]> 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 6a382ebf7bcb4bde0c83783e05211f9ba8241ccb..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':'')));
+               $sOSMType = formatOSMType($aResult['osm_type']);
                if ($sOSMType)
                {
                        echo " osm_type='$sOSMType'";