@mappedin/react-native-sdk 5.31.2 → 5.33.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.d.ts CHANGED
@@ -449,6 +449,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.r
449
449
  */
450
450
  getVenueBundle, MappedinDestinationSet, Mappedin, randomId, };
451
451
  export { labelThemes } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types';
452
+ export type { ThingsOption } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types';
452
453
  export type { IFlatLabels } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/FlatLabels';
453
454
  export type { IFloatingLabels } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/FloatingLabels';
454
455
  export type { TBlueDotPositionUpdate, TBlueDotStateChange, TJourneyOptions, TMapViewOptions, TCreateMarkerOptions, TGeolocationObject, TPathOptions, TFlatLabelOptions, TAddFloatingLabelOptions, TAddFlatLabelOptions, TLabelAllLocationCommonOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TEnableBlueDotOptions, TFloatingLabelAppearance, TFlatLabelAppearance, CAMERA_EVENT_PAYLOAD, TMapClickEvent, TGetPolygonsAtCoordinateOptions, TShowVenueOptions, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types';
@@ -621,7 +622,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/Mappedi
621
622
  }
622
623
 
623
624
  declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types' {
624
- import type { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/get-venue';
625
+ import type { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon, ThingsOption } from '@mappedin/react-native-sdk/sdks/packages/get-venue';
625
626
  import type { TFloatingLabelAppearance } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.FloatingLabel';
626
627
  import type { TEnableBlueDotOptions, TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
627
628
  import type { Euler, Object3D, Vector3 } from 'three';
@@ -629,7 +630,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
629
630
  import { TOOLTIP_ANCHOR } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartTooltip';
630
631
  import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE, CAMERA_EASING_MODE, E_MAP_CHANGED_REASON } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums';
631
632
  import { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/OutdoorViewController';
632
- export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
633
+ export type { TEnableBlueDotOptions, TFloatingLabelAppearance, ThingsOption };
633
634
  /** @internal */
634
635
  export type Without<T, U> = {
635
636
  [P in Exclude<keyof T, keyof U>]?: never;
@@ -1845,7 +1846,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
1845
1846
  }
1846
1847
 
1847
1848
  declare module '@mappedin/react-native-sdk/sdks/packages/get-venue' {
1848
- import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
1849
+ import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata, ThingsOption } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
1849
1850
  import { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin';
1850
1851
  import { defaultThings } from '@mappedin/react-native-sdk/sdks/packages/get-venue/default-things';
1851
1852
  import { GET_VENUE_EVENT } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
@@ -1883,6 +1884,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue' {
1883
1884
  export type { TOperationHoursMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinLocation';
1884
1885
  export type { TMappedinCoordinateOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinCoordinate';
1885
1886
  export type { TDirectionToOptions, TTHINGS, TAccessors } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
1887
+ export type { ThingsOption };
1886
1888
  export { OfflineSearch } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.OfflineSearch';
1887
1889
  export type { TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions, } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.OfflineSearch';
1888
1890
  export { defaultThings };
@@ -3268,7 +3270,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
3268
3270
 
3269
3271
  declare module '@mappedin/react-native-sdk/wrappers/common/types' {
3270
3272
  import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core.interface';
3271
- import type { MappedinNode, MappedinPolygon, TJourneyOptions, TShowVenueOptions, TLabelAllLocationFlatLabelOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn';
3273
+ import type { MappedinNode, MappedinPolygon, TJourneyOptions, TShowVenueOptions, ThingsOption, TLabelAllLocationFlatLabelOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn';
3272
3274
  export type TFocusOnTargetsSerializable = {
3273
3275
  nodes?: MappedinNode['id'][];
3274
3276
  polygons?: MappedinPolygon['id'][];
@@ -3335,6 +3337,19 @@ declare module '@mappedin/react-native-sdk/wrappers/common/types' {
3335
3337
  noAuth?: boolean;
3336
3338
  language?: string;
3337
3339
  emitAnalyticsEvents?: boolean;
3340
+ /**
3341
+ * An object specifying additional properties to fetch for each data item.
3342
+ * Each key represents a data item (e.g., 'locations', 'nodes'), and the value is an array of strings indicating extra properties to be included.
3343
+ * @example
3344
+ * For example:
3345
+ * ```
3346
+ * getVenue({
3347
+ * venue: 'some-venue',
3348
+ * things: { vortexes: [ 'material' ]
3349
+ * }})
3350
+ * ```
3351
+ */
3352
+ things?: ThingsOption;
3338
3353
  };
3339
3354
  /**
3340
3355
  * @experimental
@@ -3627,7 +3642,10 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
3627
3642
  * An object containing all outlined polygons.
3628
3643
  */
3629
3644
  outlinedPolygons: Map<string, MappedinPolygon>;
3630
- cameraPlane: any;
3645
+ /**
3646
+ * A plane that is parallel to the ground and is used for raycasting.
3647
+ */
3648
+ worldPlane: Mesh;
3631
3649
  getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string | null): Vector3;
3632
3650
  currentScale: number;
3633
3651
  getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
@@ -5236,6 +5254,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.type
5236
5254
  clientId: string;
5237
5255
  clientSecret: string;
5238
5256
  venue: string;
5257
+ accessToken: string;
5239
5258
  };
5240
5259
  export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & {
5241
5260
  perspective?: string;
@@ -7049,7 +7068,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
7049
7068
  #private;
7050
7069
  static ENABLED: boolean;
7051
7070
  static OPTIONS: Required<TShowWatermarkOptions>;
7052
- object: Sprite;
7071
+ object?: Sprite;
7053
7072
  constructor(core: ICore);
7054
7073
  show: () => void;
7055
7074
  hide: () => void;
@@ -7270,7 +7289,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
7270
7289
  resolution: Vector2;
7271
7290
  cameraParameters: any;
7272
7291
  controls: typeof Mappedin.CameraControls;
7273
- cameraPlane: Mesh;
7292
+ worldPlane: Mesh;
7274
7293
  canvasWidth: number;
7275
7294
  canvasHeight: number;
7276
7295
  cachedPadding: TPadding;
@@ -7609,7 +7628,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/pub-sub.typed
7609
7628
  * @template EVENT_PAYLOAD - The type of the event payload.
7610
7629
  * @template EVENT - The type of the event.
7611
7630
  */
7612
- export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD> {
7631
+ export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
7613
7632
  /**
7614
7633
  * @private
7615
7634
  * @internal
@@ -8035,60 +8054,73 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinVenue
8035
8054
  import type { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
8036
8055
  import type { TLogo, TOpeningHours } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types';
8037
8056
  /**
8038
- * A {@link MappedinVenue} is a specific place (like a mall) with one or more Maps (typically representing different floors) and Locations (stores, washrooms, elevators, etc).
8039
- *
8040
- * A Venue can have more properties such as 'name' and 'slug'. The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Venues. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
8041
- *
8042
- * See below for an example a 'things' object with available Venue properties specified:
8043
- *
8044
- * things: {
8045
- * venue: ['slug', 'name', 'language', 'address', 'city', 'state', 'postal', 'telephone', 'latitude', 'longitude', 'website', 'operationHours'],
8046
- * locations: [],
8047
- * categories: [],
8048
- * maps: []
8049
- * }
8050
- *
8051
- *
8052
- * @class MappedinVenue
8053
- */
8057
+ * A {@link MappedinVenue} is a specific place (like a mall) with one or more Maps (typically representing different floors) and Locations (stores, washrooms, elevators, etc).
8058
+ *
8059
+ * A Venue can have more properties such as 'name' and 'slug'. The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Venues. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
8060
+ *
8061
+ * See below for an example a 'things' object with available Venue properties specified:
8062
+ *
8063
+ * things: {
8064
+ * venue: ['slug', 'name', 'language', 'address', 'city', 'state', 'postal', 'telephone', 'latitude', 'longitude', 'website', 'operationHours'],
8065
+ * locations: [],
8066
+ * categories: [],
8067
+ * maps: []
8068
+ * }
8069
+ *
8070
+ *
8071
+ * @class MappedinVenue
8072
+ */
8054
8073
  export class MappedinVenue {
8055
- #private;
8056
- defaultMap: string;
8057
- address: string;
8058
- city: string;
8059
- countrycode: string;
8060
- externalId: string;
8061
- id: string;
8062
- latitude?: number;
8063
- logo?: TLogo;
8064
- longitude?: number;
8065
- name: string;
8066
- operationHours?: TOpeningHours[];
8067
- postal: string;
8068
- slug: string;
8069
- state: string;
8070
- telephone: string;
8071
- tzid: string;
8072
- tzidOverride: string;
8073
- utcOffset: string;
8074
- website: string;
8075
- secureContentStorage: boolean;
8076
- defaultLanguage: {
8077
- code: string;
8078
- name: string;
8079
- };
8080
- languages: {
8074
+ #private;
8075
+ defaultMap: string;
8076
+ address: string;
8077
+ city: string;
8078
+ countrycode: string;
8079
+ externalId: string;
8080
+ id: string;
8081
+ latitude?: number;
8082
+ logo?: TLogo;
8083
+ longitude?: number;
8081
8084
  name: string;
8082
- code: string;
8083
- }[];
8084
- topLocations?: string[];
8085
- constructor(mappedin: Mappedin, data: any);
8086
- get metadata(): any;
8087
- set metadata(value: any);
8088
- static hydrate(data: any, mappedin: Mappedin): MappedinVenue;
8089
- static fetch(mappedin: Mappedin): Promise<MappedinVenue>;
8090
- get isMultiBuilding(): any;
8091
- toJSON(): any;
8085
+ operationHours?: TOpeningHours[];
8086
+ postal: string;
8087
+ slug: string;
8088
+ state: string;
8089
+ telephone: string;
8090
+ tzid: string;
8091
+ tzidOverride: string;
8092
+ utcOffset: string;
8093
+ website: string;
8094
+ secureContentStorage: boolean;
8095
+ defaultLanguage: {
8096
+ code: string;
8097
+ name: string;
8098
+ };
8099
+ languages: {
8100
+ name: string;
8101
+ code: string;
8102
+ }[];
8103
+ topLocations?: string[];
8104
+ /**
8105
+ * Venue render options provided by the server.
8106
+ */
8107
+ renderOptions: {
8108
+ /**
8109
+ * Whether the venue should use perspectives to render the map or {@link Mappedin.polygons}.
8110
+ */
8111
+ useLivePolygons: boolean;
8112
+ /**
8113
+ * Whether the venue should automatically apply {@link TDirectionToOptions} `simplify: { enabled: true }` to all directions.
8114
+ */
8115
+ simplifyDirections: boolean;
8116
+ };
8117
+ constructor(mappedin: Mappedin, data: any);
8118
+ get metadata(): any;
8119
+ set metadata(value: any);
8120
+ static hydrate(data: any, mappedin: Mappedin): MappedinVenue;
8121
+ static fetch(mappedin: Mappedin): Promise<MappedinVenue>;
8122
+ get isMultiBuilding(): any;
8123
+ toJSON(): any;
8092
8124
  }
8093
8125
  }
8094
8126
 
@@ -10205,73 +10237,76 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
10205
10237
  import type { ICore, MappedinPolygon, Collider } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
10206
10238
  import { BlueDotManager, Path } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
10207
10239
  class EventSystem {
10208
- core: ICore;
10209
- blueDotManager?: BlueDotManager;
10210
- rendererDomElement: any;
10211
- currentHover: string | null;
10212
- hoverLabel: any;
10213
- hoverColor: Color;
10214
- options: {
10215
- disableHover: boolean;
10216
- };
10217
- constructor(core: ICore);
10218
- setBlueDotManager: (blueDotManager: any) => void;
10219
- touchCount: number;
10220
- zoomOut(): void;
10221
- zoomIn(event: any): void;
10222
- onPointerMove: (event: any) => void;
10223
- onPointerUp: (event: any) => void;
10224
- /**
10225
- * We've confirmed that a map click has occured, so handle that here
10226
- */
10227
- handleMapClick(event: any): void;
10228
- onPointerDown: (event: any) => void;
10229
- incrementTouches: (event: any) => void;
10230
- decrementTouches: (event: any) => void;
10231
- clearMouse: () => void;
10232
- getMousePos: (event: any) => {
10233
- x: any;
10234
- y: any;
10235
- };
10236
- getScaledMousePos: (event: any) => {
10237
- x: number;
10238
- y: number;
10239
- };
10240
- cursorPos: {
10241
- x: number;
10242
- y: number;
10243
- };
10244
- mouse: {
10245
- x: number;
10246
- y: number;
10247
- };
10248
- mouseDownStart: {
10249
- time: number;
10250
- clientX: number;
10251
- clientY: number;
10252
- };
10253
- scaledCursorPos: {
10254
- x: number;
10255
- y: number;
10256
- };
10257
- hasTouched: boolean;
10258
- calculateMouseCoordinates: (event: any) => void;
10259
- getMouseRayIntersects: (objects: Object3D | Object3D[]) => import("three").Intersection<Object3D<import("three").Object3DEventMap>>[];
10260
- detectCollidersUnderMouse: () => Collider[];
10261
- detectPolygonsUnderMouse: () => string[];
10262
- detectPathsUnderMouse: () => Path[];
10263
- detectWatermarkUnderMouse: () => boolean;
10264
- detectMapsUnderMouse: () => import("../../internal").MappedinMap[];
10265
- getMouseMapPosition: () => {
10266
- x: number;
10267
- y: number;
10268
- };
10269
- checkMouseIntersectsBlueDot: () => boolean;
10270
- doHoverEffect: () => void;
10271
- onPolygonHoverOut: (polygonId: string) => boolean;
10272
- onPolygonHoverOver: (polygon: MappedinPolygon | string) => boolean;
10273
- setHoverColor: (color: string) => void;
10274
- destroy(): void;
10240
+ core: ICore;
10241
+ blueDotManager?: BlueDotManager;
10242
+ rendererDomElement: any;
10243
+ currentHover: string | null;
10244
+ hoverLabel: any;
10245
+ hoverColor: Color;
10246
+ options: {
10247
+ disableHover: boolean;
10248
+ };
10249
+ constructor(core: ICore);
10250
+ setBlueDotManager: (blueDotManager: any) => void;
10251
+ touchCount: number;
10252
+ zoomOut(): void;
10253
+ zoomIn(event: any): void;
10254
+ onPointerMove: (event: any) => void;
10255
+ onPointerUp: (event: any) => void;
10256
+ /**
10257
+ * We've confirmed that a map click has occured, so handle that here
10258
+ */
10259
+ handleMapClick(event: any): void;
10260
+ onPointerDown: (event: any) => void;
10261
+ incrementTouches: (event: any) => void;
10262
+ decrementTouches: (event: any) => void;
10263
+ clearMouse: () => void;
10264
+ getMousePos: (event: any) => {
10265
+ x: any;
10266
+ y: any;
10267
+ };
10268
+ getScaledMousePos: (event: any) => {
10269
+ x: number;
10270
+ y: number;
10271
+ };
10272
+ cursorPos: {
10273
+ x: number;
10274
+ y: number;
10275
+ };
10276
+ mouse: {
10277
+ x: number;
10278
+ y: number;
10279
+ };
10280
+ mouseDownStart: {
10281
+ time: number;
10282
+ clientX: number;
10283
+ clientY: number;
10284
+ };
10285
+ scaledCursorPos: {
10286
+ x: number;
10287
+ y: number;
10288
+ };
10289
+ hasTouched: boolean;
10290
+ calculateMouseCoordinates: (event: any) => void;
10291
+ getMouseRayIntersects: (objects: Object3D | Object3D[]) => import("three").Intersection<Object3D<import("three").Object3DEventMap>>[];
10292
+ detectCollidersUnderMouse: () => Collider[];
10293
+ detectPolygonsUnderMouse: () => string[];
10294
+ detectPathsUnderMouse: () => Path[];
10295
+ detectWatermarkUnderMouse: () => boolean;
10296
+ detectMapsUnderMouse: () => import("../../internal").MappedinMap[];
10297
+ /**
10298
+ * Gets mouse click position in x y map coordinates
10299
+ */
10300
+ getMouseMapPosition: () => {
10301
+ x: number;
10302
+ y: number;
10303
+ };
10304
+ checkMouseIntersectsBlueDot: () => boolean;
10305
+ doHoverEffect: () => void;
10306
+ onPolygonHoverOut: (polygonId: string) => boolean;
10307
+ onPolygonHoverOver: (polygon: MappedinPolygon | string) => boolean;
10308
+ setHoverColor: (color: string) => void;
10309
+ destroy(): void;
10275
10310
  }
10276
10311
  export default EventSystem;
10277
10312
  }
@@ -10387,115 +10422,141 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
10387
10422
  import { STACKED_MAPS_STATE, MapViewScene, MapViewStackScene, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
10388
10423
  import type { ICore, TCameraTransform } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
10389
10424
  enum ACTION {
10390
- enable = "enable",
10391
- disable = "disable",
10392
- showOverview = "showOverview",
10393
- zoomInToMap = "zoomInToMap",
10394
- scrollToMap = "scrollToMap"
10425
+ enable = "enable",
10426
+ disable = "disable",
10427
+ showOverview = "showOverview",
10428
+ zoomInToMap = "zoomInToMap",
10429
+ scrollToMap = "scrollToMap",
10430
+ restack = "restack"
10395
10431
  }
10396
10432
  type TTargetTransitionFunction = ((options: TParams) => () => Promise<void>) | ((options: TParams) => void);
10397
10433
  type TParams = {
10398
- map: MappedinMap;
10434
+ map: MappedinMap;
10399
10435
  } | {
10400
- directions: MappedinDirections | MappedinDirections[];
10436
+ directions: MappedinDirections | MappedinDirections[];
10401
10437
  } | {
10402
- stackScene: MapViewStackScene;
10403
- directions: MappedinDirections | MappedinDirections[];
10404
- verticalDistanceBetweenMaps?: number;
10438
+ stackScene: MapViewStackScene;
10439
+ directions: MappedinDirections | MappedinDirections[];
10440
+ verticalDistanceBetweenMaps?: number;
10405
10441
  } | {
10406
- stackScene: MapViewStackScene;
10407
- verticalDistanceBetweenMaps?: number;
10408
- map: MappedinMap;
10409
- nodes: MappedinNode[];
10442
+ stackScene: MapViewStackScene;
10443
+ verticalDistanceBetweenMaps?: number;
10444
+ map: MappedinMap;
10445
+ nodes: MappedinNode[];
10410
10446
  } | {
10411
- stackScene: MapViewStackScene;
10412
- map: MappedinMap;
10413
- nodes: MappedinNode[];
10414
- rotation: number;
10415
- cameraTransform?: TCameraTransform;
10416
- verticalDistanceBetweenMaps?: number;
10447
+ stackScene: MapViewStackScene;
10448
+ map: MappedinMap;
10449
+ nodes: MappedinNode[];
10450
+ rotation: number;
10451
+ cameraTransform?: TCameraTransform;
10452
+ verticalDistanceBetweenMaps?: number;
10417
10453
  };
10418
10454
  type TActionFn = [STACKED_MAPS_STATE, TTargetTransitionFunction[]];
10419
10455
  type TState = {
10420
- [stateName in STACKED_MAPS_STATE]?: {
10421
- actions: {
10422
- [actionName in ACTION]?: TActionFn;
10456
+ [stateName in STACKED_MAPS_STATE]?: {
10457
+ actions: {
10458
+ [actionName in ACTION]?: TActionFn;
10459
+ };
10423
10460
  };
10424
- };
10425
10461
  };
10426
10462
  export type TInternalTransitionOptions = {
10427
- animate?: boolean;
10463
+ animate?: boolean;
10428
10464
  };
10429
10465
  export type TStackedMapsOptions = {
10430
- verticalDistanceBetweenMaps?: number;
10431
- mapLabels?: boolean;
10466
+ /**
10467
+ * The vertical distance between maps in overview, in metres.
10468
+ * @default 50
10469
+ */
10470
+ verticalDistanceBetweenMaps?: number;
10471
+ /**
10472
+ * Whether to show map level labels in overview.
10473
+ * @default true
10474
+ */
10475
+ mapLabels?: boolean;
10476
+ /**
10477
+ * Whether to show only Journey maps in the stack if a Journey is active and the current map is part of the Journey.
10478
+ * @default true
10479
+ */
10480
+ prioritizeJourneyMaps?: boolean;
10432
10481
  };
10433
10482
  class StackedMapsController {
10434
- #private;
10435
- options: TStackedMapsOptions;
10436
- enabled: boolean;
10437
- stackScene: MapViewStackScene;
10438
- directions: MappedinDirections | MappedinDirections[];
10439
- constructor(core: ICore);
10440
- needsUpdate: boolean;
10441
- currentState: STACKED_MAPS_STATE;
10442
- mapsInJourney: MappedinMap[];
10443
- getZoomIntoMapOptions: (params: TParams) => (MapViewScene | {
10444
- activeMap: MappedinMap;
10445
- focusOn: {
10446
- targets: {
10447
- nodes: MappedinNode[];
10448
- };
10449
- options: {
10450
- zoom?: number;
10451
- tilt: number;
10452
- rotation: number;
10453
- position?: MappedinNode | import("../../internal").MappedinCoordinate;
10454
- easing: CAMERA_EASING_MODE;
10455
- };
10456
- };
10457
- })[];
10458
- getDisableOptions: (params: TParams) => (MapViewScene | {
10459
- activeMap: MappedinMap;
10460
- })[];
10461
- getShowOverviewOptions: (params: TParams) => (MapViewStackScene | {
10462
- activeMap: MappedinMap;
10463
- focusOn: {
10464
- options: {
10465
- tilt: number;
10466
- duration: number;
10467
- };
10468
- };
10469
- verticalDistanceBetweenMaps: number;
10470
- })[];
10471
- getScrollToMapOptions: (params: TParams) => (MapViewStackScene | {
10472
- focusOn: {
10473
- targets: {
10474
- nodes: MappedinNode[];
10475
- };
10476
- options: {
10477
- tilt: number;
10478
- easing: CAMERA_EASING_MODE;
10479
- };
10480
- };
10481
- activeMap: MappedinMap;
10482
- })[];
10483
- getEnableOptions: (params: TParams) => void;
10484
- getShowOverviewTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
10485
- getZoomInToMapTransition: (options: any) => () => Promise<void>;
10486
- getScrollToMapTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
10487
- getDisableTransition: (options: any) => () => Promise<void>;
10488
- getEnableTransition: () => () => void;
10489
- states: TState;
10490
- transition(currentState: STACKED_MAPS_STATE, actionName: ACTION): TTargetTransitionFunction[] | void;
10491
- exec(transitions: TTargetTransitionFunction[] | void, params: TParams): Promise<void>;
10492
- disable: () => Promise<void>;
10493
- enable: (opts?: TStackedMapsOptions) => Promise<void>;
10494
- get nodesInJourney(): MappedinNode[];
10495
- showOverview: () => Promise<void>;
10496
- scrollToMap: (map: MappedinMap) => Promise<void>;
10497
- zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
10498
- get currentMap(): MappedinMap;
10483
+ #private;
10484
+ options: TStackedMapsOptions;
10485
+ enabled: boolean;
10486
+ stackScene: MapViewStackScene;
10487
+ constructor(core: ICore);
10488
+ needsUpdate: boolean;
10489
+ currentState: STACKED_MAPS_STATE;
10490
+ mapsInStack: MappedinMap[];
10491
+ getZoomIntoMapOptions: (params: TParams) => (MapViewScene | {
10492
+ activeMap: MappedinMap;
10493
+ focusOn: {
10494
+ targets: {
10495
+ nodes: MappedinNode[];
10496
+ };
10497
+ options: {
10498
+ zoom?: number;
10499
+ tilt: number;
10500
+ rotation: number;
10501
+ position?: MappedinNode | import("../../internal").MappedinCoordinate;
10502
+ easing: CAMERA_EASING_MODE;
10503
+ };
10504
+ };
10505
+ })[];
10506
+ getDisableOptions: (params: TParams) => (MapViewScene | {
10507
+ activeMap: MappedinMap;
10508
+ })[];
10509
+ getShowOverviewOptions: (params: TParams) => (MapViewStackScene | {
10510
+ activeMap: MappedinMap;
10511
+ focusOn: {
10512
+ options: {
10513
+ tilt: number;
10514
+ duration: number;
10515
+ };
10516
+ };
10517
+ verticalDistanceBetweenMaps: number;
10518
+ })[];
10519
+ getScrollToMapOptions: (params: TParams) => (MapViewStackScene | {
10520
+ focusOn: {
10521
+ targets: {
10522
+ nodes: MappedinNode[];
10523
+ };
10524
+ options: {
10525
+ tilt: number;
10526
+ easing: CAMERA_EASING_MODE;
10527
+ };
10528
+ };
10529
+ activeMap: MappedinMap;
10530
+ })[];
10531
+ getRestackOptions: (params: TParams) => (MapViewStackScene | {
10532
+ activeMap: MappedinMap;
10533
+ focusOn: {
10534
+ options: {
10535
+ tilt: number;
10536
+ duration: number;
10537
+ };
10538
+ };
10539
+ verticalDistanceBetweenMaps: number;
10540
+ })[];
10541
+ getEnableOptions: () => void;
10542
+ getShowOverviewTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
10543
+ getZoomInToMapTransition: (options: any) => () => Promise<void>;
10544
+ getScrollToMapTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
10545
+ getRestackTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
10546
+ getDisableTransition: (options: any) => () => Promise<void>;
10547
+ getEnableTransition: () => () => void;
10548
+ states: TState;
10549
+ get determineMapStack(): MappedinMap[];
10550
+ transition(currentState: STACKED_MAPS_STATE, actionName: ACTION): TTargetTransitionFunction[] | void;
10551
+ exec(transitions: TTargetTransitionFunction[] | void, params: TParams): Promise<void>;
10552
+ disable: () => Promise<void>;
10553
+ enable: (opts?: TStackedMapsOptions) => Promise<void>;
10554
+ get nodesInJourneyOrMap(): any[];
10555
+ showOverview: () => Promise<void>;
10556
+ scrollToMap: (map: MappedinMap) => Promise<void>;
10557
+ restack: (options?: TStackedMapsOptions) => Promise<void>;
10558
+ zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
10559
+ get currentMap(): MappedinMap;
10499
10560
  }
10500
10561
  export default StackedMapsController;
10501
10562
  }
@@ -10523,7 +10584,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
10523
10584
  /**
10524
10585
  * Exports the current scene as a GLTF file.
10525
10586
  */
10526
- getCurrentSceneGLTF(userOptions: TGLTFExportOptions): Promise<Blob>;
10587
+ getCurrentSceneGLTF: (userOptions: TGLTFExportOptions) => Promise<Blob>;
10527
10588
  }
10528
10589
  }
10529
10590
 
@@ -10547,6 +10608,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
10547
10608
  */
10548
10609
  getVisibleLayersForLoadedMap(map: MappedinMap): string[];
10549
10610
  addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void>;
10611
+ removeGeoJSONLayer(layerName: string): Promise<void>;
10550
10612
  }
10551
10613
  export default LayerController;
10552
10614
  }
@@ -11885,6 +11947,26 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/
11885
11947
  * @returns Promise when all animations are complete.
11886
11948
  */
11887
11949
  zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
11950
+ /**
11951
+ * @experimental
11952
+ *
11953
+ * Used when in {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW} state to replace the maps in the
11954
+ * current stack if there is a new Journey or Journey is cleared.
11955
+ *
11956
+ * @param options - Options to adjust the overview. Each option defaults to the setting passed in {@link enable}, unless provided.
11957
+ *
11958
+ * @example
11959
+ * ```ts
11960
+ * mapView.Journey.draw(...);
11961
+ * mapView.StackedMaps.enable();
11962
+ * mapView.StackedMaps.showOverview();
11963
+ * mapView.Journey.clear();
11964
+ * mapView.StackedMaps.restack();
11965
+ * ```
11966
+ *
11967
+ * @returns Promise when all animations are complete.
11968
+ */
11969
+ restack: (options?: TStackedMapsOptions) => Promise<void>;
11888
11970
  /**
11889
11971
  * @experimental
11890
11972
  *
@@ -12049,6 +12131,12 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/
12049
12131
  * Adds a GeoJSON Feature or FeatureCollection to the map as a layer. The layer name must be unique
12050
12132
  */
12051
12133
  addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void>;
12134
+ /**
12135
+ * @experimental
12136
+ * Hides a GeoJSON layer from the map and removes it from the list of layers.
12137
+ * It will not appear in {@link getAllLayersForMap} afterwards and can be overwritten by a new layer with the same name.
12138
+ */
12139
+ removeGeoJSONLayer(layerName: string): Promise<void>;
12052
12140
  }
12053
12141
  export default LayerController;
12054
12142
  }