Clustering/Grouping different markers under the same cluster

103 views
Skip to first unread message

julienhelios

unread,
Jul 15, 2011, 12:26:02 PM7/15/11
to google-map...@googlegroups.com
I have a technical issue that get me stuck. I am using Google Map to display items belonging to different categories (see image). Each category has its own marker icon (example the house, the recycle.. on the image enclosed) to recognize it easily.



I want to cluster all of them and i know how to do it if there were only one category of item (one type of marker, for instance the house one) but i am not able to cluster different kind of items under the same cluster. For instance, for the image enclosed, i would like to cluster the 3 types of items (plus, recycle and house) to get something like this :

I would really appreciate if someone could give me a tip !
Thanks


Daejeon

unread,
Jul 18, 2011, 11:24:50 PM7/18/11
to google-map...@googlegroups.com
http://gmaps-utility-library.googlecode.com/svn/trunk/markerclusterer/1.0/src/markerclusterer.js 


I am currently trying marker clustering as well, and I able to cluster different category under same cluster by using the library above. 

On Saturday, 16 July 2011 00:26:02 UTC+8, julienhelios wrote:
I want to cluster all of them and i know how to do it if there were only one category of item (one type of marker, for instance the house one) but i am not able to cluster different kind of items under the same cluster. For instance, for the image enclosed, i would like to cluster the 3 types of items (plus, recycle and house) to get something like this :


Just wonder, how you cluster them if there were only one category? Is it using the same library that I am using? Thanks :)

Luke Mahé

unread,
Jul 18, 2011, 11:54:16 PM7/18/11
to google-map...@googlegroups.com
FYI that library is for V2 - you'll want the V3 library - http://code.google.com/p/google-maps-utility-library-v3/source/browse/trunk/markerclusterer/src/markerclusterer.js

-- Luke


--
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/-/eQOGAOE-bRIJ.

To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

jufemaiz:Joel Courtney

unread,
Jul 19, 2011, 2:51:02 AM7/19/11
to Google Maps JavaScript API v3
Use a single MarkerCluster object for all the markers. The markers
don't need to have the same attributes.

On Jul 19, 1:24 pm, Daejeon <siaw.man3...@gmail.com> wrote:
> http://gmaps-utility-library.googlecode.com/svn/trunk/markerclusterer...
Reply all
Reply to author
Forward
0 new messages