| 1 |
<!doctype html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<title>renderd example map</title> |
| 5 |
<meta charset="utf-8" /> |
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 7 |
<link rel="icon" href="data:;base64,iVBORw0KGgo=" /> |
| 8 |
<link rel="stylesheet" href="leaflet/leaflet.css" /> |
| 9 |
<script src="leaflet/leaflet.min.js"></script> |
| 10 |
</head> |
| 11 |
|
| 12 |
<body style="margin: 0"> |
| 13 |
<div id="map" style="position: absolute; width: 100%; height: 100%"></div> |
| 14 |
|
| 15 |
<script> |
| 16 |
var attribution = |
| 17 |
'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors.'; |
| 18 |
var options = { |
| 19 |
maxZoom: 20, |
| 20 |
attribution: attribution, |
| 21 |
}; |
| 22 |
|
| 23 |
var png = L.tileLayer( |
| 24 |
"http://localhost:8081/tiles/renderd-example/{z}/{x}/{y}.png", |
| 25 |
options, |
| 26 |
); |
| 27 |
|
| 28 |
var jpg = L.tileLayer( |
| 29 |
"http://localhost:8081/tiles/renderd-example-jpg/{z}/{x}/{y}.jpg", |
| 30 |
options, |
| 31 |
); |
| 32 |
var png32 = L.tileLayer( |
| 33 |
"http://localhost:8081/tiles/renderd-example-png32/{z}/{x}/{y}.png", |
| 34 |
options, |
| 35 |
); |
| 36 |
var webp = L.tileLayer( |
| 37 |
"http://localhost:8081/tiles/renderd-example-webp/{z}/{x}/{y}.webp", |
| 38 |
options, |
| 39 |
); |
| 40 |
|
| 41 |
var map = L.map("map", { |
| 42 |
center: [0, 0], |
| 43 |
zoom: 4, |
| 44 |
layers: [png], |
| 45 |
}); |
| 46 |
|
| 47 |
var baseMaps = { |
| 48 |
JPG: jpg, |
| 49 |
PNG: png, |
| 50 |
PNG32: png32, |
| 51 |
WEBP: webp, |
| 52 |
}; |
| 53 |
|
| 54 |
var layerControl = L.control.layers(baseMaps).addTo(map); |
| 55 |
</script> |
| 56 |
</body> |
| 57 |
</html> |