@mappedin/mappedin-js 5.33.0 → 5.34.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.
@@ -955,8 +955,8 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/MappedinLocation' {
955
955
  }
956
956
 
957
957
  declare module '@mappedin/mappedin-js/lib/esm/get-venue/MappedinCoordinate' {
958
- import { MappedinNode, Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/internal';
959
958
  import type { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/internal';
959
+ import { Mappedin, MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/internal';
960
960
  export type TMappedinCoordinateOptions = {
961
961
  map: MappedinMap;
962
962
  mappedin: Mappedin;
@@ -1019,6 +1019,11 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/MappedinCoordinate' {
1019
1019
  * Get Nearest Node to Coordinate, which can then be used for navigation
1020
1020
  */
1021
1021
  get nearestNode(): MappedinNode;
1022
+ /**
1023
+ * Get the {@link MappedinNode}s within a radius of the {@link MappedinCoordinate}.
1024
+ * @param radius - The radius in metres.
1025
+ */
1026
+ nodesInRadius(radius: number): MappedinNode[];
1022
1027
  toJSON(): {
1023
1028
  x: number;
1024
1029
  y: number;
@@ -1969,6 +1974,10 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/MappedinNavigatable' {
1969
1974
  * Exclude all the vortexes matching the given IDs
1970
1975
  */
1971
1976
  excludedVortexIds?: string[];
1977
+ /**
1978
+ * Exclude all the nodes matching the given IDs
1979
+ */
1980
+ excludedNodeIds?: string[];
1972
1981
  /**
1973
1982
  * @experimental
1974
1983
  * Apply line-of-sight simplifying to directions. This will attempt to remove unnecessary nodes between turns.
@@ -2783,6 +2792,7 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/Mappedin.cache' {
2783
2792
  get polygonsByMapId(): Map<string, MappedinPolygon[]>;
2784
2793
  get nodesByMapId(): Map<string, MappedinNode[]>;
2785
2794
  findNearestNodeOnMap(mapId: string, coordinate: MappedinCoordinate): MappedinNode;
2795
+ findNodeWithinRadiusOnMap(mapId: string, coordinate: MappedinCoordinate, radius: number): MappedinNode[];
2786
2796
  get locationsByMapId(): Map<string, MappedinLocation[]>;
2787
2797
  static instances: Map<Mappedin, MappedinCache>;
2788
2798
  static create(mappedin: Mappedin): MappedinCache;
@@ -2886,13 +2896,15 @@ declare class NavigationGraph {
2886
2896
  * @param accessible boolean - optional, if true directions will only take accessible route, defaults to false
2887
2897
  * @param includedVortexIds set - optional, exclude all the vertexes matching the given IDs
2888
2898
  * @param excludedVortexIds set - optional, exclude all the vertexes matching the given IDs
2899
+ * @param excludedNodeIds set - optional, exclude all the nodes matching the given IDs
2889
2900
  */
2890
- aStar({ originIds, destinationNodeIds, accessible, includedVortexIds, excludedVortexIds, }: {
2901
+ aStar({ originIds, destinationNodeIds, accessible, includedVortexIds, excludedVortexIds, excludedNodeIds, }: {
2891
2902
  originIds: string[];
2892
2903
  destinationNodeIds: string[];
2893
2904
  accessible: boolean;
2894
2905
  includedVortexIds?: Set<string>;
2895
2906
  excludedVortexIds?: Set<string>;
2907
+ excludedNodeIds?: Set<string>;
2896
2908
  }): Edge[];
2897
2909
  getDistance(origin: INode, destination: INode): number;
2898
2910
  getShortestEuclideanDistance(origin: INode, destinations: INode[]): number;
@@ -2957,10 +2969,11 @@ declare class Navigator {
2957
2969
  * @param includedVortexIds set - optional, exclude all the vertexes matching the given IDs
2958
2970
  * @param excludedVortexIds set - optional, exclude all the vertexes matching the given IDs
2959
2971
  */
2960
- getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt, includedVortexIds, excludedVortexIds, simplify, }: {
2972
+ getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt, includedVortexIds, excludedVortexIds, excludedNodeIds, simplify, }: {
2961
2973
  originIds: string[];
2962
2974
  includedVortexIds?: Set<string>;
2963
2975
  excludedVortexIds?: Set<string>;
2976
+ excludedNodeIds?: Set<string>;
2964
2977
  destinationNodeIds: string[];
2965
2978
  accessible: boolean;
2966
2979
  departFrom?: ILocation;