-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.html
41 lines (37 loc) · 1.06 KB
/
example.html
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>L.FreieTonne Example</title>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/>
<link rel="stylesheet" href="https://esm.sh/leaflet/dist/leaflet.css" />
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
#map { width: 100%; height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script type="importmap">
{
"imports": {
"leaflet": "https://esm.sh/leaflet",
"leaflet-freie-tonne": "./dist/L.FreieTonne.js"
}
}
</script>
<script type="module">
import * as L from 'leaflet';
import FreieTonne from 'leaflet-freie-tonne';
var map = L.map('map', {
center: [53.7259, 9.5072],
zoom: 10
});
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution: '© <a href="http://www.openstreetmap.org/copyright" target="_blank">OSM Contributors</a>',
noWrap: true
}).addTo(map);
new FreieTonne().addTo(map);
</script>
</body>
</html>