[mapserver-users] getfeature problem

Bistrais, Bob Bob.Bistrais at maine.gov
Mon Nov 5 13:27:57 PST 2012


I am trying to work with some feature results, and am getting an error returned on a layer->getFeature.  I tried to research other posts about this, seems like there was some issues with WMS or something not quite related to where I am.  I'm using MS4W 3.0.4 - MapServer 6.0.2 with PHP MapScript 6.1

My code:

print "results = ". $layer->getNumResults();   //Verify that we get results, indeed one result returned as expected

                for($r = 0; $r < $layer->getNumResults(); $r++) {
                                $result = $layer->getResult($r);
                                $res = $layer->getResult(0);
                                $firstResult = $layer->getFeature($res->shapeindex);                    //This is the line it fails on
                                $parcelWkt = $firstResult->toWkt();



results = 1
Fatal error: Call to undefined method layerObj::getFeature() in C:\ms4w\apps\geoparcels\htdocs\php\selectParcelPt.php on line 280

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121105/792ecd77/attachment.html>


More information about the mapserver-users mailing list