[Cartoweb-users] initialMapStates for different layers

Oliver Christen oliver.christen at camptocamp.com
Wed Nov 10 06:27:57 EST 2010


hello Simone

you can only select on initialMapState at once.
so initialMapStateId = default, pippo will not work as you are requesting
that your project has two different state at the same time, which is simply
not possible.

though what you want to do is more probably:

mapInfo.initialMapStates.default.layers.pippo.selected = true
mapInfo.initialMapStates.default.layers.pippo.hidden= true

im not really sure whats that EAR you added ? is it a child layer of the
pippo layer ?
if so you need to write

 mapInfo.initialMapStates.default.layers.EAR.hidden= true
mapInfo.initialMapStates.default.layers.EAR.selected = true
as the parent layer doesnt need to be explicitly selected (as far as I
remember)

regards
Oliver

2010/11/10 Simone Frigerio <simone.frigerio at univie.ac.at>

>  Hi folk,
> one doubt on initialMapStates settings. I need to show automatically a
> background (default) and a hidden mask (pippo).
> I set in server_conf/project.ini:
> ...
> mapInfo.initialMapStates.default.location.bbox = "924693, 226180, 961394,
> 247681"
> mapInfo.initialMapStates.default.layers.raster.selected = true
> ...
> mapInfo.initialMapStates.pippo.layers.EAR.selected = true
> mapInfo.initialMapStates.pippo.layers.EAR.hidden= true
> ....
>
> Tho choice to activate more MasStates could be done in client.ini.  In
> client.ini "default" is selected automatically, but if I want both the
> MApStates at the beginning, an error occourred (message: not able to find
> Initial MapStates)
> The syntax is: initialMapStateId = default, pippo
>
> Which lack in syntax I made?
> Best regards.
>
> Simone
>
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20101110/ebad693a/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 566 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/cartoweb-users/attachments/20101110/ebad693a/attachment.gif 


More information about the Cartoweb-users mailing list