-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
208 lines (183 loc) · 7.11 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
<!DOCTYPE html>
<html lang="en-us">
<head>
<!-- dummy favicon -->
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
<!-- boostrap styles -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<!-- mapbox styles -->
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.css' rel='stylesheet' />
<!-- mapbox draw styles -->
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.0.4/mapbox-gl-draw.css' type='text/css' />
<!-- turf -->
<script src='https://npmcdn.com/@turf/turf/turf.min.js'></script>
<!-- mapbox gl -->
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.js'></script>
<!-- mapbox draw -->
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.0.4/mapbox-gl-draw.js'></script>
<!-- boostrap stuff -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</head>
<style>
#map {
height: 100%;
}
.map-overylay-pane {
background: rgba(255, 255, 255, 0.8);
border-radius: 3px;
box-shadow: 0px 1px 2px 0px gray;
top: 0;
right: 0;
height: 100%;
position: fixed;
}
#highlight-container {
background: red;
height: 40px;
width: 40px;
margin: 10px;
position: fixed;
top: 0;
left: 0;
border-radius: 5px;
opacity: .7;
display: none;
}
/* Spinner */
/*https://projects.lukehaas.me/css-loaders/*/
.loader,
.loader:after {
border-radius: 50%;
width: 10em;
height: 10em;
}
.loader {
margin: 60px auto;
font-size: 10px;
position: relative;
text-indent: -9999em;
border-top: 1.1em solid rgba(67,148,218, 0.2);
border-right: 1.1em solid rgba(67,148,218, 0.2);
border-bottom: 1.1em solid rgba(67,148,218, 0.2);
border-left: 1.1em solid #4394da;
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
-webkit-animation: load8 1.1s infinite linear;
animation: load8 1.1s infinite linear;
}
@-webkit-keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
</style>
<body>
<div class="container-fluid p-0">
<div class="row w-100" id="map-container">
<div class="col">
<div id="map" class="h-100"></div>
</div>
<div class="col-lg-3 map-overylay-pane pt-2">
<div class="row pb-3">
<div class="col-lg-12">
<h2> GeoJSON Grid Creator </h2>
</div>
</div>
<div class="row" id="form-row">
<div class="col-lg-12">
<h6> Step 1: Set Parameters </h6>
<form class="needs-validation" id="gridConfig" action="#" novalidate>
<div class="form-group">
<div class="form-row">
<label for="cellSize" class="col-sm-3 col-form-label">Cell Size</label>
<div class="col">
<input type="number" class="form-control" id="cellSize" placeholder="Cell Size" required>
<div class="invalid-feedback">
Cell size is required.
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
<label for="uom" class="col-sm-3 col-form-label">Unit of Measure</label>
<div class="col">
<select class="form-control" id="uom">
<option value="feet">Feet</option>
<option value="kilometers">Kilometers</option>
<option value="meters">Meters</option>
<option value="miles">Miles</option>
<option value="radians">Radians</option>
<option value="degrees">Degrees</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
<label for="gridType" class="col-sm-3 col-form-label">Grid Type</label>
<div class="col">
<select class="form-control" id="gridType">
<option value = "square">Square</option>
<option value = "hex">Hex</option>
<option value = "triangle">Triangle</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
<label for="renderMap" class="col-sm-3 col-form-label">Render Map</label>
<div class="col">
<select class="form-control" id="renderMap">
<option value="true">Yes</option>
<option value="false">No</option>
</select>
</div>
</div>
</div>
</form>
<h6> Step 2: Draw Bounding Box </h6>
<p>
Use the <a href="#" id='clickme'>draw tool</a> to draw a bounding box on the map.
</p>
<h6> Step 3:</h6>
<button id="create-button" type="submit" class="btn btn-secondary disabled">Create Grid!</button>
</div>
</div>
<div class="row" id="download-row" style="display:none">
<div class="col-lg-12">
<h5><a id="downloadAnchor" href="">>> Download Grid <<</a></h5>
<p>
<button id="reset-button" type="submit" class="btn btn-primary">Start Over</button>
</p>
</div>
</div>
<div class="row">
<div class="col align-self-center pt-2" id="dataPane">
</div>
</div>
</div>
</div>
</div>
<script src="js/grid_maker.js"></script>
</body>
</html>