]> git.openstreetmap.org Git - nominatim.git/commitdiff
fix large viewbox computation
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 13 Aug 2018 18:52:49 +0000 (20:52 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 13 Aug 2018 18:52:49 +0000 (20:52 +0200)
Fixes #1137.

lib/SearchContext.php

index c0ae903295073b237bb44e19bc30b440ba48f46c..84159b83ca21c660112df8d4c8ed27837ff6ce19 100644 (file)
@@ -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)',