forked from foss4gtkb/odd2017
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdual_KM.html
More file actions
97 lines (77 loc) · 2.7 KB
/
Copy pathdual_KM.html
File metadata and controls
97 lines (77 loc) · 2.7 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>KIMOTSUKI vs MORI FEB2017</title>
<link rel="stylesheet" href="./css/leaflet.css" />
<script src="./js/leaflet-src.js"></script>
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
#map1, #map2 { width: 49.5%; height: 100%; }
#map1 { float: left; }
#map2 { float: right; }
</style>
</head>
<body>
<div id="map1"></div>
<div id="map2"></div>
<script src="./js/L.Map.Sync.js"></script>
<script type="text/javascript">
var center1 = [31.271802,130.992565];
var center2 = [42.045213,140.595818];
var layer1 = L.tileLayer(
'http://giscience.sakura.ne.jp/tileodd/T_KIMO/{z}/{x}/{y}.png',{
attribution: 'Contains modified Copernicus Sentinel data 2017',
opacity:0.8
});
var osm1 = L.tileLayer(
'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
id: 'examples.map-i875mjb7',
opacity:0.99
});
var layer2 = L.tileLayer(
'http://giscience.sakura.ne.jp/tileodd/T_MORI/{z}/{x}/{y}.png',{
attribution: 'Contains modified Copernicus Sentinel data 2017',
opacity:0.8
});
var osm2 = L.tileLayer(
'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
id: 'examples.map-i875mjb7',
opacity:0.99
});
var map1 = L.map('map1', {
layers: [osm1,layer1],
center: center1,
zoom: 12
});
baseMaps1 = {
"OSM": osm1
};
overlay1 = {
"S2A":layer1
};
L.control.layers(baseMaps1,overlay1).addTo(map1);
//map1.attributionControl.setPrefix('');
var map2 = L.map('map2', {
layers: [osm2,layer2],
center: center2,
zoom: 11
});
baseMaps2 = {
"OSM": osm2
};
overlay2 = {
"S2A":layer2
};
L.control.layers(baseMaps2,overlay2).addTo(map2);
map1.unsync(map2);
map2.unsync(map1);
</script>
</body>
</html>