X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/569184a5b09a3bc348a774c0a387ca2e16299fbf..0394f32438a134266e75e28fd3b586e9a1dc3f92:/lib/SearchContext.php?ds=sidebyside 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)',