From 9fd75fd7ce3040c0f376a2fc5411de2b267af8b7 Mon Sep 17 00:00:00 2001 From: Brian Quinion Date: Mon, 9 Sep 2013 16:18:40 +0100 Subject: [PATCH 1/1] improve admin type labels --- lib/Geocode.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Geocode.php b/lib/Geocode.php index d660e8b3..a784d53b 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1491,7 +1491,12 @@ $aResult['icon'] = CONST_Website_BaseURL.'images/mapicons/'.$aClassType[$aResult['class'].':'.$aResult['type']]['icon'].'.p.20.png'; } - if (isset($aClassType[$aResult['class'].':'.$aResult['type']]['label']) + if (isset($aClassType[$aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']]['label']) + && $aClassType[$aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']]['label']) + { + $aResult['label'] = $aClassType[$aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']]['label']; + } + elseif (isset($aClassType[$aResult['class'].':'.$aResult['type']]['label']) && $aClassType[$aResult['class'].':'.$aResult['type']]['label']) { $aResult['label'] = $aClassType[$aResult['class'].':'.$aResult['type']]['label']; -- 2.39.5