/
index.html
40 lines (31 loc) · 1.67 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>tortuOSMity</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js"></script>
<script src="leaflet-hash.js"></script>
</head>
<body>
<div id="map" style="position:absolute; left:0; right:0; top:0; bottom:0; background-color:black;"></div>
<script>
var map = L.map('map', {maxZoom:5, minZoom:4}).setView([50,8], 4)
var hash = new L.Hash(map)
var attr = '<a href="https://twitter.com/tyr_asd/status/695930442143375361">How Bendy are the Roads?</a> Last updated 2023-06. Data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://openstreetmap.org/copyright">ODbL</a>, Imagery © <a href="https://github.com/tyrasd/tortuosmity">Martin Raifer</a>, <a href="http://creativecommons.org/licenses/by/3.0/">cc-by</a>'
L.tileLayer('./tiles/{x}/{y}.png', {
minZoom: 4,
maxNativeZoom: 4,
attribution: attr
}).addTo(map)
var overlay = L.tileLayer('https://api.mapbox.com/styles/v1/openstreetmap/ckasmteyi1tda1ipfis6wqhuq/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidHlyIiwiYSI6ImNpcTdyZWQwbjAwMmhoeW5zbXc1enJ3cWoifQ.094oUYlT0wZbf2Q2wM-QQQ', {
opacity: 0.75,
attribution: 'Overlay © <a href="https://www.mapbox.com/about/maps/">Mapbox</a>'
}).addTo(map)
L.control.layers(undefined, {
"locations":overlay
}).addTo(map)
</script>
</body>
</html>