if ($aPlace['place_id']) echo ' place_id="'.$aPlace['place_id'].'"';\r
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'].'"';\r
if ($aPlace['ref']) echo ' ref="'.htmlspecialchars($aPlace['ref']).'"';\r
+ if (isset($aPlace['lat'])) echo ' lat="'.htmlspecialchars($aPlace['lat']).'"';\r
+ if (isset($aPlace['lon'])) echo ' lon="'.htmlspecialchars($aPlace['lon']).'"';\r
echo ">".htmlspecialchars($aPlace['langaddress'])."</result>";\r
\r
- echo "<addressparts>";\r
- foreach($aAddress as $sKey => $sValue)\r
- {\r
- $sKey = str_replace(' ','_',$sKey);\r
- echo "<$sKey>";\r
- echo htmlspecialchars($sValue);\r
- echo "</$sKey>";\r
- }\r
- echo "</addressparts>";\r
+ if ($bShowAddressDetails) {\r
+ echo "<addressparts>";\r
+ foreach($aAddress as $sKey => $sValue)\r
+ {\r
+ $sKey = str_replace(' ','_',$sKey);\r
+ echo "<$sKey>";\r
+ echo htmlspecialchars($sValue);\r
+ echo "</$sKey>";\r
+ }\r
+ echo "</addressparts>";\r
+ }\r
}\r
\r
echo "</reversegeocode>";\r