[GIS] Blank map with a single layer while using MapServer

mapserver

I am just tying to render a map with single layer using map server and I get a blank output.
Below is how the map file looks like

MAP
  IMAGETYPE PNG
  SIZE  900 900
  EXTENT    37.078266 6.747135 68.172030 97.403297
  SHAPEPATH "E:/GIS Data/INDIA/2001_State.shp"
  IMAGECOLOR    255 255 255

    LAYER
        NAME    '2001_STATE'
        DATA    '2001_STATE'
        STATUS  OFF
        TYPE    POLYGON

     CLASS
        NAME "2001_STATE"
        STYLE
          COLOR 232 232 232
          OUTLINECOLOR  32 32 32
        END
     END    
    END
END

I have saved this map file as prac1.map

The following is the URL I am trying to hit for the above map file

http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/prac1.map&mode=map&layer=2001_State&

Any help would be appreciated.

Best Answer

Try setting your LAYER STATUS to STATUS DEFAULT

I couldn't get the MapServer tutorial examples working until I set the LAYER STATUS from STATUS OFF to STATUS DEFAULT.

Why the demos come with STATUS OFF already set I don't know.

I suspect the mode=map setting makes mapserver not render a layer unless STATUS DEFAULT

Related Question