GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Builds a transformStyle callback that carries the GeoLeaf-owned sources and layers from the previous style into the next one, appending the layers after the incoming basemap layers so they render on top (correct z-order). The raster basemap injection path re-inserts its layer at the bottom independently, so a vector→raster swap keeps GeoLeaf layers on top as well.

      Ownership is passed in (snapshotted from the adapter's layer registry) rather than inferred from id conventions, so the merge is authoritative. Preserved layers keep their serialized paint/layout (e.g. taxonomy match expressions and visibility), and GeoJSON sources keep their serialized data — hence the rebuild is unnecessary.

      Parameters

      • owned: OwnedStyleIds

        The source/layer ids GeoLeaf owns at swap time.

      Returns StyleTransform

      A transformStyle callback for map.setStyle(next, { transformStyle }).