@wemap/geo 11.0.2 → 11.3.1
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 +8 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/graph/GeoGraphRouter.ts +5 -8
package/dist/index.js
CHANGED
|
@@ -1561,12 +1561,7 @@ class NoRouteFoundError extends Error {
|
|
|
1561
1561
|
return message;
|
|
1562
1562
|
}
|
|
1563
1563
|
}
|
|
1564
|
-
const
|
|
1565
|
-
projectionMaxDistance: 50,
|
|
1566
|
-
weightEdgeFn: (edge) => edge.length,
|
|
1567
|
-
acceptEdgeFn: () => true
|
|
1568
|
-
};
|
|
1569
|
-
class GeoGraphRouter {
|
|
1564
|
+
const _GeoGraphRouter = class {
|
|
1570
1565
|
constructor(graph) {
|
|
1571
1566
|
__publicField(this, "_mapMatching");
|
|
1572
1567
|
__publicField(this, "_graph");
|
|
@@ -1574,7 +1569,7 @@ class GeoGraphRouter {
|
|
|
1574
1569
|
this._graph = graph;
|
|
1575
1570
|
this._mapMatching = new GeoGraphProjectionHandler(graph);
|
|
1576
1571
|
}
|
|
1577
|
-
getShortestPath(start, end, options = DEFAULT_OPTIONS) {
|
|
1572
|
+
getShortestPath(start, end, options = _GeoGraphRouter.DEFAULT_OPTIONS) {
|
|
1578
1573
|
const { acceptEdgeFn, weightEdgeFn, projectionMaxDistance } = options;
|
|
1579
1574
|
this._mapMatching.maxDistance = projectionMaxDistance;
|
|
1580
1575
|
const createdVertices = [];
|
|
@@ -1724,8 +1719,12 @@ class GeoGraphRouter {
|
|
|
1724
1719
|
}
|
|
1725
1720
|
return GeoGraphItinerary.fromGraphVertices(start.coords, end.coords, path, edgesWeights);
|
|
1726
1721
|
}
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1722
|
+
};
|
|
1723
|
+
let GeoGraphRouter = _GeoGraphRouter;
|
|
1724
|
+
__publicField(GeoGraphRouter, "DEFAULT_OPTIONS", {
|
|
1725
|
+
projectionMaxDistance: 50,
|
|
1726
|
+
weightEdgeFn: (edge) => edge.length
|
|
1727
|
+
});
|
|
1729
1728
|
exports.AbsoluteHeading = AbsoluteHeading;
|
|
1730
1729
|
exports.Attitude = Attitude;
|
|
1731
1730
|
exports.BoundingBox = BoundingBox;
|