<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>I'm trying to get some old code to work with 6.+ and can't retrieve census counts yet via the old method.</div><div>Does someone know what the new syntax would be below?</div><div><br></div><div>Thanks</div><div><br></div><div>$layer->queryByShape($circle);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$numResults = $layer->getNumResults();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if($numResults > 0 && $numResults < 10000){</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>echo '';</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>echo '<br/><br/> numResults : '.$numResults;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$totalPop = 0;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$error = false;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>debug(" $numResults results.");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$layer->open();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>for($i=0;$i<$numResults;++$i){</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>// New way</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$shpIdx = $layer->getResult($i)->shapeindex;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>echo 'shpIdx : '.$shpIdx;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>//$feat = $layer->getFeature($shpIdx);<span class="Apple-tab-span" style="white-space:pre"> </span>// <- DOES NOT WORK</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>//echo 'feat : '.$feat;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$layer->close();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>return 1;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}else{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>return 0;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><br> </div></body>
</html>