[mapserver-users] Mapfile displaying in red

Fawcett, David David.Fawcett at state.mn.us
Wed Jul 15 09:59:45 EDT 2009


Paul, 
 
Your polygon data is red because you are telling MapServer to color it
red.  
 
In the class in your layer 'map' (probably not a great layer or class
name), you are using a style to color your polygons.  
 
    CLASS
       NAME 'map'
       STYLE
         COLOR 255 0 0
       END
       LABEL 
   TYPE bitmap
    END
    END

You have set the value of the color property to be 255 0 0.  Colors are
set as RGB (Red Green Blue) triplets.  In that line, you are saying,
'color it with the full amount of red and don't use any green or blue'.
 
If you change the value to 0 0 255, you will see blue polygons.  
 
For an easy way to come up with prettier colors, take a look at
ColorBrewer:
http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer_intro.html
 
David.

	-----Original Message-----
	From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Paul
Curran
	Sent: Wednesday, July 15, 2009 5:20 AM
	To: mapser all users
	Subject: [mapserver-users] Mapfile displaying in red
	
	
	Hi 
	 
	When i load my map file which can be seen below i can view the
outline of map but the actual map displays as red. I am viewing the map
via the mapserver.exe
(e.g.http://localhost/cgi-bin/mapserv.exe?mode=map&map=c:/ms4w/apps/open
layers-2.5/data/test.map&layer='map')
	 
	Here is my map file, Can anyone spot were i am going wrong? any
help greatly appreciated.
	 
	The uk.shp file i am attempting to load consists of .tiff images
amd was put together using FWTools
	 
	MAP
	NAME test
	  # Map image size
	  SIZE 400 600
	  IMAGECOLOR 249 245 186
	    IMAGETYPE PNG24
	  OUTPUTFORMAT
	    NAME PNG24
	    DRIVER 'GD/PNG'
	    MIMETYPE 'image/PNG'
	    #IMAGEMODE PC256
	    EXTENSION 'png'
	  END
	  EXTENT -888385.321101 -31000.000000 1548385.321101
1271000.000000
	   
	  WEB
	 IMAGEPATH "\ms4w\tmp\ms_tmp\"
	    IMAGEURL "\ms_tmp\"
	    METADATA
	     WMS_SRS "EPSG:4326 EPSG:900913"
	 END
	  END
	  LAYER
	    NAME 'map'
	    DATA 'C:\ms4w\apps\openlayers-2.5\data\map.shp'
	    TYPE polygon
	    STATUS DEFAULT
	    TRANSPARENCY 100
	    PROJECTION
	    'proj=longlat'
	    'ellps=WGS84'
	    'datum=WGS84'
	    'no_defs'
	    ''
	    END
	    CLASS
	       NAME 'map'
	       STYLE
	         COLOR 255 0 0
	       END
	       LABEL 
	   TYPE bitmap
	    END
	    END
	  END
	END
	 
	
	
________________________________

	Upgrade to Internet Explorer 8 Optimised for MSN. Download Now
<http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U>  

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


More information about the mapserver-users mailing list