[Mapserver-users] PHPmapscript 4, color
Erich Schroeder
erich@museum.state.il.us
Thu, 3 Jul 2003 16:11:32 -0500 (CDT)
Hi,
I'm confused in how I should be rewriting some phpmapscript for changing
from version 3.5 to 4.
In my application it looks to see if a polygon shapefile showing modern
distribution of a taxon exists, and if so adds it as a layer. It then
checks to see if the user wanted it to show, and if not turns the layer
off.
The old script looks like:
//Check if modern distribution is present, and add
if (file_exists("mammal/$TaxonLower.shp")) {
$distpresent = TRUE;
$layer = ms_newLayerObj($map);
$layer->set("data","mammal/$TaxonLower");
$layer->set("name","moderndist");
$layer->set("type",MS_LAYER_POLYGON);
$layer->set("status",MS_ON);
if ($drawdist == "n") {$layer->set("status",MS_OFF);}
$distcolor = $map->addColor(232,151,97);
$class = ms_newClassObj($layer);
$class->set("name","ModernDistribution");
$class->set("symbol",0);
$class->set("color",$distcolor);
$ok = $map->moveLayerUp(3);
$ok = $map->moveLayerUp(3);
$img = $map->draw();
} //end of modern dist
And now of course it chokes on the
$distcolor = $map->addColor(232,151,97);
line.
Am I supposed to now have a line like:
$class->setRGB(232,151,97);
Erich
--
---------------------------------------------------------------------
Erich Schroeder Phone: (217)785-0033
Curator, Information Technologies FAX: (217)785-2857
Illinois State Museum GIS Lab email:erich(at)illinois.state.museum
http://illinois.state.museum/
---------------------------------------------------------------------
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users