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
| function createMarker(point,text) {
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(text); });
return marker; //fonction qui affiche l'info bulle légende sur le marqueur
}
function load() {
if (GBrowserIsCompatible())
{
/****************Google monde************************/
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(30, 0), 1);
// Paris
var point = new GLatLng(48.85929404029, 2.341461181640);
var MonIcon = new GIcon(G_DEFAULT_ICON);
MonIcon.iconSize=new GSize(32,33);
MonIcon.image="./css/mapPin2009.png";
var marker = new GMarker(point,MonIcon);
map.addOverlay(marker);
/****************Google France************************/
var mapFrance = new GMap2(document.getElementById("mapFrance"));
mapFrance.setCenter(new GLatLng(47, 3), 5);
// Paris
var point = new GLatLng(48.85929404029, 2.341461181640);
var MonIcon = new GIcon(G_DEFAULT_ICON);
MonIcon.iconSize=new GSize(32,33);
MonIcon.image="./css/mapPin2009.png";
var marker = new GMarker(point,MonIcon);
mapFrance.addOverlay(marker);
mapFrance.addControl(new GSmallMapControl());
}
} |
Partager