|
|
|
@ -24,6 +24,7 @@
|
|
|
|
|
- objets = gis type d'objets à afficher (fichier json/gis_xx qui génère la source de donnees)
|
|
|
|
|
- autocenterandzoom|centrer_auto = oui centrer et zoomer la carte automatiquement pour afficher tous les marqueurs
|
|
|
|
|
- kml = 12 kml à superposer à la carte (id_document ou url)
|
|
|
|
|
- gpx = 12 gpx à superposer à la carte (id_document ou url)
|
|
|
|
|
- localize_visitor|localiser_visiteur = oui centrer la carte sur la position du visiteur (API geolocation HTML5)
|
|
|
|
|
- point = non si elle vaut "non" cette option n'affichera pas de points du tout (utile pour n'afficher qu'un kml par exemple)
|
|
|
|
|
X - ajaxload = non si elle vaut "non" cette option désactive l'init de la carte sur l'event ajaxload
|
|
|
|
@ -157,6 +158,18 @@ var map[(#GET{id})];
|
|
|
|
|
map[(#GET{id})].addLayer(kml_#COMPTEUR_BOUCLE);
|
|
|
|
|
</BOUCLE_kml>
|
|
|
|
|
</BOUCLE_test_kml>
|
|
|
|
|
<BOUCLE_test_gpx(CONDITION){si (#ENV{gpx}|oui)}>
|
|
|
|
|
#SET{gpx, #ENV{gpx}}
|
|
|
|
|
[(#GET{gpx}|is_array|non) #SET{gpx, #ARRAY{0,#GET{gpx}}} ]
|
|
|
|
|
<BOUCLE_gpx(POUR){tableau #GET{gpx}}>
|
|
|
|
|
[(#VALEUR|intval|oui)
|
|
|
|
|
var gpx_#COMPTEUR_BOUCLE = new L.GPX(['(#VALEUR|generer_url_entite{document}|url_absolue)'], {async: true}); ]
|
|
|
|
|
[(#VALEUR|intval|non)
|
|
|
|
|
var gpx_#COMPTEUR_BOUCLE = new L.GPX(['(#VALEUR|copie_locale)'], {async: true}); ]
|
|
|
|
|
gpx_#COMPTEUR_BOUCLE.on("loaded", function(e) { map[(#GET{id})].fitBounds(e.target.getBounds()); });
|
|
|
|
|
map[(#GET{id})].addLayer(gpx_#COMPTEUR_BOUCLE);
|
|
|
|
|
</BOUCLE_gpx>
|
|
|
|
|
</BOUCLE_test_gpx>
|
|
|
|
|
|
|
|
|
|
[(#ENV{localize_visitor,#ENV{localiser_visiteur}}|oui)
|
|
|
|
|
map[(#GET{id})].locate({setView: true, maxZoom: [(#ENV{zoom,#CONFIG{gis/zoom,0}})]});]
|
|
|
|
|