GeoLeaf Core API - v3.19.0
    Preparing search index...
    • Applies a basemap via map.setStyle() — full style replacement.

      Used for all transitions where the source or target basemap is vector: raster→vector, vector→raster, vector→vector.

      The GeoLeaf-owned sources/layers of the current style are carried into the incoming style via transformStyle (a setStyle option since v5; see the adapter's buildStyleChangeTransform), so they survive the swap natively — no teardown, no re-injection (the former geoleaf:style:rebuild dance; audit redundancy #1).

      After the new style loads — or, when MapLibre had nothing to apply and so fired no style.load, once the style has passed through the transform and the live style has the shape it rendered (going back to the vector basemap whose style the map holds, while another one downloads):

      1. Puts back the runtime images (hatch patterns, sprite icons) a style REBUILD wiped — the engine keeps them when it can diff the two styles.
      2. Applies the target basemap (raster source/layer inserted at the bottom, or vector filters), then its hillshade overlay if it declares one — the style change dropped the previous basemap's.
      3. Brings the terrain in line with the target — put on at once when it declares terrain.default3D, bound to the tilt when its terrain.activation is "pitch".
      4. Dispatches geoleaf:basemap:change.

      Parameters

      Returns void