GeoLeaf Core API - v3.0.0
    Preparing search index...
    VectorTiles: {
        shouldUseVectorTiles(def: VtLayerDef): boolean;
        _getVTConfig(def: VtLayerDef | null): VtConfig | null;
        _resolveTileUrl(def: VtLayerDef, vtConfig: VtConfig): string | null;
        loadVectorTileLayer(
            layerId: string,
            layerLabel: string,
            def: VtLayerDef,
            _baseOptions: Record<string, unknown>,
        ): Promise<
            {
                id: string;
                label: string;
                featureCount: number;
                isVectorTile: boolean;
            },
        >;
        updateLayerStyle(
            layerId: string,
            styleData: GeoJSONCurrentStyle | null,
        ): void;
    } = ...

    Type Declaration

    • shouldUseVectorTiles: function
      • Determines if a layer definition should use vector tiles. Returns true only when the VT config provides an absolute tile URL. Relative paths (auto-generated from profile structure) are not used because PBF files may not exist — the layer falls back to GeoJSON.

        Parameters

        Returns boolean

    • _getVTConfig: function
    • _resolveTileUrl: function
      • Resolves the full tile URL template from the layer definition.

        ⚠️ The tilesDirectory fallback below is UNREACHABLE from the production flow, and deliberately so. _createVectorTileLayer only calls this after shouldUseVectorTiles() has returned true, and that guard requires an ABSOLUTE tilesUrl — so by the time we get here, the first branch always wins. The derived …/{z}/{x}/{y}.pbf path is therefore dead code in practice.

        It is kept, not purged (R.33, backlog résiduel S5). Two reasons: it is covered by 13 assertions across __tests__/geojson/vector-tiles.test.js and __tests__/config/s13-layer-data.test.js, several of them asserting the derived path specifically; and it becomes live again the moment the absolute-URL guard is relaxed, which is what "arming" a profile's vector tiles would mean. Removing it would delete tested behaviour to fix a promise that was really a data problem — the six tourism layers that declared enabled:true without a tilesUrl have been disarmed in the profiles instead.

        Parameters

        Returns string | null

    • loadVectorTileLayer: function
      • Creates a vector tile layer by delegating to the adapter, then binds interactions and records shared state. The adapter builds one vector source and up to 3 render layers (fill/line/circle) from the resolved spec.

        Parameters

        • layerId: string

          Unique layer ID.

        • layerLabel: string

          Display label.

        • def: VtLayerDef

          Normalised layer definition (must include vectorTiles block).

        • _baseOptions: Record<string, unknown>

          Base options (unused in MapLibre mode).

        Returns Promise<
            {
                id: string;
                label: string;
                featureCount: number;
                isVectorTile: boolean;
            },
        >

        Layer metadata.

    • updateLayerStyle: function