GeoLeaf Core API - v3.0.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;
        getFilter(layerId: string): unknown;
        setFilter(layerId: string, filter: unknown): void;
        easeTo(options: { pitch?: number; bearing?: number }): void;
        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

    Methods

    • Parameters

      • options: { source: string; exaggeration?: number } | null

      Returns void