]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/address-xml.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / template / address-xml.php
index 6183b284dbc3e8df471ffc719e438e1de83dd17a..ab0bc72cbab623cbe62ff13d217ba6325b0deaf3 100644 (file)
@@ -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 "<error>$sError</error>";
     else echo '<error>Unable to geocode</error>';
@@ -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']).'</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);