[Cartoweb-users] multiple scale dependent layers - one legendentry
Oliver Christen
oliver.christen at camptocamp.com
Wed Nov 21 08:47:40 EST 2007
Hi
to activate a layer (or layerGroup) at startup, you need to use the initialMapStates parameters.
see http://www.cartoweb.org/doc/cw3.4/xhtml/user.config.html#user.config.server.maps_config.initial
more specificaly:
mapInfo.initialMapStates.default.layers.*layer_id*.selected = true
this works the same for layer and layerGroup
write these in file cartoweb3/projects/*yourproject*/server_conf/*yourproject*/*yourproject*.ini
regards
Oliver
----- Original Message -----
From: karsten vennemann
To: cartoweb-users at lists.maptools.org
Sent: Wednesday, November 21, 2007 2:01 PM
Subject: RE: [Cartoweb-users] multiple scale dependent layers - one legendentry
Thanks for the tip. Yes the rivers LayerGroup was at the top level. I added a container layer as suggested
layers.riversContainer.className = LayerGroup
layers.riversContainer.children = rivers
;LayerGroup rivers
layers.rivers.className = LayerGroup
layers.rivers.children = rivers_and_streams500k, rivers_and_streams50k, rivers_and_streams50k_2, rivers_and_streams20k, rivers_and_streams1k
layers.rivers.label = Rivers
layers.rivers.icon = blank.png
layers.rivers.aggregate = true
If the aggregated LayerGroup rivers is the only layer in the Container LayerGroup the checkbox did not get rendered when
layers.rivers.icon = blank.png
is set. When I uncomment the icon it does get rendered J. I'm not sure whether that is intended behaviour.
It does however always get rendered when I add more layers to the Container LayerGroup.
In my mapfile all the rivers layers are now set to
STATUS ON
The LayerGroup rivers shows up invisible /with a unchecked checkbox in the legend, whereas another layer "counties" in my mapfile shows up visible (see below).
How can I set the LayerGroup to be visible at the initial loading ?
Karsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20071121/76cad2cb/attachment.html
More information about the Cartoweb-users
mailing list