@wemap/routers 12.10.1 → 12.10.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 +2 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/ItineraryInfoManager.ts +1 -5
- package/src/model/Itinerary.ts +1 -1
- package/src/remote/cityway/CitywayRemoteRouter.spec.ts +1 -1
- package/src/remote/geovelo/GeoveloRemoteRouter.spec.ts +1 -1
- package/src/remote/osrm/OsrmRemoteRouter.spec.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -764,7 +764,7 @@ class Itinerary {
|
|
|
764
764
|
}
|
|
765
765
|
get distance() {
|
|
766
766
|
if (this._distance === null) {
|
|
767
|
-
this._distance = Utils.calcDistance(
|
|
767
|
+
this._distance = Utils.calcDistance(this.coords);
|
|
768
768
|
}
|
|
769
769
|
return this._distance;
|
|
770
770
|
}
|
|
@@ -4840,9 +4840,7 @@ class ItineraryInfoManager {
|
|
|
4840
4840
|
this._coordsPreviousStep = new Array(itinerary.coords.length);
|
|
4841
4841
|
this._coordsDistanceTraveled = new Array(itinerary.coords.length);
|
|
4842
4842
|
this._coordsLeg = new Array(itinerary.coords.length);
|
|
4843
|
-
|
|
4844
|
-
const destinationProjectionDistance = this._itinerary.destination.distanceTo(this._itinerary.coords[this._itinerary.coords.length - 1]);
|
|
4845
|
-
this._itineraryDistanceWithoutProjections = itinerary.distance - originProjectionDistance - destinationProjectionDistance;
|
|
4843
|
+
this._itineraryDistanceWithoutProjections = itinerary.distance;
|
|
4846
4844
|
let stepId = 0;
|
|
4847
4845
|
let previousStep = null;
|
|
4848
4846
|
let nextStep = this._steps[0];
|