Closed cr3a7ure closed 2 months ago
Hi, thanks for the pull request!
I wonder, can you prevent those download attempts be configuring bounds and zooms of the layer?
I have not studied your code in more depth TBH, but I believe it will require more logic for sure. Especially if you had in mind the base layer which covers most of the times the whole map. I am serving custom geoTIFF overlays as WMTS layers which means that they are oddly shaped. I cannot suggest a universal way to retrieve bounds/zoom/layer.
On my scenario, I retrieve the bounds of the layer via WMS Info calls on GeoServer, I set those in the extent of the leaflet map and then proceed to use saveTiles
on those bounds.
For compatibility reasons and stability we could use a flag in options
to allow those 400s be counted towards saveend
event.
I have deployed the change and monitoring the user experience.
Thanks for jumping in.
This is a common scenario when retrieving tiles beyond zoom level 19 on openstreetmaps and from other servers too. I followed the least changes approach. The saved blob, does not get rendered from leaflet. We can also return a null sized image blob.
Thanks for the time to review it.