Problems with ms_newFeatureObj in PHP3 MapScript
Daniel Morissette
morissette at dmsolutions.ca
Wed Feb 14 10:44:55 PST 2001
Martin Lowry wrote:
>
> Hi All,
>
> I've been struggling for a while now to make automatic inline feature
> addition work, but with no success. Maybe somebody can tell me what's
> wrong with the following script.
>
...
> $line = ms_newLineObj();
> $retval = $line->addXY($lng, $lat);
> $feature = ms_newFeatureObj($lyr_Sites);
> $retval = $feature->shape->add($line); // $retval is
> always 0, i.e. success
> $feature->set("text", "H".$row["FieldNo"]);
Martin,
Which version of PHP MapScript are you using?
I think ms_NewFeatureObj() has been removed after the 3.3.011 release
and it may well have been broken in version 3.3.011.
I suggest that you get version 3.4 (it is much more stable anyways) and
use layerObj's addFeature(shapeObj shape) method which replaced the
ms_NewFeatureObj().
Best Regards,
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
http://www.dmsolutions.ca/
------------------------------------------------------------
Don't put for tomorrow what you can do today, because if
you enjoy it today you can do it again tomorrow.
More information about the MapServer-users
mailing list