JMap.Map.Selection.addFeaturesToLayerSelection
Add to the current layer selection the provided feature(s).
Don't cancel previous selection, but add features to it.
The JMap layer id
The feature(s) that will be selected on the map
JMap.Map.Selection.clearLayersSelection
Clear selection for all specified layers.
The JMap layer ids passed as an array
JMap.Map.Selection.clearSelection
Clear all selection.
If a layer id is provided, clear only the layer selection, else clear selection of all layers.
The JMap layer id
JMap.Map.Selection.getSelectedFeatureIdsForLayer
Returns the current selected feature ids for a specific JMap layer.
This function is the equivalent of that code :
// returns the same as JMap.Map.getSelectedFeatureIdsForLayer(3)
JMap.Map.Selection
.getSelectedFeaturesForLayer(layerId)
.map(feature => feature.id)
JMap.Map.Selection.getSelectedFeatures
Returns the current map selection as a javascript map (= a javascript object) where :
JMap.Map.Selection.getSelectedFeaturesForLayer
Returns the current selected features for a specific JMap layer.
an array of GeoJSON features
JMap.Map.Selection.getSelectionCentroid
a JMapSelection object
a JLocation representing the centroid of the selection
JMap.Map.Selection.isEmpty
Returns true if no selection is made for all layers.
If at least one feature is selected on one layer, returns false.
JMap.Map.Selection.isEmptyByLayerId
Returns true if no selection is made for the specified layer.
If at least one feature is selected on the layer, returns false.
JMap.Map.Selection.removeFeaturesFromLayerSelection
Remove from current layer selection the provided feature(s).
Don't cancel previous selection, just remove feature(s) from it.
The JMap layer id
The feature id(s) that will be remove from the layer selection
JMap.Map.Selection.selectOnAllLayersAtLocation
Select for all layers the features that are at the location.
Same behavior as if you were clicking on the map in order to select features.
The location where you want feature selection
selection parameters, see JMapSelectionParams
The new feature selection
JMap.Map.Selection.selectOnAllLayersFromCircle
Select for all layers the features that intersect the circle.
The circle
selection parameters, see JMapSelectionParams
The new feature selection
JMap.Map.Selection.selectOnAllLayersFromLine
Select for all layers the features that intersect the line.
The line
selection parameters, see JMapSelectionParams
The new feature selection
JMap.Map.Selection.selectOnAllLayersFromPolygon
Select for all layers the features that intersect the polygon.
The polygon
selection parameters, see JMapSelectionParams
The new feature selection
JMap.Map.Selection.selectOnOneLayerAtLocation
Select for specific layer its features that are at the location.
Same behavior as if you were clicking on the map in order to select features, but for only one layer.
The JMap layer id
The location where you want feature selection
selection parameters, see JMapSelectionParams
The features array
JMap.Map.Selection.selectOnOneLayerFromCircle
Select for specific layer its features that intersect the circle.
The JMap layer id
The circle
selection parameters, see JMapSelectionParams
The features array
JMap.Map.Selection.selectOnOneLayerFromLine
Select for specific layer its features that intersect the line.
The JMap layer id
The line
selection parameters, see JMapSelectionParams
The features array
JMap.Map.Selection.selectOnOneLayerFromPolygon
Select for specific layer its features that intersect the line.
The JMap layer id
The line
selection parameters, see JMapSelectionParams
The features array
JMap.Map.Selection.setLayerSelection
Set the selection for a specific layer.
Cancel previous selection if exist, and replace by new selection
The JMap layer id
The new selection. This is what will be selected on the map
JMap.Map.Selection.setLayersSelection
Set the selection for multiple layers.
For each layer:
sets the selection of the specified layer with the new selection. Previous selection will be cleared.
an array of JSelectionSetLayersSelectionParams
JMap.Map.Selection
You can select features on the map with JMap, this where you can manage the selection.
You can select on the map programatically by passing a location, or by passing features.
And you can also removing some or all features of the selection.