X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/b7abc8566ed5b67ddbbfed7e10701b4838008f6b..e47646ddbaf7b2e7dc93b41394d0a3d10d58f16e:/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;