[Cartoweb-users] initialMapState definition by URL or Php

o.bonnefon@libertysurf.fr o.bonnefon at libertysurf.fr
Thu Nov 29 08:28:20 EST 2007


Hello, a-priori, there's no problem with getInitialMapState() :

if (!empty($_REQUEST['initialState'])) {
$stateId = $_REQUEST['initialState'];

-----------> print($stateId); // displays ms2 when url =
...?initialState=ms2

$this->initialMapState = $this->getMapInfo()

->getInitialMapStateById($stateId);

}
Have you got an idea ?

Thanks for the translation into french, it works fine.

kind regards

Olivier BONNEFON


<mmm
<this is quite strange, as the check on the initialMapState
<is almost the
<first thing done.
<the script check first for initialState in url, then it
<tries to get
<CW3_INITIAL_MAP_STATE_ID from env and finally try to get it
<from <config.

<you can try to put some "print ('something');" in function
<getInitialMapState in Cartoclient.php to see whats happening.

<regards
<Oliver

> Hello,
>
> I'm trying to define the initialMapStateId of my project :
> by url : ...?initialState=ms2
> or by Php : $_ENV['CW3_INITIAL_MAP_STATE_ID'] = 'ms2';
>
> but the project always opens with the map state defined in
> client.ini by initialMapStateId = ms1
>
> Please help me !
>
> kind regards
>
> (PS : I'm using Cartoweb 3.4.0 and initialMapStateId = ms2
> can be activated in client.ini )
>
> Olivier BONNEFON


------------------------ ALICE C'EST ENCORE MIEUX AVEC CANAL+ LE BOUQUET ! ---------------
Découvrez vite l'offre exclusive ALICEBOX et CANAL+ LE BOUQUET, en cliquant ici http://alicebox.fr
Soumis à conditions.





More information about the Cartoweb-users mailing list