]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/address-xml.php
cmake: use explicit VPATH when calling pgxs makefile
[nominatim.git] / lib / template / address-xml.php
index ba085eea9fd27b757270659d8a6e374b0dbf7c5a..109e66a17ef41d2e3426f6b4061c535817be6435 100644 (file)
                if ($aPlace['ref']) echo ' ref="'.htmlspecialchars($aPlace['ref']).'"';
                if (isset($aPlace['lat'])) echo ' lat="'.htmlspecialchars($aPlace['lat']).'"';
                if (isset($aPlace['lon'])) echo ' lon="'.htmlspecialchars($aPlace['lon']).'"';
+               if (isset($aPlace['aBoundingBox']))
+               {
+                       echo ' boundingbox="';
+                       echo join(',', $aPlace['aBoundingBox']);
+                       echo '"';
+
+                       if ($bAsPoints && isset($aPlace['aPolyPoints']))
+                       {
+                               echo ' polygonpoints=\'';
+                               echo json_encode($aPlace['aPolyPoints']);
+                               echo '\'';
+                       }
+               }
+
+               if (isset($aPlace['asgeojson']))
+               {
+                       echo ' geojson=\'';
+                       echo $aPlace['asgeojson'];
+                       echo '\'';
+               }
+
+               if (isset($aPlace['assvg']))
+               {
+                       echo ' geosvg=\'';
+                       echo $aPlace['assvg'];
+                       echo '\'';
+               }
+
+               if (isset($aPlace['astext']))
+               {
+                       echo ' geotext=\'';
+                       echo $aPlace['astext'];
+                       echo '\'';
+               }
                echo ">".htmlspecialchars($aPlace['langaddress'])."</result>";
 
                if (isset($aPlace['aAddress']))
@@ -47,9 +81,7 @@
                        echo "<extratags>";
                        foreach ($aPlace['sExtraTags'] as $sKey => $sValue)
                        {
-                               echo '<tag key="'.htmlspecialchars($sKey).'">';
-                               echo htmlspecialchars($sValue);
-                               echo "</tag>";
+                               echo '<tag key="'.htmlspecialchars($sKey).'" value="'.htmlspecialchars($sValue).'"/>';
                        }
                        echo "</extratags>";
                }
                        echo "<namedetails>";
                        foreach ($aPlace['sNameDetails'] as $sKey => $sValue)
                        {
-                               echo '<name key="'.htmlspecialchars($sKey).'">';
+                               echo '<name desc="'.htmlspecialchars($sKey).'">';
                                echo htmlspecialchars($sValue);
                                echo "</name>";
                        }
                        echo "</namedetails>";
                }
+
+               if (isset($aPlace['askml']))
+               {
+                       echo "\n<geokml>";
+                       echo $aPlace['askml'];
+                       echo "</geokml>";
+               }
+
        }
 
        echo "</reversegeocode>";