Changement de style a la volee
[lhc/web/spip_carte_de_sites.git] / contenu / page-carte_de_sites.html
index 7406c32..37ae6d0 100755 (executable)
@@ -6,10 +6,13 @@
     - legende = non : 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
 ]
 
 <!-- Carte -->
-<div id="map" style="width: 540px; height: 400px">
+<div id="map" style="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>
@@ -45,7 +48,7 @@
                cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/{styleId}/256/{z}/{x}/{y}.png';
                
        var midnightCommander = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId: 999}),
-               minimal = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId: 14189});
+               minimal = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId: [(#ENV{style}|sinon{'14189'})]});
                
 
     <B_map>