From 8cff1baee651462831d9d5ba14c1f5dc4129cef3 Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Fri, 17 Feb 2012 16:44:47 +0100 Subject: [PATCH] Centrage et zoom aux p'tits oignons --- contenu/page-carte_de_sites.html | 10 ++++++---- modeles/carte_de_sites.html | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/contenu/page-carte_de_sites.html b/contenu/page-carte_de_sites.html index 4e51b46..bcb479f 100755 --- a/contenu/page-carte_de_sites.html +++ b/contenu/page-carte_de_sites.html @@ -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 ] @@ -46,9 +48,10 @@ minimal = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId: 14189}); - - var map = new L.Map('map', {center: new L.LatLng(46.8, 2.52), zoom: 5, layers: [ group_#ID_MOT, midnightCommander, minimal]}); - + + var map = new L.Map('map', {center: new L.LatLng([(#ENV{coord}|sinon{'46.8,2.52'})]), zoom: [(#ENV{zoom}|sinon{5})], layers: [ group_#ID_MOT, midnightCommander, minimal]}); + + var baseMaps = { "Vue de nuit ;-)": midnightCommander, @@ -93,4 +96,3 @@ ] - diff --git a/modeles/carte_de_sites.html b/modeles/carte_de_sites.html index 100c6a9..27531ba 100755 --- a/modeles/carte_de_sites.html +++ b/modeles/carte_de_sites.html @@ -1,2 +1,2 @@ [(#REM) Carte des ateliers ] - + -- 2.20.1