Created
June 14, 2017 07:51
-
-
Save Kamilnaja/af49613db30a131985a75ab9e09914ae 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
for (var i = 0, max = markers.length; i < max; i++) { | |
var miejscowosc = markers[i].getAttribute("miejscowosc"), | |
point = new google.maps.LatLng( | |
parseFloat(markers[i].getAttribute("lat")), | |
parseFloat(markers[i].getAttribute("lgt")) | |
), | |
marker = new google.maps.Marker({ | |
map: map, | |
position: point, | |
title: miejscowosc | |
}), | |
infowindow = new google.maps.InfoWindow({ | |
}); | |
google.maps.event.addListener(marker, 'click', function () { | |
// where I have added .html to the marker object. | |
infowindow.setContent(this.miejscowosc); | |
infowindow.open(map, this); | |
}); | |
markerArray.push(marker); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment