X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/75ec3326e1f10e72b9ce8e2a11a9c4d5db2c881d..3abbeb5f081c648a6f2fe0213663627ad6b37198:/lib/template/address-xml.php
diff --git a/lib/template/address-xml.php b/lib/template/address-xml.php
index dc9f0548..185601ad 100644
--- a/lib/template/address-xml.php
+++ b/lib/template/address-xml.php
@@ -25,17 +25,21 @@
if ($aPlace['place_id']) echo ' place_id="'.$aPlace['place_id'].'"';
if ($aPlace['osm_type'] && $aPlace['osm_id']) echo ' osm_type="'.($aPlace['osm_type']=='N'?'node':($aPlace['osm_type']=='W'?'way':'relation')).'"'.' osm_id="'.$aPlace['osm_id'].'"';
if ($aPlace['ref']) echo ' ref="'.htmlspecialchars($aPlace['ref']).'"';
+ if (isset($aPlace['lat'])) echo ' lat="'.htmlspecialchars($aPlace['lat']).'"';
+ if (isset($aPlace['lon'])) echo ' lon="'.htmlspecialchars($aPlace['lon']).'"';
echo ">".htmlspecialchars($aPlace['langaddress'])."";
- echo "";
- foreach($aAddress as $sKey => $sValue)
- {
- $sKey = str_replace(' ','_',$sKey);
- echo "<$sKey>";
- echo htmlspecialchars($sValue);
- echo "$sKey>";
- }
- echo "";
+ if ($bShowAddressDetails) {
+ echo "";
+ foreach($aAddress as $sKey => $sValue)
+ {
+ $sKey = str_replace(' ','_',$sKey);
+ echo "<$sKey>";
+ echo htmlspecialchars($sValue);
+ echo "$sKey>";
+ }
+ echo "";
+ }
}
echo "";