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

Last change on this file since 5245 was 5245, checked in by mervart, 11 years ago
File size: 1.8 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
18 function initialize(lat, lon) {
19
20 var myOptions = {
21 center: new google.maps.LatLng(lat, lon),
22 zoom: 3,
23 mapTypeId: google.maps.MapTypeId.SATELLITE,
24 panControl: true
25 };
26
27 map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
28 zoom = 0;
29
30 var image = new google.maps.MarkerImage("qrc:///map/crosshair.png",
31 null,
32 null,
33 new google.maps.Point(20, 20),
34 new google.maps.Size(40,40)
35 );
36 marker = new google.maps.Marker({
37 map: map,
38 position: new google.maps.LatLng(lat, lon),
39 icon: image,
40 });
41 }
42
43 function gotoLocation(lat, lon) {
44 if (zoom == 0) {
45 zoom = 17;
46 map.setZoom(zoom);
47 }
48 var position = new google.maps.LatLng(lat, lon);
49 map.setCenter(position);
50 marker.setPosition(position);
51 }
52 </script>
53
54 <script type="text/javascript"
55 src="http://maps.googleapis.com/maps/api/js?sensor=false">
56 </script>
57
58 </head>
59 <body>
60 <div id="map_canvas">Waiting for data...</div>
61 </body>
62</html>
Note: See TracBrowser for help on using the repository browser.