Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated README with click event enhancement

  • Loading branch information...
commit f9a2efd70d998c35e3b371dcc5c450add5d40d9f 1 parent dd4e693
@jawj authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 README.textile
View
4 README.textile
@@ -47,10 +47,10 @@ Create an @OverlappingMarkerSpiderfier@ instance:
bc. var oms = new OverlappingMarkerSpiderfier(map);
-Instead of adding click listeners to your markers directly via @google.maps.event.addListener@, add a global listener on the @OverlappingMarkerSpiderfier@ instance instead. The listener will be passed the clicked marker as its first argument.
+Instead of adding click listeners to your markers directly via @google.maps.event.addListener@, add a global listener on the @OverlappingMarkerSpiderfier@ instance instead. The listener will be passed the clicked marker as its first argument, and the Google Maps @event@ object as its second.
bc. var iw = new gm.InfoWindow();
-oms.addListener('click', function(marker) {
+oms.addListener('click', function(marker, event) {
iw.setContent(marker.desc);
iw.open(map, marker);
});

3 comments on commit f9a2efd

@ehboym

Hi

Is there a way to make the spiders open all the time ?

When the markers are UnSpidered the user has no idea that there are several markers on the same location.
S I was wandering if it is possible to make the spiders open all the time.

Thanks

Erez

@jawj
Owner

Afraid not: for the reason, see #3

However, I am thinking about ways to make it easier to indicate whether or not a marker will spiderfy when clicked. Watch this space...

@barryrp

Hi

We have several pins at same address but each pin is different (indicating interest of person by color)
Can the single pin that you click to see the group be unique (like a pin with a 'G' for group) ???

Please sign in to comment.
Something went wrong with that request. Please try again.