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

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