From cf9b248f293f24c4fe1435d828b53087b661d470 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 1 Dec 2020 17:54:53 +0100 Subject: [PATCH] add address rank to XML output 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 | 3 +++ lib/template/search-xml.php | 1 + 2 files changed, 4 insertions(+) diff --git a/lib/template/address-xml.php b/lib/template/address-xml.php index a17da738..ab0bc72c 100644 --- a/lib/template/address-xml.php +++ b/lib/template/address-xml.php @@ -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=\''; diff --git a/lib/template/search-xml.php b/lib/template/search-xml.php index 68d985f3..5ac8e9dd 100644 --- a/lib/template/search-xml.php +++ b/lib/template/search-xml.php @@ -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="'; -- 2.39.5