I've been trying to use this USA/States map that have predefined classes for
every color that you would want to make each state/county.
Snip:
LAYER
NAME "co"
TYPE POLYGON
STATUS OFF
DATA co99_d00
LABELITEM "NAME"
PROJECTION
"proj=latlong"
"ellps=GRS80"
"datum=NAD83"
END
CLASS
NAME "Aqua counties"
EXPRESSION ([STATE]=56 AND %aquaexpr%)
COLOR 0 255 255
OUTLINECOLOR 99 101 99
END
I've used the mapserv cgi to get what I want, but I really need to get the PHP
version working. The syntax for aquaexpr is [COUNTY]=34 <-- state fips number.
I've gotten this far:
$map = ms_newMapObj($map_path."state-wy.map");
$outLayer = $map->getlayerbyname("co");
$outLayer->set("status", 1);
$oClass = $outLayer->getClass(0);
$oClass->set("aquaexpr","[COUNTY]=15"); // Does not work.
$image=$map->draw();
$image_url=$image->saveWebImage();
Please give me some advice as to how I should either reset the expression or
set that %aquaexpr% var.
Thanks!
- Chris
Reporter: calmeida@orchidsuites.net Date: 2006/02/03 - 22:35