]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-xml.php
merge in the postcode and is_in terms into the address vector for search
[nominatim.git] / lib / template / search-xml.php
index 5ebfa2826c8e11c3edea9d0fad7e9a16cc058bfe..be05cb40c85b336b44bb241f9b80fac39a0c0c09 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\" ?";
                        }
                }
 
                        }
                }
 
+               if (isset($aResult['asgeojson']))
+               {
+                       echo ' geojson=\'';
+                       echo $aResult['asgeojson'];
+                       echo '\'';
+               }
+
+               if (isset($aResult['assvg']))
+               {
+                       echo ' geosvg=\'';
+                       echo $aResult['assvg'];
+                       echo '\'';
+               }
+
+               if (isset($aResult['astext']))
+               {
+                       echo ' geotext=\'';
+                       echo $aResult['astext'];
+                       echo '\'';
+               }
+
                if (isset($aResult['zoom']))
                {
                        echo " zoom='".$aResult['zoom']."'";
                if (isset($aResult['zoom']))
                {
                        echo " zoom='".$aResult['zoom']."'";
 
                echo " class='".htmlspecialchars($aResult['class'])."'";
                echo " type='".htmlspecialchars($aResult['type'])."'";
 
                echo " class='".htmlspecialchars($aResult['class'])."'";
                echo " type='".htmlspecialchars($aResult['type'])."'";
+               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)."'";
                }
 
-               if (isset($aResult['address']))
+               if (isset($aResult['address']) || isset($aResult['askml']))
                {
                        echo ">";
                {
                        echo ">";
+               }
+
+               if (isset($aResult['askml']))
+               {
+                       echo "\n<geokml>";
+                       echo $aResult['askml'];
+                       echo "</geokml>";
+               }
+
+               if (isset($aResult['address']))
+               {
+                       echo "\n";
                        foreach($aResult['address'] as $sKey => $sValue)
                        {
                                $sKey = str_replace(' ','_',$sKey);
                        foreach($aResult['address'] as $sKey => $sValue)
                        {
                                $sKey = str_replace(' ','_',$sKey);
                                echo htmlspecialchars($sValue);
                                echo "</$sKey>";
                        }
                                echo htmlspecialchars($sValue);
                                echo "</$sKey>";
                        }
+               }
 
 
+               if (isset($aResult['address']) || isset($aResult['askml']))
+               {
                        echo "</place>";
                }
                else
                        echo "</place>";
                }
                else