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

    Class OverlayText

    Post-processing operation to overlay text on an image

    Supports query parameters: text, label, fontSize, fontWeight, fontFamily, textColor, fill, textStroke, textStrokeWidth, textPadding, textAnchor, anchor, tx, ty, textAutoColor (boolean), textUppercase (boolean)

    const op = new OverlayText();
    // Use with params: ?text=Hello&fontSize=20&textColor=red

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Create a new text overlay operation

      Parameters

      • id: string = 'overlayText'

        Optional identifier for debugging

      Returns OverlayText

    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>