• JMap.Layer.isVisible

    Returns the tree element visibility property.

    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

    • Optional checkParentVisibility: boolean

      If true will check if all parent elements have the property visible equals to true

    Returns boolean

    Throws

    Error if no layer found for the id

    Example

    // returns false if layer id=3 is not set as visible
    JMap.Layer.isVisible(3)