Hey folks,
I'm having some trouble getting Geoserver (1.4 RC5) to accept SLD
urls in a WMS GetMap request.
http://indus.msi.ucsb.edu:8180/knb/wms?VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=metacat:data_points&SRS=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=720&HEIGHT=360&FORMAT=image/gif&STYLES=&TRANSPARENT=TRUE&SLD=http://indus.msi.ucsb.edu:8180/knb/data/styles/data_points_style.sld&UNIQUEID=
and all I get is a WMS Exception: "SLD document contains no layers"
I can confirm that the SLD is valid since it is the *exact* same .sld
file used as a default for this layer by geoserver (try it without
&SLD=... and you'll get the correct response)
Any special tricks for specifying the SLD by URL in a getmap request?
--
Matthew T. Perry
GIS Analyst / Software Engineer
National Center for Ecological Analysis and Synthesis (NCEAS)
work: perry@anonymised.com
web: http://www.perrygeo.net
I'm gettin the same correct answer from the URL you sent both with or without
the SLD= parameter..
wonder is that's the geoserver version you mention and if still getting the
error?
gabriel
On Tuesday 12 December 2006 02:04, Matthew Perry wrote:
Hey folks,
I'm having some trouble getting Geoserver (1.4 RC5) to accept SLD
urls in a WMS GetMap request.
http://indus.msi.ucsb.edu:8180/knb/wms?VERSION=1.1.1&REQUEST=GetMap&SERVICE
=WMS&LAYERS=metacat:data_points&SRS=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=720
&HEIGHT=360&FORMAT=image/gif&STYLES=&TRANSPARENT=TRUE&SLD=http://indus.msi.u
csb.edu:8180/knb/data/styles/data_points_style.sld&UNIQUEID=
and all I get is a WMS Exception: "SLD document contains no layers"
I can confirm that the SLD is valid since it is the *exact* same .sld
file used as a default for this layer by geoserver (try it without
&SLD=... and you'll get the correct response)
Any special tricks for specifying the SLD by URL in a getmap request?
Gabriel,
With Miles' help I was able to fix the problem. Thanks for giving it a look.
Mile Jordan wrote:
> You need a <UserLayer> with a <Name> in your SLD:
On 12/12/06, Gabriel Roldán <groldan@anonymised.com> wrote:
I'm gettin the same correct answer from the URL you sent both with or without
the SLD= parameter..
wonder is that's the geoserver version you mention and if still getting the
error?
gabriel
On Tuesday 12 December 2006 02:04, Matthew Perry wrote:
> Hey folks,
>
> I'm having some trouble getting Geoserver (1.4 RC5) to accept SLD
> urls in a WMS GetMap request.
>
> http://indus.msi.ucsb.edu:8180/knb/wms?VERSION=1.1.1&REQUEST=GetMap&SERVICE
>=WMS&LAYERS=metacat:data_points&SRS=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=720
>&HEIGHT=360&FORMAT=image/gif&STYLES=&TRANSPARENT=TRUE&SLD=http://indus.msi.u
>csb.edu:8180/knb/data/styles/data_points_style.sld&UNIQUEID=
>
> and all I get is a WMS Exception: "SLD document contains no layers"
>
> I can confirm that the SLD is valid since it is the *exact* same .sld
> file used as a default for this layer by geoserver (try it without
> &SLD=... and you'll get the correct response)
>
> Any special tricks for specifying the SLD by URL in a getmap request?
--
Matthew T. Perry
GIS Analyst / Software Engineer
National Center for Ecological Analysis and Synthesis (NCEAS)
work: perry@anonymised.com
web: http://www.perrygeo.net