[mapserver-users] Old code must be deprecated

Michael McInnis mmcinnis59 at msn.com
Fri Sep 27 10:06:26 PDT 2013


I'm trying to get some old code to work with 6.+ and can't retrieve census counts yet via the old method.Does someone know what the new syntax would be below?
Thanks
$layer->queryByShape($circle);	$numResults = $layer->getNumResults();
	if($numResults > 0 && $numResults < 10000){		echo '';		echo '<br/><br/> numResults : '.$numResults;
		$totalPop = 0;		$error = false;		debug("  $numResults results.");
		$layer->open();
		for($i=0;$i<$numResults;++$i){			// New way			$shpIdx = $layer->getResult($i)->shapeindex;			echo 'shpIdx : '.$shpIdx;
			//$feat = $layer->getFeature($shpIdx);	// <- DOES NOT WORK			//echo 'feat : '.$feat;					}
		$layer->close();
		return 1;	}else{		return 0;	}
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130927/5c88bfa3/attachment.htm>


More information about the MapServer-users mailing list