X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/25baaf530dea28b7cf3c72ba4e83f3ebed05629f..a9b4894b0716e7c75327053d175388a727ce3509:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index b9e26f03..f0e03de5 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;