-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
325 lines (308 loc) · 18.5 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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-fr" lang="fr-fr" dir="ltr" >
<head>
<title>Geoservices monitoring map</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="description" content="Monitoring map for research data" />
<link rel="icon" type="image/png" href="favicon.png" />
<link href="lib/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<link href="lib/simple-slidebar/simple_slidebar.css" rel="stylesheet">
<link href="lib/bootstrap-datepicker-1.6.1/css/bootstrap-datepicker3.min.css" rel="stylesheet">
<link rel="stylesheet" href="lib/bootstrap-slider/9.1.3/css/bootstrap-slider.min.css">
<link href="lib/font-awesome-4.6.3/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="lib/openlayers/3/ol.css" type="text/css" />
<link rel="stylesheet" href="css/mviewer.css" type="text/css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.3.0/mustache.min.js"></script>
<script type="text/javascript" src="lib/proj4js/2.3.6/proj4.js"></script>
<script type="text/javascript" src="lib/jquery/base/1.10.2/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="lib/openlayers/3/ol.js"></script>
<script type="text/javascript" src="lib/jquery/base/plugins/xml2json/jquery.xml2json.js"></script>
<script type="text/javascript" src="lib/jqm-templates.js"></script>
<script type="text/javascript" src="lib/Sortable/1.4.2/Sortable.min.js"></script>
<script type="text/javascript" src="lib/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="lib/bootstrap-datepicker-1.6.1/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="lib/bootstrap-datepicker-1.6.1/locales/bootstrap-datepicker.fr.min.js"></script>
<script type="text/javascript" src="lib/bootstrap-slider/9.1.3/bootstrap-slider.min.js"></script>
<script type="text/javascript" type="text/javascript" src="lib/mviewer.js"></script>
<script type="text/javascript" src="lib/featurestyles.js"></script>
<script type="text/javascript">
var config = {};
var widgets = {};
$(document).ready(function () {
"use strict";
if (window.location.search) {
$.extend(config, $.parseJSON('{"' + decodeURIComponent(window.location.search.substring(1)
.replace(/&/g, "\",\"").replace(/=/g,"\":\"")) + '"}'));
}
var configFile = (config.config) ? config.config : "config.xml";
var theme = (config.theme) ? config.theme : null;
$.ajax({
url: configFile + '?_dc=' + (new Date()).getTime(),
dataType: "xml",
success: function (xml) {
var style = "css/themes/default.css";
if ($(xml).find("application").attr("style") && $(xml).find("application").attr("style").match("css")) {
style = $(xml).find("application").attr("style");
}
if (theme) {
style = "css/themes/" + theme + ".css";
}
$('head').prepend('<link rel="stylesheet" href="'+style+'" type="text/css" />');
var map = mviewer.init(xml);
$( "#map" ).focus();
}, // fin success config
error: function (request, status, error) {
mviewer.alert("Fichier de configuration : " + configFile + " non trouvé ou incorrect !", "alert-danger");
}
});
Sortable.create(document.getElementById('layers-container'), {
handle: '.layerdisplay-title',
draggable: '.draggable',
onUpdate: function (evt) {
var actionMove = {
layerName: $(evt.item).attr("data-layerid"),
layerRef: "",
action: ""};
var itemsList = $(evt.from).find(".list-group-item");
//New position in the list
var newPos = evt.newIndex;
if (newPos < itemsList.length -1) {
//Get the under layer name
actionMove.layerRef = $(itemsList[newPos +1]).attr("data-layerid");
actionMove.action = "up"
} else {
//Get the over layer name
actionMove.layerRef = $(itemsList[newPos -1]).attr("data-layerid");
actionMove.action = "down";
}
mviewer.orderLayer(actionMove);
}
});
$("#right-panel .close,#bottom-panel .mv-close").click(function () {mviewer.hideLocation()});
});
</script>
</head>
<body>
<!-- Ajax Loader -->
<!--<img src="img/loader.gif" id="loading-indicator" style="display:none" />-->
<div id="loading-indicator" style="display:none">
<div class="loader">Loading...</div>
</div>
<!-- NAVBAR -->
<nav class="navbar navbar-default no-margin navbar-fixed-top" id="mv-navbar">
<div class="navbar-header fixed-brand">
<a type="button" class="navbar-brand menu-toggle" href="#"><span class="glyphicon glyphicon-menu-hamburger"></span></a>
<a class="navbar-brand" href="#">
<img alt="Logo" src="img/logo/earth-globe.svg" class="mv-logo">
</a>
<!--<a class="navbar-brand" href="#"> Mviewer</a>-->
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<!--<li class="active" ><button class="navbar-toggle collapse in" data-toggle="collapse" id="menu-toggle-2"> <span class="glyphicon glyphicon-th-large" aria-hidden="true"></span></button></li>-->
</ul>
<p class="navbar-text mv-title">mViewer</p>
<div class="navbar-form navbar-left" role="search" id="searchtool">
<div class="form-group input-group">
<input type="text" class="form-control" placeholder="Rechercher" id="searchfield">
<div class="input-group-btn">
<button type="button" class="btn btn-default mv-searchtool-delete">
<span class="glyphicon glyphicon-remove"></span>
</button>
<button type="button" class="btn btn-default" aria-label="Help" data-toggle="modal" data-target="#parameterspanel">
<span class="glyphicon glyphicon-option-vertical"></span>
</button>
</div>
</div>
</div>
<div class="nav navbar-nav navbar-right">
<button type="button" class="btn btn-default navbar-btn mv-navbar-btn" data-toggle="modal" data-target="#help">?</button>
</div>
</div>
</nav>
<div id="wrapper">
<!-- LEFT MENU SIDEBAR -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav nav-pills nav-stacked" id="menu"></ul>
<!--<div id="menu-toggle-2" ><span class="fa leftpanel-btn"></span></div>-->
</div>
<!-- Page Content -->
<div id="page-content-wrapper" >
<div class="container-fluid xyz" >
<!-- MAP -->
<div class="row">
<div id="map" tabindex="1" accesskey="1"></div>
<div id="layers-container-box" class="">
<div id="legend" class="active">
<div id="layers-container-box-header" >
<a onclick="mviewer.toggleLegend();" title="Afficher/masquer la légende" href="#"> <span class="glyphicon glyphicon-list"></span> </a>
<a id="btn-remove-layers" onclick="mviewer.removeAllLayers();" title="Supprimer toutes les couches" href="#"> <span class="glyphicon glyphicon-trash"></span> </a>
</div>
<ul id="layers-container" class="list-group"></ul>
</div>
</div>
<div id="feature-info" class=""></div>
<!-- BOTTOM PANEL -->
<div id="bottom-panel">
<div id="bottom-panel-btn" ><i class="mv-close fa fa-chevron-down" title="Fermer ce panneau" onclick="$('#bottom-panel').toggleClass('active')" ></i></div>
<div class="mv-header"><h5>Informations</h5>
</div>
<div class="popup-content" ></div>
</div>
</div>
</div>
<!-- MARKER USED BY SEARCH IN FEATURES FUNCTIONNALITY, TO LOCATE SELECTED FEATURE ON THE MAP-->
<!--<img id="els_marker" src="img/marker-pink.png" />-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="els_marker" x="0px" y="0px" viewBox="0 0 297 297" style="enable-background:new 0 0 297 297;" xml:space="preserve" width="30px" height="30px">
<path d="M148.5,0C85.646,0,34.511,51.136,34.511,113.989c0,25.11,8.008,48.926,23.157,68.873 c13.604,17.914,32.512,31.588,53.658,38.904l27.464,68.659c1.589,3.971,5.434,6.574,9.71,6.574c4.276,0,8.121-2.603,9.71-6.574 l27.464-68.659c21.146-7.316,40.054-20.99,53.658-38.904c15.149-19.947,23.157-43.763,23.157-68.873 C262.489,51.136,211.354,0,148.5,0z M148.5,72.682c22.777,0,41.308,18.53,41.308,41.308c0,22.777-18.53,41.309-41.308,41.309 c-22.777,0-41.308-18.531-41.308-41.309C107.192,91.212,125.723,72.682,148.5,72.682z" fill="#F31541"/><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g>
</svg>
<!-- SEARCH RESULTS -->
<ul id="searchresults" class="list-group" ></ul>
<!-- BACKGROUND LAYERS -->
<div id="backgroundlayerstoolbar-gallery"></div>
<!-- FIRST VERTICAL RIGHT TOOLBAR -->
<div id="zoomtoolbar" class="btn-group-vertical btn-group-sm" role="group" aria-label="true">
<button href="#" onclick="mviewer.zoomIn();" title="Zoom avant (zoom fenêtre : shift + clic sur la carte)"
class="btn btn-default btn-raised" tabindex="104" accesskey="4" >
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
</button>
<button href="#" id="toto" onclick="mviewer.zoomToInitialExtent();"
title="Revenir à l'étendue géographique de départ" class="btn btn-default btn-raised" tabindex="105" accesskey="5">
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
</button>
<button href="#" onclick="mviewer.zoomOut();" title="Zoom arrière"
class="btn btn-default btn-raised" tabindex="106" accesskey="6">
<span class="glyphicon glyphicon-minus" aria-hidden="true"></span>
</button>
</div>
<!-- SECOND VERTICAL RIGHT TOOLBAR -->
<div id="toolstoolbar" class="btn-group-vertical btn-group-sm" role="group" aria-label="true">
<button class="mv-modetools btn btn-default btn-raised" href="#" onclick="mviewer.setTool('measureline', this.id);" id="measurebtn" title="Mesurer"
tabindex="108" accesskey="8" style="display:none;">
<span class="glyphicon glyphicon-resize-horizontal" aria-hidden="true"></span>
</button>
<a class="btn btn-default btn-raised" type="button" href="?login" id="login" title="Se connecter" tabindex="110" accesskey="10"
style="display:none;">
<span class="glyphicon glyphicon-lock" aria-hidden="true"></span>
</a>
<button data-toggle="modal" data-target="#sharepanel" onclick="mviewer.mapShare();" id="sharebtn" title="Partager cette carte"
tabindex="111" accesskey="11" class="btn btn-default btn-raised">
<span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span>
</button>
<a href="#" id="exportpng" title="Exporter carte au format image" download="carte.png"
class="btn btn-default btn-raised" tabindex="113" accesskey="13" style="display:none;">
<span class="glyphicon glyphicon-picture" aria-hidden="true"></span>
</a>
</div>
<div id="drawtoolsoptions" style="display:none;" class="btn-group btn-group-sm" role="group" aria-label="true">
<button id="measurelinebtn" title="Mesure linéaire" onclick="mviewer.setTool('measureline');" class="btn btn-default" >
<span class="glyphicon glyphicon-resize-small" aria-hidden="true"></span>
</button>
<button id="measureareabtn" title="Mesure surfacique" onclick="mviewer.setTool('measurearea');" class="btn btn-default">
<span class="glyphicon glyphicon-adjust" aria-hidden="true"></span>
</button>
</div>
<div id="backgroundlayerstoolbar-default" class="btn-group-vertical btn-group-sm" role="group" aria-label="true">
<button href="#" onclick="mviewer.nextBackgroundLayer();" id="backgroundlayersbtn" title="Changer de fond de carte" tabindex="103" accesskey="3"
class="btn-lg btn-default btn-raised" >
<!--<span class="glyphicon glyphicon-globe" aria-hidden="true"></span>-->
</button>
</div>
</div>
</div><!-- END WRAPPER -->
<!-- RIGHT PANEL -->
<div id="right-panel">
<div class="mv-header"><h5>Informations</h5>
<a href="#" class="close" data-dismiss="alert" aria-label="close" onclick="$('#right-panel').toggleClass('active')" title="Fermer">×</a>
</div>
<div class="popup-content" ></div>
</div>
<!-- SEARCH PARAMETERS PANEL -->
<div id="parameterspanel" class="modal fade" tabindex="-1" role="dialog" >
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h5 class="modal-title">Paramètres de recherche</h5>
</div>
<div class="modal-body" >
<ul id="searchparameters">
<li class="mv-param-item" id="param_search_bbox" onclick="mviewer.toggleParameter(this)" >
<a href="#" ><span class="state-icon fa mv-unchecked"></span>
Rechercher dans l'emprise de la carte
</a>
</li>
<li class="mv-param-item" id="param_search_localities" onclick="mviewer.toggleParameter(this)" >
<a href="#" ><span class="state-icon fa mv-unchecked"></span>
Rechercher des adresses
</a>
</li>
<li class="mv-param-item" id="param_search_features" onclick="mviewer.toggleParameter(this)" >
<a href="#" ><span class="state-icon fa mv-unchecked"></span>
Rechercher des entités
</a>
</li>
</ul>
<p id="adresse-attribution"></p>
</div>
</div>
</div>
</div>
<!-- SHARE PANEL -->
<div id="sharepanel" class="modal fade" tabindex="-1" role="dialog" >
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><center>Partager cette carte</center></h4>
</div>
<div class="modal-body" >
<div class="row">
<div class="col-md-6" >
<a type="button" class="btn btn-default" id="permalinklink" href="#" title="Lien permanent vers la carte"><img src="img/share/share_link.png" height="100px"></a>
</div>
<div id='share' class="col-md-6">
<img id="permaqr" src="img/blank.gif" title="QR code vers la carte" alt="QR code" />
</div>
</div>
</div>
</div>
</div>
</div>
<!-- IMAGE POPUP -->
<div id="imagepopup" class="modal fade" tabindex="-1" role="dialog" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body" >
<div class="row">
<div class="col-md-12">
<img class="popphoto center-block" src="img/blank.gif" style="max-height:512px;" alt="image">
</div>
</div>
</div>
</div>
</div>
</div>
<!-- HELP POPUP -->
<div id="help" class="modal fade" tabindex="-1" role="dialog" >
<div class="modal-dialog modal-lg">
<div class="modal-content" role="document">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">A propos</h4>
</div>
<div class="modal-body" ></div>
</div>
</div>
</div>
<!--ALERTS AREA -->
<div id="alerts-zone" ></div>
<script type="text/javascript" src="lib/simple-slidebar/slidebar_menu.js"></script>
</body>
</html>