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

    Class OverlaySvg

    Post-processing operation to overlay SVG icons on an image

    Supports query parameters: overlay, ovl, ofg, overlayFg, obg, overlayBg, fg, bg, pixelRatio, anchor, ow, oh, ox, oy

    const op = new OverlaySvg({ marker: '<svg>...</svg>' });
    // Use with params: ?overlay=marker&ow=32&oh=32&anchor=center

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Create a new SVG overlay operation

      Parameters

      • svgIcons: Record<string, string>

        Record mapping icon IDs to SVG strings

      • id: string = 'overlaySvg'

        Optional identifier for debugging

      Returns OverlaySvg

    Properties

    id?: string

    Unique identifier or descriptive name

    Methods

    • Execute the post-processing operation

      Parameters

      • ctx: CanvasRenderingContext2D

        Canvas 2D rendering context

      • W: number
      • H: number
      • params: Record<string, string>

        Query parameters from the image request

      Returns Promise<void>