GeoLeaf Core API - v3.19.0
    Preparing search index...
    • Wraps a style transform so that the INCOMING style is read as it passes — before the transform appends to it the layers carried over from the previous style.

      That moment is the only one where a basemap's own layers can be told apart: once the style is live, a carried symbol layer reads exactly like one of the basemap's.

      It is also the only point that sees the style through, and so the only one that can tell a switch MapLibre had nothing to do for. MapLibre 6.7.0's Style.setState runs the transform, diffs, and — when the diff holds no operation — returns without emitting anything: no style.load. When it has operations, style.load fires in the same call, right after the transform. onPassed, when given, is therefore called in a microtask after each run of the transform, with what it returned: by then, style.load has come or will not come for that run.

      MapLibre runs a transform twice when it rebuilds a style instead of diffing it; the reading is the same both times, and onPassed is called after each.

      Parameters

      • transform: StyleTransform | null

        The adapter's transform, or null when it gave none.

      • OptionalonPassed: (rendered: NativeStyleView) => void

        Called in a microtask after each run, with the style the transform returned.

      Returns { transform: StyleTransform | null; landmarks: () => StyleLandmarks | null }

      The transform to hand to setStyle — null when none was given, so that a plain setStyle stays one —, and a reader of the landmarks: null until the transform has run.