adam-lynch / back-of-your-hand

How well do you know your area? Test your knowledge by locating streets with this game.
https://backofyourhand.com
Mozilla Public License 2.0
79 stars 9 forks source link

Markers & polylines moves on pan or zoom #38

Closed adam-lynch closed 2 years ago

adam-lynch commented 2 years ago

This is very weird. In the following GIF, I've drawn a polyline over the street. This should always be overlayed exactly over the street.

It seems to me that it must be an issue in code, not the map tiles. Either an issue with a dependency or my CSS. I've tried updating dependencies, using the mapbox-gl CSS, and commenting out my custom layer CSS (all at the same time).

This could be related to a lot of a things;

adam-lynch commented 2 years ago

Looks like this must be an issue with Leaflet. I made some simple examples (based on MapTiler's examples):

adam-lynch commented 2 years ago

Reported to Leaflet: https://github.com/Leaflet/Leaflet/issues/8089. For now, I'm just going to set a max zoom level. It's fine up until zoom level 23.

adam-lynch commented 2 years ago

That Leaflet issue was closed as a suspected mapbox-gl integration bug. Logged;

I think I'm going to close this issue until people complain because it allows enough zoom in my opinion and two people have told me that things typically break at a deep zoom level anyway.

Stuff was never designed to work reliably at zoom level 24 and further, anyway.

- Leaflet maintainer

yes, it's common in GIS softwares with different projections for example or at a high level of precision it's like float multiplication with a lot of zero after the comma computers are bad at these things 😉

- GIS Discord