I'm trying to export the map, but I'm always getting the same error:
Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.I have the following code:
var canvas = event.context.canvas;var exportPNGElement = document.createElement('a');exportPNGElement.download = 'Mapa.png';exportPNGElement.href = canvas.toDataURL('image/png');document.body.appendChild(exportPNGElement);exportPNGElement.click();document.body.removeChild(exportPNGElement);What is wrong? Do you have any idea?
أكثر...
Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.I have the following code:
var canvas = event.context.canvas;var exportPNGElement = document.createElement('a');exportPNGElement.download = 'Mapa.png';exportPNGElement.href = canvas.toDataURL('image/png');document.body.appendChild(exportPNGElement);exportPNGElement.click();document.body.removeChild(exportPNGElement);What is wrong? Do you have any idea?
أكثر...