@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 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([this.origin, ...this.coords, this.destination]);
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
- const originProjectionDistance = this._itinerary.origin.distanceTo(this._itinerary.coords[0]);
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];