forked from mviewer/mviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
590 lines (572 loc) · 32.7 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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-fr" lang="fr-fr" dir="ltr" >
<head>
<title>mviewer</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="Visualiseur géographique" />
<link rel="icon" type="image/png" href="favicon.png" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.4.3/css/flag-icon.css" rel="stylesheet">
<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 rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.css" />
<link href="lib/font-awesome-5.6.3/css/all.min.css" rel="stylesheet" />
<link rel="stylesheet" href="lib/openlayers/6.3.1/css/ol.css" type="text/css" />
<link rel="stylesheet" href="css/mviewer.css" type="text/css" />
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto');
div#loading-page {
color: #999;
font-family: 'Roboto', sans-serif;
font-size: 16px;
text-align: center;
padding-top: 25%;
}
#loader-title{
margin-top: 20px;
}
#loader-subtitle {
margin-top: 5px;
font-weight: 700;
text-transform: uppercase;
}
.single4 {
display: inline-block;
width: 50px;
height: 50px;
border-radius: 50%;
border: 6px solid #EEEEEE;
border-top-color: #BFBFBF;
border-bottom-color: #BFBFBF;
-webkit-animation: single4 2.5s infinite ease-in-out;
animation: single4 2.5s infinite ease-in-out;
}
@-webkit-keyframes single4 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(540deg);
transform: rotate(540deg);
}
}
@keyframes single4 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(540deg);
transform: rotate(540deg);
}
}
</style>
</head>
<body>
<div id="loading-page">
<div class="single4"></div>
<div id="loader-title" i18n="loader.text">Chargement de l'application ...</div>
<div id="loader-subtitle"></div>
</div>
<div id="main" style="opacity: 0.01;">
<!-- Ajax Loader -->
<div id="loading-indicator" style="display:none">
<div class="loader">Loading...</div>
</div>
<!-- NAVBAR -->
<!-- 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="#" target='_blank'>
<img alt="Logo" src="img/logo/earth-globe.svg" class="mv-logo">
</a>
<a class="navbar-brand mv-title" href="#">mViewer</a>
<a type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" href="#">
<span class="glyphicon glyphicon-menu-hamburger"></span>
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav mv-nav">
<li class="hidden-lg hidden-md"><a href="#" data-toggle="modal" data-target="#thematic-modal" i18n="nav.responsive.topics">Thématiques</a></li>
<li class="hidden-lg hidden-md"><a href="#" data-toggle="modal" data-target="#legend-modal" i18n="nav.responsive.legend">Légende</a></li>
<li class="hidden-lg hidden-md"><a href="#" data-toggle="modal" data-target="#help" i18n="nav.responsive.about">A propos</a></li>
<li class="hidden-xs hidden-sm hidden-md">
<div class="navbar-form navbar-left" id="coordinates">
<span class=""></span>
</div>
</li>
<!--LANG SELECTOR-->
<li id="lang-button" class="hidden-lg hidden-md">
<a href="#" data-toggle="modal" data-target="#lang-popup" i18n="nav.down.lang">Langues</a>
</li>
<li id="lang-selector" class="dropdown hidden-xs hidden-sm">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="true">
<span i18n="nav.down.lang">Langue</span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu mv-translate">
<!--insert languages-->
</ul>
</li>
<!--//LANG SELECTOR-->
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<div class="navbar-form" role="search" id="searchtool">
<div class="form-group input-group">
<input type="text" class="form-control" placeholder="Rechercher" i18n="navbar.search.placeholder" id="searchfield">
<div class="input-group-btn">
<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>
</li>
<li class="hidden-xs hidden-sm">
<div class="nav navbar-nav">
<button id="iconhelp" type="button" class="btn btn-default navbar-btn mv-navbar-btn" data-toggle="modal" data-target="#help"><span class="fas fa-question"></span></button>
</div>
</li>
<!-- SEARCH RESULTS -->
<div id="searchresults" class="list-group" >
<div class="searchresults-title" i18n="search.result.title">Résultats
<button type="button" class="close">×</button>
</div>
</div>
</ul>
</div>
</nav>
<div id="wrapper">
<!-- LEFT MENU SIDEBAR -->
<div id="sidebar-wrapper"></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" i18n="legend.title" href="#"> <span class="glyphicon glyphicon-list"></span> </a>
<a id="btn-remove-layers" onclick="mviewer.removeAllLayers();" title="Supprimer toutes les couches" i18n="legend.remove.all" 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 fas fa-chevron-down" title="Fermer ce panneau" i18n="bottom.panel.close" onclick="$('#bottom-panel').toggleClass('active')" ></i></div>
<div class="mv-header"><h5 i18n="bottom.panel.title">Informations</h5>
</div>
<div class="popup-content" ></div>
</div>
<!-- RIGHT PANEL -->
<div id="right-panel">
<div class="mv-header"><h5 i18n="right.panel.title">Informations</h5>
<a href="#" class="close" data-dismiss="alert" aria-label="close" onclick="$('#right-panel').toggleClass('active')" title="Fermer" i18n="right.panel.close">×</a>
</div>
<div class="popup-content" ></div>
</div>
</div>
</div>
<div id="mouse-position" class="container"></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 -->
<div id="searchresults" class="list-group" >
<div class="searchresults-title">Résultats
<button type="button" class="close">×</button>
</div>
</div>
<!-- BACKGROUND LAYERS -->
<div id="backgroundlayerstoolbar-gallery">
<div class="" onclick="mviewer.bgtoogle();"></div>
<ul id="basemapslist" ></ul>
</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();" i18n="tbar.right.zoom.in" 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="#" onclick="mviewer.zoomToInitialExtent();"
title="Revenir à l'étendue géographique de départ" i18n="tbar.right.zoom.initial" 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" i18n="tbar.right.zoom.out"
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">
<a class="btn btn-default btn-raised" type="button" href="?login" id="login" title="Se connecter" tabindex="110" accesskey="10"
i18n="tbar.right.login" 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"
i18n="tbar.right.share" tabindex="111" accesskey="11" class="btn btn-default btn-raised">
<span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span>
</button>
<button id="geolocbtn" type="button" class="btn btn-default btn-raised" onclick="mviewer.geoloc();"
title="Se localiser" i18n="tbar.right.location" tabindex="103" accesskey="3">
<span class="glyphicon glyphicon-map-marker" aria-hidden="true"></span>
</button>
<button id="northbtn" type="button" class="btn btn-default btn-raised" onclick="mviewer.northRotate();"
title="Orienté au nord" i18n="tbar.right.rotation" tabindex="106" accesskey="6">
<span class="glyphicon glyphicon-upload" aria-hidden="true"></span>
</button>
<button id="studiolink" type="button" class="btn btn-default btn-raised" onclick="mviewer.openStudio();"
title="Modifier la carte" i18n="tbar.right.studio" tabindex="106" accesskey="6">
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
</button>
<a href="#" id="exportpng" title="Exporter carte au format image" i18n="tbar.right.png" 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="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" i18n="tbar.right.background" 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 -->
<!-- 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" title="Fermer" i18n="search.panel.close" class="close" data-dismiss="modal">×</button>
<h5 class="modal-title" i18n="search.panel.title">Paramètres de recherche</h5>
</div>
<div class="modal-body" >
<ul id="searchparameters">
<li class="mv-param-item" onclick="search.toggleParameter(this)" >
<a href="#">
<span id="param_search_bbox" class="state-icon far mv-unchecked"></span>
<div style="display:inline;" i18n="search.modal.extent.text">Rechercher dans l'emprise de la carte</div>
</a>
</li>
<li class="mv-param-item" id="param_search_localities" onclick="search.toggleParameter(this)" >
<a href="#">
<span class="state-icon far mv-unchecked"></span>
<div style="display:inline;" i18n="search.modal.address.text">Rechercher des adresses</div>
</a>
</li>
<li class="mv-param-item" id="param_search_features" onclick="search.toggleParameter(this)" >
<a href="#">
<span class="state-icon far mv-unchecked"></span>
<div style="display:inline;" i18n="search.modal.items.text">Rechercher des entités</div>
</a>
</li>
</ul>
<p id="adresse-attribution"></p>
</div>
</div>
</div>
</div>
<!-- LAYER AUTHENTIFICATION PANEL -->
<div id="loginpanel" 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" id="login-panel-title" i18n="layer.authent.title">Configurer l'accès au service</h5>
<span id="login-panel-service-url"><small><i i18n="layer.authent.title">URL du service</i></small></span>
</div>
<div class="modal-body" >
<div class="loginmodal-container">
<form>
<input type="hidden" id="service-url">
<input type="hidden" id="layer-id">
<input type="text" id="user" placeholder="Login" i18n="layer.authent.login">
<input type="password" id="pass" placeholder="Mot de passe" i18n="layer.authent.password">
<input type="button" id="savelogin" class="btn btn-light" i18n="layer.authent.valid" title="valider" value="Valider">
</form>
</div>
</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 i18n="share.panel.title">Partager cette carte</center></h4>
</div>
<div class="modal-body" >
<h6 class="modal-share-title" ><strong i18n="share.modal.title">Mode d'affichage</strong></h6>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12" >
<div class="form-group" id="mv-display-mode">
<label class="radio-inline">
<input type="radio" value="d" name="mv-display-mode" checked i18n="share.radio.normal">
<div style="display:inline;" i18n="share.radio.normal">Normal</div>
</label>
<label class="radio-inline">
<input type="radio" name="mv-display-mode" value="s">
<div style="display:inline;" i18n="share.radio.simple">Simplifié</div>
</label>
<label class="radio-inline">
<input type="radio" name="mv-display-mode" value="u">
<div style="display:inline;" i18n="share.radio.minimal">Ultra simplifié</div>
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-6" >
<a type="button" class="btn btn-default" id="permalinklink" href="#" title="Lien permanent vers la carte" i18n="share.picture.permalink"><img src="img/share/share_link.png" height="100px"></a>
</div>
<div id='share' class="col-md-6 col-sm-6 col-xs-6">
<img id="permaqr" src="img/blank.gif" title="QR code vers la carte" i18n="share.picture.qrcode" alt="QR code" />
</div>
</div>
<div class="row" id="shareToMapfish">
<div class="col-sm-10 form-inline">
<button style="display:inline;" id="shareToMapfishButton" type="button" class="btn btn-md btn-default" onclick="mviewer.sendToGeorchestra();">
<span class="fas fa-share-square"></span>
<div i18n="share.btn.mapfishapp">Afficher dans Mapfishapp</div>
</button>
<form id="georchestraForm" target="_blank" method="post" action="#" style="display:none;">
<input type="hidden" id="georchestraFormData" name="data" value="" />
<input type="submit" data-role="button" data-mini="true" data-iconpos="right" value="geOrchestra" />
</form>
</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>
<!-- LANG POPUP -->
<div id="lang-popup" 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" i18n="lang.modal.title">Langues</h4>
</div>
<div id="lang-body" class="modal-body">
<ul>
</ul>
</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" i18n="help.modal.title">DOCUMENTATION</h4>
</div>
<div class="modal-body" ></div>
</div>
</div>
</div>
<!-- THEMATIC POPUP -->
<div id="thematic-modal" class="modal fade" tabindex="-1" role="dialog" >
<div class="modal-dialog modal-sm">
<div class="modal-content" role="document">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" i18n="thematic.modal.title">Thématiques</h4>
</div>
<div class="modal-body" ></div>
</div>
</div>
</div>
<!-- LEGEND POPUP -->
<div id="legend-modal" class="modal fade" tabindex="-1" role="dialog" >
<div class="modal-dialog modal-sm">
<div class="modal-content" role="document">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" i18n="legend.modal.title">Options d'affichage</h4>
</div>
<div class="modal-body" ></div>
</div>
</div>
</div>
<!-- FEATUREINFO POPUP -->
<div id="modal-panel" class="modal fade" tabindex="-1" role="dialog" >
<div class="modal-dialog modal-md">
<div class="modal-content" role="document">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" i18n="featureinfo.modal.title">Informations</h4>
</div>
<div class="modal-body" >
<div class="popup-content"></div>
</div>
</div>
</div>
</div>
<!--ALERTS AREA -->
<div id="alerts-zone" ></div>
</div>
<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/6.3.1/build/ol.js"></script>
<script type="text/javascript" src="lib/jquery/base/plugins/xml2json/jquery.xml2json.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" src="lib/typeahead/typeahead.bundle.min.js"></script>
<script type="text/javascript" src="lib/bootstrap-typeahead/bootstrap3-typeahead.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.min.js"></script>
<script type="text/javascript" src="lib/fuse/fuse.min.js"></script>
<script type="text/javascript" src="js/extend.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/ogcutils.js"></script>
<script type="text/javascript" src="js/configuration.js"></script>
<script type="text/javascript" src="js/measure.js"></script>
<script type="text/javascript" src="js/info.js"></script>
<script type="text/javascript" src="js/search.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/4.6.3/papaparse.min.js"></script>
<script type="text/javascript" src="js/csv.js"></script>
<script type="text/javascript" src="js/mviewer.js"></script>
<script type="text/javascript" src="js/templates.js"></script>
<script type="text/javascript" src="js/featurestyles.js"></script>
<script type="text/javascript" src="js/custom.js" ></script>
<script type="text/javascript" src="lib/i18njs/i18n.js" ></script>
<script type="text/javascript">
var API = {};
$(document).ready(function () {
"use strict";
if (window.location.search) {
$.extend(API, $.parseJSON('{"' + decodeURIComponent(window.location.search.substring(1)
.replace(/&/g, "\",\"").replace(/=/g,"\":\"")) + '"}'));
}
// Search for a config param
var configFile = (API.config);
// If no config param, search for a fragment (#)
if (!API.config) {
var fragment = window.location.hash.split('#')[1];
if (fragment) {
configFile = fragment;
if (!configFile.startsWith("/")) {
configFile = "/".concat(configFile)
}
configFile = "apps".concat(configFile);
}
if (configFile) {
if (!configFile.endsWith(".xml")) {
configFile = configFile.concat(".xml");
}
}
}
// If no config param nor fragment then use the default config file
if (!configFile) {
configFile = "apps/default.xml";
}
// Save the config file path in the API object
API.config = configFile;
var theme = (API.theme) ? API.theme : null;
$.ajax({
url: configFile + '?_dc=' + (new Date()).getTime(),
dataType: "xml",
success: function (xml) {
$( document ).on( "layersLoaded", function (e) {
mviewer.overLayersReady();
});
//load conf
$( document ).on( "configurationCompleted", function (e, eData) {
//get JSON conf from xml;
var _conf = configuration.parseXML(eData.xml);
var style = "css/themes/default.css";
if (!theme && _conf.application.style && _conf.application.style.match("css")) {
style = _conf.application.style;
} else if (theme) {
style = "css/themes/" + theme + ".css";
}
$('head').prepend('<link rel="stylesheet" href="' + style + '" type="text/css" />');
var title = "";
if (_conf.application.title) {
title = _conf.application.title;
$("#loader-subtitle").text(title);
}
configuration.load(_conf);
setTimeout(function () {
$("#loading-page").hide();
$("#main").css("opacity", 1).hide();
$("#main").fadeIn(1500);
mviewer.getMap().updateSize();
}, 2000);
$( "#map" ).focus();
});
$( document ).on( "applicationExtended", function (e, eData) {
configuration.complete(eData.xml);
});
configuration.getExtensions(xml);
}, // 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>
<script type="text/javascript" src="lib/simple-slidebar/slidebar_menu.js"></script>
</body>
</html>