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

    Map configuration section

    interface MapConfig {
        target?: string;
        id?: string;
        bounds?: [[number, number], [number, number]];
        center?: [number, number];
        zoom?: number;
        maxZoom?: number;
        minZoom?: number;
        initialMaxZoom?: number;
        padding?: [number, number];
        positionFixed?: boolean;
        boundsMargin?: number;
        mapOptions?: Record<string, unknown>;
    }
    Index

    Properties

    target?: string

    HTML element ID for the map container.

    id?: string

    Alias for target (legacy).

    bounds?: [[number, number], [number, number]]

    Geographic bounds: [[south, west], [north, east]]. Required.

    center?: [number, number]

    Initial map center [lat, lng].

    zoom?: number

    Initial zoom level.

    maxZoom?: number

    Maximum zoom level.

    minZoom?: number

    Minimum zoom level.

    initialMaxZoom?: number

    Alias for maxZoom (legacy). Used by CoreMapModule.

    padding?: [number, number]

    Padding in pixels applied to fitBounds ([top/bottom, left/right]).

    positionFixed?: boolean

    When true, restricts panning/zooming to bounds.

    boundsMargin?: number

    Degree by which bounds are padded when positionFixed is true. Default 0.3.

    mapOptions?: Record<string, unknown>

    Raw MapLibre GL map options forwarded to the MapLibre Map constructor.