$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);
}
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
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