Function createOgcStyleRefResolver

  • Build a StyleRefResolver backed by the server's /ogc/styles surface. The resolver fetches GET /ogc/styles/{styleId} (content-negotiated MapLibre) and projects the returned style document's layers into the per-layer HonuaStyleRefBody override map that applyStyleRefs consumes. Layer overrides are keyed by MapLibre layer id; only paint/layout/zoom/filter/metadata are carried over (structural fields such as source are intentionally dropped — a StyleRef refines existing layers).

    The presetId argument is currently advisory and not encoded into the request path; the server resolves presets server-side by styleId.

    Parameters

    Returns StyleRefResolver