]> git.openstreetmap.org Git - nominatim.git/commitdiff
improve admin type labels
authorBrian Quinion <brian.quinion@mapquest.com>
Mon, 9 Sep 2013 15:18:40 +0000 (16:18 +0100)
committerBrian Quinion <brian.quinion@mapquest.com>
Mon, 9 Sep 2013 15:18:40 +0000 (16:18 +0100)
lib/Geocode.php

index d660e8b3b2f926a0ed217b6989d00e4d22c4c57a..a784d53bbd0da1b3f52dcb23e8370f016514bafd 100644 (file)
                                        $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'];