From df463f4ea6fb4767945b95e9ecba603146677474 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 11 Oct 2017 22:17:59 +0200 Subject: [PATCH] Show address rank in details and hide unset admin_level Address rank explains better why the address parts are where they are. Fixes #766. --- lib/template/details-html.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/template/details-html.php b/lib/template/details-html.php index 76818395..dedf52f3 100644 --- a/lib/template/details-html.php +++ b/lib/template/details-html.php @@ -68,7 +68,8 @@ echo ' '.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'No Name')."\n"; echo ' ' . $aAddressLine['class'].':'.$aAddressLine['type'] . "\n"; echo ' ' . osmLink($aAddressLine) . "\n"; - echo ' ' . (isset($aAddressLine['admin_level']) ? $aAddressLine['admin_level'] : '') . "\n"; + echo ' ' . (isset($aAddressLine['rank_address']) ? $aAddressLine['rank_address'] : '') . "\n"; + echo ' ' . ($aAddressLine['admin_level'] < 15 ? $aAddressLine['admin_level'] : '') . "\n"; echo ' ' . format_distance($aAddressLine['distance'])."\n"; echo ' ' . detailsLink($aAddressLine,'details >') . "\n"; echo "\n"; @@ -149,6 +150,7 @@ Local name Type OSM + Address rank Admin level Distance -- 2.39.5