-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathgeo.html
More file actions
46 lines (42 loc) · 1.59 KB
/
geo.html
File metadata and controls
46 lines (42 loc) · 1.59 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps API Example: GGeoXml KML Overlay</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAGdvu711CjVYBdSLJltwFDhR3coRlXuo9xlNmrdIbWhZQW65S4hR8Ab8t5rr0Dc2v6pn5Lskb4wZFcg" type="text/javascript"></script>
<script type="text/javascript">
var map;
var geoXml;
var toggleState = 1;
function initialize() {
var date = new Date();
var toto = date.getTime();
geoXml = new GGeoXml("http://feraudet.com/gps/kml.php?" + toto);
//geoXml = new GGeoXml("http://feraudet.com/gps/cta.kml?123" + toto);
map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(48.7062916667,1.92896166667), 11);
//map.setCenter(new GLatLng(41.875696,-87.624207), 11);
map.setUIToDefault();
map.addOverlay(geoXml);
}
function toggleMyKml() {
if (toggleState == 1) {
map.removeOverlay(geoXml);
toggleState = 0;
} else {
map.addOverlay(geoXml);
toggleState = 1;
}
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width: 1024px; height: 768px; float:left; border: 1px solid black;"></div>
</div>
<br clear="all"/>
<br/>
<input type="button" value="Toggle KML" onClick="toggleMyKml();"/>
</body>
</html>