-
Notifications
You must be signed in to change notification settings - Fork 0
/
kharkov.html
185 lines (142 loc) · 6.72 KB
/
kharkov.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!doctype html>
<html>
<head>
<title>Kharkov Old Maps</title>
<link rel="stylesheet" href="assets/leaflet-0.7.3/leaflet.css">
<link rel="stylesheet" href="assets/leaflet.groupedlayercontrol/leaflet.groupedlayercontrol.css">
<style type="text/css">
html,
body,
#map {
margin: 0px;
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="assets/jquery-1.11.1.min.js"></script>
<script src="assets/leaflet-0.7.3/leaflet.js"></script>
<script src="assets/leaflet.groupedlayercontrol/leaflet.groupedlayercontrol.js"></script>
<script>
var BingLayer = L.TileLayer.extend({
getTileUrl: function(tilePoint) {
this._adjustTilePoint(tilePoint);
return L.Util.template(this._url, {
s: this._getSubdomain(tilePoint),
q: this._quadKey(tilePoint.x, tilePoint.y, this._getZoomForUrl())
});
},
_quadKey: function(x, y, z) {
var quadKey = [];
for (var i = z; i > 0; i--) {
var digit = '0';
var mask = 1 << (i - 1);
if ((x & mask) != 0) {
digit++;
}
if ((y & mask) != 0) {
digit++;
digit++;
}
quadKey.push(digit);
}
return quadKey.join('');
}
});
var layerBA = new BingLayer('http://t{s}.tiles.virtualearth.net/tiles/a{q}.jpeg?g=2732', {
maxZoom: 19,
subdomains: ['0', '1', '2', '3', '4'],
attribution: '© <a href="http://bing.com/maps">Bing Maps</a>'
});
var layerOSM = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '© Map Data <a href="https://openstreetmap.org/copyright">OpenStreetMap</a> contributors'
});
var layerMapQuestOSM = L.tileLayer("http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png", {
maxZoom: 19,
subdomains: ["otile1", "otile2", "otile3", "otile4"],
attribution: '© Tiles courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a>. © Map data <a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors'
});
var layerTFL = L.tileLayer('http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '© <a href="http://www.opencyclemap.org">OpenCycleMap</a>, © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
});
var layerMSHyb = L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/hybrid/x={x}&y={y}&z={z}', {
maxZoom: 19,
attribution: 'Data © <a href="http://www.openstreetmap.org/copyright/en">OSM</a> contributors (ODbL), rendering ' +
'<a href="http://giscience.uni-hd.de/" target="_blank">GIScience Research Group @ University of Heidelberg</a>'
});
var layerMapBoxImagery = L.tileLayer('http://{s}.tiles.mapbox.com/v4/openstreetmap.map-inh7ifmo/{z}/{x}/{y}.png?access_token=pk.eyJ1Ijoib3BlbnN0cmVldG1hcCIsImEiOiJhNVlHd29ZIn0.ti6wATGDWOmCnCYen-Ip7Q', {
maxZoom: 17,
attribution: 'Data © <a href="http://www.openstreetmap.org/copyright/en">OSM</a> contributors (ODbL), rendering ' +
'<a href="http://giscience.uni-hd.de/" target="_blank">GIScience Research Group @ University of Heidelberg</a>'
});
var layerHikeBike = L.tileLayer('http://{s}.hikebike.gpsies.com/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '© <a href="http://hikebikemap.org/">HikeBikeMap</a>, © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
});
var layerOSMTopo = L.tileLayer('http://opentopomap.org/{z}/{x}/{y}.png', {
maxZoom: 16,
attribution: 'Map Data: © <a href="https://openstreetmap.org/copyright">OpenStreetMap</a>-Mitwirkende, <a href="http://viewfinderpanoramas.org">SRTM</a> | Display Map: © <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
});
var layerEmpty = L.tileLayer('assets/img/blank.png', {
maxZoom: 19
});
var kharkov1787 = L.tileLayer('http://134.249.136.27:8001/v2/kharkov1787/{z}/{x}/{y}.png', {
maxZoom: 18
});
var kharkov1804 = L.tileLayer('http://134.249.136.27:8001/v2/kharkov1804/{z}/{x}/{y}.png', {
maxZoom: 18
});
var kharkov1817 = L.tileLayer('http://134.249.136.27:8001/v2/kharkov1817/{z}/{x}/{y}.png', {
maxZoom: 18
});
var kharkov1822 = L.tileLayer('http://134.249.136.27:8001/v2/kharkov1822/{z}/{x}/{y}.png', {
maxZoom: 18
});
var kharkov1854 = L.tileLayer('http://134.249.136.27:8001/v2/kharkov1854/{z}/{x}/{y}.png', {
maxZoom: 18
});
var kharkov1877 = L.tileLayer('http://134.249.136.27:8001/v2/kharkov1877/{z}/{x}/{y}.png', {
maxZoom: 18
});
var map = new L.Map('map', {
minZoom: 13,
maxZoom: 19,
layers: [layerOSM]
}).setView([49.99126, 36.23939], 14);
var baseLayers = {
"OpenStreetMap": layerOSM,
"Thunderforest Landscape": layerTFL,
"MapBox Imagery": layerMapBoxImagery,
"MapQuest OSM": layerMapQuestOSM,
"OpenTopoMap": layerOSMTopo,
"Bing Aerial": layerBA,
"Empty Layer": layerEmpty
};
var LayerControlBase = L.control.groupedLayers(baseLayers, {}, {
collapsed: false
});
LayerControlBase.addTo(map);
var groupedOverlays = {
"Custom Layers": {
"Kharkov 1787":kharkov1787,
"Kharkov 1804":kharkov1804,
"Kharkov 1817":kharkov1817,
"Kharkov 1822":kharkov1822,
"Kharkov 1854":kharkov1854,
"Kharkov 1877":kharkov1877
}
};
var LayerControlServices = L.control.groupedLayers({}, groupedOverlays, {
collapsed: false
});
LayerControlServices.addTo(map);
$('.leaflet-top.leaflet-right .leaflet-control-layers').css('width', '178px');
</script>
<script src="//cdn.maptiks.com/maptiks-leaflet.min.js"></script>
<script>maptiks.trackcode='f63e0d03-1a14-4418-b757-9b4355bcc9fc';</script>
</body>
</html>