-
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
Calling easeTo/flyTo while updating the bearing and rapidly zooming crashes zoom #9793
Comments
This report is not actionable on our end as is. Can you be more specific about what "buggy" means? It would also be very helpful to include an example of the issue you're reporting in JSBin or something similar. I am not seeing any issue with zoom when I try it. I'm going to close this for now. Feel free to update and reopen. |
buggy = is not responsive, very hard to change and after few minutes completely freeze |
I still don't see any issue with zooming. We need more specifics to go on. Do you see this on every map or just with certain styles/interactions/setups (if the latter, provide a JSBin example showing the specific circumstance that causes an issue)? What are the specs of your GPU? What system are you running on? |
I use it on a robotics website : https://www.vigibot.com/ to show location of some robots (realtime websocket one page app). You can select the 24/7 demo robot named "Bubot", real GPS @ 10Hz you can look the small GPS noise @ maximum zoom. I move a basic Marker @ 10Hz, I reduced the easeTo() @ maximum 1Hz because @ 10Hz all users get the Pan/Zoom unusable/locked after few use (any browsers desktop / any mobiles devices) My code could not be more minimalist :
|
I think I'm still not 100% clear on what it is you're trying to do or experiencing. Let me clarify. On your website, users can move robots around and as the robot moves, you update the map with a marker to display the robot's position and bearing. By 10Hz, you mean that you're updating the marker 10 times per second. Is that correct? When I looked at your website, the map zoomed just fine and appeared to update fine as well. If you need to update your marker frequently or effectively animate it, we have some examples such as https://docs.mapbox.com/mapbox-gl-js/example/animate-marker/ that may be helpful. I think this may be a question better suited for Mapbox Support because I don't think it's a bug in GL JS. |
The problem is not the marker. Always perfect update. |
Manual pan and zoom freeze when we use automatic pan/zoom @ more than few Hz. |
I still am not seeing any issue with easeTo or flyTo on my computer using Chrome on MacOS Catalina. At this point, unless you can isolate the issue to a minimal, reproducible example on a site like JSBin (e.g. not your own website but something where we can easily see and interact with the code), I'm afraid there's not much we can do to help. I don't believe there's a bug in GL JS though so you may be able to get further help on working through a problem like this by contacting Mapbox support. |
I make a basic minimal html file with sinus cosinus fake coordinate @ 10Hz... |
Here is the minimal code to display the bug, same problem on last firefox/ last chrome mobile and desktop : https://www.serveurperso.com/temp/test.html Zoom working for about few sec... use F5 to reset and zoom work again, and stop again after few second.
|
Great, thanks! I'll take a look |
OK that was very helpful. I do see the error you're reporting and in fact after doing some research, I see that the same error was reported awhile back in #7523 but we were never able to isolate a test case. I managed to simplify your test case even more and make a live example of it. If you zoom in and out rapidly on that page, you should trigger the error within a few seconds (I seemed to have slightly more difficulty triggering it on JSBin than I did locally for some reason). The map will continue updating its position but zooming will no longer be possible and you should see What's interesting is that this only seems to happen when Lines 1209 to 1217 in 1299199
specifically line 1211. While |
For what it's worth we noticed a bunch of production errors for "this._onEaseFrame is not a function". On our map a UI control that only calls zoomIn is throwing the error when rapidly clicked. No easing, bearing, etc in play at all. |
@leigeber Are you able to isolate an example that reproduces this bug? That would be super helpful in figuring out what's wrong. |
@ryanhamley After digging we do actually have an easeTo call deep in the code with bearing and pitch set to 0 tied to the zoomend event. Easy enough to check if the ease is needed to resolve on our end. Sounds like what you were describing above, sorry for the false alarm. |
@ryanhamley @serveurperso This was an interesting bug to track down but I think I found the problem.
The offending code is here: mapbox-gl-js/src/ui/handler_manager.js Lines 509 to 511 in 16211e8
The error does not occur when you comment out line 510, or set |
I think this can be closed since the fix has been merged? |
I can increase public frequency to 10Hz on my live website (vigibot.com) to make a test. Edit: |
The remaining problem is the MOBILE user action priority for pinch/zoom (and drag) is lower than the EaseTo refresh. |
mapbox-gl-js version:
Last
browser:
Any
Steps to Trigger Behavior
Link to Demonstration
https://jsbin.com/
Expected Behavior
Manual Zoom is responsive at 10Hz refresh rate easeTo/jumpTo
Any platform any browsers
Actual Behavior
Manual Zoom is buggy at 10Hz refresh rate easeTo/jumpTo
Any platform any browsers
The text was updated successfully, but these errors were encountered: