Setting attributes of shapes on php-mapscript

Francesco Antognini fantognini at GMAIL.COM
Mon Jul 16 15:13:38 EDT 2007


Hello
I'm stuck with this and need advice. I'm working with ms4w version 2.2.3.

In php mapscript, I'm trying to assign values to attributes of newly created
shape objects. However, whatever I do it doesn't seem to work.

First of all shapeobj->setValue() is not defined:

$shpn= ms_newShapeObj(MS_SHAPE_POLYGON);
$shpn->setvalue(0,"foobar");      // >>> php generates error

Then setting the directly the values array works on the php object:

$shpn->value[0]='bar';
$shpn->value['foo']='bar';

However changes are never transferred to the actual peer in the layer, as
print_r clearly shows:

.... [values] => Array ( ) .....


At this point I wonder whether this is possible at all, at least in
php-mapscript. If anyone can give me hint it would be very helpful. Even a
negative one.
TIA
F. Antognini

-- 
Francesco Antognini
Computer Consultant
Switzerland
fantognini at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070716/d809f26a/attachment.html


More information about the mapserver-users mailing list