[Geoserver-users] Only one SLD file for each Layer Group?

Hi to the GeoServer community:

I would like to know if it is possible to use the same SLD file for different FeatureTypes which belong to the same Layer-Group. If possible, should I use the element for each FeatureType?

When I try to display my GeoServer WMS in some GIS clients, then all styles for each layer-group appear and it is very confusing. And in other cases, it is not possible to connect to the server, but I am not sure if that is the reason why it does not work.

Thanks in advance,

José Miguel


José Miguel Rubio Iglesias

Subdirección General de Aplicaciones Geográficas

Instituto Geográfico Nacional

C/General Ibáñez de Ibero, 3 28003 MADRID

Despacho: A 0002 Teléfono: 91 597 97 51

E-mail: jmrubio@anonymised.com

Rubio Iglesias José Miguel ha scritto:

Hi to the GeoServer community:

I would like to know if it is possible to use the same SLD file for different FeatureTypes which belong to the same Layer-Group. If possible, should I use the <NamedLayer> element for each FeatureType?

Layer groups cannot be styled dynamically. Only the default style can be
applied to them, and internally they get simply get expanded in
their composing layers and the associated styles.

Groups are just syntactic sugar, if you need to style the layers inside
the group or use advanced SLD techniques just list explicitly all the layers in your requests.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.