-
Notifications
You must be signed in to change notification settings - Fork 0
/
oigawa.html
executable file
·108 lines (85 loc) · 4.09 KB
/
oigawa.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
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
98
99
100
101
102
103
104
105
106
107
108
<html style="height: 100%; margin: 0;">
<head>
<title>topodemo</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script>
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js'></script>
<link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css' rel='stylesheet' />
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"/>
<link rel="stylesheet" href="./dist/leaflet.zoomhome.css"/>
<script src="./dist/leaflet.zoomhome.min.js"></script>
<script src="./dist/bundle.js"></script>
<!-- plugin -->
<link rel="stylesheet" href="css/Control.OSMGeocoder.css" />
<script src="js/Control.OSMGeocoder.js"></script>
<!-- plugin -->
</head>
<body style="height: 100%; margin: 0; overflow: hidden;">
<div id='map' style="height: 100%; width: 100%;"></div>></div>
</body>
<script>
var map1 = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: "<a href='https://www.openstreetmap.org/#map=14/24.8168/103.3237' target='_blank'> © OpenStreetMap contributors CC BY-SA2.0</a>"
});
var map0 = L.tileLayer('https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: "<a href='https://maps.gsi.go.jp/development/ichiran.html' target='_blank'>地理院タイル・淡色地図</a>"
});
var map2 = L.tileLayer('https://cyberjapandata.gsi.go.jp/xyz/seamlessphoto/{z}/{x}/{y}.jpg', {
maxZoom: 18,
attribution: "<a href='https://maps.gsi.go.jp/development/ichiran.html' target='_blank'>地理院タイル・全国最新写真</a>"
});
var map3 = L.tileLayer('https://cyberjapandata.gsi.go.jp/xyz/gazo1/{z}/{x}/{y}.jpg', {
maxZoom: 17,
attribution: "<a href='https://maps.gsi.go.jp/development/ichiran.html' target='_blank'>地理院タイル・過去空中写真(1974年~1978年)</a>"
});
var map4 = L.tileLayer('https://cyberjapandata.gsi.go.jp/xyz/ort_old10/{z}/{x}/{y}.png', {
maxZoom: 17,
attribution: "<a href='https://maps.gsi.go.jp/development/ichiran.html' target='_blank'>地理院タイル・過去空中写真(1961年~1969年)</a>"
});
var map5 = L.tileLayer('https://cyberjapandata.gsi.go.jp/xyz/hillshademap/{z}/{x}/{y}.png', {
maxZoom: 16,
attribution: "<a href='https://maps.gsi.go.jp/development/ichiran.html' target='_blank'>地理院タイル・陰影起伏図</a>"
});
var map = L.map('map', {
center: [34.766882,138.291035],
zoom: 13,
layers: [map2],
zoomControl: false
});
var baseLayers = {
"OpenStreetMap": map1,
"淡色地図": map0,
"最新空中写真": map2,
"1974年~1978年の空中写真":map3,
"1960年代の空中写真":map4,
"陰影起伏図":map5
};
L.control.layers(baseLayers).addTo(map);
L.control.scale({imperial: false}).addTo(map);
var zoomHome = L.Control.zoomHome();
zoomHome.addTo(map);
map.addControl(new L.Control.Fullscreen());
var printer = L.easyPrint({
tileLayer: map1,
sizeModes: ['Current', 'A4Landscape', 'A4Portrait'],
filename: 'myMap',
exportOnly: true,
hideControlContainer: true
}).addTo(map);
function manualPrint () {
printer.printMap('CurrentSize', 'MyManualPrint')
}
var option = {
position: 'topright', // topright, topleft, bottomright, bottomleft
text: '検索',
placeholder: '検索条件を入力してください。'
}
var osmGeocoder = new L.Control.OSMGeocoder(option);
map.addControl(osmGeocoder);
</script>
</html>