- $aPointDetails['aNames'] = array();
-/*
- for($i = 1; $i <= $aPointDetails['numnames']; $i++)
- {
- $sSQL = "select name[$i].key, name[$i].value from placex where place_id = $iPlaceID limit 1";
- $aNameItem = $oDB->getRow($sSQL);
- if (substr($aNameItem['key'],0,5) == 'name:') $aNameItem['key'] = substr($aNameItem['key'],5);
- $aPointDetails['aNames'][$aNameItem['key']] = $aNameItem['value'];
- }
-*/
- // Get the bounding box and outline polygon
- $sSQL = "select *,ST_AsText(outline) as outlinestring from get_place_boundingbox($iPlaceID)";
- $aPointPolygon = $oDB->getRow($sSQL);
- IF (PEAR::IsError($aPointPolygon))
- {
- var_dump($aPointPolygon);
- exit;
- }
- if (preg_match('#POLYGON\\(\\(([- 0-9.,]+)#',$aPointPolygon['outlinestring'],$aMatch))
- {
- preg_match_all('/(-?[0-9.]+) (-?[0-9.]+)/',$aMatch[1],$aPolyPoints,PREG_SET_ORDER);
- }
- elseif (preg_match('#POINT\\((-?[0-9.]+) (-?[0-9.]+)\\)#',$aPointPolygon['outlinestring'],$aMatch))
- {
- $fRadius = 0.01;
- $iSteps = ($fRadius * 40000)^2;
- $fStepSize = (2*pi())/$iSteps;
- $aPolyPoints = array();
- for($f = 0; $f < 2*pi(); $f += $fStepSize)
- {