<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-2022-jp">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="MS UI Gothic" size=2>
<DIV><FONT face="MS UI Gothic" size=2>Hi, I'm trying to query a layer via
mapscript but I can't get a count above 0 for numitems on the layer object
or numvalues off the feature object. Is there a mapfile configuration or
mapscript method i'm missing?</FONT></DIV>
<DIV><FONT face="MS UI Gothic" size=2></FONT> </DIV>
<DIV><FONT face="MS UI Gothic" size=2>Thank you,</FONT></DIV>
<DIV>Tom</DIV>
<DIV> </DIV>
<DIV><FONT face="MS UI Gothic" size=2></FONT> </DIV>
<DIV><FONT face="MS UI Gothic" size=2></FONT> </DIV>
<DIV><FONT face="MS UI Gothic" size=2>mapscript code : </FONT><FONT
face="MS UI Gothic" size=2>-------------------------------------</FONT></DIV>
<DIV><FONT face="MS UI Gothic" size=2></FONT> </DIV>
<DIV><FONT face="MS UI Gothic" size=2>my $map = new
mapscript::mapObj($mfpath);</FONT></DIV>
<DIV><FONT face="MS UI Gothic" size=2>my $lobj =
$map->getLayerByName($lyr);</FONT></DIV>
<DIV><FONT face="MS UI Gothic" size=2>my $ret =
$lobj->queryByRect($map,$robj);</FONT></DIV>
<DIV><FONT face="MS UI Gothic" size=2>my $numRec =
$lobj->getNumResults();</FONT></DIV>
<DIV><FONT face="MS UI Gothic" size=2>my $results =
$lobj->getResults();</FONT></DIV>
<DIV><FONT face="MS UI Gothic" size=2></FONT> </DIV><FONT
face="MS UI Gothic" size=2>
<DIV><BR>for($i=0;$i<$numRec;$i++){<BR> $result =
$results->getResult($i);<BR> $feature = $lobj->getFeature(
$result->{shapeindex} , $result->{tileindex} );<BR># #$att1 =
$feature->getValue( 1 );<BR># #$att2 = $feature->getValue( 2
);<BR> print $lobj->{numitems} . " " . $result->{shapeindex} . " " .
$result->{tileindex} . " " .$feature->{numvalues} ." <br>";</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>output: ----------------------------------------------------</DIV>
<DIV> </DIV>
<DIV>0 4443 -1 0 <BR>0 4446 -1 0 <BR>0 4452 -1 0 <BR>0 4455 -1 0 <BR>0 4471 -1 0
<BR>0 4472 -1 0 <BR>0 4477 -1 0 <BR>0 4479 -1 0 <BR>0 4483 -1 0 <BR></DIV>
<DIV> </DIV>
<DIV>MAPFILE --------------------------------------</DIV>
<DIV> </DIV>
<DIV>LAYER<BR> NAME m_stores<BR> TEMPLATE "<A
href="">http://192.168.10.33/php/qtemp.html</A>"<BR> TYPE
QUERY<BR> DATA
bgshp/m_store_4612<BR> END</DIV></FONT></FONT></DIV></BODY></HTML>