• JMap.Layer.getSelfOrChildren

    If the layerId is a layer returns it. If the layerId is a layer group, returns all of its layers children (remove all layer groups).

    Returns an empty array if it's an empty layer group

    Parameters

    • layerId: JId

      The JMap layer id

    Returns JLayer[]

    Throws

    Error if no layer found for the id

    Example

    // returns an array with only JMap layers (no layer group)
    JMap.Layer.getSelfOrChildren(3)