/**
* Get radius around reference point.
*
- * @return float Search radius around refernce point.
+ * @return float Search radius around reference point.
*/
public function nearRadius()
{
$this->sqlViewboxCentre .= ")'::geometry,4326)";
$sSQL = 'ST_BUFFER('.$this->sqlViewboxCentre.','.($fRouteWidth/69).')';
- $sGeom = chksql($oDB->getOne("select ".$sSQL), "Could not get small viewbox");
+ $sGeom = chksql($oDB->getOne('select '.$sSQL), 'Could not get small viewbox');
$this->sqlViewboxSmall = "'".$sGeom."'::geometry";
$sSQL = 'ST_BUFFER('.$this->sqlViewboxCentre.','.($fRouteWidth/30).')';
- $sGeom = chksql($oDB->getOne("select ".$sSQL), "Could not get large viewbox");
+ $sGeom = chksql($oDB->getOne('select '.$sSQL), 'Could not get large viewbox');
$this->sqlViewboxLarge = "'".$sGeom."'::geometry";
}
return '';
}
+
+ public function debugInfo()
+ {
+ return array(
+ 'Near radius' => $this->fNearRadius,
+ 'Near point (SQL)' => $this->sqlNear,
+ 'Bounded viewbox' => $this->bViewboxBounded,
+ 'Viewbox (SQL, small)' => $this->sqlViewboxSmall,
+ 'Viewbox (SQL, large)' => $this->sqlViewboxLarge,
+ 'Viewbox (SQL, centre)' => $this->sqlViewboxCentre,
+ 'Countries (SQL)' => $this->sqlCountryList,
+ 'Excluded IDs (SQL)' => $this->sqlExcludeList
+ );
+ }
}