CLASS and php/mapscript
Pietro Giannini
pgiannini at BYTEWISE.IT
Mon Oct 30 03:53:42 PST 2006
Luca,
I had a similar problem.
Try:
....
$style=$class->getStyle(0);
$style->color->setRGB( -1,-1,-1);
In other words you must get the reference of the existing Style from the
Class.
I made so, and works... - I don't know because :) -
ciao
___________________________
Pietro Giannini
Bytewise srl - Area GIS
41°50'38.58"N 12°29'13.39"E
On Lun, 30 Ottobre 2006 12:03, Luca Casagrande disse:
> Hi to all!
> I am trying to create a new layer using php/mapscript; the problem is for
> the class section:
> this is the mapfile sample i'd like to crete:
>
> CLASS
> EXPRESSION "1"
> STYLE
> COLOR -1 -1 -1
> END
> END
>
> And this is the mapscript i have written:
>
> $class = ms_newClassObj($layer);
> $class->setExpression("'[pixel]' EQ '1'");
>
> $style = ms_newStyleObj($class);
> $style->color->setRGB( -1,-1,-1);
>
> Debugging the mapfile, the CLASS it's been created, but not the style of
> the class.
>
> Thanks very much
> Luca
> --
> Help QGIS development! Make a donation right now at
> http://xrl.us/supportqgis
>
> LINUX User #411601
> GENTOO-GIS Development Team
> jabber: casagrande at jabber.linux.it
>
>
>
More information about the MapServer-users
mailing list