Choropleth Mapping Project

Lowell Filak lfilak at MEDINACO.ORG
Thu May 26 09:16:34 EDT 2005


The following message was sent by Brandon Ellis <ostrya.geo at YAHOO.COM>
on Wed, 25 May 2005 18:36:32 -0700.

> 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!

Brandon,

What version are you using?

Lowell



More information about the mapserver-users mailing list