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
| <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<title>[...]</title>
<style type="text/css">
html, body {
height : 100%;
}
#map_canvas{
margin : auto;
width : 600px;
height: 600px;
}
</style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize() {
var myLatlng = new google.maps.LatLng(48.834555,2.232989);
var myMapOptions = {
zoom: 13,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
// Carte
var myMap = new google.maps.Map(
document.getElementById('map_canvas'),
myMapOptions
);
// Marqueur
var myMarker = new google.maps.Marker({
// Coordonnées
position: myLatlng,
map: myMap,
title: "titre"
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map_canvas"></div>
</body>
</html> |
Partager