Skip to content

Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. #130

Open
@RonLibero

Description

@RonLibero

When we use the 'leaflet-groupedlayercontrol' plugin, together with this EasyPrint plugin, we get an error by exporting the image.

 L.easyPrint({
            sizeModes: ['Current', 'A4Landscape', 'A4Portrait'],
            exportOnly: true,
            hideControlContainer: true,
        }).addTo(map);

On click export image, we receive the next console error:

oops, something went wrong! DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
    at i3 (https://cityview.test:5173/node_modules/.vite/deps/leaflet-easyprint.js?v=55796427:66:71)

is there anyone who has a solution for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions