+ if ($aLookup)
+ {
+ $oPlaceLookup = new PlaceLookup($oDB);
+ $oPlaceLookup->setLanguagePreference($aLangPrefOrder);
+ $oPlaceLookup->setIncludeAddressDetails(getParamBool('addressdetails', true));
+ $oPlaceLookup->setIncludeExtraTags(getParamBool('extratags', false));
+ $oPlaceLookup->setIncludeNameDetails(getParamBool('namedetails', false));
+
+ $aPlace = $oPlaceLookup->lookupPlace($aLookup);
+
+ $oPlaceLookup->setIncludePolygonAsPoints($bAsPoints);
+ $oPlaceLookup->setIncludePolygonAsText($bAsText);
+ $oPlaceLookup->setIncludePolygonAsGeoJSON($bAsGeoJSON);
+ $oPlaceLookup->setIncludePolygonAsKML($bAsKML);
+ $oPlaceLookup->setIncludePolygonAsSVG($bAsSVG);
+ $oPlaceLookup->setPolygonSimplificationThreshold($fThreshold);
+
+ $fRadius = $fDiameter = getResultDiameter($aPlace);
+ $aOutlineResult = $oPlaceLookup->getOutlines($aPlace['place_id'], $aPlace['lon'], $aPlace['lat'], $fRadius);
+
+ if ($aOutlineResult)
+ {
+ $aPlace = array_merge($aPlace, $aOutlineResult);
+ }
+ }
+ else
+ {
+ $aPlace = null;
+ }
+
+ logEnd($oDB, $hLog, sizeof($aPlace)?1:0);
+
+ if (CONST_Debug)
+ {
+ var_dump($aPlace);
+ exit;
+ }