X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/12168e3ca9421ab1d0195507919c26ce029ce155..825e19480891f7ad3dd368056e4db5ef902e97a5:/lib/template/address-xml.php?ds=inline
diff --git a/lib/template/address-xml.php b/lib/template/address-xml.php
index 6183b284..ab0bc72c 100644
--- a/lib/template/address-xml.php
+++ b/lib/template/address-xml.php
@@ -11,7 +11,7 @@ echo " attribution='Data © OpenStreetMap contributors, ODbL 1.0. http://www.ope
echo " querystring='".htmlspecialchars($_SERVER['QUERY_STRING'], ENT_QUOTES)."'";
echo ">\n";
-if (!sizeof($aPlace)) {
+if (empty($aPlace)) {
if (isset($sError))
echo "$sError";
else echo 'Unable to geocode';
@@ -28,6 +28,9 @@ if (!sizeof($aPlace)) {
echo join(',', $aPlace['aBoundingBox']);
echo '"';
}
+ echo " place_rank='".$aPlace['rank_search']."'";
+ echo " address_rank='".$aPlace['rank_address']."'";
+
if (isset($aPlace['asgeojson'])) {
echo ' geojson=\'';
@@ -48,9 +51,9 @@ if (!sizeof($aPlace)) {
}
echo '>'.htmlspecialchars($aPlace['langaddress']).'';
- if (isset($aPlace['aAddress'])) {
+ if (isset($aPlace['address'])) {
echo '';
- foreach ($aPlace['aAddress'] as $sKey => $sValue) {
+ foreach ($aPlace['address']->getAddressNames() as $sKey => $sValue) {
$sKey = str_replace(' ', '_', $sKey);
echo "<$sKey>";
echo htmlspecialchars($sValue);