[PLUGINS] ~maj globale
[lhc/web/www.git] / www / plugins / gis / javascript / gis.js.html
1 #HTTP_HEADER{Content-type:text/javascript}
2
3 [(#INCLURE{lib/leaflet/dist/[(#CONFIG{auto_compress_js}|=={oui}|?{'leaflet','leaflet-src'})].js})]
4
5 [L.Icon.Default.imagePath = '(#CHEMIN{lib/leaflet/dist/images}|url_absolue)';]
6
7 (function() {
8
9 L.gisConfig = {
10 'gis_layers': #EVAL{json_encode($GLOBALS['gis_layers'])},
11 'default_layer': '[(#REM|gis_layer_defaut)]',
12 'affiche_layers': [(#CONFIG{gis/layers,#ARRAY}|json_encode)]
13 };
14
15 L.geocoderConfig = {
16 'forwardUrl': '[(#VAL{gis_geocoder_rechercher}|generer_url_action{mode=search}|html_entity_decode)]',
17 'reverseUrl': '[(#VAL{gis_geocoder_rechercher}|generer_url_action{mode=reverse}|html_entity_decode)]'
18 };
19
20 })();
21
22 [(#INCLURE{javascript/gis_geocoder.js})]
23
24 [(#INCLURE{javascript/gis_utils.js})]
25
26 [(#INCLURE{lib/leaflet/plugins/KML.js})]
27
28 [(#INCLURE{lib/leaflet/plugins/GPX.js})]
29
30 [(#INCLURE{lib/leaflet/plugins/TOPOJSON.js})]
31
32 [(#INCLURE{lib/leaflet/plugins/leaflet-providers.js})]
33
34 [(#INCLURE{lib/leaflet/plugins/Control.FullScreen.js})]
35
36 [(#INCLURE{lib/leaflet/plugins/Control.MiniMap.js})]
37
38 [(#REM) Scripts de google et bing si besoin ]
39
40 #SET{layers,#CONFIG{gis/layers,#ARRAY{0,openstreetmap_mapnik}}}
41 [(#VAL|gis_layer_defaut|in_array{#GET{layers}}|non)
42 #SET{layers,#GET{layers}|push{#VAL|gis_layer_defaut}}
43 ]
44
45 [(#LISTE{google_roadmap,google_satellite,google_terrain}|array_intersect{#GET{layers}}|count|>{0}|oui)
46 [(#INCLURE{lib/leaflet/plugins/Google.js})]
47 ]
48
49 [(#VAL{bing_aerial}|in_array{#GET{layers}}|oui)
50 [(#INCLURE{lib/leaflet/plugins/Bing.js})]
51 ]
52
53 [(#INCLURE{lib/leaflet/plugins/leaflet.markercluster-src.js})]
54
55 [(#INCLURE{javascript/leaflet.gis.js})]
56
57 [(#CONFIG{auto_compress_js}|=={oui}|oui)
58 // gis.js
59 #FILTRE{trim|compacte}]