maplibre-gl-svg-sprite - v0.1.0
    Preparing search index...

    Function registerSVGProtocol

    • Register an SVG protocol for on-the-fly parameterized icon rendering

      URL format: ${protocol}://<id>.png?color=#ff0000&width=24&pixelRatio=2

      Parameters

      • maplibre: MapLibreLike

        MapLibre GL JS instance

      • protocol: string

        Protocol name

      • icons: Record<string, string>

        Record mapping icon IDs to SVG strings

      • options: SVGProtocolOptions = {}

      Returns () => void

      Function to unregister the protocol

      If maplibre doesn't have addProtocol/removeProtocol