@mappedin/mappedin-js 5.32.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.
@@ -254,6 +254,7 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/Mappedin.types' {
254
254
  clientId: string;
255
255
  clientSecret: string;
256
256
  venue: string;
257
+ accessToken: string;
257
258
  };
258
259
  export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & {
259
260
  perspective?: string;
@@ -954,8 +955,8 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/MappedinLocation' {
954
955
  }
955
956
 
956
957
  declare module '@mappedin/mappedin-js/lib/esm/get-venue/MappedinCoordinate' {
957
- import { MappedinNode, Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/internal';
958
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';
959
960
  export type TMappedinCoordinateOptions = {
960
961
  map: MappedinMap;
961
962
  mappedin: Mappedin;
@@ -1018,6 +1019,11 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/MappedinCoordinate' {
1018
1019
  * Get Nearest Node to Coordinate, which can then be used for navigation
1019
1020
  */
1020
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[];
1021
1027
  toJSON(): {
1022
1028
  x: number;
1023
1029
  y: number;
@@ -1897,7 +1903,7 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/pub-sub.typed' {
1897
1903
  * @template EVENT_PAYLOAD - The type of the event payload.
1898
1904
  * @template EVENT - The type of the event.
1899
1905
  */
1900
- export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD> {
1906
+ export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
1901
1907
  /**
1902
1908
  * @private
1903
1909
  * @internal
@@ -1968,6 +1974,10 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/MappedinNavigatable' {
1968
1974
  * Exclude all the vortexes matching the given IDs
1969
1975
  */
1970
1976
  excludedVortexIds?: string[];
1977
+ /**
1978
+ * Exclude all the nodes matching the given IDs
1979
+ */
1980
+ excludedNodeIds?: string[];
1971
1981
  /**
1972
1982
  * @experimental
1973
1983
  * Apply line-of-sight simplifying to directions. This will attempt to remove unnecessary nodes between turns.
@@ -2782,6 +2792,7 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/Mappedin.cache' {
2782
2792
  get polygonsByMapId(): Map<string, MappedinPolygon[]>;
2783
2793
  get nodesByMapId(): Map<string, MappedinNode[]>;
2784
2794
  findNearestNodeOnMap(mapId: string, coordinate: MappedinCoordinate): MappedinNode;
2795
+ findNodeWithinRadiusOnMap(mapId: string, coordinate: MappedinCoordinate, radius: number): MappedinNode[];
2785
2796
  get locationsByMapId(): Map<string, MappedinLocation[]>;
2786
2797
  static instances: Map<Mappedin, MappedinCache>;
2787
2798
  static create(mappedin: Mappedin): MappedinCache;
@@ -2885,13 +2896,15 @@ declare class NavigationGraph {
2885
2896
  * @param accessible boolean - optional, if true directions will only take accessible route, defaults to false
2886
2897
  * @param includedVortexIds set - optional, exclude all the vertexes matching the given IDs
2887
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
2888
2900
  */
2889
- aStar({ originIds, destinationNodeIds, accessible, includedVortexIds, excludedVortexIds, }: {
2901
+ aStar({ originIds, destinationNodeIds, accessible, includedVortexIds, excludedVortexIds, excludedNodeIds, }: {
2890
2902
  originIds: string[];
2891
2903
  destinationNodeIds: string[];
2892
2904
  accessible: boolean;
2893
2905
  includedVortexIds?: Set<string>;
2894
2906
  excludedVortexIds?: Set<string>;
2907
+ excludedNodeIds?: Set<string>;
2895
2908
  }): Edge[];
2896
2909
  getDistance(origin: INode, destination: INode): number;
2897
2910
  getShortestEuclideanDistance(origin: INode, destinations: INode[]): number;
@@ -2956,10 +2969,11 @@ declare class Navigator {
2956
2969
  * @param includedVortexIds set - optional, exclude all the vertexes matching the given IDs
2957
2970
  * @param excludedVortexIds set - optional, exclude all the vertexes matching the given IDs
2958
2971
  */
2959
- getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt, includedVortexIds, excludedVortexIds, simplify, }: {
2972
+ getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt, includedVortexIds, excludedVortexIds, excludedNodeIds, simplify, }: {
2960
2973
  originIds: string[];
2961
2974
  includedVortexIds?: Set<string>;
2962
2975
  excludedVortexIds?: Set<string>;
2976
+ excludedNodeIds?: Set<string>;
2963
2977
  destinationNodeIds: string[];
2964
2978
  accessible: boolean;
2965
2979
  departFrom?: ILocation;