Skip to content
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

The load event in mapbox fires before everything has been rendered. #1

Open
Eddie-Larsson opened this issue Feb 19, 2018 · 2 comments
Assignees
Labels
external issue A bug in one of the dependencies

Comments

@Eddie-Larsson
Copy link
Owner

As stated the 'load' event for the rendered map is fired before everything has been properly rendered, resulting in missing features in the image. Current workaround is to listen for the 'render' event and wait in intervals of 500 milliseconds, if no render event happened during that time the map is considered done.

This is undesirable for a multitude of reasons but the primary problem is that the "fix" might fail horribly under some condition such as poor network connectivity or possibly even a slow machine.

Possibly related are the following mapbox-gl -js issues 1, 2.

@Eddie-Larsson Eddie-Larsson added the bug Something isn't working label Feb 19, 2018
@Eddie-Larsson Eddie-Larsson self-assigned this Feb 19, 2018
@sebastianovide
Copy link

we are displaying an historical sequence of maps and therefore we need to know when to hide layers (when the new one is fully rendered)... What would be the best way of doing it ? (waiting few times half a second seams a lot...)

@Eddie-Larsson
Copy link
Owner Author

@sebastianovide Beats me, the best way I've found is the one described above. If I knew of a better way I'd be using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external issue A bug in one of the dependencies
Projects
None yet
Development

No branches or pull requests

2 participants