[mapserver-users] Simple Map File Question

Martin, Daniel DMartin at erac.com
Fri Aug 9 13:57:59 EDT 2002


This is such a common question.  I know I fought with the SAME problem when
I first started using MapServer.  This is a quote from the MAP file
documentation  for version 3.6, within the LAYER object:

STATUS [on|off|default]
Sets the current status of the layer. Often modified by MapServer itself.
Default turns the layer on permanently.

This doesn't explain the STATUS situation mentioned below.  I think updating
might help alleviate that common question.

-Dan Martin


-----Original Message-----
From: Steve Lime [mailto:steve.lime at dnr.state.mn.us]
Sent: Friday, August 09, 2002 9:31 AM
To: wzhang at c-cor.net; mapserver-users at lists.gis.umn.edu
Subject: Re: [mapserver-users] Simple Map File Question


The mapserver CGI version considers ALL non-default layers to be off.
First thing it does after processing the mapfile and the user input is
to turn all layers off. It then steps through the layer list provided by
the user and turns those on. Bottom line? STATUS ON/OFF makes no
difference to the CGI version. You must explicitly request that
non-default layers be on. Make sense?

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> "Zhang, William" <wzhang at c-cor.net> 08/08/02 07:07PM >>>

Hi,

I succeeded in compiling and runing MapServer demo on Win2000 with IIS
5.0.
Now I am trying to study the tutorials and get problem. When I run the
tutorial Section 1 -- Example 1 with the map file 

NAME S1EX1
EXTENT -97.238976 41.619778 -82.122902 49.38562
SIZE 400 300
SHAPEPATH "C:\Inetpub\wwwroot\itasca\test\tutorial35"
LAYER # States
  NAME "states"
  DATA states_ugl
  STATUS DEFAULT
  TYPE POLYGON
  CLASSITEM "STATE"
  CLASS
    NAME "Michigan"
    COLOR 255 255 128
    OUTLINECOLOR 0 0 0
  END # end of class object
END # end of layer object
END # end of map file

It works fine. But when I changed the map file to 

NAME S1EX1
EXTENT -97.238976 41.619778 -82.122902 49.38562
SIZE 400 300
SHAPEPATH "C:\Inetpub\wwwroot\itasca\test\tutorial35"
LAYER # Roads
  NAME "roads"
  DATA roads_ugl
  STATUS ON
  TYPE LINE
  CLASSITEM "ROAD"
  CLASS
    NAME "MichiganROAD"
    COLOR 255 255 128    
  END # end of class object
END # end of layer object
END # end of map file

This does not work. It only shows a blank box. I downloaded
roads_ugl.shp,
roads_ugl.shx and roads_ugl.dbf from 
http://terrasip.gis.umn.edu/projects/tutorial35/download.html 
and put them in the SHAPEPATH specified directory. I think it must be
something wrong in my map file. Could somebody kindly give me a hint?

Thanks,

William Zhang

C-Cor.net
E-Mail: wzhang at c-cor.net 
Phone: (925) 251-3019
Fax:   (925) 467-0600
 




More information about the mapserver-users mailing list