From 0394f32438a134266e75e28fd3b586e9a1dc3f92 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 13 Aug 2018 20:52:49 +0200 Subject: [PATCH] fix large viewbox computation Fixes #1137. --- lib/SearchContext.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SearchContext.php b/lib/SearchContext.php index c0ae9032..84159b83 100644 --- a/lib/SearchContext.php +++ b/lib/SearchContext.php @@ -108,8 +108,8 @@ class SearchContext $aViewBox[3] ); - $fHeight = $aViewBox[0] - $aViewBox[2]; - $fWidth = $aViewBox[1] - $aViewBox[3]; + $fHeight = abs($aViewBox[0] - $aViewBox[2]); + $fWidth = abs($aViewBox[1] - $aViewBox[3]); $this->sqlViewboxLarge = sprintf( 'ST_SetSRID(ST_MakeBox2D(ST_Point(%F,%F),ST_Point(%F,%F)),4326)', -- 2.43.2