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

    Function syncTerrainToBasemap

    • Brings the terrain in line with the basemap that just became active. Called once the basemap is in place, on every activation path; this is where the activation mode is decided, and nowhere else.

      • terrain.activation: "pitch": the terrain follows the tilt from now on. When the basemap it takes over from did too, the binding is handed over in place: a terrain that is on stays on, with no write when both read the same elevation source at the same exaggeration.
      • terrain.default3D: the terrain is put on and the camera posted, as activateTerrain does. The same basemap applied AGAIN on the same map — a refresh — is neither torn down nor posted again: its source and its terrain are checked, written only if they went missing, and the camera stays where the visitor left it.
      • Neither: whatever the previous basemap held is released.

      Leaving a basemap whose terrain was put on by its selection flattens the camera, as it always did (deactivateTerrain). Leaving one whose terrain followed the tilt never moves it.

      Parameters

      • map: NativeMap | null

        The native maplibregl.Map instance.

      • definition: BasemapDefinition

        The definition of the basemap now active.

      • key: string

        Its key.

      Returns void