[mapserver-users] Simple Map File Question

Steve Lime steve.lime at dnr.state.mn.us
Fri Aug 9 10:31:26 EDT 2002


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