forked from kartena/Leaflet.zoomslider
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest3.html
More file actions
39 lines (34 loc) · 1.29 KB
/
test3.html
File metadata and controls
39 lines (34 loc) · 1.29 KB
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>
<meta charset="utf-8" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="lib/leaflet-0.4.0/leaflet.css" />
<link rel="stylesheet" href="../src/L.Control.Zoomslider.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="lib/leaflet-0.4.0/leaflet.ie.css" />
<link rel="stylesheet" href="../src/L.Control.Zoomslider.ie.css" />
<![endif]-->
</head>
<body>
<div id="map"></div>
<script src="lib/leaflet-0.4.0/leaflet.js"></script>
<script src="../src/L.Control.Zoomslider.js" ></script>
<script src="lib/leaflet-tilejson.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="osm.tilejson.js"></script>
<script>
var layer1 = L.TileJSON.createTileLayer(osmTileJSON);
osmTileJSON.maxzoom = 18;
osmTileJSON.minzoom = 0;
var layer2 = L.TileJSON.createTileLayer(osmTileJSON);
var mapConfig = L.TileJSON.createMapConfig(osmTileJSON);
mapConfig.layers = [layer1];
var map = new L.Map('map', mapConfig);
L.control.layers({
"Few zoomlevels": layer1,
"All zoomlevels": layer2
}).addTo(map);
</script>
</body>
</html>