Skip to content

Instantly share code, notes, and snippets.

@amitittyerah
Created March 17, 2014 01:14
Show Gist options
  • Save amitittyerah/9592270 to your computer and use it in GitHub Desktop.
Save amitittyerah/9592270 to your computer and use it in GitHub Desktop.
Adding markers to a google map with a loop
google.maps.event.addListener(marker, 'click',
(function(marker_inner) {
return function() {
new google.maps.InfoWindow({
content: 'Marker : ' + marker_inner.data.title
}).open(map,marker_inner);
map.setCenter(marker_inner.getPosition());
}
})(marker)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment