X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/2c42bda9cef0877ac2f14f0e5353876e3abd8d73..9e35e5c2b02887e361972ffbb20e65bbba0d02c7:/lib/SearchContext.php 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)',