Setting attributes of shapes on php-mapscript
Daniel Morissette
dmorissette at MAPGEARS.COM
Tue Jul 17 06:57:14 PDT 2007
I'm not sure about SWIG MapScript, but in PHP MapScript, the
shape->values[] array is read-only and there is no way to set the
values[] with PHP MapScript.
If working with a shapefile then the recommended way to update
attributes is to use the PHP dbase functions as was pointed out in
another post earlier in this thread.
Daniel
Rodrigo Del C. Andrade wrote:
> Hi.
>
> As of mapscript 4.10 you need to initialize the shapes to receive
> values.
> try issuing a
>
> $shp->initValues(1);
>
> before setValue. The int argument is the number of values you will
> set in that shape.
> I know this was changed for the SWIG versions of mapscript, I am not
> sure about it on the PHP front, but someone will correct me if its not
> the case.
>
> Cheers,
>
> Rodrigo
>
>
--
Daniel Morissette
http://www.mapgears.com/
More information about the MapServer-users
mailing list