• 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.

    Parameters

    Returns void

    Throws

    Error if any layer is not found for any of the ids, or if any of the layers is not a vector layer or if the params array is either not an array or an empty array

    Example

    // set selection on layers id=5 and 6. Layer 6 selection will be emptied (empty array passed)
    JMap.Map.Selection.setLayersSelection([
    {layerId: 5, selectability: [...features...]},
    {layerId: 6, selectability: []}
    ])