]> 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 54217933ef7d8962a5e3934b3186b6ae9cb8d57d..7a5c997fddd1b35b222871b7cd160fdca161c0e3 100644 (file)
@@ -25,7 +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':''))));
+               $sOSMType = formatOSMType($aResult['osm_type']);
                if ($sOSMType)
                {
                        echo " osm_type='$sOSMType'";