Oups
[lhc/web/spip_carte_de_sites.git] / contenu / page-carte_de_sites.html
index 37ae6d0..01b55dc 100755 (executable)
@@ -3,16 +3,19 @@
     
     Parametres :
 
-    - legende = non : ne pas afficher la legende
+    - legende = oui : ne pas afficher la legende
     - coord    = 46.8,2.52   : pour un centrage optimal sur la carte de France
     - zoom    = 5   : pour un centrage optimal sur la carte de France
     - larg  = 540   : largeur
     - haut  = 400   : hauteur
     - style = 14189 : style de carte. Voir http://maps.cloudmade.com/editor
+    - boite = oui   : affiche la boite avec calques et types
 ]
 
 <!-- Carte -->
-<div id="map" style="width: [(#ENV{larg}|sinon{'540'})]px; height: [(#ENV{haut}|sinon{'400'})]px">
+
+<div id="map" style="[(#ENV{larg}|oui) width: [(#ENV{larg}|sinon{'540'})px;]] height: [(#ENV{haut}|sinon{'400'})]px">
+
 <script src="[(#CHEMIN{lib/CloudMade-Leaflet-edb7d25/dist/leaflet.js}|url_absolue)]"></script>
 
 <script>
@@ -62,7 +65,7 @@
                        };
 
 <B_groups>
-       var overlayMaps = {     
+       var overlayMaps = {
                <BOUCLE_groups(MOTS){type = Ateliers}{par num titre}>
                        "[(#TITRE|supprimer_numero)]": group_#ID_MOT,</BOUCLE_groups>
        };
@@ -71,7 +74,9 @@
 
        layersControl = new L.Control.Layers(baseMaps, overlayMaps);
         
-       map.addControl(layersControl);
+       [(#ENV{boite}|!={non}|oui)
+        map.addControl(layersControl);
+    ]
 
        map.on('click', onMapClick);