From 5a772a5770b4c0ced10e7da95dee17e5052ff8de Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 20 Jul 2018 23:29:36 +0200 Subject: [PATCH] Don't add viewbox weight when no viewbox is given Fixes #1068. --- lib/Geocode.php | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.5