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

    Options passed to IMapAdapter.init() to configure the map instance.

    The index signature allows adapters to forward engine-specific options (e.g. MapLibre style) without breaking the contract.

    interface MapInitOptions {
        container: string | HTMLElement;
        center?: GeoLeafLatLng;
        zoom?: number;
        minZoom?: number;
        maxZoom?: number;
        maxPitch?: number;
        bounds?: GeoLeafBounds;
        preserveDrawingBuffer?: boolean;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

      Forward-compatibility escape hatch for engine-specific options.

    Index

    Properties

    container: string | HTMLElement

    DOM element or CSS selector of the map container.

    center?: GeoLeafLatLng

    Initial map center. Defaults to the adapter's built-in default.

    zoom?: number

    Initial zoom level.

    minZoom?: number

    Minimum allowed zoom level.

    maxZoom?: number

    Maximum allowed zoom level.

    maxPitch?: number

    Maximum pitch in degrees (0–85). MapLibre default: 60.

    bounds?: GeoLeafBounds

    Initial bounds — fitBounds() is called after map creation when provided.

    preserveDrawingBuffer?: boolean

    Keeps the WebGL framebuffer readable after rendering (canvas.toDataURL / toBlob). Required by the print plugin for off-screen capture and live canvas preview. Incurs a small memory/perf overhead — enable only when needed. Set automatically when the print plugin is registered (Sprint 2); opt-in here for manual activation.