• JMap.Layer.deleteLayer

    Deletes the layer in the data store and in the map.

    The layer is not deleted server side, but only in the browser.

    Use this function if you want to dynamically remove a layer.

    Parameters

    • layerId: JId

      The JMap layer id

    Returns void

    Throws

    Error if layer is not found

    Example

    // Removes layer 4 (only client side)
    JMap.Layer.deleteLayer(4)