-
Notifications
You must be signed in to change notification settings - Fork 0
/
where.html
52 lines (48 loc) · 1.81 KB
/
where.html
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
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>A Map of Information</title>
<link href="http://google-developers.appspot.com/maps/documentation/javascript/examples/default.css" rel="stylesheet">
<!-- If you are in China, you may need to use theis site for the Google Maps code
<script src="http://maps.google.cn/maps/api/js" type="text/javascript"></script> -->
<script src="http://maps.googleapis.com/maps/api/js"></script>
<script src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js"></script>
<script src="where.js"></script>
<script>
function initialize() {
alert("To see the title of a marker, hover over the marker but don't click.");
var myLatlng = new google.maps.LatLng(37.39361,-122.099263)
var mapOptions = {
zoom: 3,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
i = 0;
var markers = [];
for ( pos in myData ) {
i = i + 1;
var row = myData[pos];
window.console && console.log(row);
// if ( i < 3 ) { alert(row); }
var newLatlng = new google.maps.LatLng(row[0], row[1]);
var marker = new google.maps.Marker({
position: newLatlng,
map: map,
title: row[2]
});
markers.push(marker);
}
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="height: 500px"></div>
<p><b>About this Map</b></p>
<p>
This is a cool map from
<a href="http://www.py4e.com">www.py4e.com</a>.
</p>
</body>
</html>