[mapserver-users] getfeature problem

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Mon Nov 5 14:47:30 PST 2012


Man are the docs out-of-date in this regard. See RFC 65 for an example, see the Proposed Technical Changes section  (it's much simpler in 6.x)...

  http://mapserver.org/development/rfc/ms-rfc-65.html

I'll get some documentation tickets in place to address the documentation shortcomings.

Steve


From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Bistrais, Bob
Sent: Monday, November 05, 2012 3:28 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] getfeature problem

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/89938048/attachment.htm>


More information about the MapServer-users mailing list