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
| //Afficher marqueur avec des options
var tours = new google.maps.LatLng(48.833251, 2.338877);
var marker = new google.maps.Marker({
position: paris,
map: map,
flat: false,
icon: icontest,
// icon avec le lombre//
shadow: shadowicontest,
title: "Paris",
clickable: true,
});
// afficher infobulle//
var infobulle = new google.maps.InfoWindow({
content: "Ville Paris"
});
// ouvrir en fois tu clic sur le marqueur
google.maps.event.addListener(marker, "click", function(){
infobulle.open(map, marker);
});
// fermer en fois tu clic sur la carte
google.maps.event.addListener(map, "click", function(){
infobulle.close();
}); |