PHP/Mapscript - Layer Color
Terry Wood
terry at WOODTROOP.COM
Wed Sep 1 09:23:19 PDT 2004
Greetings,
I am using PHP/Mapscript version 4.2.2 and I cannot figure out how
to change the color of a layer. If I filter an existing layer (with a
WHERE clause) I get output, but I cannot change the color of the layer
on the screen.
Here is a section of my code :
// Load Mapscript
dl("php_mapscript.so");
<>// Load MapServer .map file
<>$map = ms_newMapObj("/data/maps/hpWork.map");
// Query
$layer = ms_newLayerObj($map, $map->getLayerByName("Parcels"));
$layer->setFilter("parcelid IN ('0000-27-009-012-0-001-01','0000-14-008-008-0-001-01')");
$layer->set("status",MS_ON);
// Draw Map
$img = $map->draw();
$url = $img->saveWebImage();
I am not going to show all of my failed attempts at changing the layer
colors... Anybody know how to do this?
Terry Wood
More information about the MapServer-users
mailing list