If I try to make screenshots with my custom tiles, I am getting CORS errors. I don't get any errors if custom tiles are used in Leaflet map, they are fetching with http 200 status. In my browser they render like this:
When I make a screenshot, it looks like this:
and I am getting CORS errors for the same tiles they are loading without any issues.
Access to image at 'https://customTilesPlaceholder.com/tiles/orthophoto_tiles/21/608480/1304017.png' from origin 'https://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
This is how I add my custom tiles to the leaflet. The drone tileLayer doesn't appear in screenshots.
If I try to make screenshots with my custom tiles, I am getting CORS errors. I don't get any errors if custom tiles are used in Leaflet map, they are fetching with http 200 status. In my browser they render like this:
When I make a screenshot, it looks like this:
and I am getting CORS errors for the same tiles they are loading without any issues.
Access to image at 'https://customTilesPlaceholder.com/tiles/orthophoto_tiles/21/608480/1304017.png' from origin 'https://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
This is how I add my custom tiles to the leaflet. The drone tileLayer doesn't appear in screenshots.
I tried to use crossorigin option for tileLayer with empty string or true value, but then my custom tiles are not loading at all.
This is cors settings in Node.js server that is hosting map tiles:
Do you have any idea why leaflet-simple-map-screenshoter is throwing CORS errors for fetching custom tiles?