Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.3.0-beta4
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
It would be great to implement a fully functional SLD-WMS, that is a WMS that fully implements the SLD specification, with the GetStyle, PutStyle, DescribeLayer, and GetLegendGraphic operations, along with the appropriate WMS Capabilities document enhancements. Also allow users to pass in the SLD parameter instead of a named style. This should not be all that hard, as GeoTools already has SLD parsers and renderers using them. Indeed GeoServer already uses SLD to configure styles, this is just the logical web services extension. This will require reworking the style configuration a bit, but it's a much needed reworking.
Just added SLD and SLD_BODY support to GetMap, still need to advertise it in capabilities.
Basically it is working both in literal and library mode, so please test it and bug me for any problem
Be aware that the SLD parser being used is a bit more smart than previously, it now supports NamedLayer and NamedStyles,
and geoserver properly manages them.
For a more descriptive information about how it works take a look at the javadoc in GetMapKvpReader.
An be aware that you have to correctly specify the layer name in NamedLayer/Name and UserLayer/Name if you want geoserver recognizing your style.
Quick ref:
wms/GetMap?....&LAYERS=...&SLD=http://somesite/myStyle.sld --> remote library mode, paint the layers from the LAYERS parameter with the styling defined in the remote SLD document, or the layer's default style if the doc contains no styling for a layer
wms/GetMap?....&LAYERS=...&SLD_BODY=http://somesite/myStyle.sld --> inline library mode, same as above but providing the document inline (properly encoded for HTTP travel)
wms/GetMap?....&SLD=http://somesite/myStyle.sld --> remote literal mode, paint exactly the layers defined in the remote SLD document, styled as the document says
wms/GetMap?....&SLD_BODY=http://somesite/myStyle.sld --> inline literal mode, same as above but providing the document inline (properly encoded for HTTP travel)
wait for comments, bug reports