]> git.openstreetmap.org Git - nominatim.git/commitdiff
fix top-bottom mixup in bounding box
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 12 Jun 2015 21:53:40 +0000 (23:53 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 12 Jun 2015 21:53:40 +0000 (23:53 +0200)
lib/Geocode.php
tests/features/api/regression.feature
tests/features/api/search_params.feature

index a9fa44fe0578976c9f77b45e491ae7dd5b073fa3..a932949d20934f39e14be9592cd3343eeef057aa 100644 (file)
                        $fRight = (float)$sRight;
                        $fTop = (float)$sTop;
                        $fBottom = (float)$sBottom;
-                       if ($fRight > $fLeft && $fBottom > $fTop
-                           && ($fRight - $fLeft) < 2 && ($fBottom - $fTop) < 2)
+                       if ($fRight > $fLeft && $fBottom < $fTop
+                           && ($fRight - $fLeft) < 2 && ($fTop - $fBottom) < 2)
                                $this->aViewBox = array($fLeft, $fBottom, $fRight, $fTop);
                }
 
index 8a436fc3d41dac571fc4626557e737170e6b0d57..bbff268a566f9476c6442545007164c21cb1b384 100644 (file)
@@ -187,7 +187,7 @@ Feature: API regression tests
      Scenario: trac #5238
         Given the request parameters
          | bounded | viewbox
-         | 1       | 0,0,-1,-1
+         | 1       | 0,0,1,-1
         When sending json search query "sy"
         Then exactly 0 results are returned
 
index b9d06791572eadd16e4720f63c19b7b5d812b3b0..92ca8c398b7d812cba013a6514ed3fa222135d9f 100644 (file)
@@ -83,7 +83,7 @@ Feature: Search queries
     Scenario: bounded search remains within viewbox, even with no results
         Given the request parameters
          | bounded | viewbox
-         | 1       | 43.54285,-5.662003,43.5403125,-5.6563282
+         | 1       | 43.5403125,-5.6563282,43.54285,-5.662003
          When sending json search query "restaurant"
         Then less than 1 result is returned