Skip to content

Commit

Permalink
fix : fix check isWorld for boundingbox
Browse files Browse the repository at this point in the history
  • Loading branch information
liodali committed Jul 6, 2022
1 parent 5bd1cb8 commit 00a6d14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flutter_osm_interface/lib/src/types/bounding_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BoundingBox {
}) : assert(north <= 86.0),
assert(east <= 180.0),
assert(south >= -86.0),
assert(west > -180.0);
assert(west >= -180.0);

const BoundingBox.world()
: this.north = 85.0,
Expand Down Expand Up @@ -93,7 +93,7 @@ class BoundingBox {

extension ExtBoundingBox on BoundingBox {
bool isWorld() {
return north - 85.0 < 0.1 && east == 180.0 && south - -85.0 > -0.1 && west == -180.0;
return north >= 85.0 && east == 180.0 && south <= -85.0 && west == -180.0;
}

bool inBoundingBox(GeoPoint point) {
Expand Down

0 comments on commit 00a6d14

Please sign in to comment.