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

    Structural view of the raw MapLibre GL Map as consumed by the basemaps module. Argument types are intentionally permissive (Record<string, unknown> specs, generic listeners) because the registry assembles specs dynamically and patches filter expressions in place — the same loose-spec style the module has always used. Backed at runtime by a genuine maplibregl.Map (see MaplibreMap).

    interface NativeMap {
        addSource(id: string, source: Record<string, unknown>): void;
        addLayer(layer: Record<string, unknown>, before?: string): void;
        removeSource(id: string): void;
        removeLayer(id: string): void;
        getSource(id: string): NativeSourceView | undefined;
        getLayer(id: string): unknown;
        getStyle(): NativeStyleView | undefined;
        setStyle(
            style: unknown,
            options?: { diff?: boolean; transformStyle?: StyleTransform },
        ): void;
        setTerrain(options: { source: string; exaggeration?: number } | null): void;
        getTerrain(): { source: string; exaggeration?: number } | null;
        getFilter(layerId: string): unknown;
        setFilter(layerId: string, filter: unknown): void;
        setLayoutProperty(layerId: string, name: string, value: unknown): void;
        easeTo(options: { pitch?: number; bearing?: number }): void;
        jumpTo(options: { pitch?: number; bearing?: number }): void;
        getPitch(): number;
        getMaxPitch?(): number;
        isMoving(): boolean;
        loaded(): boolean;
        isStyleLoaded(): boolean;
        on(type: string, listener: (e: NativeMapErrorEvent) => void): unknown;
        off(type: string, listener: (e: NativeMapErrorEvent) => void): unknown;
        once(type: string, listener: () => void): unknown;
    }
    Index
    • The terrain the map holds, or null — the engine resets it whenever it rebuilds a style.

      Returns { source: string; exaggeration?: number } | null

    • Posts the camera with NO animation — see terrain.ts on why the tilt cannot be animated.

      Parameters

      • options: { pitch?: number; bearing?: number }

      Returns void