-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathiife.html
More file actions
55 lines (42 loc) · 1.1 KB
/
iife.html
File metadata and controls
55 lines (42 loc) · 1.1 KB
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
<html>
<head>
<title>Parcel Sandbox</title>
<meta charset="UTF-8" />
<script src="./build/mbt.min.js"></script>
</head>
<body>
<div id="map" style="width: 600px; height: 600px">
</div>
<script>
console.log(ol, mbt, maplibregl);
const map = new ol.Map({
target: 'map',
view: new ol.View({
center: [831634, 5933959],
zoom: 13,
}),
controls: [],
});
const layer = new mbt.ol.MaplibreLayer({
apiKey: '5cc87b12d7c5370001c1d6554840ecb89d2743d2b0aad0588b8ba7eb',
});
map.addLayer(layer);
const osm = new ol.layer.Tile({
source: new ol.source.OSM(),
opacity: 0.5,
});
map.addLayer(osm);
/* const tracker = new mbt.ol.RealtimeLayer({
url: 'wss://api.geops.io/tracker-ws/v1/',
apiKey: '5cc87b12d7c5370001c1d6554840ecb89d2743d2b0aad0588b8ba7eb',
});
tracker.attachToMap(map);
tracker.onClick(([feature]) => {
if (feature) {
// eslint-disable-next-line no-console
console.log(feature.getProperties());
}
});*/
</script>
</body>
</html>