Rev | Line | |
---|
[5172] | 1 |
|
---|
[5171] | 2 | var map;
|
---|
[5172] | 3 | var marker;
|
---|
[5171] | 4 |
|
---|
[5172] | 5 | function 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 |
|
---|
| 16 | marker = new google.maps.Marker({
|
---|
[5173] | 17 | map: map,
|
---|
| 18 | position: new google.maps.LatLng(lat, lon),
|
---|
[5174] | 19 | // icon: "qrc:///map/html/crosshair.png"
|
---|
[5172] | 20 | });
|
---|
[5171] | 21 | }
|
---|
| 22 |
|
---|
[5172] | 23 | function gotoLocation(lat, lon) {
|
---|
| 24 | var position = new google.maps.LatLng(lat, lon);
|
---|
| 25 | map.setCenter(position);
|
---|
| 26 | marker.setPosition(position);
|
---|
[5171] | 27 | }
|
---|
| 28 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.