forked from ncareol/osm-tiles-docker
-
Notifications
You must be signed in to change notification settings - Fork 28
/
test_with_keyId.html
36 lines (30 loc) · 1.03 KB
/
test_with_keyId.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
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Test of Zavpyj OSM Tile Server</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v1.0.2/leaflet.css" />
</head>
<body>
<div id="mapid" style="width: 1600px; height: 800px"></div>
<script src="http://cdn.leafletjs.com/leaflet/v1.0.2/leaflet.js"></script>
<script>
var osmLayer = L.tileLayer('http://localhost/osm_tiles/{z}/{x}/{y}.png?keyId={keyId}', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
maxZoom: 19,
id: 'osm.map',
keyId: 'abcdefghijklmnopqrstuvwxyz1234567890'
});
var mymap = L.map('mapid', {
center: [48.1329646, -1.6371024],
zoom: 10,
layers: [osmLayer]
});
osmLayer.addTo(mymap);
L.marker([48.1329646, -1.6371024]).addTo(mymap)
.bindPopup('Micropole Rennes')
.openPopup();
</script>
</body>
</html>