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
| function showAddress2007_2(tab_adres2007_2) {
var noloc= Array();
for(i=0; i<=tab_adres2007_2.length; i++){
address= tab_adres2007_2[i];
if (geocoder) { alert(address);
geocoder.getLatLng(address, function(point) {
if (!point) { alert(address); /* Si les coordonnées n'ont pas été trouvés */
}
else {
/* /* Les coordonnées ont été trouvés */
/* Création d'un marqueur */
var icon = new GIcon();
icon.image = "images/mm_20_blue2.png";
icon.shadow = "images/mm_20_shadow.png";
icon.iconSize = new GSize(20, 27);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);
var options = {
icon: icon,
draggable: true,
bouncy: false
};
var marker = new GMarker(point, options);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml("<table width='215'><tr><td>"+ address +"</td></tr><tr><td> </td></tr><tr><td></td></tr></table><br />");
});
markerGroups["patient2007_2"].push(marker);
map.addOverlay(marker);
}
});
}//if (geocoder)
}//for
} |
Partager