php mapscript + .map file question (color specific country)
Geoff Rowland
geoffrey.rowland at NOAA.GOV
Thu Mar 10 08:34:29 PST 2005
I don't quite understand how to do this.
I have a shp file of Africa. Based on user selection, I want to 'zoom'
to the selected country - color that country a specific color and all
its neighbors a different color. I can set the extents of the country
based on user selection with no problem. However I am unsure how to set
the color of the country that was selected. Any help would be great!
Attribute name in the shape file is Cntry_name
here is my map file
NAME "Africa"
SIZE 600 700
STATUS ON
EXTENT -17.533 -46.970 55.541 37.340
UNITS dd
SHAPEPATH "data"
WEB
IMAGEPATH "d:\ms\tmp\"
IMAGEURL "tmp/"
END
SYMBOL
NAME 'star'
TYPE VECTOR
FILLED TRUE
POINTS
0 .375
.35 .375
.5 0
.65 .375
1 .375
.75 .625
.875 1
.5 .75
.125 1
.25 .625
END
END
LAYER
NAME "INLINE"
TYPE POINT
STATUS ON
CLASS
NAME "0"
STYLE
COLOR 255 0 0 # red
SYMBOL 'star'
SIZE 16
END #style
END #class
END #layer
LAYER
NAME "Africa"
TYPE POLYGON
STATUS ON
DATA "africa"
CLASS
STYLE
COLOR 255 243 227
OUTLINECOLOR 200 200 200
SYMBOL 0
END
END
END
END
--
Geoffrey Rowland
Technical Officer
Climate Information Project
NOAA Research
Office of Global Programs
http://www.cip.ogp.noaa.gov
Contractor,
RGII Technologies, Inc., a Computer Horizons Company
http://www.rg2.com
Phone: 301-427-2089x186
Fax : 301-427-2082
geoffrey.rowland at noaa.gov
More information about the MapServer-users
mailing list