Created
December 29, 2010 23:15
-
-
Save russ/759201 to your computer and use it in GitHub Desktop.
This file contains 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
$(".map-marker").each(function() { | |
var title = $(this).data("title") | |
var lat = $(this).data("lat") | |
var lng = $(this).data("lng") var marker = new google.maps.Marker({ | |
position: new google.maps.LatLng(lat, lng), | |
map: map, | |
title: title }); | |
var infowindow = new google.maps.InfoWindow({ | |
content: $(this).html() }); | |
google.maps.event.addListener(marker, "click", function() { | |
infowindow.open(map, marker); }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment