-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
241 lines (201 loc) · 10.8 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
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Exploring Vermont Trails</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/logo-nav.css" rel="stylesheet">
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<!-- Leaflet from CDN -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ==" crossorigin=""/>
<!-- Make sure you put this AFTER Leaflet's CSS -->
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-lInM/apFSqyy1o6s89K4iQUKg6ppXEgsVxT35HbzUupEVRh2Eu9Wdl4tHj7dZO0s1uvplcYGmt3498TtHq+log==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Esri Leaflet from CDN -->
<script src="https://unpkg.com/[email protected]/dist/esri-leaflet.js"></script>
<style>
body { margin:0; padding:0; }
#map { position: absolute; top:0; bottom:0; right:0; left:0;}
</style>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="#">
<img src="logo.png" width="150" height="30" alt="">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#"><b>Vermont Trail Explorer</b>
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<div data-toggle="modal" data-target="#aboutModal"><a class="nav-link" href="#">About</a></div>
</li>
<li class="nav-item">
<li class="nav-item">
<div data-toggle="modal" data-target="#layerModal"><a class="nav-link" href="#">Layers</a></div>
</li>
<li class="nav-item">
<a class="nav-link" href="http://geodata.vermont.gov/" target="_blank">Open Data Portal</a>
</li>
<li class="nav-item">
<a class="nav-link" href="http://vcgi.vermont.gov/" target="_blank">VCGI Website</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Page Content -->
<div class="container">
<div id="map" ></div>
<script>
<!-- Sets map location and moves zoom controls -->
var map = L.map('map', {zoomControl: true}).setView([44.2627, -72.5804], 10);
map.zoomControl.setPosition('bottomright')
<!-- basemap from Mapbox -->
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1Ijoia2Vmb3J0bmV5IiwiYSI6ImNqNnF5cXlsMDAzaXoyd3BoOXJtcnhxZ3AifQ.kMVhBHqX5aWw171n1csPug' , {
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>, ' +
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
id: 'mapbox.streets'
}).addTo(map);
<!-- E911 Trails -->
var traillinesurl = "https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/OPENDATA_VCGI_EMERGENCY_SP_NOCACHE_v1/MapServer/21/";
var traillines = L.esri.featureLayer({
url: traillinesurl,
style: function (feature) {
return {color: '#f49842',
weight: 2,
opacity: 0.8,};
}
})
<!-- VT Large Forest Land Ownership Blocks - lines -->
var vtforesturl = "https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/OPENDATA_VCGI_CADASTRAL_SP_NOCACHE_v1/MapServer/7/";
var vtforest = L.esri.featureLayer({
url: vtforesturl,
style: function (feature) {
return {color: '#884EA0',
weight: 2,
opacity: 0.9,};
}
})
<!-- VT Northern Forest Lands Area - Private Conservation Lands -->
var privatelandurl = "https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/OPENDATA_VCGI_CADASTRAL_SP_NOCACHE_v1/MapServer/8/";
var privateland = L.esri.featureLayer({
url: privatelandurl,
style: function (feature) {
return {color: '#2471A3',
weight: 2,
opacity: 0.9,};
}
})
<!-- VT Protected Lands -->
var protectedlandurl = "https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/OPENDATA_VCGI_CADASTRAL_SP_NOCACHE_v1/MapServer/10/";
var protectedland = L.esri.featureLayer({
url: protectedlandurl,
style: function (feature) {
return {color: '#2E4053',
weight: 2,
opacity: 0.9,};
}
});
<!-- VT Wilderness Areas -->
var wildernessurl = "https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/OPENDATA_VCGI_CADASTRAL_SP_NOCACHE_v1/MapServer/12/";
var wilderness = L.esri.featureLayer({
url: wildernessurl,
style: function (feature) {
return {color: '#D4AC0D',
weight: 2,
opacity: 0.9,};
}
});
<!-- Makes layer controls -->
var mapOverlays = {
"Trails": traillines,
"Vermont Wilderness Blocks": wilderness,
"Protected Lands Blocks": protectedland,
"Private Land Blocks": privateland,
"Large Forest Land Ownership Blocks": vtforest,
};
L.control.layers(null, mapOverlays, {position:'bottomright'}).addTo(map);
</script>
</div>
<!-- Modal -->
<div class="modal fade" id="aboutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">About</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
The map was created using Leaflet with added layer and zoom controls in a basic Bootstrap template quickly to create something is responsive and easy to use. The basemap is from Mapbox and the Open Street Map tilesets while the toggeable layers are from the Vermont Center for Geographic Information's Open Data Portal served through Esri's APIs. The layers include point, line and shape vectors.<p>
<ul>
<li><a href="http://leafletjs.com/examples.html" target="_blank">Leaflet Tutorials</a>
</li>
<li><a href="https://startbootstrap.com/template-categories/all/" target="_blank">Bootstrap Templates</a>
</li>
<li><a href="http://geodata.vermont.gov/" target="_blank">VCGI Open Data Portal</a>
</li>
<li><a href="https://github.com/vcgi" target="_blank">VCGI GitHub</a>
</li>
</ul>
Start by selecting what you want to see in the layer control in the bottom right!
</template>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="layerModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Layers</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<ul>
<li>VT Trails (<a href="https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/OPENDATA_VCGI_EMERGENCY_SP_NOCACHE_v1/MapServer/21/" target="_blank">Layer 21</a>) Line Data defining Vermont trails including the Long Trail, Appalachian Trail and other State or Local trail networks. <p>
</li>
<li>VT Wilderness Areas (<a href="https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/OPENDATA_VCGI_CADASTRAL_SP_NOCACHE_v1/MapServer/12/" target="_blank">Layer 12</a>) Description: A parcel of Forest Service land congressionally designated as wilderness such as National Wilderness Area.<p>
</li>
<li>VT Protected Lands (<a href="https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/OPENDATA_VCGI_CADASTRAL_SP_NOCACHE_v1/MapServer/10/" target="_blank">Layer 10</a>) parcel data from the Vermont Protected Lands Database (VPLD) showing protect lands.<p>
</li>
<li>VT Northern Forest Lands Area - Private Conservation Lands (<a href="https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/OPENDATA_VCGI_CADASTRAL_SP_NOCACHE_v1/MapServer/8/" target="_blank">Layer 8</a>) Private Conservation Lands in the Northern Forest land area - land in full or partial ownership by 501(c)3 conservation organizations (VLT, TNC, GMC, and others).<p>
</li>
<li>VT Large Forest Land Ownership Blocks - lines (<a href="https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/OPENDATA_VCGI_CADASTRAL_SP_NOCACHE_v1/MapServer/7/" target="_blank">Layer 7</a>)Large forest land ownership blocks (Northern Forest Lands)<p>
</li>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- /.container -->
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>
</html>