umap
umap copied to clipboard
Restrict zoom levels available for custom backgrounds
We (SOSM) just had a map configuration by one of our users make their map unusable and lead to a browser crash for anybody viewing the map which, because it was a recent addition, did the same for everybody visiting our umap instance.
It seems (this isn't quite repeatable) that the user set the max_zoom parameter for a custom layer to 60, that caused the issue. Regardless of that I believe it would be best practice to limit the zoom pickers to a reasonable range (0-24) instead of them being unbounded.
Hey @simonpoole I'm failling to reproduce the issue just setting a max zoom value. Can you point me to the map so I can investigate ?
Hi @yohanboniface it was this https://umap.osm.ch/de/map/dd-kletternch_3872#7/46.167/10.300 map. Manually changing (in the json) the max_zoom from 60 to 22 fixed the issue, adding @datendelphin as he actually fixed it.
Can't reproduce it either with a new map. But changeing it from 60 to 22 definitely resolved the issue for that map. Unfortunately no idea what else is needed to trigger it.
I'm closing it since it's an edgy case which has a workaround.