]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-xml.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / template / search-xml.php
index 84e177750b020b7c919126517b1fdab4dfb8485f..693330bb52cfce29fba95d3ce1c45415085b4b99 100644 (file)
@@ -1,6 +1,5 @@
 <?php
        header("content-type: text/xml; charset=UTF-8");
 <?php
        header("content-type: text/xml; charset=UTF-8");
-       header("Access-Control-Allow-Origin: *");
 
        echo "<";
        echo "?xml version=\"1.0\" encoding=\"UTF-8\" ?";
 
        echo "<";
        echo "?xml version=\"1.0\" encoding=\"UTF-8\" ?";
@@ -10,7 +9,7 @@
        echo " timestamp='".date(DATE_RFC822)."'";
        echo " attribution='Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright'";
        echo " querystring='".htmlspecialchars($sQuery, ENT_QUOTES)."'";
        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($sViewBox)) echo " viewbox='".htmlspecialchars($sViewBox, ENT_QUOTES)."'";
+       if ($sViewBox) echo " viewbox='".htmlspecialchars($sViewBox, ENT_QUOTES)."'";
        echo " polygon='".($bShowPolygons?'true':'false')."'";
        if (sizeof($aExcludePlaceIDs))
        {
        echo " polygon='".($bShowPolygons?'true':'false')."'";
        if (sizeof($aExcludePlaceIDs))
        {
@@ -81,7 +80,8 @@
                echo " display_name='".htmlspecialchars($aResult['name'], ENT_QUOTES)."'";
 
                echo " class='".htmlspecialchars($aResult['class'])."'";
                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 " icon='".htmlspecialchars($aResult['icon'], ENT_QUOTES)."'";
                if (isset($aResult['icon']) && $aResult['icon'])
                {
                        echo " icon='".htmlspecialchars($aResult['icon'], ENT_QUOTES)."'";
@@ -94,8 +94,9 @@
 
                if (isset($aResult['askml']))
                {
 
                if (isset($aResult['askml']))
                {
-                       echo "\n";
+                       echo "\n<geokml>";
                        echo $aResult['askml'];
                        echo $aResult['askml'];
+                       echo "</geokml>";
                }
 
                if (isset($aResult['address']))
                }
 
                if (isset($aResult['address']))