GeoLeaf Core API - v3.19.0
    Preparing search index...

    Internal registry for MapLibre layers managed by the adapter.

    One instance per adapter. All mutations are through explicit methods — callers never modify entries directly.

    Index
    • Registers a new GeoLeaf layer with its MapLibre sub-layers.

      Parameters

      • layerId: string

        GeoLeaf layer identifier.

      • subLayerTypes: SubLayerType[]

        Which sub-layer types were created.

      • zIndex: number

        The rank the layer is registered under.

      • Optionaloptions: {
            isVectorTile?: boolean;
            sourceLayer?: string;
            customSubLayerIds?: string[];
            geometryTypes?: Set<string>;
        }

        Additional options (vector tile, source-layer, custom IDs).

        • OptionalisVectorTile?: boolean
        • OptionalsourceLayer?: string
        • OptionalcustomSubLayerIds?: string[]

          Override auto-generated sub-layer IDs (e.g. for cluster layers).

        • OptionalgeometryTypes?: Set<string>

          GeoJSON geometry-type vocabulary present on the layer.

      Returns LayerRegistryEntry

    • Records sub-layers added to a layer AFTER its registration — a layer that received a geometry it had no sub-layer for (growGeoJSONLayer).

      subLayerIds is read bottom-up by the ordering code — its first id is the bottom of the layer's stack, which getInsertBeforeId anchors other layers on — so the list is put back in the order the engine DRAWS, never appended to.

      Parameters

      • layerId: string

        GeoLeaf layer identifier.

      • added: readonly SubLayerType[]

        The sub-layer families added.

      • geometryTypes: Iterable<string>

        The GeoJSON geometry types the layer now also holds.

      • drawingOrder: readonly string[]

        Every layer id of the style, bottom first.

      Returns boolean

      true if the layer is registered; false otherwise, and nothing changed.

    • Records a new rank for a registered layer, and moves its entry to the END of the registry.

      The move is what keeps getInsertBeforeId right. A re-ranked layer is drawn above the layers already holding its new rank, and that method takes the FIRST entry of a rank for the bottom of its group. An entry re-ranked where it stood could be that first entry while drawn on top of the group: the next layer inserted under that rank would anchor on it, and end above layers it belongs under.

      Parameters

      • layerId: string

        GeoLeaf layer identifier.

      • zIndex: number

        The rank the layer is now drawn at.

      Returns boolean

      true if the layer is registered; false otherwise, and nothing changed.

    • Computes the beforeId for placing a layer at the given z-index.

      Finds the entry with the lowest strictly higher z-index and returns its first sub-layer ID. If none exists, returns the sentinel layer ID so the layer goes just below the POI boundary. Among entries of the same rank the first registered answers: it is the bottom of its group, every later layer of that rank having been placed above it.

      Parameters

      • zIndex: number

        The z-index of the layer being placed.

      • OptionalexcludeLayerId: string

        A layer left out of the search: the one being re-ranked, which must not anchor on itself.

      Returns string

      The MapLibre layer ID to pass as beforeId to map.addLayer() or map.moveLayer().