namespace Nominatim;
-require_once(CONST_BasePath.'/lib/AddressDetails.php');
-require_once(CONST_BasePath.'/lib/Result.php');
+require_once(CONST_LibDir.'/AddressDetails.php');
+require_once(CONST_LibDir.'/Result.php');
class PlaceLookup
{
}
}
- $aPlace['addresstype'] = ClassTypes\getProperty(
+ $aPlace['addresstype'] = ClassTypes\getLabelTag(
$aPlace,
- 'simplelabel',
- $aPlace['class']
+ $aPlace['country_code']
);
+
+ $aResults[$aPlace['place_id']] = $aPlace;
}
- Debug::printVar('Places', $aPlaces);
+ $aResults = array_filter(
+ $aResults,
+ function ($v) {
+ return !($v instanceof Result);
+ }
+ );
+
+ Debug::printVar('Places', $aResults);
- return $aPlaces;
+ return $aResults;
}
/* returns an array which will contain the keys