Is there a way to ensure the Clusters given by getClusters() function in 
the Clusterer class always gives the Clusters sorted by order of the 
markers that it contains and the order they were placed on the map? I have 
a website where I need to draw arrows that go from one marker to another to 
indicate a travel path. However, with the clusterer the order of the 
clusters in getClusters() are different every time. So my arrow drawing 
function draws arrows in the wrong sequence sometimes when you have to 
redraw because markers/clusters changed.

Here is a test website with what I mean: 
http://labs.shifthappens.nl/vagabond/pilot . At first load everything seems 
OK, the arrows are drawn from marker A to marker J without strange things. 
But as soon as you start panning around or zoom in/out a couple of times, 
the arrows change and go from A -> B -> E -> J or any other combination.

I understand that the sequence normally doesn't matter that much, but in my 
case it does. If I can't trust the getClusters function I have to resort to 
sorting the clusters manually after getting them. This is not only more 
work for me, it also slows down the map movements.

Someone got a solution for this?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/WfQsPkcXKvgJ.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to