Here you go:
google.maps.event.addListener(markerCluster, 'clusterclick',
function(cluster) {
var center = cluster.getCenter();
var size = cluster.getSize();
var markers = cluster.getMarkers();
});
-- Luke
On Tue, Aug 24, 2010 at 1:49 AM, Pat45 <[email protected]> wrote:
> Hi Stephan,
>
> Trying to use cluster.getSize(), cluster.getCenter() etc...with no
> success.
> Possible to see some example code ?
>
> Thanks
>
> Patrick
>
> On 23 juil, 08:36, Stefan Karlsson <[email protected]>
> wrote:
> > Y that is awesome, exactly what I was looking for.
> > Thank you very much for this, you saved my day.
> >
> > Stefan
> >
> > On 23 Juli, 07:37, Luke Mahé <[email protected]> wrote:
> >
> >
> >
> > > Hey Stefan,
> >
> > > This is possible, but I just updated the MarkerClusterer to make it
> easier
> > > :) (So download the latest version -
> http://code.google.com/p/google-maps-utility-library-v3/source/browse...
> > > )
> >
> > > You can add an event listener to the markerClusterer 'clusterclick'
> event:
> > > google.maps.event.addListener(markerCluster, 'clusterclick',
> > > function(cluster) {});
> >
> > > Then you can get info about the cluster with:
> > > cluster.getCenter();
> > > cluster.getSize();
> > > cluster.getMarkers();
> >
> > > Does that do what you need?
> >
> > > -- Luke
> >
> > > On Thu, Jul 22, 2010 at 6:56 PM, Stefan Karlsson <
> >
> > > [email protected]> wrote:
> > > > Just started to use MarkerCluster and now i'm looking for handling
> > > > clickevents on clustered markers. What I want is if clicked on a dual
> > > > marker (or more) I'd like to open a infowindow with content for all
> > > > markers in this click. So what i'm looking for is the clickevent on
> > > > markers and also a method to return the markers within that click.
> > > > Thoght it would be standard functionality that should exist but did
> > > > not found it in the references for MarkerCluster.
> >
> > > > Stefan
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> Groups
> > > > "Google Maps JavaScript API v3" group.
> > > > To post to this group, send email to
> > > > [email protected].
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<google-maps-js-api-v3%[email protected]><google-maps-js-api-v3%2B
> [email protected]>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.- Masquer
> le texte des messages précédents -
> >
> > - Afficher le texte des messages précédents -
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.