problem getting shape index values

Doug Williams williams at WEBSAWYER.COM
Tue Feb 21 14:59:19 EST 2006


I posted a problem with queryByPoint on a point layer added from an external
database.  It seemed as if getShape was not working ... but I have found that
by modifying my code as below I can get the shape information.

            $oShape = $oLayer->getShape($oRes->tileindex,$oRes->shapeindex);

            for($iField=0; $iField < sizeof($selFields); $iField++)
            {
               if ($selFields[$iField] == "index") {
                  $tempval = $oShape->index;
               } elseif ($selFields[$iField] == "text") {
                  $tempval = $oShape->text;
               } else {
                  $tempval = $oShape->values[$selFields[$iField]];
//                  $tempval = $oShape->getValue($oLayer, $selFields[$iField]);
            }

My fault, I did not realize that it was not possible to get certain values
from the 'values' or 'getValue' methods.



More information about the mapserver-users mailing list