echo " querystring='".htmlspecialchars($_SERVER['QUERY_STRING'], ENT_QUOTES)."'";
echo ">\n";
-if (!sizeof($aPlace)) {
+if (empty($aPlace)) {
if (isset($sError))
echo "<error>$sError</error>";
else echo '<error>Unable to geocode</error>';
echo join(',', $aPlace['aBoundingBox']);
echo '"';
}
+ echo " place_rank='".$aPlace['rank_search']."'";
+ echo " address_rank='".$aPlace['rank_address']."'";
+
if (isset($aPlace['asgeojson'])) {
echo ' geojson=\'';
}
echo '>'.htmlspecialchars($aPlace['langaddress']).'</result>';
- if (isset($aPlace['aAddress'])) {
+ if (isset($aPlace['address'])) {
echo '<addressparts>';
- foreach ($aPlace['aAddress'] as $sKey => $sValue) {
+ foreach ($aPlace['address']->getAddressNames() as $sKey => $sValue) {
$sKey = str_replace(' ', '_', $sKey);
echo "<$sKey>";
echo htmlspecialchars($sValue);