Created
March 17, 2014 01:14
-
-
Save amitittyerah/9592270 to your computer and use it in GitHub Desktop.
Adding markers to a google map with a loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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