• JMap.Layer.setLayersVisibility

    Set the visibility property of multiple layers.

    For each layer:

    If it's a JMap layer, it apply the visibility to it.

    The visibility property is initialy defined on the project, and can be changed by the user through the JMap Cloud NG Core library.

    If this property is false, the layer cannot be displayed on the map.

    If it's true, the layer can be rendered on the map. The layer is rendered depending on the current map scale of the map, and the min / max scale defined for this layer.

    Parameters

    Returns void

    Throws

    Error if any layer is not found for any of the ids

    Example

    // show layers id=5 and 6, hide layer 3
    JMap.Layer.setLayersVisibility([
    {layerId: 5, visibility: true},
    {layerId: 6, visibility: true},
    {layerId: 3, visibility: false}
    ])