leaflet-rotate icon indicating copy to clipboard operation
leaflet-rotate copied to clipboard

Rotate mobile device path don't follow

Open ttooo opened this issue 7 months ago • 3 comments

I searched the web a lot to figure out if there was a solution and I checked your code too.

The issue is that on map rotate with fingers the path don't follow, you can try with your demo.

Here I try your sample on an iPhone 12 Pro Max (iOS 17.0.3 on Safari). I pointed with a white arrow the path, as you can see during rotation the path don't follow, it moves on its own. It's when I stop touching the map the path come back at its place.

The markers always remain at the correct spot. Not the path, polylines, etc... I don't know how to fix them. When I realeased my fingers there are always at the good spot.

rotation

Here is an other sample with my code, it does the same, but it's maybe more visible since it's more zoomed.

rotation2

Thanks a lot for your plugin it helps me a lot for my project. I just miss this feature I can't fix.

ttooo avatar Nov 19 '23 10:11 ttooo

during rotation the path don't follow, it moves on its own.

It could also be that it simply doesn't rotate.

Or it could be also related due to an "un-fired" event (leaflet-rotate → leaflet) or an "un-listened" event (leaflet-rotate ← leaflet).

The relevant touch handler file should be the following:

https://github.com/Raruto/leaflet-rotate/blob/48e97a6408df7796b3e06e6d8eb0729eb504b1be/src/map/handler/TouchGestures.js#L1-L177

but you should also check core leaflet repo (and everything related to the L.Map class) to get a better idea.

👋 Raruto

Raruto avatar Nov 22 '23 10:11 Raruto

I have the same issue on Chrome on Android. Would be nice if this could be fixed because it makes zooming/rotating with lots of polygons on the screen pretty confusing to look at.

SuNNjek avatar Dec 14 '23 12:12 SuNNjek

I'm experiencing the same. In fact, in the demo it also happens if you just zoom out a lot using desktop.

Initially I only had markers, and it was fine. But now that I have paths, the map looks broken while rotating. :(

mauriciabad avatar Feb 21 '24 17:02 mauriciabad