-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.html
276 lines (245 loc) · 9.02 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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg"
crossorigin="anonymous">
<!-- Yes, I know I should just do this all with npm, but I can't yet figure out how to get it to work that way -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<title>Cloud Optimized GeoTIFF (COG) map</title>
<style>
html, body {
margin: 0;
height: 100%;
}
#map {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
}
.map-small {
}
button, input, select, textarea {
font-size: 11px;
color: black;
}
.controls {
position: relative;
top: 5px;
left: 18px;
padding: 10px 35px;
background-color: rgba(147, 93, 140, 0);
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-size: 12pt;
text-outline: 2px 2px #000000;
color: floralwhite;
}
.flexbox { display: flex; }
.flexbox .stretch { flex: 1; max-width: 800px;}
.flexbox .normal { flex: 0; margin: 0 0 0 2.25rem; }
.flexbox div input { padding: .5em 1em; width: 100%; }
.flexbox div button {
background-color: transparent;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
color: #ffffff !important;
-moz-appearance: none;
-webkit-appearance: none;
-ms-appearance: none;
appearance: none;
-moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
-webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
-ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
border-radius: 8px;
border: 0;
cursor: pointer;
display: inline-block;
font-weight: 300;
height: 2.6em;
line-height: 1.75em;
min-width: 5.25em;
padding: 0 1.1em;
text-align: center;
text-decoration: none;
white-space: nowrap;
background-color: rgba(147, 93, 140, 0.79);
margin-left: -1.2em;
margin-top: 1px;
}
.text-field {
background-color: rgba(220, 220, 220, 0.8);
padding: 3px;
border-radius: 7px;
}
.text {
color: #f2f2f2;
background: rgba(255, 74, 74, 0.6);
font-size: 15px;
line-height: 15px;
font-weight: 700;
margin: 0 2px 5px;
float: left;
padding: 4px;
margin: 2.2px 3px 4px;
font-family: 'Libre Baskerville', serif;
max-width: 100px;
}
@media only screen and (max-width : 480px) {
.text {
visibility: hidden;
font-size: 0px;
padding: 0px;
margin: 0 0 0;
};
}
.samples {
position: relative;
top: 5px;
left: 0px;
}
.button {
background-color: transparent;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
color: #ffffff !important;
-moz-appearance: none;
-webkit-appearance: none;
-ms-appearance: none;
appearance: none;
-moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
-webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
-ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
border-radius: 8px;
border: 0;
cursor: pointer;
display: inline-block;
font-weight: 300;
height: 1.75em;
line-height: 1.75em;
min-width: 3.25em;
padding: 0 0.7em;
text-align: center;
text-decoration: none;
white-space: nowrap;
background-color: rgba(147, 93, 140, 0.79);
}
.button:hover {
background-color: rgba(255, 255, 255, 0.79);
}
/* The Modal (background) */
.modal {
}
/* Modal Content */
.modal-content {
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-size: 12pt;
text-outline: 2px 2px #000000;
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
min-width: 300px;
max-width: 800px;
}
/* The Close Button */
.close {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
</style>
</head>
<body>
<div id="map" class="map" ></div>
<div class="controls">
<!--p><input type="checkbox" id="labels" name="labels" checked="true"> Labels</p-->
<section class="flexbox">
<div class="text"> COG URL:</div>
<div class="stretch">
<input type="text" class="text-field" name="cog-url" id="cog-url" placeholder="Enter COG URL or click on a sample" />
</div>
<div class="normal" id="submit-url">
<button>Submit</button>
</div>
<!--
<input type="text" class="text-field" name="cog-url" id="cog-url" size="110" value="http://oin-hotosm.s3.amazonaws.com/594ab0ba1b114600111194a3/0/d66720c4-148c-4e11-9d54-4ae2a6ba6351.tif">
<button class="button" id="submit-url">Submit</button> -->
</section>
<div class="samples">
<button class="button" id="sample-1">sample 1</button>
<button class="button" id="sample-2">sample 2</button>
<button class="button" id="sample-3">sample 3</button>
</div>
</div>
</div>
<!-- <div id="myModal" class="modal">
-->
<!-- Modal content -->
<!--div class="modal-content">
<span class="close">×</span>
<p>Some text in the Modal..</p>
</div-->
<!-- </div>
-->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content">
<a href="https://github.com/radiantearth/cog-map"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3 class="modal-title">About COG Map</h3>
</div>
<div class="modal-body">
<p>This map enables the display and sharing of any geospatial data that is available online as a
Cloud Optimized GeoTIFF (COG). A COG is a special format to store geospatial rasters on the cloud so
software can stream just what it needs and make immediate use of it. You can learn more at
<a href="http://cogeo.org">cogeo.org</a></p>
<p>To try out using a COG click on one of the <code>sample</code> buttons, or enter
any URL of a cloud optimized geotiff that is stored online. The map will render tiles
and let you zoom in and explore. You can share the exact view that you're looking at
by copying the URL and sending it to a friend.
</p>
<p>The map is powered by <a href="http://github.com/radiantearth/tiles.rdnt.io">tiles.rdnt.io</a>, an instance
of <a href="https://github.com/mojodna/marblecutter">marblecutter</a> hosted on
<a href="https://aws.amazon.com/lambda/">AWS Lambda</a>, which enables it to scale
to any number of users. The tile service can be used with any online COG, and you are
free to use the tiler to try out COG's in your own application. Documentation on using it is available
in the <a href="http://github.com/radiantearth/tiles.rdnt.io">github repo</a>, or you can
install your own <a href="https://github.com/mojodna/marblecutter-virtual">COG
tiler</a>.
</p>
<p>This map is open source, and contributions are welcome on our <a href="https://github.com/radiantearth/cog-map">
github repo</a>. The development of this map was generously supported <a href="http://radiant.earth">Radiant.Earth</a>.
And thanks to <a href="http://openaerialmap.org">OpenAerialMap</a> and <a href="http://planet.com">Planet</a> for the
openly licensed sample data, and to <a href="http://carto.com">Carto</a> and <a href="http://openstreetmap.org">OSM contributors</a>
for the basemap.
</div>
<div class="modal-footer">
<a href="http://radiant.earth">
<img src="https://demos.radiant.earth/assets/images/radiant_logo_2.png" width="200"/></a>
<button type="button" id="close" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<button id="about" class="button" data-toggle="modal" data-target="#myModal" style="position: absolute; bottom: 10px; left: 10px; z-index: 99;">
<i class="fas fa-question"></i>
</button>
<script src="./main.js"></script>
</body>
</html>