- $iPlaceID = geocodeReverse((float)$this->aNearPoint[0], (float)$this->aNearPoint[1]);
- if ($iPlaceID)
- $aSearchResults = $this->getDetails(array($iPlaceID));
+ $oReverse = new ReverseGeocode($this->oDB);
+ $oReverse->setZoom(18);
+
+ $aLookup = $oReverse->lookup((float)$this->aNearPoint[0],
+ (float)$this->aNearPoint[1],
+ false);
+
+ if (CONST_Debug) var_dump("Reverse search", $aLookup);
+
+ if ($aLookup['place_id'])
+ $aSearchResults = $this->getDetails(array($aLookup['place_id'] => -1));