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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
| <!DOCTYPE html>
<html lang="fr">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<meta charset="UTF-8" />
<title>Titre de votre page</title>
<style type="text/css">
html {
height: 100%
}
body {
height: 100%;
margin: 0;
padding: 0
}
#EmplacementDeMaCarte {
height: 100%
}
</style>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var tableauMarqueurs = [
[ 47.325371, 1.044195 ],
[ 47.345627, 0.894806 ],
[ 47.334488, 0.944717 ],
[ 47.331615, 1.129307 ],
[ 47.270981, 1.375158 ],
[ 47.290585, 1.346169 ],
[ 47.330112, 0.995293 ],
[ 47.339272, 1.175795 ],
[ 47.307144, 1.318617 ],
[ 47.328671, 1.288072 ],
[ 47.344994, 1.212090 ],
[ 47.357315, 0.831850 ],
[ 47.342327, 1.245060 ]
];
var maCarte;
var zoneMarqueurs = new google.maps.LatLngBounds();
function initialisation() {
var optionsCarte = {
zoom: 19,
center: new google.maps.LatLng( 47.389982, 0.688877 ),
mapTypeId: google.maps.MapTypeId.ROADMAP
}
maCarte = new google.maps.Map( document.getElementById("EmplacementDeMaCarte"), optionsCarte );
for( var i = 0, I = tableauMarqueurs.length; i < I; i++ ) {
ajouteMarqueur( tableauMarqueurs[i] );
}
maCarte.fitBounds( zoneMarqueurs );
}
function ajouteMarqueur( latlng ) {
var latitude = latlng[0];
var longitude = latlng[1];
var optionsMarqueur = {
map: maCarte,
position: new google.maps.LatLng( latitude, longitude )
};
var marqueur = new google.maps.Marker( optionsMarqueur );
zoneMarqueurs.extend( marqueur.getPosition() );
}
google.maps.event.addDomListener( window, 'load', initialisation );
</script>
</head>
<body>
<div id="EmplacementDeMaCarte"></div>
<noscript>
<p>Attention : </p>
<p>Afin de pouvoir utiliser Google Maps, JavaScript doit être activé.</p>
<p>Or, il semble que JavaScript est désactivé ou qu\'il ne soit pas supporté par votre navigateur.</p>
<p>Pour afficher Google Maps, activez JavaScript en modifiant les options de votre navigateur, puis essayez à nouveau.</p>
</noscript>
</body>
</html> |
Partager