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

Clusters blinking on updating its markers #864

Open
aneela1191 opened this issue Apr 1, 2024 · 6 comments
Open

Clusters blinking on updating its markers #864

aneela1191 opened this issue Apr 1, 2024 · 6 comments
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@aneela1191
Copy link

aneela1191 commented Apr 1, 2024

Steps to reproduce

  1. Create a cluster
  2. Add a marker every second
  3. Clusters and markers keep blinking/flashing

Code example

https://jsfiddle.net/qwe3d1Lm/1/

@aneela1191 aneela1191 added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Apr 1, 2024
@wangela
Copy link
Member

wangela commented Apr 1, 2024

If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.

@aneela1191 Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

@jiikoosol
Copy link

I'm having the same issue, is there some workaround to fix it?

@h3
Copy link

h3 commented Nov 6, 2024

Been banging my head on this issue for a good while now .. seems like this PR solves it: #802

Unfortunately it is still not being merged :/

@james-astra
Copy link

Can this be merged?

@usefulthink
Copy link
Contributor

Unfortunately not, mainly because there is no Contributor License Agreement for the contribution, but also because it doesn't fix the issue and instead just patches a symptom.

I'm going to spend some time on this project soon, so I'll have a look into the root-cause.

@james-astra
Copy link

Unfortunately not, mainly because there is no Contributor License Agreement for the contribution, but also because it doesn't fix the issue and instead just patches a symptom.

I'm going to spend some time on this project soon, so I'll have a look into the root-cause.

That's great thanks a lot!

I use this package for clustering hundreds of vehicles on a map, which change positions dynamically constantly. There seems to be another issue with getting the cluster to be smoothly re-calculated, say I have 100 vehicles as markers in the cluster, when new location information comes in over websockets, I find the associated marker in the MarkerClusterer.markers and set the position, this works great but then I can't get the clusters to be correctly re-drawed if they need to be.

I can get them to redraw by clearing all of the markers and re-creating the clusterer however this has a laggy blink effect as described in this issue. I have tried called .render() on the clusterer but it seems to render from the non-updated location, changing .location in the MarkerClusterer.markers does not seem to affect the render.

I have opted to recluster every 5 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

6 participants