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

    Function refreshBasemap

    • Re-applies the active raster basemap when its source has been lost from the style without a deliberate basemap switch (e.g., race with a plugin that adds layers inside the same map.on("load") dispatch as the deferred setBaseLayer).

      No-op when:

      • no basemap is considered active (_activeKey is null)
      • the active basemap is vector (managed by setStyle, not this path)
      • the basemap source is already present in the style
      • the active basemap is a WMTS one whose GetCapabilities is still resolving: the resolution builds the source when it lands

      A WMTS basemap whose source is gone is resolved again rather than re-applied as it stands — so it comes back asynchronously, where every other raster type comes back before this returns.

      The active basemap's hillshade overlay and terrain are checked along with it, and put back when they went missing. The camera is left where the visitor put it: a refresh never posts the basemap's pitch and bearing again.

      Does NOT emit geoleaf:basemap:change — this is an internal re-apply, not a user-visible basemap change.

      Returns void