[Cartoweb-users] Group layers in .map file?

Oliver Christen oliver.christen at camptocamp.com
Fri Feb 23 02:00:12 EST 2007


hi Brendan,

I dont know about mapfile groups, but you can very easily have the same
behaviour by using layerGroups in the layers.ini file and aggregating the
child layers

like this:

layers.vector.className = LayerGroup
layers.vector.children = sea, district
layers.vector.label = Vector
layers.vector.aggregate = true

layers.district.className = Layer
layers.district.msLayer = district
layers.district.label = district

layers.sea.className = Layer
layers.sea.msLayer = sea
layers.sea.label = sea in this exemple, the user will see only one layer

Vector that include both district and sea

see http://www.cartoweb.org/cwiki/HowToCreateALayerTree and
http://www.cartoweb.org/doc/cw3.3/xhtml/user.layers.html for more infos

Hope this help

Regards
Oliver

----- Original Message ----- 
From: Brendan Walashek at GolfingVancouver.com
To: cartoweb-users at lists.maptools.org
Sent: Friday, February 23, 2007 1:20 AM
Subject: [Cartoweb-users] Group layers in .map file?




Do I understand this correctly...
For Mapserver, you can use the following:

In the myproject.map file:
----------------------------
LAYER my_layer1
GROUP "my_layer"
...
END

LAYER my_layer2
GROUP "my_layer"
...
END
-----------------------------

This works in a normal Mapserver environment by calling the "my_layer" group
name which will call both layers "my_layer1" AND "my_layers2".
BUT, in Cartoweb, in Layers.ini, calling the group layername "my_layer" does
not work.  It comes up with an error saying it cannot find the "my_layer"
group.

Basically I want to call multiple layers in the .map file by ONE name.  ie.
multiple shapefiles by one layer name (a group).  Did it before using
Cartoweb with Mapserver.
Any help would be appreciated.  Thanks.

___________________
Brendan Walashek
GIS / 3D Mapping / Custom Applications


www.mapsbyair.com
McElhanney Consulting Services
Vancouver Office
(604) 683-8521 ext.278




_______________________________________________
Cartoweb-users mailing list
Cartoweb-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users



More information about the Cartoweb-users mailing list