• JMap.Layer.setVisible

    Set the visibility property of the 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

    • layerId: JId

      The JMap layer id

    • isVisible: boolean

      The new visibility property value for the layer

    Returns void

    Throws

    Error if no layer found for the id

    Example

    // show layer id=5
    JMap.Layer.setVisible(5, true)

    // hide layer id=3
    JMap.Layer.setVisible(3, false)