markerjs2 icon indicating copy to clipboard operation
markerjs2 copied to clipboard

Error show me when a i can save image.

Open chiragDesaiPantherCodx opened this issue 3 years ago • 1 comments

core.js:4002 ERROR DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. at Image.h.onload [as __zone_symbol__ON_PROPERTYload] (http://localhost:4200/app-views-pages-tests-tests-module.js:5083:5795) at Image.wrapFn (http://localhost:4200/polyfills.js:4630:39) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:3772:31) at Object.onInvokeTask (http://localhost:4200/vendor.js:91108:33) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:3771:60) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (http://localhost:4200/polyfills.js:3544:47) at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (http://localhost:4200/polyfills.js:3847:34) at invokeTask (http://localhost:4200/polyfills.js:5042:14) at Image.globalZoneAwareCallback (http://localhost:4200/polyfills.js:5068:17)

chiragDesaiPantherCodx avatar Apr 06 '22 06:04 chiragDesaiPantherCodx

This is likely because you are annotating the image from an external source and CORS cause this. Start by setting crossorigin="anonymous" on your image.

ailon avatar Apr 06 '22 07:04 ailon