-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unable to remove transitions from style #1
Comments
@orangemug maybe trying one of the following options? Option 1: Option 2: More context in the linked issues. |
I've tried the options above but wasn't successful. Using option 2 I wonder why the following isn't working:
Looking for a solution I came across the following nice project |
@pathmapper thanks for looking into this. So are we basically thinking that the delay (setTimeout) is the best approach until it gets fixed upstream (mapbox-gl-js) ? FYI, a (partially) working export UI, in Maputnik 😁 |
@orangemug Turns out that what we are trying to remove is not a transition, instead it's a label fade-in. There is a Thanks for the UI preview! |
Nice spot @pathmapper. So I tested with So I added a hack 7df2314 which is described here Although this is a massive hack, I believe this should be relatively stable unless the CPU is busy for 1 second between 'render' events being fired, which seems pretty unlikely in all but the most extreme of cases. Give it a try and let me know what you think. |
Thanks @orangemug, worked for me. Yes, I also think that currently the only way to be sure the map is rendered completely is to wait until there are no render events fired anymore. I've tested also on a pretty old (~ 10 years) laptop and had no issues, so 1 second debounce was enough in this case. Question: It is currently 1 second wait after the last render event, right? So if there is another render event before the wait milliseconds have elapsed, the wait period starts again? |
@pathmapper thanks for testing
Correct, my assumption was that even on a really slow machine a 1 second delay between events would be pretty drastic, however I'm unsure of the total work to complete. I'm imagining a really complex map with 100,000 of renderer items would get lots of render events. Note: This is mainly guess work, I need to dive into the mapbox-gl-js codebase to confirm all that. But I definitely haven't got the time for that right now |
This issue should be resolved with #3. @orangemug can you close here? I don't have the rights. |
This means we need to wait for 'a while' until the transitions complete. This isn't very stable because the 1000ms is just a guess and could be incorrect for the style/renderer. See lines below
https://github.com/orangemug/mapbox-gl-to-blob/blob/9a138181ccd1747c5296ca67976f65b4ee43b587/index.js#L181-L191
https://github.com/orangemug/mapbox-gl-to-blob/blob/9a138181ccd1747c5296ca67976f65b4ee43b587/index.js#L75-L93
The text was updated successfully, but these errors were encountered: