-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
239 lines (223 loc) · 12.4 KB
/
index.html
File metadata and controls
239 lines (223 loc) · 12.4 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="refresh" content="300" >
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Map Frederick City</title>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-97517927-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<link rel="stylesheet" href="./css/spires.css" type="text/css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<!-- <body class="container"> -->
<body>
<div id="header" class="container-fluid">
<h1>Map Frederick City</h1>
</div>
<div id="content" class="container-fluid">
<div>
<p>Data provided by the City of Frederick's <a href="https://www.cityoffrederick.com/274/Technology" target="_blank">IT department</a>.
This site was created and maintained by the Frederick Meetup Groups. For more information on them go to our <a href="./about.html" target="_blank">About Us</a> page
Select the region to be filtered below by sizing the box over the area needed. If more information on the type is needed, hover over the image. Then click "Filter".</p>
</div>
<div class="container-fluid map_container">
<div id="map"></div>
</div>
<div id="filter" class="container-fluid"></div>
</div>
<br>
<div id="footer" class="container-fluid">
<br>
<script>
var request;
if(window.XMLHttpRequest)
request = new XMLHttpRequest();
else
request = new ActiveXObject("Microsoft.XMLHTTP");
request.open('GET', 'https://api.mapfrederick.city/export/reststatus/', false);
request.send(); // there will be a 'pause' here until the response to come.
// the object request will be actually modified
if (request.status === 200) {
console.log('Spires is up')
}
else {
console.log(request.status)
document.write("Attention: The backend GIS server is down. We have no control over this endpoint. Please stand by. The page will refresh in 5 minutes.");
}
</script>
<br>
<p>Brought to you by the City of Frederick and the Frederick Meetup groups</p>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#filterModal">
Filter
</button>
</div>
<!-- Modal -->
<div class="modal fade" id="filterModal" tabindex="-1" role="dialog" aria-labelledby="filterModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="filterModalLabel">Select data to be exported. Hover over image to see map type.</h4>
</div>
<div class="modal-body filter_container">
<form role="form">
Aerial Imagery: Earliest to Latest<br>
<a href="#" title="Aerial 1958" onclick="$('img').click(function();return false;">
<img src="images/Aerial1958.png" alt="Aerial_1958"></a>
<a href="#" title="Aerial 1964" onclick="$('img').click(function();return false;">
<img src="images/Aerial1964.png" alt="Aerial_1964"></a>
<a href="#" title="Aerial 1970" onclick="$('img').click(function();return false;">
<img src="images/Aerial1970.png" alt="Aerial_1970"></a>
<a href="#" title="Aerial 1983" onclick="$('img').click(function();return false;">
<img src="images/Aerial1983.png" alt="Aerial_1983"></a>
<a href="#" title="Aerial 1988" onclick="$('img').click(function();return false;">
<img src="images/Aerial1988.png" alt="Aerial_1988"></a>
<a href="#" title="Aerial 2003" onclick="$('img').click(function();return false;">
<img src="images/Aerial2003.png" alt="Aerial_2003"></a>
<a href="#" title="Aerial 2005" onclick="$('img').click(function();return false;">
<img src="images/Aerial2005.png" alt="Aerial_2005"></a>
<a href="#" title="Aerial 2007" onclick="$('img').click(function();return false;">
<img src="images/Aerial2007.png" alt="Aerial_2007"></a>
<a href="#" title="Aerial 2011" onclick="$('img').click(function();return false;">
<img src="images/Aerial2011.png" alt="Aerial_2011"></a>
<a href="#" title="Aerial 2014" onclick="$('img').click(function();return false;">
<img src="images/Aerial2014.png" alt="Aerial_2014"></a>
<br>
Other Imagery<br>
<a href="#" title="Annexes" onclick="$('img').click(function();return false;">
<img src="images/Annexes.png" alt="Annexes"></a>
<a href="#" title="BaseCombined" onclick="$('img').click(function();return false;">
<img src="images/BaseCombined.png" alt="BaseCombined"></a>
<a href="#" title="Contours" onclick="$('img').click(function();return false;">
<img src="images/Contours.png" alt="Contours"></a>
<a href="#" title="Electric" onclick="$('img').click(function();return false;">
<img src="images/Electric.png" alt="Electric"></a>
<a href="#" title="Floodplain" onclick="$('img').click(function();return false;">
<img src="images/Floodplain.png" alt="Floodplain"></a>
<a href="#" title="Frederick" onclick="$('img').click(function();return false;">
<img src="images/Frederick.png" alt="Frederick"></a>
<a href="#" title="gImagery" onclick="$('img').click(function();return false;">
<img src="images/gimagery.png" alt="gImagery"></a>
<a href="#" title="Historic District" onclick="$('img').click(function();return false;">
<img src="images/historicDistrict.png" alt="historicDistrict"></a>
<a href="#" title="Improvement Plans" onclick="$('img').click(function();return false;">
<img src="images/ImprovementPlans.png" alt="ImprovementPlans"></a>
<a href="#" title="Nacs" onclick="$('img').click(function();return false;">
<img src="images/Nacs.png" alt="Nacs"></a>
<a href="#" title="Parcels" onclick="$('img').click(function();return false;">
<img src="images/Parcels.png" alt="Parcels"></a>
<a href="#" title="Plats" onclick="$('img').click(function();return false;">
<img src="images/Plats.png" alt="Plats"></a>
<a href="#" title="Plow Regions" onclick="$('img').click(function();return false;">
<img src="images/PlowRegions.png" alt="PlowRegions"></a>
<a href="#" title="Sewer" onclick="$('img').click(function();return false;">
<img src="images/Sewer.png" alt="Sewer"></a>
<a href="#" title="Storm" onclick="$('img').click(function();return false;">
<img src="images/Storm.png" alt="Storm"></a>
<a href="#" title="Subdivisions" onclick="$('img').click(function();return false;">
<img src="images/Subdivisions.png" alt="Subdivisions"></a>
<a href="#" title="Utilities" onclick="$('img').click(function();return false;">
<img src="images/Utilities.png" alt="Utilities"></a>
<a href="#" title="Water" onclick="$('img').click(function();return false;">
<img src="images/Water.png" alt="Water"></a>
<a href="#" title="Zoning" onclick="$('img').click(function();return false;">
<img src="images/Zoning.png" alt="Zoning"></a>
</form>
</div>
<div class="modal-footer">
<input type="radio" name="type" id="json"/>JSON
<input type="radio" name="type" id="kmz"/>KMZ
<input type="radio" name="type" id="map" checked="checked"/>Image
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary" onclick="doExport()">Export</button>
</div>
</div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<!-- TODO: recenter the map when resizing the window -->
<script>
var rect_bounds = {
north: 39.45475167817998,
south: 39.36297059491874,
east: -77.34786987304688,
west: -77.48588562011719
};
var rectangle;
var map;
var data_set;
var bboxPointsSet = 0;
function initMap() {
var mapDiv = document.getElementById('map');
map = new google.maps.Map(mapDiv, {
center: {lat: 39.4139, lng: -77.4111},
zoom: 11
});
rectangle = new google.maps.Rectangle({
bounds: rect_bounds,
editable: true,
draggable: true
});
rectangle.setMap(map);
}
function doExport() {
if(document.getElementById('json').checked) {
type = 'json'
console.log('json');
}
else if(document.getElementById('kmz').checked) {
type = 'kmz'
console.log('kmz');
}
else {
type = 'map'
console.log('map');
}
var ne = rectangle.getBounds().getNorthEast();
var sw = rectangle.getBounds().getSouthWest();
console.log('bbox: [' +
sw.lat() + ', ' + sw.lng() + ', ' + ne.lat() + ', ' + ne.lng() + ']');
//http://api.mapfrederick.city/bbox/map/Contours/coordinates=39.453518,-77.421502,39.450468,-77.413600
//var url_base = 'https://api.mapfrederick.city/bbox';
var url_base = 'https://epqvt0nita.execute-api.us-east-1.amazonaws.com/dev/bbox';
var url_full = url_base + '/' + type + '/' + data_set + '/coordinates='
+ sw.lat() + ',' + sw.lng() + ',' + ne.lat() + ',' + ne.lng() + '/';
console.log("URL: " + url_full);
var win = window.open('./export.html?url=' + url_full, '_blank');
win.focus();
}
$('img').click(function(){
$('.selected').removeClass('selected'); // removes the previous selected class
$(this).addClass('selected'); // adds the class to the clicked image
console.log(this['alt'])
data_set = this['alt'];
});
</script>
<!-- Replace YOUR_API_KEY with your Google API key in the line below -->
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap" async defer></script>
</body>
</html>