zbycz / osmapp

Lets make a universal app for OpenStreetMap
https://osmapp.org
GNU General Public License v3.0
192 stars 15 forks source link

User can zoom in to NaN when scrolling #381

Closed kudlav closed 3 months ago

kudlav commented 3 months ago

Zooming in can cause zooming into the terrain when using a map with tilted terrain. Results into broken app and the URL: https://osmapp.org/#NaN/49.2177/16.6333

It's hard to restore the app. After refreshing the site, the following error occurs. The app should reset the zoom and position when the position becomes invalid. obrazek

To fix the website use has to:

  1. change URL to valid (e.g. https://osmapp.org/#10/49.2177/16.6333)
  2. press enter
  3. refresh the page
kudlav commented 3 months ago

Tested with Firefox 127, Chrome 126 GIF 22 06 2024 12-51-13

zbycz commented 3 months ago

Fixed both saving invalid zoom to URL and crashing on invalid view from other causes. Thanks for a great report. 👍

btw, it looks like an issue in maplibre-gl if you wanted to report there

kudlav commented 3 months ago

Existing maplibre-gl-js issue: https://github.com/maplibre/maplibre-gl-js/issues/4235

zbycz commented 1 month ago

maplibre 4.5.2 is also fixing the underlying issue "Fix camera being able to move into 3D terrain"

Updated here https://github.com/zbycz/osmapp/issues/381 & deployed right now.

kudlav commented 1 month ago

Fix of the crash is still in progress: https://github.com/maplibre/maplibre-gl-js/issues/1542

zbycz commented 1 month ago

I see, thanks - so they probably put wrong issue in the Relase notes 😄 https://github.com/maplibre/maplibre-gl-js/releases/tag/v4.5.2