Displaying total number as pin text for multiple pins at the same location

39 views
Skip to first unread message

deastr

unread,
Sep 6, 2011, 3:27:31 PM9/6/11
to google-map...@googlegroups.com
Let's say you have multiple pins at the same location or very close. Instead of displaying several very close pins I want to display a single pin with pin count. Is this possible?

You can see an example as attachment.

I'd appreciate any help.


Capture.PNG

geoco...@gmail.com

unread,
Sep 6, 2011, 6:05:24 PM9/6/11
to Google Maps JavaScript API v3
On Sep 6, 12:27 pm, deastr <arma...@gmail.com> wrote:
> Let's say you have multiple pins at the same location or very close. Instead
> of displaying several very close pins I want to display a single pin with
> pin count. Is this possible?

Yes. How many markers? If lots, you will want to do this server
side, if not you can do it client side: pick a threshold distance,
process all your markers, collapsing those within the threshold and
counting them so you know the number to display.

I have seen discussions about this on the v2 group, not many here.

-- Larry

>
> You can see an example as attachment.
>
> I'd appreciate any help.
>
>  Capture.PNG
> 177KViewDownload

xelawho

unread,
Sep 6, 2011, 6:13:21 PM9/6/11
to Google Maps JavaScript API v3
isn't this kind of like marker clusterer?

http://code.google.com/apis/maps/articles/toomanymarkers.html

deastr

unread,
Sep 8, 2011, 4:09:07 PM9/8/11
to google-map...@googlegroups.com
MarkerClusterer seems exactly what I want thanks a lot.
Reply all
Reply to author
Forward
0 new messages