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

Efficiently moving a single marker #2296

Closed
Overv opened this issue Mar 18, 2016 · 5 comments
Closed

Efficiently moving a single marker #2296

Overv opened this issue Mar 18, 2016 · 5 comments
Labels
performance ⚡ Speed, stability, CPU usage, memory usage, or power usage

Comments

@Overv
Copy link

Overv commented Mar 18, 2016

All of the examples update the GeoJSON and completely recreate the markers from that when they move a point.

Is there a more efficient way to move a single marker when there are a lot of markers in the GeoJSON?

Or would writing a custom WebGL marker overlay be the best way of going about this?

Context: I'm developing a public transit visualization application and I need move about 100 out of 5000 markers per second efficiently. Reloading the GeoJSON causes too noticeable of a stutter, even when buffering all the updates for a second.

@mourner
Copy link
Member

mourner commented Mar 19, 2016

Reloading the GeoJSON causes too noticeable of a stutter

Can you try the latest master version? There were related speedups.

We're investigating ways to improve this use case with #1504 and mapbox/geojson-vt#26.

@mourner mourner added the performance ⚡ Speed, stability, CPU usage, memory usage, or power usage label Mar 19, 2016
@Overv
Copy link
Author

Overv commented Mar 19, 2016

The problem is pretty much solved in the latest master version, thanks!

@mourner
Copy link
Member

mourner commented Mar 19, 2016

Great! Closing then.

@mourner mourner closed this as completed Mar 19, 2016
@daumann
Copy link
Contributor

daumann commented Mar 25, 2019

@Overv what was the solution to your problem? Do you retile all data for every dataupdate?

@Overv
Copy link
Author

Overv commented Mar 26, 2019

@daumann My solution was to not use mapbox-gl-js and instead use https://github.com/eJuke/Leaflet.Canvas-Markers (and fork it over at https://github.com/Overv/Leaflet.Canvas-Markers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance ⚡ Speed, stability, CPU usage, memory usage, or power usage
Projects
None yet
Development

No branches or pull requests

3 participants