X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1faa0f4d41da125dfb35d20dc2449e87f2497e20..f8a5f2964fb4fdcaa774f1149dc6007012af3a2a:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index 9bb4d46a..bc81bced 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -642,12 +642,6 @@ class Geocode $oValidTokens = new TokenList(); if (!empty($aTokens)) { - $sSQL = 'SELECT word_id, word_token, word, class, type, country_code, operator, search_name_count'; - $sSQL .= ' FROM word '; - $sSQL .= ' WHERE word_token in ('.join(',', $this->oDB->getDBQuotedList($aTokens)).')'; - - Debug::printSQL($sSQL); - $oValidTokens->addTokensFromDB( $this->oDB, $aTokens, @@ -897,15 +891,15 @@ class Geocode foreach ($aSearchResults as $iIdx => $aResult) { $fRadius = ClassTypes\getDefRadius($aResult); - $aOutlineResult = $this->oPlaceLookup->getOutlines($aResult['place_id'], $aResult['lon'], $aResult['lat'], $fDiameter); + $aOutlineResult = $this->oPlaceLookup->getOutlines($aResult['place_id'], $aResult['lon'], $aResult['lat'], $fRadius); if ($aOutlineResult) { $aResult = array_merge($aResult, $aOutlineResult); } // Is there an icon set for this type of result? - $sIcon = ClassTypes\getIcon($aResult); + $sIcon = ClassTypes\getIconFile($aResult); if (isset($sIcon)) { - $aResult['icon'] = CONST_Website_BaseURL.'images/mapicons/'.$aIcon.'.p.20.png'; + $aResult['icon'] = $sIcon; } $sLabel = ClassTypes\getLabel($aResult); @@ -941,7 +935,7 @@ class Geocode // - number of exact matches from the query $aResult['foundorder'] -= $aResults[$aResult['place_id']]->iExactMatches; // - importance of the class/type - $iClassImportance = ClassTypes/getImportance($aResult); + $iClassImportance = ClassTypes\getImportance($aResult); if (isset($iClassImportance)) { $aResult['foundorder'] += 0.0001 * $iClassImportance; } else {