source: ntrip/trunk/BNC/src/map/html/mapview.js@ 5195

Last change on this file since 5195 was 5192, checked in by mervart, 13 years ago
File size: 944 bytes
RevLine 
[5172]1
[5171]2var map;
[5172]3var marker;
[5171]4
[5172]5function initialize(lat, lon) {
[5171]6
[5172]7 var myOptions = {
8 center: new google.maps.LatLng(lat, lon),
9 zoom: 17,
10 mapTypeId: google.maps.MapTypeId.SATELLITE,
11 panControl: true
12 };
[5171]13
[5172]14 map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
15
[5190]16 var image = new google.maps.MarkerImage("qrc:///map/html/crosshair.png",
17 null,
[5191]18 null,
[5192]19 new google.maps.Point(20, 20),
[5191]20 new google.maps.Size(40,40)
[5190]21 );
[5172]22 marker = new google.maps.Marker({
[5190]23 map: map,
24 position: new google.maps.LatLng(lat, lon),
25 icon: image,
[5172]26 });
[5171]27}
28
[5172]29function gotoLocation(lat, lon) {
30 var position = new google.maps.LatLng(lat, lon);
31 map.setCenter(position);
32 marker.setPosition(position);
[5171]33}
34
Note: See TracBrowser for help on using the repository browser.