Opened 19 years ago
Closed 12 years ago
#1166 closed enhancement (fixed)
When providing a non-"library" SLD parameter, LAYERS should not be required.
Reported by: | 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 (5)
comment:1 by , 13 years ago
Milestone: | → 6.2 release |
---|---|
Owner: | changed from | to
comment:3 by , 13 years ago
Compilation is broken :
mapwms.c: In function ‘msWMSLoadGetMapParams’: mapwms.c:1121: error: too many arguments to function ‘msSLDApplySLDURL’ mapwms.c:1126: error: too many arguments to function ‘msSLDApplySLD’ mapwms.c: In function ‘msWMSGetLegendGraphic’: mapwms.c:3724: error: too many arguments to function ‘msSLDApplySLDURL’ mapwms.c:3727: error: too many arguments to function ‘msSLDApplySLD’ make: *** [mapwms.o] Erreur 1
I guess you have changes for the prototype in mapogcsld.h that haven't been commited ?
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Empty LAYERS parameter is also valid when SLD is provided: r12643
Closing.
Note:
See TracTickets
for help on using tickets.
This is still relevant. Will look at it for next release.