[postgis-users] Re: Success!

Paul Ramsey pramsey at refractions.net
Sat Feb 1 12:44:32 PST 2003

Bill Wheaton wrote:

> Thanks so much for your suggestion to change STATUS to 'DEFAULT' in
> my mapfile!  That was it.  As soon as I changed that, it worked the
> first time...My only remaining question is-- what's the difference
> between STATUS ON|OFF|DEFAULT ?  I looked at the MapServer
> documentation, and it is some what cryptic on this note...

The problem with STATUS is that different programs interact with it
differently. Only 'DEFAULT' has an unambiguous meaning: a DEFAULT layer
will always get rendered, no matter what happens.

ON and OFF set the layer status at the time the mapfile is loaded.
However, that status can then be worked on by the progam using the map

In the case of the mapserv CGI, the only layers which will be rendered
are DEFAULT layers and layers which are requested in the 'layers' CGI
parameter. All the rest will be turned off.

In the case of Mapscript, the statuses will be as read from the mapfile
until you start jimmying with them in your script.

The WMS interface interacts with the STATUS directive the same way as
the CGI: only DEFAULT layers and requested layers are rendered. This
might not actually be according to the WMS spec, WMS might expect that
only requested layers be rendered, but nonetheless that is how it is
right now :)


      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632

More information about the postgis-users mailing list