X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/64fa70ac0aaaad3e2fa881cde7c7f2050e151141..ca53f9c1bf1576e4750483ee9538b1de49e141ed:/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)',