]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-xml.php
allow parameters to be empty
[nominatim.git] / lib / template / search-xml.php
index 7cbcc04bf605623e3485b03f9d15910e7f649259..7a5c997fddd1b35b222871b7cd160fdca161c0e3 100644 (file)
@@ -25,8 +25,7 @@
        foreach($aSearchResults as $iResNum => $aResult)
        {
                echo "<place place_id='".$aResult['place_id']."'";
-               $sOSMType = ($aResult['osm_type'] == 'N'?'node':($aResult['osm_type'] == 'W'?'way':($aResult['osm_type'] == 'R'?'relation':
-               ($aResult['osm_type'] == 'T'?'tiger':($aResult['osm_type'] == 'I'?'interpolation':'')))));
+               $sOSMType = formatOSMType($aResult['osm_type']);
                if ($sOSMType)
                {
                        echo " osm_type='$sOSMType'";