@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.js
CHANGED
|
@@ -766,7 +766,7 @@ class Itinerary {
|
|
|
766
766
|
}
|
|
767
767
|
get distance() {
|
|
768
768
|
if (this._distance === null) {
|
|
769
|
-
this._distance = geo.Utils.calcDistance(
|
|
769
|
+
this._distance = geo.Utils.calcDistance(this.coords);
|
|
770
770
|
}
|
|
771
771
|
return this._distance;
|
|
772
772
|
}
|
|
@@ -4842,9 +4842,7 @@ class ItineraryInfoManager {
|
|
|
4842
4842
|
this._coordsPreviousStep = new Array(itinerary.coords.length);
|
|
4843
4843
|
this._coordsDistanceTraveled = new Array(itinerary.coords.length);
|
|
4844
4844
|
this._coordsLeg = new Array(itinerary.coords.length);
|
|
4845
|
-
|
|
4846
|
-
const destinationProjectionDistance = this._itinerary.destination.distanceTo(this._itinerary.coords[this._itinerary.coords.length - 1]);
|
|
4847
|
-
this._itineraryDistanceWithoutProjections = itinerary.distance - originProjectionDistance - destinationProjectionDistance;
|
|
4845
|
+
this._itineraryDistanceWithoutProjections = itinerary.distance;
|
|
4848
4846
|
let stepId = 0;
|
|
4849
4847
|
let previousStep = null;
|
|
4850
4848
|
let nextStep = this._steps[0];
|