@wemap/geo 3.1.8 → 3.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/geo"
|
|
13
13
|
},
|
|
14
14
|
"name": "@wemap/geo",
|
|
15
|
-
"version": "3.1.
|
|
15
|
+
"version": "3.1.11",
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/wemap/wemap-modules-js/issues"
|
|
18
18
|
},
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"license": "ISC",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@wemap/logger": "^3.0.0",
|
|
31
|
-
"@wemap/maths": "^3.
|
|
31
|
+
"@wemap/maths": "^3.1.11",
|
|
32
32
|
"lodash.isfinite": "^3.3.2",
|
|
33
33
|
"lodash.isnumber": "^3.0.3",
|
|
34
34
|
"lodash.isstring": "^4.0.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "1e72b637bcc6e4d378bdb7c93870228636bdcb35"
|
|
37
37
|
}
|
|
@@ -11,11 +11,7 @@ class BoundingBox {
|
|
|
11
11
|
this.southWest = southWest || null;
|
|
12
12
|
this.northEast = northEast || null;
|
|
13
13
|
|
|
14
|
-
if (this.southWest && this.northEast
|
|
15
|
-
&& (
|
|
16
|
-
this.southWest.lat > this.northEast.lat
|
|
17
|
-
|| this.southWest.lng > this.northEast.lng)
|
|
18
|
-
) {
|
|
14
|
+
if (this.southWest && this.northEast && this.getNorth() < this.getSouth()) {
|
|
19
15
|
throw new Error('Incorrect bounding box');
|
|
20
16
|
}
|
|
21
17
|
}
|
|
@@ -28,7 +28,8 @@ describe('Bounding Box', () => {
|
|
|
28
28
|
expect(boundingBox.northEast).is.null;
|
|
29
29
|
expect(boundingBox.southWest).is.null;
|
|
30
30
|
|
|
31
|
-
expect(() => new BoundingBox(new Coordinates(10, -20), new Coordinates(-5, 40))).
|
|
31
|
+
expect(() => new BoundingBox(new Coordinates(10, -20), new Coordinates(-5, 40))).not.throw(Error);
|
|
32
|
+
expect(() => new BoundingBox(new Coordinates(-5, -20), new Coordinates(10, 40))).is.throw(Error);
|
|
32
33
|
|
|
33
34
|
boundingBox = new BoundingBox(northEast, southWest);
|
|
34
35
|
expect(boundingBox.northEast).equals(northEast);
|