@wemap/routers 9.2.0 → 10.0.0-alpha.1
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
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/routers"
|
|
12
12
|
},
|
|
13
13
|
"name": "@wemap/routers",
|
|
14
|
-
"version": "
|
|
14
|
+
"version": "10.0.0-alpha.1",
|
|
15
15
|
"bugs": {
|
|
16
16
|
"url": "https://github.com/wemap/wemap-modules-js/issues"
|
|
17
17
|
},
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@turf/boolean-point-in-polygon": "^6.5.0",
|
|
30
30
|
"@turf/convex": "^6.5.0",
|
|
31
31
|
"@turf/helpers": "^6.5.0",
|
|
32
|
-
"@wemap/geo": "^
|
|
33
|
-
"@wemap/logger": "^9.
|
|
32
|
+
"@wemap/geo": "^10.0.0-alpha.1",
|
|
33
|
+
"@wemap/logger": "^9.0.0",
|
|
34
34
|
"@wemap/maths": "^9.0.0",
|
|
35
|
-
"@wemap/osm": "^
|
|
35
|
+
"@wemap/osm": "^10.0.0-alpha.1"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "21ba33bd03930c68e3f358534ba95936ad965e34"
|
|
38
38
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-statements */
|
|
2
2
|
|
|
3
|
-
import { Coordinates
|
|
4
|
-
import Logger from '@wemap/logger';
|
|
3
|
+
import { Coordinates } from '@wemap/geo';
|
|
5
4
|
import { rad2deg, positiveMod } from '@wemap/maths';
|
|
6
5
|
|
|
7
6
|
import Itinerary from '../../model/Itinerary.js';
|
|
@@ -98,12 +97,7 @@ class OsrmRemoteRouter extends RemoteRouter {
|
|
|
98
97
|
jsonToCoordinates(json) {
|
|
99
98
|
const coords = new Coordinates(json[1], json[0]);
|
|
100
99
|
if (json.length > 2) {
|
|
101
|
-
|
|
102
|
-
Logger.warn('Still using legacy level format. Please update your project.');
|
|
103
|
-
coords.level = Level.fromString(json[2]);
|
|
104
|
-
} else {
|
|
105
|
-
coords.level = json[2];
|
|
106
|
-
}
|
|
100
|
+
coords.level = json[2];
|
|
107
101
|
}
|
|
108
102
|
return coords;
|
|
109
103
|
}
|