-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmapPage.html
194 lines (174 loc) · 8.5 KB
/
mapPage.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
<!DOCTYPE html>
<head>
<title>Mapal</title>
<link rel="shortcut icon" type="image/x-icon" href="graphics/headerlogo.ico" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CDN og lokal source leaflet -->
<link rel="stylesheet" href="Leaflet/leaflet.css"/>
<link rel="stylesheet" type="text/css" href="Leaflet/Leaflet.draw/dist/leaflet.draw.css">
<script src="Leaflet/leaflet.js"></script>
<script src="Leaflet/Leaflet.draw/dist/leaflet.draw.js"></script>
<!-- CDN bootstrap -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script> -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.js"></script> -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
<script src="bootstrap/js/jquery-1.12.3.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- TERRAFORMER IO -->
<script src="terraformer/terraformer.min.js"></script>
<script src="terraformer/terraformer.js"></script>
<!-- <script src="terraformer-arcgis-parser.min.js"></script> https://github.com/Esri/terraformer-arcgis-parser -->
<!-- <script src="terraformer-wkt-parser.min.js"></script> https://github.com/Esri/terraformer-wkt-parser -->
<!-- <script src="terraformer-geostore.min.js"></script> https://github.com/Esri/terraformer-geostore -->
<!-- source til wickets -->
<script src="Leaflet/wicket.js"></script>
<script src="Leaflet/wicket-leaflet.js"></script>
<script src="script.js"></script>
<script src="head/locationDbHead.js"></script>
<!-- <script src="head/groupDbHead.js"></script> -->
<script src="head/userDbHead.js"></script>
<script src="objects/location.js"></script>
<link rel="stylesheet" href="mapal_style.css">
</head>
<body onload="initializeMapPage()">
<div class="jumbotron text-center">
<div class="container upper-right">
<div class="row">
<div class="col-xs-12">
<div class="myLoc">
<span id="myLocIcon" class="glyphicon glyphicon-map-marker"></span>
<label id="myLoc"></label>
</div>
</div>
</div>
</div>
</div>
<div id="mapwrapper">
<div id="map">
<div style="position: absolute; z-index: 1; left:0.55em; top:7em" class="btn-group-vertical"> <!-- z=1 button is in front of map, but under overlay !-->
<button type="button" id="drawPoly" class="btn btn-s bg-info" title="Create a location" data-toggle="tooltip" data-placement="right" onclick="drawPolygon()"><span id="drawIcon" class="glyphicon glyphicon-plus"></span></button>
<button type="button" id="currentLoc" class="btn btn-s bg-success" onclick="manageUser('updateUserLocation')" title="Update your current location" data-toggle="tooltip" data-placement="right"><span id="locIcon" class="glyphicon glyphicon-map-marker"></span></button>
<button type="button" id="showLoc" class="btn btn-s bg-warning" onclick="manageUser('getMyLocations')" title="See your locations" data-toggle="tooltip" data-placement="right"><span id="showLocsIcon" class="glyphicon glyphicon-eye-open"></span></button>
<button type="button" id="geoMessage" class="btn btn-s bg-danger" onclick="manageUser('updateUserGeomessage')" title="Update your GeoMessage" data-toggle="tooltip" data-placement="right"><span id="messageIcon" class="glyphicon glyphicon-comment"></span></button>
</div>
</div>
</div>
<!-- SIDE MENU -->
<div id="wrapper">
<div class="overlay"></div>
<!-- Sidebar -->
<nav class="navbar navbar-inverse navbar-fixed-top" id="sidebar-wrapper" role="navigation">
<ul class="nav sidebar-nav">
<li class="sidebar-brand">
<a>
Mapal
</a>
</li>
<li>
<button class="sideMenuButton" onClick="openMainMenu()"><span class="glyphicon glyphicon-home"></span> Show groups </button>
</li>
<!-- <li>
<button class="sideMenuButton"><span class="glyphicon glyphicon-eye-open"></span> [View groups]</button>
</li> -->
<li>
<button class="sideMenuButton" onClick="openMapPage()"><span class="glyphicon glyphicon-globe"></span> Create location</button>
</li>
<!-- <li>
<button class="sideMenuButton"><span class="glyphicon glyphicon-plus"></span> [Create group]</button>
</li> -->
<!-- <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Works <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li class="dropdown-header">Dropdown heading</li>
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li> -->
<li>
<button class="sideMenuButton"><span class="glyphicon glyphicon-cog"></span> Settings</button>
</li>
<li>
<button class="sideMenuButton" onClick="emailpage()"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
</li>
<li>
<button class="sideMenuButton" onClick="getLogOutModal()"><span class="glyphicon glyphicon-log-out"></span> Log out</button>
</li>
</ul>
</nav>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<button type="button" class="hamburger is-closed" data-toggle="offcanvas">
<span class="hamb-top"></span>
<span class="hamb-middle"></span>
<span class="hamb-bottom"></span>
</button>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<div class="container">
<!-- Modal -->
<div class="modal fade" id="myLocation" role="dialog">
<div class="vertical-alignment-helper">
<div class="modal-dialog vertical-align-center">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4><span class="glyphicon glyphicon-pencil"></span> Give your location a name</h4>
</div>
<div class="modal-body" style="padding:40px 50px;">
<form role="form">
<div class="form-group">
<label for="location_name"><span class="glyphicon glyphicon-globe"></span> Location name</label>
<input type="text" class="form-control" id="location_name" placeholder="Enter location name">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-default pull-left" data-dismiss="modal" onclick="cancelLocation()"><span class="glyphicon glyphicon-remove"></span> Cancel</button>
<button type="button" class="btn btn-primary btn-default pull-right" data-dismiss="modal" onclick="submitLocation()"><span class="glyphicon glyphicon-ok"></span> Submit</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<p id="polygonCoords"></p>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<!-- log out modal -->
<div class="modal fade" id="logOutModal" role="dialog">
<div class="vertical-alignment-helper">
<div class="modal-dialog vertical-align-center">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-body" style="padding:1em 3em 3em 3em;">
<h3 style="text-align: center">Are you sure you want to log out?</h3>
<button type="button" class="btn btn-danger btn-default pull-right" data-dismiss="modal" ><span class="glyphicon glyphicon-remove"></span> Cancel</button>
<button type="button" class="btn btn-primary btn-default pull-left" data-dismiss="modal" onclick="logOutFunction()"><span class="glyphicon glyphicon-ok"></span> Yes</button>
</div>
</div>
</div>
</div>
</div>
</div>
</body>