X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/f6cf89fdde89f3ae26cb5146c6b2124cf9022f77..a9ef3021320949e46b098b20d467adc82b96bfb9:/lib/Geocode.php 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;