1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| var locations = [
<?php include("fixe.txt");?>
];
var infowindow = new google.maps.InfoWindow();
var monIconPerso = new google.maps.MarkerImage("pic/radio.png"),i;
for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({
icon : monIconPerso,
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map
});
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(locations[i][0]);
infowindow.open(map, marker);
}
})(marker, i));
}
} |
Partager