forked from FreemapSlovakia/freemap-mapnik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preview.html
22 lines (21 loc) · 797 Bytes
/
preview.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Map Preview</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.4/leaflet.js"></script>
<script type="text/javascript" src="preview/leaflet-hash.js"></script>
</head>
<body style="margin: 0">
<div id="mapid" style="width: 100vw; height: 100vh"></div>
<script>
const mymap = L.map("mapid").setView([49, 20], 10);
L.tileLayer("http://localhost:4000/{z}/{x}/{y}", {
maxZoom: 18,
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
}).addTo(mymap);
new L.Hash(mymap);
</script>
</body>
</html>