]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-xml.php
add extratags and name details to PlaceLookup (reverse)
[nominatim.git] / lib / template / search-xml.php
index b78c23eab869f63654b181db6d89092c67370d58..c1fd58f02ed4f612424eeebdd3d1829394207f15 100644 (file)
@@ -5,11 +5,12 @@
        echo "?xml version=\"1.0\" encoding=\"UTF-8\" ?";
        echo ">\n";
 
-       echo "<searchresults";
+       echo "<";
+       echo (isset($sXmlRootTag)?$sXmlRootTag:'searchresults');
        echo " timestamp='".date(DATE_RFC822)."'";
        echo " attribution='Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright'";
        echo " querystring='".htmlspecialchars($sQuery, ENT_QUOTES)."'";
-       if (isset($_GET['viewbox']) && $_GET['viewbox']) echo " viewbox='".htmlspecialchars($_GET['viewbox'], ENT_QUOTES)."'";
+       if ($sViewBox) echo " viewbox='".htmlspecialchars($sViewBox, ENT_QUOTES)."'";
        echo " polygon='".($bShowPolygons?'true':'false')."'";
        if (sizeof($aExcludePlaceIDs))
        {
@@ -80,7 +81,7 @@
                echo " display_name='".htmlspecialchars($aResult['name'], ENT_QUOTES)."'";
 
                echo " class='".htmlspecialchars($aResult['class'])."'";
-               echo " type='".htmlspecialchars($aResult['type'])."'";
+               echo " type='".htmlspecialchars($aResult['type'], ENT_QUOTES)."'";
                echo " importance='".htmlspecialchars($aResult['importance'])."'";
                if (isset($aResult['icon']) && $aResult['icon'])
                {
                }
        }
        
-       echo "</searchresults>";
+       echo "</" . (isset($sXmlRootTag)?$sXmlRootTag:'searchresults') . ">";