Mapscript-using getshape()

Michael chaumic at NETVIGATOR.COM
Sun May 8 10:15:26 EDT 2005


Hello,
 I'm new to MapServer and phpMapScript. I have the followings code trying to
access the field value of a layer.

#-------------------
$myLayer = $gpoMap->getLayerByName("MooringBuoy");
$myLayer->Open();
$myShape = $myLayer->getShape(-1,5);
$Result = $MyShape->values["keyword"];
print_r($Result);
$myLayer->Close();

#------------------

However, the print_r function didn't print anything. Anything wrong with my
code ?

Thank.


Michael



More information about the mapserver-users mailing list