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

    3D terrain configuration of a basemap: a raster-dem elevation source the map is draped over. Read whatever the basemap type.

    interface TerrainConfig {
        enabled: boolean;
        demUrl?: string;
        demEncoding?: "terrarium" | "mapbox";
        demMaxZoom?: number;
        exaggeration?: number;
        activation?: "basemap" | "pitch";
        activateFromPitch?: number;
        deactivateBelowPitch?: number;
        default3D?: boolean;
        pitch?: number;
        bearing?: number;
    }
    Index
    enabled: boolean

    Enables 3D terrain rendering for this basemap. Default: false.

    demUrl?: string

    URL template for the raster-dem tile source (MNT/DTM tiles). Required when enabled is true. Examples:

    demEncoding?: "terrarium" | "mapbox"

    Tile encoding format. Default: "terrarium".

    demMaxZoom?: number

    Maximum zoom level available for DEM tiles. Default: 15.

    exaggeration?: number

    Vertical exaggeration factor. Default: 1.5. Recommended range: 1.0–3.0.

    activation?: "basemap" | "pitch"

    What puts the terrain on.

    • "basemap" (default): selecting the basemap does, when default3D is true. The camera is then posted to pitch and bearing, and eased back flat when the basemap is left.
    • "pitch": the terrain follows the tilt of the camera. It is absent while the map is flat — no elevation tile is requested —, put on once the camera comes to rest tilted to activateFromPitch or more, and removed once it comes to rest under deactivateBelowPitch. Between the two it stays as it was. The decision is taken when a movement ENDS, never during it, and the camera is never moved: default3D, pitch and bearing have no role in this mode, and the profile schema refuses them there.
    activateFromPitch?: number

    activation: "pitch" only: tilt, in degrees, from which the terrain is put on. Above 0, at most 85 — and no higher than the map's maxPitch, or the terrain can never show. Default: 12.

    deactivateBelowPitch?: number

    activation: "pitch" only: tilt, in degrees, under which the terrain is removed. Must be lower than activateFromPitch: one threshold for both would put the terrain on and off between two movements that end around it. Default: half of activateFromPitch.

    default3D?: boolean

    When true, the 3D terrain is activated when this basemap is selected, and deactivated when another one is. Without it — and without activation: "pitch", the only other thing that activates a terrain — an enabled terrain is never drawn: no control lets the user turn it on or off. Not read with activation: "pitch". Default: false.

    pitch?: number

    Camera pitch in degrees, posted when the terrain is activated by the selection of the basemap. Not read with activation: "pitch", which never moves the camera. Default: 45.

    bearing?: number

    Camera bearing in degrees, posted when the terrain is activated by the selection of the basemap. Not read with activation: "pitch", which never moves the camera. Default: 0.