Google Maps JS API v3 - Simple Multiple Marker Example

Posted by Wes on Stack Overflow See other posts from Stack Overflow or by Wes
Published on 2010-06-17T05:14:33Z Indexed on 2010/06/17 5:43 UTC
Read the original article Hit count: 956

Fairly new to the Google Maps Api. I've got an array of data that I want to cycle through and plot on a map. Seems fairly simple, but all the multi-marker tutorials I have found are quite complex.

Lets use the data array from google's site for an example:

    var locations = [
  ['Bondi Beach', -33.890542, 151.274856, 4],
  ['Coogee Beach', -33.923036, 151.259052, 5],
  ['Cronulla Beach', -34.028249, 151.157507, 3],
  ['Manly Beach', -33.80010128657071, 151.28747820854187, 2],
  ['Maroubra Beach', -33.950198, 151.259302, 1]
];

I simply want to plot all of these points and have an infoWindow pop up when clicked to display the name.

Any help is greatly appreciated!

© Stack Overflow or respective owner

Related posts about google-maps

Related posts about google-maps-api