openstreetmap-tile-server/leaflet-demo.html
Mikael Wikstrom a814c0306a
upgrade leaflet from v1.7.1 to v1.8.0 ()
Leaflet 1.8.0	Stable version, released on April 18, 2022.
Leaflet 1.7.1	Previous stable version, released on September 3, 2020.

install leaflet localy so server works offline

Co-authored-by: galewis2 <62433564+galewis2@users.noreply.github.com>
2022-09-27 10:03:13 -04:00

36 lines
969 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Custom Tile Server</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="leaflet.css"/>
<script src="leaflet.js"></script>
<style>
html, body, #map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map').setView([0, 0], 3);
L.tileLayer('/tile/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
id: 'base'
}).addTo(map);
</script>
</body>
</html>