X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e929399d4dd23fa1571dd77cf489ef51d716f5cc..ec8963f3d2e18a197aee8576889400fb058150d3:/lib/Geocode.php?ds=inline diff --git a/lib/Geocode.php b/lib/Geocode.php index 59830623..1dd5a0e5 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -149,6 +149,10 @@ class Geocode private function viewboxImportanceFactor($fX, $fY) { + if (!$this->aViewBox) { + return 1; + } + $fWidth = ($this->aViewBox[2] - $this->aViewBox[0])/2; $fHeight = ($this->aViewBox[3] - $this->aViewBox[1])/2;