The JMap layer id
The feature(s) that will be selected on the map
Error if layer is not found or features format is not good
// Add one feature (id = 234) to layer 4 selection
JMap.Map.Selection.addFeaturesToLayerSelection(4, {
id: 234,
type: "Point",
geometry: {...},
properties: [...]
})
// Add 2 features (id = 234 and 567) to layer 4 selection
JMap.Map.Selection.addFeaturesToLayerSelection(4, [
{
id: 234,
type: "Point",
geometry: {...},
properties: [...]
},
{
id: 567,
type: "Point",
geometry: {...},
properties: [...]
}
])
JMap.Map.Selection.addFeaturesToLayerSelection
Add to the current layer selection the provided feature(s).
Don't cancel previous selection, but add features to it.