[Mapserver-users] GIS Student needs help

Dylan Keon keon at nacse.org
Sat Mar 15 00:16:55 EST 2003


George,

Looks like your EXTENT isn't quite right.  It should be "minx miny maxx 
maxy" and you have "minx maxy maxx miny."  So instead of "EXTENT -127.92 
49.47 -77.05 23.66" try "EXTENT -127.92 23.66 -77.05 49.47"

Also, put the line "UNITS DD" somewhere in the map object, like right 
after your EXTENT line (your shapefile *is* unprojected (lat/lon), right?).

You should also set up the WEB object.  Fill in the IMAGEPATH and 
IMAGEURL with the correct paths to the writeable temp directory.  You 
may also need to set up the HEADER and FOOTER in the WEB object, 
depending on what you're trying to do.

See http://mapserver.gis.umn.edu/doc36/mapfile-reference.html for more 
info on mapfile syntax.

So, try this (make sure to enter correct paths under the WEB object):

#************single.map*****************
NAME TEST
STATUS ON
EXTENT -127.92 23.66 -77.05 49.47
UNITS DD
SIZE 400 300
SHAPEPATH "data"

WEB
   IMAGEPATH "E:\Apache Group\Apache2\htdocs\temp\" 

   IMAGEURL "/temp/"
END

LAYER
   NAME "states"
   DATA states
   STATUS DEFAULT
   TYPE POLYGON
   CLASS
     COLOR 220 220 220
     OUTLINECOLOR 0 0 0
   END
END

END
#***************************************

--Dylan


George McCown wrote:
> I've removed the comment and corrected the the scr to:
> 
> <img border="1"src="/cgi-bin/mapserv.exe?map=/hall/single.map&amp;mode=map">
> 
> I still cannot see the shp file.  Can you guys help me again?
> 
> George
> 
> 
> 
> ----- Original Message -----
> From: "Krung Saengpole" <krung at cad.go.th>
> To: <mapserver-users at lists.gis.umn.edu>
> Sent: Friday, March 14, 2003 7:49 PM
> Subject: Re: [Mapserver-users] GIS Student needs help
> 
> 
> 
>>George,
>>
>>Also you have to change src attribute to use your mapserver program with
> 
> your platform, e.g.
> 
>><img .... src="/cgi-bin/mapserv.exe?map=.....">
>>
>>because in Windows, mapserver program is mapserv.exe. Demo setting is for
> 
> *n*x.
> 
>>Krung
>>
>>
>>
>>>George,
>>>
>>>For starters, your LAYER line is commented out.  Remove the leading #
>>
>>>from LAYER.
>>
>>>--Dylan
>>>
>>>
>>>George McCown wrote:
>>>
>>>>I've successfully installed the demo map server on apache 2.
>>>>Now I want to learn how to make single layers but I need more help
>>>>than what the Tutorial shows.
>>>>
>>>>data file: E:\Apache Group\Apache2\htdocs\hall\data\states.shp
>>>>mapserv(3.6): E:\Apache Group\Apache2\cgi-bin
>>>>single.map and single.html: E:\Apache Group\Apache2\htdocs\hall
>>>>
>>>>********* Single.html**********************
>>>>
>>>><html>
>>>><head>
>>>><title>single</title>
>>>></head>
>>>>
>>>><body>
>>>><h1>SINGLE LAYER</h1>
>>>>
>>>><img border="1"
> 
> src="="/cgi-bin/mapserv35?map/hall/single.map&mode=map">
> 
>>>><p>why is it mapserv35?map not just mapserv.exe?</p>
>>>>
>>>></body>
>>>>
>>>></html>
>>>>
>>>>************single.map*****************
>>>>NAME test
>>>>EXTENT -127.92 49.47 -77.05 23.66
>>>>SIZE 400 300
>>>>SHAPEPATH "data"
>>>>#LAYER # start of the "states" layer object
>>>>  NAME "states"
>>
>>
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu
>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list