> -----Original Message-----
> From: geoserver-users-bounces@lists.sourceforge.net
> [mailto:geoserver-users-bounces@lists.sourceforge.net] On
> Behalf Of Andrea Aime
> Anyways, there is an alternative: have the files be served over http
> and use the parameter sld=http://myserver/mySld.sld as the request
> parameter in GetMap instead of using styles. The drawback of doing so
> is that your sld will have to style all the layers afaik (not sure, I
> know it's there but I never tried it out).
Yep, you can do that - there are a couple of ways to go about it. You
can put a list of layers in the request, and only put styles for the
layers that you want to customise in an SLD. Then, any layers that you
have requested which don't have styles in your SLD, will be also
rendered but using their default style.
So a request like
wms?request=getmap&layers=aad:iceberg,aad:voyage_track&SLD=http://…mys
ld.sld&... Would render both layers even if there is a custom style
specified for only one of them in the SLD.
The other way to go about it would be to omit the 'layers' parameter
from the request completely, but still use the SLD. Then you'd get all
the layers that are in the SLD. If you only specify the layer in the
SLD, and don't specify style for it, it will still render using the
default style, so the following sld would work if no 'layers' or
'styles' parameters are used:
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld
StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gml="http://www.opengis.net/gml" >
<NamedLayer>
<Name>add:cst10_polygon</Name>
</NamedLayer>
</StyledLayerDescriptor>
Regards,
Miles
___________________________________________________________________________
Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not the
intended recipient, you are notified that use or dissemination of this communication is
strictly prohibited by Commonwealth law. If you have received this transmission in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and
DELETE the message.
Visit our web site at http://www.antarctica.gov.au/
___________________________________________________________________________