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
| <html>
<title>Maps</title>
<head>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
function initialize() {
var position = new google.maps.LatLng(33.8932689, 10.1029100);
var myOptions = {
zoom: 7,
center: position,
disableDoubleClickZoom : false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(
document.getElementById("map_canvas"),
myOptions);
var image = 'pin30_yellow.png';
var marker = new google.maps.Marker({
position: position,
map: map,
icon: image,
title:"This is the place."
});
var contentString = 'Hello <strong>World</strong>!';
var infowindow = new google.maps.InfoWindow({
content: contentString
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
}
<body onload="initialize()">
<div id="map_canvas" style=" height:1000px"></div>
</body>
</html> |
Partager