]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/address-xml.php
add extratags and name details to PlaceLookup (reverse)
[nominatim.git] / lib / template / address-xml.php
index 9eeb3b778a6c5737d76a49ee33cfd3455fa47081..ba085eea9fd27b757270659d8a6e374b0dbf7c5a 100644 (file)
@@ -29,7 +29,8 @@
                if (isset($aPlace['lon'])) echo ' lon="'.htmlspecialchars($aPlace['lon']).'"';
                echo ">".htmlspecialchars($aPlace['langaddress'])."</result>";
 
-               if ($bShowAddressDetails) {
+               if (isset($aPlace['aAddress']))
+               {
                        echo "<addressparts>";
                        foreach($aPlace['aAddress'] as $sKey => $sValue)
                        {
                        }
                        echo "</addressparts>";
                }
+
+               if (isset($aPlace['sExtraTags']))
+               {
+                       echo "<extratags>";
+                       foreach ($aPlace['sExtraTags'] as $sKey => $sValue)
+                       {
+                               echo '<tag key="'.htmlspecialchars($sKey).'">';
+                               echo htmlspecialchars($sValue);
+                               echo "</tag>";
+                       }
+                       echo "</extratags>";
+               }
+
+               if (isset($aPlace['sNameDetails']))
+               {
+                       echo "<namedetails>";
+                       foreach ($aPlace['sNameDetails'] as $sKey => $sValue)
+                       {
+                               echo '<name key="'.htmlspecialchars($sKey).'">';
+                               echo htmlspecialchars($sValue);
+                               echo "</name>";
+                       }
+                       echo "</namedetails>";
+               }
        }
 
        echo "</reversegeocode>";