-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.html
54 lines (43 loc) · 1.66 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
<!DOCTYPE html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html lang="en-US">
<head>
<title>Display a GeoTiff on OL3</title>
<meta name="viewport" content="width=device-width">
<meta charset="UTF-8" />
<title>Display a GeoTiff on OL3</title>
<link rel="stylesheet" href="css/ol.css" type="text/css">
<script src="lib/ol.js"></script>
<script src="lib/lz-string.js"></script>
<script src="js/ol3map.js"></script>
<script src="js/ol3geotiff.js"></script>
<script src="js/testGeotiffParser.js"></script>
<script data-main="js/GeotiffParser" src="lib/require.js"></script>
<script type="text/javascript">
"use strict";
var loadFile = function() {
var files = document.getElementById( "tiff-file" ).files;
var file = files[0];
if (files.length < 1 || file.type !== 'image/tiff') {
return;
}
var reader = new FileReader();
reader.onload = function(e) {
addGeotiffLayer(e.target.result);
};
reader.readAsArrayBuffer( file );
}
</script>
</head>
<body onload="loadMap()";>
<form name="tiff-parser" method="post" enctype="multipart/form-data" style="margin: 2% auto auto; ">
<input type="file" name="tiff-file" id="tiff-file" accept="image/tiff" required onchange="loadFile();" />
<input type="checkbox" name="MixMaxCb" id="MixMaxCb" value="MixMax">
<label>Min:</label><input type="number" id="MinValueOfMinMax" name="min" value="0">
<label>Max:</label><input type="number" id="MaxValueOfMinMax" name="max" value="1000">
</form>
<div id="map" class="map" > </div>
</body>
</html>