Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathindex.html
More file actions
Latest commit
45 lines (40 loc) · 1.33 KB
/
Copy pathindex.html
File metadata and controls
45 lines (40 loc) · 1.33 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
40
41
42
43
44
45
<!DOCTYPE html>
<html>
<head>
<metacharset=utf-8/>
<metaname='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui' />
<title>Leaflet SplitMap</title>
<linkrel="stylesheet" type="text/css" href='https://unpkg.com/leaflet@1.3.1/dist/leaflet.css'></link>
<scriptsrc="dist/leaflet-splitmap.js"></script>
<style>
body {
margin:0;
padding:0;
}
#map {
position: absolute;
top:0;
bottom:0;
width:100%;
}
</style>
</head>
<body>
<divid='map'></div>
<script>
varmap=L.map('map').setView([51.505,-0.09],13);
varosmLayer=L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png',{
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap<\/a> contributors'
}).addTo(map);
varstamenLayer=L.tileLayer('//stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png',{
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design<\/a>, '+
'<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0<\/a> — '+
'Map data {attribution.OpenStreetMap}',
minZoom: 1,
maxZoom: 16
}).addTo(map)
L.control.splitMap(stamenLayer,osmLayer).addTo(map);
</script>
</body>
</html>