WFS layer query in php mapscript

frequens frequens at GMAIL.COM
Mon Feb 27 17:15:03 PST 2006


Hi all,

an unresolved story from two months ago...
Mapserver and php-mapscript both 4.8.1

I have a Mapserver WFS provided layer, where a typical feature in the
provided GML looks like this:

<gml:featureMember>
<ms:layerx gml:id="3">
<gml:boundedBy>
<gml:Box srsName="EPSG:2000">
<gml:coordinates>459130.000000,125350.000000
59130.000000,125350.000000</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Point srsName="EPSG:2000">
<gml:coordinates>459130.000000,125350.000000</gml:coordinates>
</gml:Point>
</ms:msGeometry>
<ms:XXX_ID>3</ms:XXX_ID>
</ms:layerx>
</gml:featureMember>

The layer displays fine, I am also able to label it (using the
ms:XXX_ID), but not gml:id (Any idea how to do this?)
The query below runs fine, returns a correct querymap and correct
number of results (single or many).
$queryObj = $map->queryByPoint( $ptClicked, MS_MULTIPLE,-1 );
$resultlayer = $map -> getLayerByName ('xxxx');
$no = $resultlayer -> getNumResults();

Yet I can not get hold on any of the attributes (gml:id nor ms:XXX_ID).
$theresult = $resultlayer ->getResult(0)->{shapeindex}; understandably returns
Notice: Use of undefined constant shapeindex - assumed 'shapeindex' in
/srv/www/htdocs/web/trywfs.php on line 99
and the order number of the feature in the GML.

The template in the map file is a 'dummy' one.

Any idea how to get gml:id or ms:XXX_ID into a variable would be appreciated...

BR

frequens



More information about the MapServer-users mailing list