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
| <!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script src="jquery.js"></script>
</head>
<body>
<script type="text/javascript">
var auto_refresh = setInterval(function (){
$('#marker').load('2.php').fadeIn("slow");
}, 2000); // rafraichis toutes les 10000 millisecondes
</script>
<div id="map" style="width: 600px; height: 550px;">
<div id="marker" >
<script>
var locations = [
[ '',49.898729,3.13606, 5],
[ '',50.684142,3.1360678, 4],
['' ,49.953802, 2.360237, 3],
[ '',48.606369,2.886894, 2],
['' ,48.149513,6.410866, 1]
];
</script>
</div>
<script>
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 6,
center: new google.maps.LatLng(47.4,1.6),
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL,
position: google.maps.ControlPosition.TOP_RIGHT
},
scaleControl: true,
streetViewControl: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var infowindow = new google.maps.InfoWindow();
var marker, i;
for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map
});
}
</script>
</div>
</body>
</html> |
Partager