source: ntrip/trunk/BNC/src/map/map_gm.html@ 5246

Last change on this file since 5246 was 5246, checked in by mervart, 9 years ago
File size: 2.0 KB
Line 
1<!DOCTYPE html>
2<html>
3 <head>
4 <meta name="viewport" content="initial-scale=1.0, user-scalable=yes" />
5
6 <style type="text/css">
7 * { margin: 0; padding: 0; }
8 html { width: 100%; height: 100%; }
9 body { width: 100%; height: 100%; }
10 #map_canvas { width: 100%; height: 100%; background-color: gray; }
11 </style>
12
13 <script>
14 var map;
15 var marker;
16 var zoom;
17 var useTrace;
18
19 function initialize(lat, lon, trace) {
20
21 useTrace = trace;
22
23 var myOptions = {
24 center: new google.maps.LatLng(lat, lon),
25 zoom: 3,
26 mapTypeId: google.maps.MapTypeId.SATELLITE,
27 panControl: true
28 };
29
30 map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
31 zoom = 0;
32
33 var image = new google.maps.MarkerImage("qrc:///map/crosshair.png",
34 null,
35 null,
36 new google.maps.Point(20, 20),
37 new google.maps.Size(40,40)
38 );
39 marker = new google.maps.Marker({
40 map: map,
41 position: new google.maps.LatLng(lat, lon),
42 icon: image,
43 });
44 }
45
46 function gotoLocation(lat, lon) {
47 if (zoom == 0) {
48 zoom = 17;
49 map.setZoom(zoom);
50 }
51 var position = new google.maps.LatLng(lat, lon);
52 map.setCenter(position);
53 marker.setPosition(position);
54
55 if (useTrace == 1) {
56 var trace = new google.maps.Marker({
57 map: map,
58 position: new google.maps.LatLng(lat, lon),
59 });
60 }
61 }
62 </script>
63
64 <script type="text/javascript"
65 src="http://maps.googleapis.com/maps/api/js?sensor=false">
66 </script>
67
68 </head>
69 <body>
70 <div id="map_canvas">Waiting for data...</div>
71 </body>
72</html>
Note: See TracBrowser for help on using the repository browser.