X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8b0b9db31e6b1cc8a8b046dace81d6a3799e8f67..3c188164ab73fc3442db1e8979b86ef5503f6b32:/lib-php/Geocode.php diff --git a/lib-php/Geocode.php b/lib-php/Geocode.php index bf9a3262..9e3b0b92 100644 --- a/lib-php/Geocode.php +++ b/lib-php/Geocode.php @@ -190,7 +190,7 @@ class Geocode $this->bFallback = $oParams->getBool('fallback', $this->bFallback); - // List of excluded Place IDs - used for more acurate pageing + // List of excluded Place IDs - used for more accurate pageing $sExcluded = $oParams->getStringList('exclude_place_ids'); if ($sExcluded) { foreach ($sExcluded as $iExcludedPlaceID) { @@ -843,7 +843,9 @@ class Geocode $aResult['importance'] = 0.001; $aResult['foundorder'] = $aResult['addressimportance']; } else { - $aResult['importance'] = max(0.001, $aResult['importance']); + if ($aResult['importance'] == 0) { + $aResult['importance'] = 0.0001; + } $aResult['importance'] *= $this->viewboxImportanceFactor( $aResult['lon'], $aResult['lat']