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

    Interface MapLike

    Interface representing a MapLibre GL JS map instance or compatible map object with image management capabilities

    interface MapLike {
        on: (type: string, handler: (e: { id: string }) => void) => void;
        off: (type: string, handler: (e: { id: string }) => void) => void;
        addImage: (
            name: string,
            image: any,
            options?: { pixelRatio?: number },
        ) => void;
        updateImage?: (
            name: string,
            image: any,
            options?: { pixelRatio?: number },
        ) => void;
        removeImage?: (name: string) => void;
        hasImage?: (name: string) => boolean;
        triggerRepaint?: () => void;
        getCanvas?: () => HTMLCanvasElement;
        canvas?: HTMLCanvasElement;
    }
    Index

    Properties

    on: (type: string, handler: (e: { id: string }) => void) => void

    Add an event listener

    off: (type: string, handler: (e: { id: string }) => void) => void

    Remove an event listener

    addImage: (name: string, image: any, options?: { pixelRatio?: number }) => void

    Add an image to the map's style

    updateImage?: (
        name: string,
        image: any,
        options?: { pixelRatio?: number },
    ) => void

    Update an existing image in the map's style

    removeImage?: (name: string) => void

    Remove an image from the map's style

    hasImage?: (name: string) => boolean

    Check if an image exists in the map's style

    triggerRepaint?: () => void

    Trigger a map repaint

    getCanvas?: () => HTMLCanvasElement

    Retrieve the map's canvas (MapLibre GL)

    canvas?: HTMLCanvasElement

    Fallback canvas reference for compat layers