@wemap/geo 11.0.2 → 11.3.0

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.mjs CHANGED
@@ -1557,12 +1557,7 @@ class NoRouteFoundError extends Error {
1557
1557
  return message;
1558
1558
  }
1559
1559
  }
1560
- const DEFAULT_OPTIONS = {
1561
- projectionMaxDistance: 50,
1562
- weightEdgeFn: (edge) => edge.length,
1563
- acceptEdgeFn: () => true
1564
- };
1565
- class GeoGraphRouter {
1560
+ const _GeoGraphRouter = class {
1566
1561
  constructor(graph) {
1567
1562
  __publicField(this, "_mapMatching");
1568
1563
  __publicField(this, "_graph");
@@ -1570,7 +1565,7 @@ class GeoGraphRouter {
1570
1565
  this._graph = graph;
1571
1566
  this._mapMatching = new GeoGraphProjectionHandler(graph);
1572
1567
  }
1573
- getShortestPath(start, end, options = DEFAULT_OPTIONS) {
1568
+ getShortestPath(start, end, options = _GeoGraphRouter.DEFAULT_OPTIONS) {
1574
1569
  const { acceptEdgeFn, weightEdgeFn, projectionMaxDistance } = options;
1575
1570
  this._mapMatching.maxDistance = projectionMaxDistance;
1576
1571
  const createdVertices = [];
@@ -1720,8 +1715,12 @@ class GeoGraphRouter {
1720
1715
  }
1721
1716
  return GeoGraphItinerary.fromGraphVertices(start.coords, end.coords, path, edgesWeights);
1722
1717
  }
1723
- }
1724
- __publicField(GeoGraphRouter, "DEFAULT_OPTIONS", DEFAULT_OPTIONS);
1718
+ };
1719
+ let GeoGraphRouter = _GeoGraphRouter;
1720
+ __publicField(GeoGraphRouter, "DEFAULT_OPTIONS", {
1721
+ projectionMaxDistance: 50,
1722
+ weightEdgeFn: (edge) => edge.length
1723
+ });
1725
1724
  export {
1726
1725
  AbsoluteHeading,
1727
1726
  Attitude,