Centrage et zoom aux p'tits oignons
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Fri, 17 Feb 2012 15:44:47 +0000 (16:44 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Fri, 17 Feb 2012 15:44:47 +0000 (16:44 +0100)
contenu/page-carte_de_sites.html
modeles/carte_de_sites.html

index 4e51b46..bcb479f 100755 (executable)
@@ -4,6 +4,8 @@
     Parametres :
 
     - 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
 ]
 
 <!-- Carte -->
                minimal = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId: 14189});
                
 
-<B_map>
-       var map = new L.Map('map', {center: new L.LatLng(46.8, 2.52), zoom: 5, layers: [<BOUCLE_map(MOTS){type = Ateliers}>     group_#ID_MOT,</BOUCLE_map>     midnightCommander, minimal]});
-</B_map>
+    <B_map>
+           var map = new L.Map('map', {center: new L.LatLng([(#ENV{coord}|sinon{'46.8,2.52'})]), zoom: [(#ENV{zoom}|sinon{5})], layers: [<BOUCLE_map(MOTS){type = Ateliers}>   group_#ID_MOT,</BOUCLE_map>     midnightCommander, minimal]});
+    </B_map>
+
 
        var baseMaps = {
                                "Vue de nuit ;-)": midnightCommander,                           
@@ -93,4 +96,3 @@
        ]       
 </BOUCLE_legende>
 </B_legende>
-
index 100c6a9..27531ba 100755 (executable)
@@ -1,2 +1,2 @@
 [(#REM) Carte des ateliers ]\r
-<INCLURE{fond=contenu/page-carte_de_sites, legende}/>\r
+<INCLURE{fond=contenu/page-carte_de_sites, env}/>\r