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