[Mapserver-users] change style dynamically - getstyle
Sylvain Beorchia
sbeorchia at gi-lemans.fr
Mon Jun 14 06:14:27 PDT 2004
Hi list,
I try to change the symbology of my object dynamically inside my PHP code, i
try this :
$sym1 = $gpoMap->getSymbolByName ( "BF125" );
$class = $oLayer->getClass (0);
$style = $class->getStyle(0);
$style->color->setRGB(0, 255, 0);
$style->set ( 'symbol', $sym1 );
$pt = ms_newPointObj();
$pt->setXY( 2100000, 10100000 );
$pt->draw($gpoMap, $oLayer, $image, 0, "Pt1");
This code is supposed to add a point on my layer according to the symbology
i try to set.
But i've got this error :
Fatal error: Call to undefined function: getstyle() in
C:\epcenter\pub\htdocs\gmap.php3 on line 984
Is GetStyle always available ? I'm using Mapserver 4, Apache 2 , PHP 4.
Thanks.
Sylvain.
More information about the MapServer-users
mailing list