Mappedin JS - v6.14.0
    Preparing search index...

    Type Alias TTakeScreenshotOptions

    Options for taking a screenshot.

    type TTakeScreenshotOptions = {
        captureMarkers?: (element: HTMLElement) => Promise<HTMLCanvasElement>;
        withLabels?: boolean;
        withOutdoorContext?: boolean;
    }
    Index

    Properties

    captureMarkers?: (element: HTMLElement) => Promise<HTMLCanvasElement>

    Optional. Function to capture HTML marker elements as canvas. When provided with withLabels, also includes markers in the screenshot.

    If the returned canvas is tainted (contains cross-origin images without CORS), the marker layer will be skipped and the screenshot will still succeed.

    To include all content, ensure:

    • Use useCORS: true in html2canvas options
    • Images have proper CORS headers (Access-Control-Allow-Origin)
    • Use scale: window.devicePixelRatio for crisp output
    • Set backgroundColor: null for transparency
    captureMarkers: (el) => html2canvas(el, {
    backgroundColor: null,
    scale: window.devicePixelRatio,
    useCORS: true,
    })
    withLabels?: boolean

    Whether to include map labels in the screenshot.

    false
    
    withOutdoorContext?: boolean

    Whether to include the outdoor context in the screenshot.

    false