Choropleth Mapping Project

Brandon Ellis ostrya.geo at YAHOO.COM
Wed May 25 21:36:32 EDT 2005


I am currently working on an equal interval choropleth
mapping project.  I have tackled the problem of
determineing map class sizes and colors but am having
trouble making the Class Object of the layer object
recognize the colors that I wish to assign to
individual polygons.  If anyone has gotten this to
work please let me know.  My goal is to dynamicly
create and control classes in a layer to produce a
chloropleth map.  I already know which polygons should
be which color, but I can't seem to get it to work
out.

Hardcoded in the map file it looks like this:
CLASSITEM "STATE_NAME"
 CLASS
   EXPRESSION "Louisiana"
   COLOR 255 15 15
 END

I am using:

$layerClassObj[$i+1]->label->color->setRGB($classColor[$i+1][0],$classColor[$i+1][1],$classColor[$i+1][2]);

where:
layerClassObj[] is the Class Object created as part of
x layer in y map

label->color are both Objects within the Class Object

classColor[][] is a multi array with rgb values

The above line of code APPEARS to be assigning the
color values to the Map Object's Reffernce Object for
some reason.  Thanks in advance for any help!

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



More information about the mapserver-users mailing list