1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
stoTicketsClos.load({
callback:function(records){
for(var i=0; i<records.length; i++){
var noAppel = records[i].data.noAppel;
var x = records[i].data.x;
x = x.replace(',','.');
var y = records[i].data.y;
y = y.replace(',','.');
CreateMarker(new google.maps.LatLng(x,y), 6);
/*alert(i);
alert(noAppel);
alert(x);
alert(y); */
}
}
});
function CreateMarker(point, zoom){
var markerOptions = {
position: point,
clickable: true,
icon: iconMarker0,
title: 'Position test\351e'
};
marker = new google.maps.Marker(markerOptions);
infoWindow = new google.maps.InfoWindow({content: '<div class="contentTab" style="margin-right:10px">coord=' + point + '</div>'});
/* Click sur le marker */
google.maps.event.addListener(marker, 'click', function(){
/* Ouverture du popup */
infoWindow.open(map, marker);
});
/* Ajout du marker sur la carte */
marker.setMap(map);
} |
Partager