jay reads (3):
Who's reading jay (7):
This is using V2 of the google maps API

The google maps api is powerful, but the documentation is seriously lacking. I bought the pragmatic book by Scott Davis, but that is seriously lacking as well.

I couldn't find a simple example of adding a GEvent to a gmarker. It's trivially easy, and the documentation makes perfect since ONCE you've seen a simple example. Here is a simple example that will hopefully save someone else a little bit of time.

var marker = new GMarker(point);
GEvent.addListener(marker, "mouseover", function() {
  marker.openInfoWindowHtml(info);
  clearSelectedListings();
  selectListing(id);
});

This will open an info window on the marker and highlight the related listing on my page.


del.icio.us Digg reddit StumbleUpon

Comment on "adding events to a gmarker"

programming google maps api Javascript (Click to add tags below)

(Separate tags using commas, for example: New York, dating, vegetarian)
Comment Anonymously