]> git.openstreetmap.org Git - nominatim.git/commitdiff
add address rank to XML output
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 1 Dec 2020 16:54:53 +0000 (17:54 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 1 Dec 2020 16:54:53 +0000 (17:54 +0100)
The address rank is much more interesting than the search rank
these days because it tells something about the kind of object.

Reverse did have neither rank, so add both for consistency.

lib/template/address-xml.php
lib/template/search-xml.php

index a17da738215b0ee0c354aa239750df4698f3999e..ab0bc72cbab623cbe62ff13d217ba6325b0deaf3 100644 (file)
@@ -28,6 +28,9 @@ if (empty($aPlace)) {
         echo join(',', $aPlace['aBoundingBox']);
         echo '"';
     }
+    echo " place_rank='".$aPlace['rank_search']."'";
+    echo " address_rank='".$aPlace['rank_address']."'";
+
 
     if (isset($aPlace['asgeojson'])) {
         echo ' geojson=\'';
index 68d985f3cc3111fd6f7aece1cce916efb7bb3f73..5ac8e9dd37425d440ab6362dff35ab07a2e98d62 100644 (file)
@@ -25,6 +25,7 @@ foreach ($aSearchResults as $iResNum => $aResult) {
         echo " osm_id='".$aResult['osm_id']."'";
     }
     echo " place_rank='".$aResult['rank_search']."'";
+    echo " address_rank='".$aResult['rank_address']."'";
 
     if (isset($aResult['aBoundingBox'])) {
         echo ' boundingbox="';