rowanwins / leaflet-easyPrint

A leaflet plugin which adds an icon to print the map - Demo @ http://rowanwins.github.io/leaflet-easyPrint/
MIT License
248 stars 137 forks source link

how to detect cors errors #103

Open barbalex opened 4 years ago

barbalex commented 4 years ago

Lots of people are running into the issue with cors preventing printing.

Is there a way to detect that network calls for maps return cors errors?

That would be great because the ui could then inform the user and maybe the user can choose a different background map that does send cors headers.

Also: when the option hideControlContainer is set to true the menus disappear and probably because of the error never reappear. Maybe I can find something to circumvent that behaviour if cors errors can be detected.