Ticket #1166 (closed enhancement: fixed)
When providing a non-"library" SLD parameter, LAYERS should not be required.
| Reported by: | rgould@… | Owned by: | assefa |
|---|---|---|---|
| Priority: | high | Milestone: | 6.2 release |
| Component: | WMS Server | Version: | 4.2 |
| Severity: | minor | Keywords: | |
| Cc: |
Description
When providing an SLD that is not a "library" SLD, LAYERS parameter should not
be required.
At the bottom is the SLD file that is used in the example (the one on
udig.refractions.net is not guaranteed to be there)
>>> Here is my request to the server:
>>>
http://dev1.dmsolutions.ca/cgi-bin/mswms_gmap?SLD=http://udig.refractions.net/park.sld&FORMAT=image/png&TRANSPARENT=TRUE&HEIGHT=372&REQUEST=GetMap&BBOX=-119.66968440860214,57.57125320534285,-111.37356827956987,62.91062206347434&WIDTH=578&&SRS=EPSG:4326&VERSION=1.1.1
>>>
>>> In theory, that should display only the park layer, in yellow.
>>>
>>> I just tried something else, and this seems to work:
>>>
http://dev1.dmsolutions.ca/cgi-bin/mswms_gmap?LAYERS=demo&SLD=http://udig.refractions.net/park.sld&FORMAT=image/png&TRANSPARENT=TRUE&HEIGHT=372&REQUEST=GetMap&BBOX=-119.66968440860214,57.57125320534285,-111.37356827956987,62.91062206347434&WIDTH=578&&SRS=EPSG:4326&VERSION=1.1.1
>>>
>>> The park layer comes up in yellow.
>>>
>>
>> I think the problem is just that you are missing the mandatory "LAYERS="
parameter in your first URL. I haven't looked at SLD in a while, but I would
think that even when using user-defined styles in an SLD you still need to
specify the LAYERS= parameters.
>
>
>
> Hi Daniel,
>
> In the SLD 1.0.0 specification, section 6.4 it states that if the SLD
parameter is being used in the request, it replaces the LAYERS and STYLES
parameters. They also give an example that uses SLD but not LAYERS and STYLEs.
Same goes for the SLD_BODY parameter.
>
> Thanks,
>
> Richard
File: park.sld
--------------------
<StyledLayerDescriptor version="1.0.0">
<NamedLayer>
<Name>park</Name>
<title>Yellow Parks</title>
<UserStyle>
<Name>Yellow</Name>
<FeatureTypeStyle>
<FeatureTypeName>park</FeatureTypeName>
<Rule>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#FFFF00</CssParameter>
</Fill>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Change History
Note: See
TracTickets for help on using
tickets.
