[Mapserver-dev] WMS and LAYERS= vs. STATUS Behaviour
Daniel Morissette
dmorissette at dmsolutions.ca
Wed Apr 28 14:11:27 EDT 2004
Frank Warmerdam wrote:
>
> It seems that a layer with STATUS DEFAULT will be returned in a GetMap
> request against MapServer regardless of whether the layer is in the
> layers list or not. Is this the expected behaviour?
>
This is the expected behavior, which is in line with the behavior of the
original mapserv CGI in which layers with status default cannot be
turned off.
>
> I would have hoped MapServer would have:
> o returned only the requested layers if there is a LAYERS= parameter
> in the WMS GetMap request.
I think that's what we used to do in very early versions of MapServer,
but we changed at some point (way back when, in v3.5 or so) to handle
the STATUS DEFAULT the same way in WMS as in the mapserv CGI.
This also allows things like putting a copyright notice or a watermark
which cannot be removed by the caller (I'm not saying it's a good idea
to do so because it breaks WMS-based apps, but the software allows it
inthe WMS interface the same way as with the traditional CGI)
> o Returned only STATUS DEFAULT layers if there was no LAYERS= parameter
> in the WMS GetMap request.
>
This is contrary to the WMS spec. We used to return all layers with
STATUS ON or DEFAULT when LAYERS wasn't specified, but when we ran the
CITE test suite we had to change v4.1 to produce an exception if LAYERS=
parameter is missing. (This is annoying but is required in order to
follow the spec: the LAYERS= parameter is required and must contain
valid layer names)
> If things are behaving as intended, then I think the WMS Server HOWTO
> should mention this gotcha.
>
We should update the docs then... I have filed a bug about this:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=636
Daniel
--
------------------------------------------------------------
Daniel Morissette dmorissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the mapserver-dev
mailing list