-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·154 lines (132 loc) · 4.52 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Official Idaho Highway Maps</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""/>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-GffPMF3RvMeYyc1LWMHtK8EbPv0iNZ8/oTtHPx9/cc2ILxQ+u905qIwdpULaqDkyBKgOaB57QTMg7ztg8Jm2Og=="
crossorigin=""></script>
<script src="proj4-compressed.js"></script>
<script src="proj4leaflet.js"></script>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
html, body, #map{
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var resolutions = [465, 233, 117.1875, 58.59375];
var tile1947 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1947/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1950 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1950/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1953 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1953/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1962 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1962/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1963 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1963/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1964 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1964/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1965 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1965/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1967 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1967/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1969 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1969/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1970 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1970/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1972 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1972/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile1987 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-1987/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var tile2007 = new L.TileLayer('https://tiles.sagebrushgis.com/idaho/idaho-2007/{z}/{x}/{y}.png',{
minZoom: 0,
maxZoom: resolutions.length-1,
continuousWorld: true
});
var baseMaps = {
"1947": tile1947,
"1950": tile1950,
"1953": tile1953,
"1962": tile1962,
"1963": tile1963,
"1964": tile1964,
"1965": tile1965,
"1967": tile1967,
"1969": tile1969,
"1970": tile1970,
"1972": tile1972,
"1987": tile1987,
"2007": tile2007
};
var overlayMaps = {
};
var southWest = L.latLng(41.5, -118);
var northEast = L.latLng(49.5, -110);
var bounds = L.latLngBounds(southWest, northEast);
var crs = new L.Proj.CRS('SR-ORG:6677', '+proj=tmerc +lat_0=42 +lon_0=-114 +k=0.9996 +x_0=2500000 +y_0=1200000 +ellps=GRS80 +units=m +no_defs');
crs.scale = function(zoom) {
return 1 / resolutions[zoom];
};
var map = new L.Map('map', {
crs: crs,
maxBounds: bounds,
layers: [
tile1947
],
center: new L.LatLng(45, -116),
zoom: 3,
continuousWorld: true
});
L.control.layers(baseMaps,overlayMaps).addTo(map);
</script>
</body>
</html>