[MS4W-Users] Get data values from shapeObj MapScript
Kenneth Hauklien
kenneth at micado.no
Fri Mar 29 11:40:18 EDT 2019
Hi there,
In previous versions of MapServer and MapScript (
https://mapserver.org/mapscript/php/index-5.6.html#shapeobj), i could query
a shapeObj after its values. And get a key => value array with all the data
fields.
Example:
public function __construct(\shapeObj $shape)
{
foreach ($shape->values as $key => $value) {
//Do something;
}
}
In the new Mapserver and MapScript, there is no $shape->values attribute.
I can get the value of element X but not the key name (Example "Gis_ID") by
using this function:
$shape->getValue(3);
But this does not help my much. My map sources are dynamic and i need to
target the data by IDs, and not a random array index.
Can anyone help me figure this out? :)
Hilsen
Kenneth Hauklien
kenneth at micado.no
https://www.micado.no
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ms4w.com/pipermail/ms4w-users/attachments/20190329/f4332359/attachment.html>
More information about the MS4W-Users
mailing list