Map files for dummies?

Fawcett, David David.Fawcett at STATE.MN.US
Fri Mar 24 14:59:36 EST 2006


Dave, 
 
Unless you are specifying the layer name in the URL that is calling
MapServer, you will need to set the STATUS of your layer, "Bexar County"
to DEFAULT.
 
David.

	-----Original Message-----
	From: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Dave Nuttall
	Sent: Friday, March 24, 2006 1:09 PM
	To: MAPSERVER-USERS at LISTS.UMN.EDU
	Subject: [UMN_MAPSERVER-USERS] Map files for dummies?
	
	

	I have an instance of Mapserver 4.8.1 running on CentOS with
Apache 2.20, PHP 5.1.2 and Mapscript running as a DSO.

	 

	I can make/display maps where I use the canned tutorials.  But
I'm failing to create map displays when I substitute shapefiles that are
of local interest.

	 

	The shapefiles in question are apparently valid, since I can
read them without any problems using "ogrinfo -al shapefile.shp".

	 

	I extract the decimal dimensions and create my own *.map file,
but all I ever get is the layer for pseudo-credits.

	 

	If someone could tweak my map file (which follows), it would be
a valuable learning experience for me.

	 

	TIA.

	Dave Nuttall

	San Antonio, TX

	 

	Here is my map file:

	 

	MAP

	    NAME BEXAR2

	    STATUS ON

	    SIZE 400 300

	    IMAGETYPE PNG

	    IMAGECOLOR 240 240 240

	    SHAPEPATH "/var/www/data/texas"

	    # the extents were pulled from the shape file with ogrinfo

	    EXTENT 29.114435 98.116613 29.760630 98.806552

	    UNITS DD

	 

	            LAYER

	                        NAME "Bexar County"

	                        TYPE POLYGON

	                        STATUS ON

	                        DATA "tgr48029all"

	    # don't know if this projection is valid!

	                        PROJECTION


	                           "proj=latlong"

	                           "ellps=GRS80"

	                           "datum=NAD83"

	                        END                 

	                        CLASS                         

	                        NAME "Bexar County"

	                        OUTLINECOLOR 90 90 90

	                        COLOR 0 255 0

	                        END

	END

	# End of map layer

	            

	# This credits layer always works/displays!         

	            LAYER

	                                     NAME "credits"

	                                     STATUS DEFAULT

	                                     TRANSFORM FALSE

	                                     TYPE ANNOTATION

	                                     FEATURE

	
POINTS 10 290

	                                     END

	                                     TEXT 'Made with Mapserver.
AIM to see it.'

	            END

	            CLASS

	                                    LABEL

	                                    TYPE BITMAP

	                                    POSITION CR

	                                    COLOR 0 0 0

	                                    END

	                        END

	END

	# end of credits layer

	END

	# end of bexar2.map for Bexar County, Texas.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060324/ad1d1b25/attachment.html


More information about the mapserver-users mailing list