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

spiderified markers collapse every time some markers are added to the cluster #318

Open
teo1978 opened this issue Feb 16, 2014 · 3 comments

Comments

@teo1978
Copy link

teo1978 commented Feb 16, 2014

Consider the following scenario:

  • a cluster is created
  • as time goes by, more and more markers are added to the cluster
  • you start interacting with the map while markers keep getting added to the cluster every once in a while
  • you zoom in and you spiderify an icon by clicking on it

Issue: if markers are added while the markers are spiderified, they "unspiderify", meaning they collapse into an icon again. This happens even if the markers that are being added are unrelated with the ones that are spiderified (i.e. they are far away and don't change the number of markers in the "spider").

This is very annoying because it means you just cannot keep adding markers in real time while the user is using the map.

Ajax loading of data that is turned into markers, for example, results in disturbing the user by continuously collapsing the markers that the user is spiderifying.

@danzel
Copy link
Member

danzel commented Feb 16, 2014

Necessary evil at the moment. If a marker is added to a cluster that is already spiderfied that would be very bad.
Can probably be fixed with some advanced coding, feel free to have a go :)
(Edit: Woops, didn't mean to close)

@danzel danzel closed this as completed Feb 16, 2014
@danzel danzel reopened this Feb 16, 2014
@teo1978
Copy link
Author

teo1978 commented Feb 16, 2014

The cluster should be unspiderfied only if a marker is added to that cluster (or subcluster or whatever it is called).
I guess the check could be done at the moment of actually adding the marker to the particular cluster, to see whether that cluster is the one that is spiderfied (as opposed to any other cluster in the group).
I'm afraid I have no idea how to do it myself, sorry.

@teastman
Copy link

I've attempted a fix for this. When ever a marker is added or removed it stores a list of spidered markers, then after the clusters are recreated it looks for the cluster containing the stored makers at the current zoom level and spiderfies it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants