The JMap layer id
The new selection. This is what will be selected on the map
Error if layer is not found or features format is not good
// will select feature (id = 234) of layer 4 on the map
JMap.Map.Selection.setLayerSelection(4, {
id: 234,
type: "Point",
geometry: {...},
properties: [...]
})
// will select two features (id = 234 and 567) of layer 4 on the map
JMap.Map.Selection.setLayerSelection(4, [
{
id: 234,
type: "Point",
geometry: {...},
properties: [...]
},
{
id: 567,
type: "Point",
geometry: {...},
properties: [...]
}
])
JMap.Map.Selection.setLayerSelection
Set the selection for a specific layer.
Cancel previous selection if exist, and replace by new selection