@wemap/routers 12.7.8 → 12.8.2
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/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/remote/idfm/IdfmRemoteRouter.ts +30 -15
package/dist/index.mjs
CHANGED
|
@@ -3383,11 +3383,25 @@ class IdfmRemoteRouter extends RemoteRouter {
|
|
|
3383
3383
|
return urlSearchParams;
|
|
3384
3384
|
}
|
|
3385
3385
|
getSectionCoords(section) {
|
|
3386
|
-
|
|
3387
|
-
|
|
3386
|
+
let from;
|
|
3387
|
+
let to;
|
|
3388
|
+
if ("stop_point" in section.from) {
|
|
3389
|
+
from = section.from.stop_point.coord;
|
|
3390
|
+
} else if ("address" in section.from) {
|
|
3391
|
+
from = section.from.address.coord;
|
|
3392
|
+
} else {
|
|
3393
|
+
from = section.from.poi.coord;
|
|
3394
|
+
}
|
|
3395
|
+
if ("stop_point" in section.to) {
|
|
3396
|
+
to = section.to.stop_point.coord;
|
|
3397
|
+
} else if ("address" in section.to) {
|
|
3398
|
+
to = section.to.address.coord;
|
|
3399
|
+
} else {
|
|
3400
|
+
to = section.to.poi.coord;
|
|
3401
|
+
}
|
|
3388
3402
|
return {
|
|
3389
|
-
from,
|
|
3390
|
-
to
|
|
3403
|
+
from: jsonToCoordinates$1(from),
|
|
3404
|
+
to: jsonToCoordinates$1(to)
|
|
3391
3405
|
};
|
|
3392
3406
|
}
|
|
3393
3407
|
/**
|