File: rtkplot_ll.htm

package info (click to toggle)
rtklib 2.4.3.b34%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 114,300 kB
  • sloc: cpp: 57,065; ansic: 53,007; makefile: 994; fortran: 987; javascript: 309; sh: 25
file content (108 lines) | stat: -rw-r--r-- 2,499 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!------------------------------------------------------------------------------
* rtkplot_ll.htm: rtkplot leaflet map view
*
* history: 2020/11/30 1.1  new
*------------------------------------------------------------------------------>
<html>
<head>
<title>RTKPLOT_MAP</title>

<meta charset=UTF-8">
<link rel="stylesheet" href="qrc://usr/share/javascript/leaflet/leaflet.css" />
<script src="qrc://usr/share/javscript/leaflet/leaflet.js"></script>

<script>

var map;
var marks = [];
var titles = [];

var LeafIcon = L.Icon.extend({
    options: {
        shadowUrl: 'qrc://usr/share/javascript/leaflet/images/marker-shadow.png',
        shadowSize: [41, 41],
        shadowAnchor: [12, 41],
        iconSize: [25, 41],
        iconAnchor: [12, 41],
        popupAnchor: [0, -40]
    }
});
var icon0 = new LeafIcon({iconUrl: 'qrc:/image/marker_yellow.png'});
var icon1 = new LeafIcon({iconUrl: 'qrc:/image/marker_red.png'});

// start map tiles
// end map tiles

function init() {
    map = L.map('map');
    tile1.addTo(map);
    L.control.layers(basemaps).addTo(map);
    L.control.scale({imperial: false}).addTo(map);
    map.zoomControl.setPosition('bottomright');
    document.getElementById('state').value='1';
}

function SetView(lat,lon,zoom) {
    map.setView([lat,lon],zoom);
}

function SetCent(lat,lon) {
    map.setView([lat,lon],map.getZoom());
}

function ZoomIn() {
    map.setZoom(map.getZoom()+1);
}

function ZoomOut() {
    map.setZoom(map.getZoom()-1);
}

function AddMark(lat,lon,title,msg) {
    var mark = L.marker([lat,lon],{opacity: 0.8}).addTo(map);
    var popup = L.popup().setContent(msg);
    if (title=='SOL1') {
        mark.setIcon(icon0);
    } else {
        mark.setIcon(icon1);
    }
    mark.bindPopup(popup);
    marks.push(mark);
    titles.push(title);
}

function PosMark(lat,lon,title) {
    for (var i in marks) {
        if (titles[i]==title) {
            marks[i].setLatLng([lat,lon]);
            break;
        }
    }
}

function ShowMark(title) {
    for (var i in titles) {
        if (titles[i]==title) {
            marks[i].setOpacity(0.8);
            break;
        }
    }
}

function HideMark(title) {
    for (var i in titles) {
        if (titles[i]==title) {
            marks[i].setOpacity(0.0);
            break;
        }
    }
}

</script>
</head>

<body style="margin: 0;"; scroll="no"; onload="init()">
  <div id="map" style="height: 100%; width: 100%;"> </div>
  <input id="state" type="hidden" value="0">
</body>
</html>