46 lines
974 B
HTML
46 lines
974 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>tile-proxy-php - Proxy Test</title>
|
|
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" />
|
|
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js"></script>
|
|
<style>
|
|
html,
|
|
body,
|
|
.map {
|
|
height: 100%;
|
|
width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="map" class="map"></div>
|
|
|
|
<script>
|
|
var map = L.map('map').setView([0, 0], 0);
|
|
|
|
var proxy_url = '{id}/{z}/{x}/{y}.png'; // eg: http://example.com/tiles/{id}/{z}/{x}/{y}.png
|
|
var tms_id = 'osm';
|
|
|
|
var tileLayer = L.tileLayer(proxy_url, {
|
|
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ',
|
|
id: tms_id
|
|
});
|
|
tileLayer.addTo(map);
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|