-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Popups and markers lag behind the map during pan animation #4670
Comments
This is true not only for popups for markers also. Generally, things that are DOM elements placed on top of the rendered canvas. |
Looks like it may be a timing issue after all. The DOM appears to be a frame ahead of the canvas when the pan easing animation is in effect. The attached gist is a proof of concept which injects one frame of latency to the popup transform. The latency is added only if the It doesn't completely solve the misalignment but does significantly improve it for me. I believe the remainder of the misalignment may be due to the I'm happy to work towards a PR if you guys have an idea of how to tackle this. I don't think that latency hack is a viable solution in itself. https://gist.github.com/bicubic/272f56341b55689982c60e32c7b28242 |
Please take a look at #4681 I was able to get popups fully aligned with two changes: DOM transform updates are not applied immediately but buffered via new function Second change is |
It would be great if this could be fixed. I find it is highly dependent on the browser. Chrome and Firefox are pretty much always in sync, but most other browsers (Safari, IE, Edge) have a noticeable lag which doesn't look good. |
@dagjomar I experience the same mostly in IE 11 and Safari. When dragging mapboxgl.Marker drags behind so it gives a rubber band effect. I have not figured out a way to stop this other than have users use Chrome. |
Not sure if this is the same bug, but map.fitBounds() exhibits the same behavior, even on Chrome. It seems that the markers are one frame ahead of the map. As a workaround I used an ease-in easing to keep the marker from jumping way ahead on the first frame |
Still seeing the issue as described on Safari (not tested on IE / Edge) with the latest version (v0.42.1) of Overall, MapBox looks incredible and far more appealing than Google Maps but unfortunately, this is pretty much a deal-breaker in terms of using it in our current project. Any update on the status of this issue (even if it's a 'no fix coming soon') would be greatly appreciated :) |
I agree it would be great to know if this can be fixed. I am hoping it might be related to this issue #5390 as the behaviour looks very similar so it may fix that as well |
@jfirebaugh I'm still seeing this on Safari and Mobile Safari (but not Chrome or Firefox): |
@ChrisLoer @jfirebaugh It's still there in IE11 and Edge as well (where it has always been worse). I was hoping it would also fix this #5390 but I still see it...especially in IE11 and Edge. Although its a different use case it does look like similar behaviour. |
Tracking the "map lags popups and markers" issue in #5390. |
Any update on this? I'm experiencing the same issues here |
Hey, I still have this problem, regardless of the browser it works the same. 3b584b404db49dbe1c5f65cbbcd937e1.mp4 |
Issue can be seen at https://www.mapbox.com/mapbox-gl-js/example/popup/
Perform a pan gesture with the mouse and lift the mouse button while still moving the cursor so the map continues to pan for a bit. Alternatively, use the arrow buttons to pan the map.
During the animation, the popup appears to be located a few pixels (one frame?) behind the map. Quite jarring on touch screen experiences.
The text was updated successfully, but these errors were encountered: