-
Notifications
You must be signed in to change notification settings - Fork 1
/
map.html
108 lines (104 loc) · 4.52 KB
/
map.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
<!DOCTYPE html>
<html>
<head>
<title>Map</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<link rel="stylesheet" href="style/navbarMAP.css" type="text/css">
<link rel="shortcut icon" type="image/png" href="images/lundin_favicon.png"/>
<style>
#map {
height:93.5%;
width: 100%;
z-index: 0;
}
/* Optional: Makes the sample page fill the window. */
html, body {
height: 100%;
margin: 0;
padding: 0;
background-color: cadetblue;
}
#navbar {
z-index: 1;
}
/* ------------------------------------ */
</style>
</head>
<body>
<!-- ------------------ NavBar ----------------- -->
<div id="navbar">
<ul>
<li><a onclick="showOptions()" style="cursor: pointer">Options</a></li>
<li style="float:right;margin-left: 0.2em;"><a href="index.html">Home</a></li>
<li style="float:right;margin-left: 0.2em;"><a href="sentinel.html">Sentinel-1 Data</a></li>
<li style="float:right;"><a onclick="showSubMenu()">Maps</a></li>
<div id="subMenu">
<li style="float:right"><a id="subMenu4" style="color:beige" onclick="focusWaterMap()">Focus Water</a></li>
<li style="float:right" ><a style="color:beige">Magnetic</a></li>
<li style="float:right"><a style="color:beige">Bathymetry</a></li>
<li style="float:right"><a id="subMenu1" style="color:beige" onclick="baseMap()">Base Map</a></li>
</div>
</ul>
</div>
<!-- ------------------ ...... ----------------- -->
<!-- ------------------ Options ----------------- -->
<div id="optionMenu">
<div id="mainMenu">
<ul>
<li onclick="generalOptions()"><a>General</a></li>
<ul id="generalMenu">
<li class="general" id="general_1" onclick="multipleTextboxes()">Multiple textboxes</li>
<li class="general" id="general_2" onclick="showGrid()">Show grid</li>
<li class="general">todo</li>
<li class="general" id="generalLast">todo</li>
</ul>
<li onclick="filterOptions()"><a>Filters</a></li>
<ul id="filterMenu">
<li class="general" id="filter_1" onclick="sortOil()">Oil</li>
<li class="general" id="filter_2" onclick="sortGas()">Gas</li>
<li class="general" id="filter_3" onclick="sortOther()">Other</li>
</ul>
<li><a>Elements</a></li>
<li onclick="weatherOptions()"><a>Weather</a></li>
<ul id="weatherMenu">
<li class="general" id="weather_1" onclick="sortWind()">Show wind</li>
<li class="general" id="weather_2" onclick="sortTemp()">Show temperature</li>
<li class="general" id="weather_3" onclick="sortForecast()">Show forecast</li>
</ul>
<li id="searchMenu" onclick="searchOptions()"><a>Find Platform</a></li>
<div id="searchBox">
<input id="searchInput" type="text">
<button id="searchButton">Search</button>
</div>
<ul id="searchResults">
</ul>
</ul>
</div>
</div>
<!-- ------------------ ...... ----------------- -->
<div id="map"></div>
<!--<script src="scripts/LatLonGraticule.js"></script>-->
<script>
var map;
var kmlURL = localStorage.getItem("kmlURL");
var splitURL = kmlURL.split(":");
var finalKML = splitURL[0] + ":" + splitURL[1] + "-" + splitURL[2]
+ '?time=' + (new Date().getTime()).toString() // One-indexed ?
console.log(finalKML);
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 64.397, lng: 7.644},
zoom: 4
});
var ctaLayer = new google.maps.KmlLayer({
url: finalKML,
map: map
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCLqi7VCFRa7voVGflNyUXyhyL8OgqIQ68&callback=initMap&libraries=geometry"></script>
<script src="scripts/map.js"></script>
<script src="scripts/map_options.js"></script>
</body>
</html>