-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotate mobile device path don't follow #43
Comments
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: leaflet-rotate/src/map/handler/TouchGestures.js Lines 1 to 177 in 48e97a6
but you should also check core leaflet repo (and everything related to the 👋 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. |
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. :( |
Hi, for those who need a fix for that, adding this block of code inside Might create a PR if @Raruto think it is ok. if (this.zoom) {
if (this._map.options.zoomAnimation) {
this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap);
} else {
this._map._resetView(this._center, this._map._limitZoom(this._zoom));
}
} |
@mauriciabad @ttooo @SuNNjek do you confirm this solution? #61 |
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.
Here is an other sample with my code, it does the same, but it's maybe more visible since it's more zoomed.
Thanks a lot for your plugin it helps me a lot for my project. I just miss this feature I can't fix.
The text was updated successfully, but these errors were encountered: