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 40 41 42 43 44 45 46 47
|
<script src="http://api.viamichelin.com/apijs/js/api.js" type="text/javascript"></script>
<script type="text/javascript">
VMAPI.registerKey("Jxxxxxxxxxxxxxxxxx");
function affiche() {
map = new VMMap(document.getElementById("yourmapdiv"));
var localisation = new VMLonLat(1.69,43.808);
var localisation1 = new VMLonLat(1.732441,43.853535);
var localisation2 = new VMLonLat(1.737525,43.83483)
var localisation3 = new VMLonLat(1.715278,43.846273)
var localisation4 = new VMLonLat(1.7156,43.77567 )
var localisation5 = new VMLonLat(1.74825,43.868)
var localisation6 = new VMLonLat(1.610523,43.812649)
var localisation7 = new VMLonLat(1.62265 ,43.81366)
map.drawMap(localisation,12);
map.showMapTools();
/* Création de l'objet image */
var image1 = new VMIcon('./images/icones/pomme.png',-12,-12);
var image2 = new VMIcon('./images/icones/vin.png',-12,-12);
var image3 = new VMIcon('./images/icones/volaille.png',-12,-12);
/* Nom */
var nom1 = "Verger des Villettes";
var nom2 = "Verger de Foncoussieres";
var nom3 = "Domaine les Fontaines de Cavalade";
var nom4 = "Domaine de la Valiere";
var nom5 = "La Ferme de Loubat";
var nom6 = "La Ferme de Loustalou";
var nom7 = "La Ferme de la Tuilerie";
/* Création de la couche sur laquelle on positionne l'image */
var coucheImage1 = new VMIconLayer(localisation1, image1,nom1 );
map.addLayer(coucheImage1);
var coucheImage2 = new VMIconLayer(localisation2, image1,nom2 );
map.addLayer(coucheImage2);
var coucheImage3 = new VMIconLayer(localisation3, image2,nom3 );
map.addLayer(coucheImage3);
var coucheImage4 = new VMIconLayer(localisation4, image2,nom4 );
map.addLayer(coucheImage4);
var coucheImage5 = new VMIconLayer(localisation5, image3,nom5 );
map.addLayer(coucheImage5);
var coucheImage6 = new VMIconLayer(localisation6, image3,nom6 );
map.addLayer(coucheImage6);
var coucheImage7 = new VMIconLayer(localisation7, image3,nom7 );
map.addLayer(coucheImage7);
}
</script> |