@mappedin/react-native-sdk 4.0.4-alpha.8 → 4.0.7

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
@@ -18,10 +18,10 @@ declare module '@mappedin/react-native-sdk' {
18
18
  export { getVenue, getVenueBundle } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
19
19
  export type { TGetVenueOptions, TGetVenueBundleOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
20
20
  export { STATE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
21
- export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_MARKER_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
21
+ export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
22
22
  export type { TSerializableJourneyOptions, TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
23
23
  import type { TEnableBlueDotOptions as TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptions as TLabelAllLocationCommonOptionsBase } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
24
- export type { TJourneyOptions, TGeolocationObject, TPathOptions, TLabelPolygonOptions, TLegacyLabelOptions, TLabelAllLocationLabelOptions, TLabelAllLocationLegacyLabelOptions, TFocusOnCameraOptions, TFocusOnTargets, TLabelAppearance, TCommonLabelOptions, TCameraAnimationOptions, TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
24
+ export type { TJourneyOptions, TGeolocationObject, TPathOptions, TFlatLabelPolygonOptions, TFloatingLabelPolygonOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TFlatLabelAppearance, TFloatingLabelAppearance, TFocusOnCameraOptions, TFocusOnTargets, TCommonLabelOptions, TCameraAnimationOptions, TFocusOnOptions, TAnimatePositionOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
25
25
  export type { TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptionsBase };
26
26
  export type TEnableBlueDotOptions = Omit<TEnableBlueDotOptionsBase, 'positionUpdater' | 'geolocationSource'>;
27
27
  export type TLabelAllLocationCommonOptions = Omit<TLabelAllLocationCommonOptionsBase, 'sortFunction' | 'translationMap'>;
@@ -31,11 +31,11 @@ declare module '@mappedin/react-native-sdk' {
31
31
  }
32
32
 
33
33
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView' {
34
- import React from "react";
35
- import { TMiMapViewOptions } from "@mappedin/react-native-sdk/wrappers/common";
36
- import { STATE } from "@mappedin/react-native-sdk/wrappers/react-native-sdk/src";
37
- import { MapViewStore } from "@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store";
38
- import type { TBlueDotPositionUpdate, TBlueDotStateChange, MappedinPolygon, MappedinMap, Mappedin } from "@mappedin/react-native-sdk/core/packages/renderer/index.rn";
34
+ import React from 'react';
35
+ import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
36
+ import { STATE } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
37
+ import { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store';
38
+ import type { TBlueDotPositionUpdate, TBlueDotStateChange, MappedinPolygon, MappedinMap, Mappedin } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
39
39
  export type TMiMapViewProps = {
40
40
  /**
41
41
  * The MapViewStore instance will be returned here
@@ -102,7 +102,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
102
102
  /**
103
103
  * @category Component
104
104
  */
105
- export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "venueData" | "options" | "style" | "onPolygonClicked" | "onBlueDotStateChanged" | "onBlueDotPositionUpdated" | "onDataLoaded" | "onNothingClicked" | "onFirstMapLoaded" | "onMapChanged" | "onStateChanged"> & React.RefAttributes<MapViewStore>>>;
105
+ export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "options" | "onFirstMapLoaded" | "onDataLoaded" | "style" | "venueData" | "onPolygonClicked" | "onBlueDotStateChanged" | "onBlueDotPositionUpdated" | "onNothingClicked" | "onMapChanged" | "onStateChanged"> & React.RefAttributes<MapViewStore>>>;
106
106
  }
107
107
 
108
108
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap' {
@@ -141,12 +141,16 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniM
141
141
 
142
142
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store' {
143
143
  import { MappedinController } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MappedinController';
144
- import { TSerializableJourneyOptions } from '@mappedin/react-native-sdk/wrappers/common';
145
- import type { TGeolocationObject, TEnableBlueDotOptions, TPathOptions, TLabelPolygonOptions, TLegacyLabelOptions, TLabelAllLocationLabelOptions, TLabelAllLocationLegacyLabelOptions, TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
146
- import { STATE, Mappedin, MappedinNode, MappedinMap, MappedinLocation, MappedinDirections, MappedinPolygon, TGetVenueOptions, TShowVenueOptions, MappedinCoordinate, MappedinDestinationSet, E_BLUEDOT_STATE, TCreateMarkerOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
144
+ import { TReactNativeFlatLabelAllLocations, TReactNativeFlatLabelAllLocationsLegacy, TReactNativeFlatLabelPolygonOptions, TReactNativeFloatingLabelPolygonOptions, TSerializableJourneyOptions } from '@mappedin/react-native-sdk/wrappers/common';
145
+ import type { TGeolocationObject, TEnableBlueDotOptions, TPathOptions, TFocusOnOptions, TAnimatePositionOptions, TLabelAllLocationFloatingLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
146
+ import { STATE, Mappedin, MappedinNode, MappedinMap, MappedinLocation, MappedinDirections, MappedinPolygon, TGetVenueOptions, TShowVenueOptions, MappedinCoordinate, MappedinDestinationSet, TCreateMarkerOptions, E_BLUEDOT_STATE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
147
+ import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
147
148
  export class MapViewStore extends MappedinController {
148
149
  #private;
149
150
  state: STATE;
151
+ /**
152
+ * @deprecated Use BlueDot Events instead
153
+ */
150
154
  BlueDotState: E_BLUEDOT_STATE;
151
155
  /**
152
156
  * @hidden
@@ -191,6 +195,10 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
191
195
  * Set Polygon Color
192
196
  */
193
197
  setPolygonColor(polygonIdOrPolygon: MappedinPolygon['id'] | MappedinPolygon, color: string, opacity?: number, textColor?: string): Promise<unknown>;
198
+ /**
199
+ * Clear Polygon Color
200
+ */
201
+ clearPolygonColor(polygonOrPolygonId: MappedinPolygon['id'] | MappedinPolygon): Promise<unknown>;
194
202
  /**
195
203
  * Clear all polygon colors
196
204
  */
@@ -207,15 +215,6 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
207
215
  * Remove all paths
208
216
  */
209
217
  removeAllPaths(): Promise<unknown>;
210
- /**
211
- * Padding - this is so that the map can be positioned on a portion of the screen
212
- */
213
- setSafeArea(padding: {
214
- top: number;
215
- bottom: number;
216
- left: number;
217
- right: number;
218
- }): void;
219
218
  /**
220
219
  * Change Map/Level
221
220
  */
@@ -224,36 +223,92 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
224
223
  * Gets the nearest node by screen coordinate
225
224
  */
226
225
  getNearestNodeByScreenCoordinates(x: number, y: number, mapIdOrMap?: MappedinMap['id'] | MappedinMap): Promise<MappedinNode | null | undefined>;
226
+ labelAllLocations(options?: TLabelAllLocationFloatingLabelOptions): Promise<unknown>;
227
+ labelAllLocations(options?: TReactNativeFlatLabelAllLocations | TReactNativeFlatLabelAllLocationsLegacy): Promise<unknown>;
228
+ labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TReactNativeFloatingLabelPolygonOptions): Promise<unknown>;
229
+ labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TReactNativeFlatLabelPolygonOptions): Promise<unknown>;
230
+ /**
231
+ * @param focusOptions You should provide at least one Node or Polygon, but everything else is optional.
232
+ * @deprecated Use Camera.focusOn instead
233
+ */
234
+ focusOn(focusOptions: TFocusOptionsLegacy): Promise<unknown>;
227
235
  /**
228
- * Label all polygons with locations either loaded via the API or passed in
236
+ * Padding - this is so that the map can be positioned on a portion of the screen
237
+ * @deprecated Use Camera.setSafeAreaInsets instead
229
238
  */
230
- labelAllLocations(options?: TLabelAllLocationLabelOptions | TLabelAllLocationLegacyLabelOptions): Promise<unknown>;
231
- labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TLabelPolygonOptions | TLegacyLabelOptions): Promise<unknown>;
239
+ setSafeArea(padding: {
240
+ top: number;
241
+ bottom: number;
242
+ left: number;
243
+ right: number;
244
+ }): void;
232
245
  /**
233
- Camera controls interface
234
- */
246
+ V3 Camera controls interface
247
+ */
235
248
  CameraControls: {
236
249
  /**
237
250
  * The current tilt in radians from top-down view.
251
+ * @deprecated Use CameraControls.tilt instead
238
252
  */
239
253
  tilt: number;
240
254
  /**
241
255
  * @param tilt The new value to set the tilt to, in radians from top-down view.
256
+ * @deprecated Use CameraControls.setTilt instead
242
257
  */
243
258
  setTilt: (tilt: number) => Promise<undefined>;
244
259
  /**
245
260
  * The current rotation in degrees from north.
261
+ * @deprecated Use CameraControls.rotation instead
246
262
  */
247
263
  rotation: number;
248
264
  /**
249
265
  * @param rotation The new value to set the rotation to, in degrees from north..
266
+ * @deprecated Use CameraControls.setRotation instead
250
267
  */
251
268
  setRotation: (rotation: number) => Promise<undefined>;
269
+ };
270
+ /**
271
+ Camera controls interface
272
+ */
273
+ Camera: {
274
+ /**
275
+ * The current tilt in radians from top-down view.
276
+ */
277
+ tilt: number;
278
+ /**
279
+ * Set Camera options immediately
280
+ */
281
+ set: (positionOptions?: TAnimatePositionOptions | undefined) => Promise<unknown>;
282
+ /**
283
+ * The current rotation in degrees from north.
284
+ */
285
+ rotation: number;
252
286
  /**
253
287
  * @param focusOptions You should provide at least one Node or Polygon, but everything else is optional.
254
288
  */
255
- focusOn(focusOptions: TFocusOnOptions): Promise<unknown>;
289
+ focusOn(focusOptions: TFocusOnOptions & {
290
+ animationOptions?: TAnimatePositionOptions;
291
+ }): Promise<unknown>;
292
+ /**
293
+ * This is so that the map can be positioned on a portion of the screen, (example padding)
294
+ */
295
+ setSafeAreaInsets: (safeAreaInsets: {
296
+ top: number;
297
+ bottom: number;
298
+ left: number;
299
+ right: number;
300
+ }) => void;
256
301
  };
302
+ /**
303
+ * Visualize directions by drawing paths, and adding connection markers
304
+ * @deprecated Use {@link MapViewStore.Journey}'s draw method instead
305
+ */
306
+ drawJourney(directions: MappedinDirections | MappedinDirections[], options?: TSerializableJourneyOptions): Promise<unknown>;
307
+ /**
308
+ * Remove any paths and markers associated with journey
309
+ * @deprecated Use mapView.Journey.clear instead
310
+ */
311
+ clearJourney(): Promise<unknown>;
257
312
  /**
258
313
  * Journey management interface
259
314
  */
@@ -313,12 +368,12 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/index.rn' {
313
368
  import { getVenue, getVenueBundle, Mappedin, MappedinDestinationSet } from '@mappedin/react-native-sdk/core/packages/get-venue';
314
369
  export * from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
315
370
  export { getVenue, getVenueBundle, MappedinDestinationSet, Mappedin };
316
- export { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, E_BLUEDOT_STATE_REASON, E_BLUEDOT_STATE, E_MARKER_STATE, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
371
+ export { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, E_BLUEDOT_STATE_REASON, E_BLUEDOT_STATE, E_BLUEDOT_MARKER_STATE, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
317
372
  export { labelThemes } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
318
- export type { TBlueDotPositionUpdate, TBlueDotStateChange, TJourneyOptions, TMapViewOptions, TCreateMarkerOptions, TGeolocationObject, TPathOptions, TCommonLabelOptions, TLegacyLabelOptions, TLabelPolygonOptions, TLabelAllLocationCommonOptions, TLabelAllLocationLabelOptions, TLabelAllLocationLegacyLabelOptions, TEnableBlueDotOptions, TLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
373
+ export type { TBlueDotPositionUpdate, TBlueDotStateChange, TJourneyOptions, TMapViewOptions, TCreateMarkerOptions, TGeolocationObject, TPathOptions, TCommonLabelOptions, TFlatLabelOptions, TFlatLabelPolygonOptions, TFloatingLabelPolygonOptions, TLabelAllLocationCommonOptions, TLabelAllLocationFloatingLabelOptions, TLabelAllLocationFlatLabelOptions, TEnableBlueDotOptions, TFloatingLabelAppearance, TFlatLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
319
374
  export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator';
320
- export type { IDirectionsResult, TMappedinDirective, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator';
321
- export type { TGetVenueBundleOptions, TGetVenueOptions, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
375
+ export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator';
376
+ export type { TGetVenueBundleOptions, TGetVenueOptions, TMappedinDirective, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
322
377
  export { MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinDirections, MappedinNavigatable, MappedinCoordinate, MappedinRankings } from '@mappedin/react-native-sdk/core/packages/get-venue';
323
378
  export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
324
379
  export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
@@ -340,10 +395,10 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src' {
340
395
  export { getVenue, getVenueBundle } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
341
396
  export type { TGetVenueOptions, TGetVenueBundleOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
342
397
  export { STATE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
343
- export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_MARKER_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
398
+ export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
344
399
  export type { TSerializableJourneyOptions, TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
345
400
  import type { TEnableBlueDotOptions as TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptions as TLabelAllLocationCommonOptionsBase } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
346
- export type { TJourneyOptions, TGeolocationObject, TPathOptions, TLabelPolygonOptions, TLegacyLabelOptions, TLabelAllLocationLabelOptions, TLabelAllLocationLegacyLabelOptions, TFocusOnCameraOptions, TFocusOnTargets, TLabelAppearance, TCommonLabelOptions, TCameraAnimationOptions, TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
401
+ export type { TJourneyOptions, TGeolocationObject, TPathOptions, TFlatLabelPolygonOptions, TFloatingLabelPolygonOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TFlatLabelAppearance, TFloatingLabelAppearance, TFocusOnCameraOptions, TFocusOnTargets, TCommonLabelOptions, TCameraAnimationOptions, TFocusOnOptions, TAnimatePositionOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
347
402
  export type { TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptionsBase };
348
403
  export type TEnableBlueDotOptions = Omit<TEnableBlueDotOptionsBase, 'positionUpdater' | 'geolocationSource'>;
349
404
  export type TLabelAllLocationCommonOptions = Omit<TLabelAllLocationCommonOptionsBase, 'sortFunction' | 'translationMap'>;
@@ -391,6 +446,21 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/Mappedi
391
446
  }
392
447
  }
393
448
 
449
+ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types' {
450
+ import { MappedinNode, MappedinPolygon } from "@mappedin/react-native-sdk/wrappers/react-native-sdk/src";
451
+ import { TFocusOptionsLegacy } from "@mappedin/react-native-sdk/core/packages/renderer/Core.interface";
452
+ export type TPolygonColorOptions = {
453
+ color: string;
454
+ opacity?: number;
455
+ textColor?: string;
456
+ };
457
+ export type { TFocusOptionsLegacy };
458
+ export type TFocusOptionsLegacySerializable = Omit<TFocusOptionsLegacy, 'nodes' | 'polygons'> & {
459
+ nodes: (MappedinNode | MappedinNode['id'])[];
460
+ polygons: (MappedinPolygon['id'] | MappedinPolygon)[];
461
+ };
462
+ }
463
+
394
464
  declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
395
465
  import type { TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
396
466
  import { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
@@ -445,9 +515,10 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
445
515
  bundleBaseUri?: string;
446
516
  version?: string;
447
517
  /**
448
- * Use bundled images and assets to show MapView. This is unnecessary and should be false in React Native
518
+ * Parse bundle and convert images to blobs. Disabled in React Native
519
+ * @private
449
520
  */
450
- useBundleAssets?: boolean;
521
+ shouldPopulateBundledImagesAsBlobs?: boolean;
451
522
  };
452
523
  /**
453
524
  * [experimental] Fetching an offline Venue bundle
@@ -518,7 +589,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
518
589
  /**
519
590
  * Visual States of the BlueDot
520
591
  */
521
- export enum E_MARKER_STATE {
592
+ export enum E_BLUEDOT_MARKER_STATE {
522
593
  /**
523
594
  * BlueDot is hidden
524
595
  */
@@ -555,7 +626,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
555
626
  }
556
627
  export enum E_SDK_EVENT {
557
628
  /**
558
- * Emitted when the SDK state changes
629
+ * Emitted when the {@link STATE | SDK state} changes
559
630
  */
560
631
  STATE_CHANGE = "STATE_CHANGE",
561
632
  /**
@@ -578,7 +649,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
578
649
  export enum E_CAMERA_EVENT {
579
650
  USER_INTERACTION_START = "USER_INTERACTION_START",
580
651
  USER_INTERACTION_END = "USER_INTERACTION_END",
581
- POSITON_CHANGED = "POSITON_CHANGED",
652
+ POSITION_CHANGED = "POSITION_CHANGED",
582
653
  ZOOM_CHANGED = "ZOOM_CHANGED",
583
654
  ROTATION_CHANGED = "ROTATION_CHANGED",
584
655
  TILT_CHANGED = "TILT_CHANGED"
@@ -587,13 +658,13 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
587
658
 
588
659
  declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types' {
589
660
  import { Mappedin, MappedinLocation, MappedinMap, MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
590
- import { TLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Label';
661
+ import { TFloatingLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.FloatingLabel';
591
662
  import { TEnableBlueDotOptions } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
592
663
  import { TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
593
664
  import { TOOLTIP_ANCHOR } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip';
594
665
  import type { Euler, Object3D, Vector3 } from 'three';
595
666
  import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
596
- export type { TEnableBlueDotOptions, TLabelAppearance };
667
+ export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
597
668
  /**
598
669
  An extension of the GeolocationPosition type.
599
670
  https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPosition
@@ -633,18 +704,18 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
633
704
  pulsePauseDuration?: number;
634
705
  /**
635
706
  * (Deprecated) alias for `nearRadius`ty
636
- * @defaultValue 20
707
+ * @defaultValue 1.8
637
708
  * @deprecated
638
709
  */
639
710
  radius?: number;
640
711
  /**
641
- * Radius of path at nearest zoom
642
- * @defaultValue 20
712
+ * Radius of path at nearest zoom, in metres
713
+ * @defaultValue 1.8
643
714
  */
644
715
  nearRadius?: number;
645
716
  /**
646
- * Radius of path at furthest zoom
647
- * @defaultValue 20
717
+ * Radius of path at furthest zoom, in metres
718
+ * @defaultValue 2.3 times nearRadius
648
719
  */
649
720
  farRadius?: number;
650
721
  /**
@@ -960,12 +1031,12 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
960
1031
  */
961
1032
  shortText?: string;
962
1033
  /**
963
- * If Polygon is not set, this will let you add a TextLabel to another Map. Otherwise, it will use the {@link IMapView3D.currentMap}
1034
+ * If Polygon is not set, this will let you add a TextLabel to another Map. Otherwise, it will use the {@link currentMap}
964
1035
  */
965
1036
  map?: MappedinMap | string;
966
1037
  };
967
- export type TLegacyLabelOptions = TCommonLabelOptions & {
968
- legacyLabels: true;
1038
+ export type TFlatLabelOptions = TCommonLabelOptions & {
1039
+ flatLabels: true;
969
1040
  /**
970
1041
  * Set this if you want to label an arbitrary part of the Map. You will need to specify height as well.
971
1042
  */
@@ -991,6 +1062,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
991
1062
  */
992
1063
  align: 'left' | 'right' | 'center';
993
1064
  };
1065
+ };
1066
+ export type TFlatLabelAppearance = {
994
1067
  /**
995
1068
  * By default this is the upper bounds of the Polygon. If you don't have a Polygon, or want a custom height for some reason, you can set this.
996
1069
  */
@@ -1001,8 +1074,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1001
1074
  */
1002
1075
  margin?: number;
1003
1076
  /**
1004
- * A optional special color if you don't want to use MapView.colors.text
1005
- * @default IMapView3D.colors.text
1077
+ * A optional color
1006
1078
  */
1007
1079
  color?: string;
1008
1080
  /**
@@ -1011,7 +1083,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1011
1083
  */
1012
1084
  fontSize?: number;
1013
1085
  /**
1014
- * A CSS style string font. ie "sans-serif". You can specify your own font via @font-face rule with a font family, and then include that here. Note: Support for a THREE.Font object is still supported, but is deprecated.
1086
+ * A CSS style string font. ie "sans-serif". You can specify your own font via @font-face rule with a font family, and then include that here.
1015
1087
  */
1016
1088
  font?: string;
1017
1089
  /**
@@ -1026,17 +1098,24 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1026
1098
  */
1027
1099
  scaleStep?: number;
1028
1100
  };
1029
- export type TLabelPolygonOptions = TCommonLabelOptions & {
1101
+ export type TFloatingLabelPolygonOptions = TCommonLabelOptions & {
1030
1102
  scale?: number;
1031
- legacyLabels?: false | undefined;
1103
+ flatLabels?: false | undefined;
1032
1104
  /**
1033
- * Custom Rank - this determines how likely a smart label will appear
1105
+ * Custom Rank - this determines how likely a Floating Label will appear
1034
1106
  */
1035
1107
  rank?: COLLISION_RANKING_TIERS | number;
1036
1108
  /**
1037
- * Customize the appearance of the Smart Label and its marker
1109
+ * Customize the appearance of the Floating Labels and their pins
1110
+ */
1111
+ appearance?: TFloatingLabelAppearance;
1112
+ };
1113
+ export type TFlatLabelPolygonOptions = TCommonLabelOptions & {
1114
+ flatLabels?: true;
1115
+ /**
1116
+ * Customize the appearance of the Flat Labels
1038
1117
  */
1039
- appearance?: TLabelAppearance;
1118
+ appearance?: TFlatLabelAppearance;
1040
1119
  };
1041
1120
  export type TLabelAllLocationCommonOptions = {
1042
1121
  /**
@@ -1052,7 +1131,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1052
1131
  */
1053
1132
  locations?: MappedinLocation[];
1054
1133
  /**
1055
- * Custom Translation Map for {@link MappedinLocationState}
1134
+ * Custom Translation Map for {@link MappedinLocation.MappedinLocationState}
1056
1135
  */
1057
1136
  translationMap?: {
1058
1137
  [key in string]: string;
@@ -1063,23 +1142,24 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1063
1142
  */
1064
1143
  createDespiteImage?: boolean;
1065
1144
  };
1066
- export type TLabelAllLocationLabelOptions = TLabelAllLocationCommonOptions & {
1145
+ export type TLabelAllLocationFloatingLabelOptions = TLabelAllLocationCommonOptions & {
1067
1146
  /**
1068
- * Use Legacy Labels
1147
+ * Use Flat Labels
1069
1148
  * @default false
1070
1149
  */
1071
- legacyLabels?: false | undefined;
1150
+ flatLabels?: false | undefined;
1072
1151
  /**
1073
- * Customize the appearance of the Smart Labels and its marker
1152
+ * Customize the appearance of the Floating Labels and their pins
1074
1153
  */
1075
- appearance?: TLabelAppearance;
1154
+ appearance?: TFloatingLabelAppearance;
1076
1155
  };
1077
- export type TLabelAllLocationLegacyLabelOptions = TLabelAllLocationCommonOptions & Omit<TLegacyLabelOptions, 'text'> & {
1156
+ export type TLabelAllLocationFlatLabelOptions = TLabelAllLocationCommonOptions & {
1078
1157
  /**
1079
- * Use LagacyLabels
1158
+ * Use Flat Labels
1080
1159
  * @default false
1081
1160
  */
1082
- legacyLabels: true;
1161
+ flatLabels: true;
1162
+ appearance?: TFlatLabelAppearance;
1083
1163
  };
1084
1164
  export type changeListenerFn<PAYLOAD> = (update: PAYLOAD) => void;
1085
1165
  export type E_SDK_EVENT_PAYLOAD = {
@@ -1101,7 +1181,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1101
1181
  export type CAMERA_EVENT_PAYLOAD = {
1102
1182
  [E_CAMERA_EVENT.USER_INTERACTION_START]: void;
1103
1183
  [E_CAMERA_EVENT.USER_INTERACTION_END]: void;
1104
- [E_CAMERA_EVENT.POSITON_CHANGED]: {
1184
+ [E_CAMERA_EVENT.POSITION_CHANGED]: {
1105
1185
  x: number;
1106
1186
  y: number;
1107
1187
  };
@@ -1111,20 +1191,21 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1111
1191
  };
1112
1192
  export type { default as BlueDotLayer } from '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot';
1113
1193
  export type { default as JourneyLayer } from '@mappedin/react-native-sdk/core/packages/renderer/layers/Journey';
1194
+ export type { FlatLabel as TFlatLabel } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.LabelAtlas';
1195
+ export type { default as TFloatingLabel } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.FloatingLabel';
1114
1196
  }
1115
1197
 
1116
1198
  declare module '@mappedin/react-native-sdk/core/packages/navigator' {
1117
1199
  import NavigationGraph from '@mappedin/react-native-sdk/core/packages/navigator/NavigationGraph';
1118
1200
  import Navigator from '@mappedin/react-native-sdk/core/packages/navigator/Navigator';
1119
- import Directive from '@mappedin/react-native-sdk/core/packages/navigator/Directive';
1120
1201
  export { ACTION_TYPE, BEARING_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator/Directive';
1121
- export { Navigator, NavigationGraph, Directive as TMappedinDirective };
1202
+ export { Navigator, NavigationGraph };
1122
1203
  export type { IDirectionsResult } from '@mappedin/react-native-sdk/core/packages/navigator/Navigator';
1123
1204
  export { E_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator/Navigator';
1124
1205
  }
1125
1206
 
1126
1207
  declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1127
- import { MapView3DLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/MapView.legacy.interface';
1208
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
1128
1209
  import { MappedinNode, MappedinPolygon, MappedinCoordinate } from '@mappedin/react-native-sdk/core/packages/get-venue';
1129
1210
  import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed';
1130
1211
  import { Vector3 } from 'three';
@@ -1155,10 +1236,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1155
1236
  safeAreaInsets?: TSafeAreaInsets;
1156
1237
  };
1157
1238
  export type TAnimatePositionOptions = {
1158
- position?: {
1159
- x: number;
1160
- y: number;
1161
- };
1162
1239
  zoom?: number;
1163
1240
  tilt?: number;
1164
1241
  rotation?: number;
@@ -1202,18 +1279,39 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1202
1279
  *
1203
1280
  * @private
1204
1281
  */
1205
- constructor(mapView: MapView3DLegacy);
1282
+ constructor(core: ICore);
1206
1283
  /**
1207
1284
  * The current camera animation, if any. Resolves when the animation finishes.
1208
1285
  */
1209
1286
  get currentAnimation(): Promise<undefined> | undefined;
1210
- get position(): {
1211
- x: number;
1212
- y: number;
1213
- };
1287
+ /**
1288
+ * Current Camera zoom (in meters)
1289
+ */
1214
1290
  get zoom(): number;
1291
+ /**
1292
+ * Current Camera rotation (in radians)
1293
+ */
1215
1294
  get rotation(): number;
1295
+ /**
1296
+ * Current Camera tilt
1297
+ */
1216
1298
  get tilt(): number;
1299
+ /**
1300
+ * Minimum distance (in meters) the camera is allowed to get to the ground.
1301
+ */
1302
+ get minZoom(): number;
1303
+ /**
1304
+ * Minimum distance (in meters) the camera is allowed to get to the ground.
1305
+ */
1306
+ set minZoom(meters: number);
1307
+ /**
1308
+ * Maximum distance (in meters) the camera is allowed to get to the ground.
1309
+ */
1310
+ get maxZoom(): number;
1311
+ /**
1312
+ * Maximum distance (in meters) the camera is allowed to get to the ground.
1313
+ */
1314
+ set maxZoom(meters: number);
1217
1315
  setSafeAreaInsets(insets: {
1218
1316
  top: number;
1219
1317
  left: number;
@@ -1229,9 +1327,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1229
1327
  /**
1230
1328
  * Set the Camera's view to a new state.
1231
1329
  */
1232
- set(options: {
1233
- positionOptions?: TAnimatePositionOptions;
1234
- }): void;
1330
+ set(positionOptions?: TAnimatePositionOptions): void;
1235
1331
  /**
1236
1332
  * Animate the Camera's view to smoothly transition to a new state over time.
1237
1333
  * Returns a promise that resolves when the animation completes and gets rejected if the animation is cancelled.
@@ -1252,84 +1348,93 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1252
1348
 
1253
1349
  declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1254
1350
  export enum EVENT {
1255
- READY = "READY",
1256
- LOAD_VENUE = "LOAD_VENUE",
1257
- SHOW_VENUE = "SHOW_VENUE",
1258
- POLYGON_CLICKED = "POLYGON_CLICKED",
1259
- SET_MAP = "SET_MAP",
1260
- MAP_CHANGED = "MAP_CHANGED",
1261
- ROTATION_CHANGED = "ROTATION_CHANGED",
1262
- TILT_CHANGED = "TILT_CHANGED",
1263
- SET_ROTATION = "SET_ROTATION",
1264
- SET_TILT = "SET_TILT",
1265
- UPDATE_GEOLOCATION = "UPDATE_GEOLOCATION",
1266
- FOCUS_ON = "FOCUS_ON",
1267
- SET_POLYGON_COLOR = "SET_POLYGON_COLOR",
1268
- SET_BACKGROUND_COLOR = "SET_BACKGROUND_COLOR",
1269
- CLEAR_POLYGON_COLOR = "CLEAR_POLYGON_COLOR",
1270
- CLEAR_ALL_POLYGON_COLORS = "CLEAR_ALL_POLYGON_COLORS",
1271
- ADD_INTERACTIVE_POLYGON = "ADD_INTERACTIVE_POLYGON",
1272
- REMOVE_INTERACTIVE_POLYGONS = "REMOVE_INTERACTIVE_POLYGONS",
1273
- SET_SAFE_AREA = "SET_SAFE_AREA",
1274
- LABEL_ALL_LOCATIONS = "LABEL_ALL_LOCATIONS",
1275
- REMOVE_ALL_LABELS = "REMOVE_ALL_LABELS",
1276
- LABEL_POLYGON = "LABEL_POLYGON",
1277
- ENABLE_BLUE_DOT = "ENABLE_BLUE_DOT",
1278
- DISABLE_BLUE_DOT = "DISABLE_BLUE_DOT",
1279
- ENABLE_BEARING = "ENABLE_BEARING",
1280
- GET_NEAREST_NODE = "GET_NEAREST_NODE",
1281
- GET_BLUE_DOT_IS_FOLLOWING = "GET_BLUE_DOT_IS_FOLLOWING",
1282
- SET_BLUE_DOT_IS_FOLLOWING = "SET_BLUE_DOT_IS_FOLLOWING",
1283
- GET_DIRECTIONS = "GET_DIRECTIONS",
1284
- DESTROY = "DESTROY",
1285
- DATA_LOADED = "DATA_LOADED",
1286
- FIRST_MAP_LOADED = "FIRST_MAP_LOADED",
1287
- CREATE_MARKER = "CREATE_MARKER",
1288
- REMOVE_MARKER = "REMOVE_MARKER",
1289
- OVERRIDE_LOCATION = "OVERRIDE_LOCATION",
1290
- /**
1291
- * @deprecated
1292
- */
1293
- BLUE_DOT_UPDATED = "BLUE_DOT_UPDATED",
1294
- SET_JOURNEY_STEP = "SET_JOURNEY_STEP",
1295
- BLUEDOT_STATE_CHANGE = "BLUEDOT_STATE_CHANGE",
1296
- BLUEDOT_POSITION_UPDATE = "BLUEDOT_POSITION_UPDATE",
1297
- DRAW_PATH = "DRAW_PATH",
1298
- REMOVE_ALL_PATHS = "REMOVE_ALL_PATHS",
1299
- NOTHING_CLICKED = "NOTHING_CLICKED",
1300
- SET_STATE = "SET_STATE",
1301
- STATE_CHANGED = "STATE_CHANGED",
1302
- DRAW_JOURNEY = "DRAW_JOURNEY",
1303
- CLEAR_JOURNEY = "CLEAR_JOURNEY",
1304
- SET_COOKIE = "SET_COOKIE",
1305
- GET_NEAREST_NODE_BY_SCREEN_COORDINATES = "GET_NEAREST_NODE_BY_SCREEN_COORDINATES"
1351
+ READY = "READY",
1352
+ LOAD_VENUE = "LOAD_VENUE",
1353
+ SHOW_VENUE = "SHOW_VENUE",
1354
+ POLYGON_CLICKED = "POLYGON_CLICKED",
1355
+ SET_MAP = "SET_MAP",
1356
+ MAP_CHANGED = "MAP_CHANGED",
1357
+ ROTATION_CHANGED = "ROTATION_CHANGED",
1358
+ TILT_CHANGED = "TILT_CHANGED",
1359
+ CAMERA_SET = "CAMERA_SET",
1360
+ /**
1361
+ * @deprecated
1362
+ */
1363
+ SET_ROTATION = "SET_ROTATION",
1364
+ /**
1365
+ * @deprecated
1366
+ */
1367
+ SET_TILT = "SET_TILT",
1368
+ /**
1369
+ * @deprecated
1370
+ */
1371
+ FOCUS_ON_LEGACY = "FOCUS_ON_LEGACY",
1372
+ SET_MIN_ZOOM = "SET_MIN_ZOOM",
1373
+ SET_MAX_ZOOM = "SET_MAX_ZOOM",
1374
+ UPDATE_GEOLOCATION = "UPDATE_GEOLOCATION",
1375
+ FOCUS_ON = "FOCUS_ON",
1376
+ SET_POLYGON_COLOR = "SET_POLYGON_COLOR",
1377
+ SET_BACKGROUND_COLOR = "SET_BACKGROUND_COLOR",
1378
+ CLEAR_POLYGON_COLOR = "CLEAR_POLYGON_COLOR",
1379
+ CLEAR_ALL_POLYGON_COLORS = "CLEAR_ALL_POLYGON_COLORS",
1380
+ ADD_INTERACTIVE_POLYGON = "ADD_INTERACTIVE_POLYGON",
1381
+ REMOVE_INTERACTIVE_POLYGONS = "REMOVE_INTERACTIVE_POLYGONS",
1382
+ CAMERA_SET_SAFE_AREA_INSETS = "CAMERA_SET_SAFE_AREA_INSETS",
1383
+ LABEL_ALL_LOCATIONS = "LABEL_ALL_LOCATIONS",
1384
+ REMOVE_ALL_LABELS = "REMOVE_ALL_LABELS",
1385
+ LABEL_POLYGON = "LABEL_POLYGON",
1386
+ ENABLE_BLUE_DOT = "ENABLE_BLUE_DOT",
1387
+ DISABLE_BLUE_DOT = "DISABLE_BLUE_DOT",
1388
+ ENABLE_BEARING = "ENABLE_BEARING",
1389
+ GET_NEAREST_NODE = "GET_NEAREST_NODE",
1390
+ GET_BLUE_DOT_IS_FOLLOWING = "GET_BLUE_DOT_IS_FOLLOWING",
1391
+ SET_BLUE_DOT_IS_FOLLOWING = "SET_BLUE_DOT_IS_FOLLOWING",
1392
+ GET_DIRECTIONS = "GET_DIRECTIONS",
1393
+ DESTROY = "DESTROY",
1394
+ DATA_LOADED = "DATA_LOADED",
1395
+ FIRST_MAP_LOADED = "FIRST_MAP_LOADED",
1396
+ CREATE_MARKER = "CREATE_MARKER",
1397
+ REMOVE_MARKER = "REMOVE_MARKER",
1398
+ OVERRIDE_LOCATION = "OVERRIDE_LOCATION",
1399
+ SET_JOURNEY_STEP = "SET_JOURNEY_STEP",
1400
+ BLUEDOT_STATE_CHANGE = "BLUEDOT_STATE_CHANGE",
1401
+ BLUEDOT_POSITION_UPDATE = "BLUEDOT_POSITION_UPDATE",
1402
+ DRAW_PATH = "DRAW_PATH",
1403
+ REMOVE_ALL_PATHS = "REMOVE_ALL_PATHS",
1404
+ NOTHING_CLICKED = "NOTHING_CLICKED",
1405
+ SET_STATE = "SET_STATE",
1406
+ STATE_CHANGED = "STATE_CHANGED",
1407
+ DRAW_JOURNEY = "DRAW_JOURNEY",
1408
+ CLEAR_JOURNEY = "CLEAR_JOURNEY",
1409
+ SET_COOKIE = "SET_COOKIE",
1410
+ GET_NEAREST_NODE_BY_SCREEN_COORDINATES = "GET_NEAREST_NODE_BY_SCREEN_COORDINATES"
1306
1411
  }
1307
1412
  export enum WAYFINDING_EVENT {
1308
- GET_MAPS_IN_NAVIGATION = "GET_MAPS_IN_NAVIGATION",
1309
- SHOW_JOURNEY = "SHOW_JOURNEY",
1310
- START_NAVIGATION = "START_NAVIGATION",
1311
- STOP_NAVIGATION = "STOP_NAVIGATION",
1312
- SEEK = "SEEK",
1313
- GET_MODE = "GET_MODE",
1314
- EXIT_NAVIGATION = "EXIT_NAVIGATION"
1413
+ GET_MAPS_IN_NAVIGATION = "GET_MAPS_IN_NAVIGATION",
1414
+ SHOW_JOURNEY = "SHOW_JOURNEY",
1415
+ START_NAVIGATION = "START_NAVIGATION",
1416
+ STOP_NAVIGATION = "STOP_NAVIGATION",
1417
+ SEEK = "SEEK",
1418
+ GET_MODE = "GET_MODE",
1419
+ EXIT_NAVIGATION = "EXIT_NAVIGATION"
1315
1420
  }
1316
1421
  export enum BRIDGE_EVENT {
1317
- READY = "READY",
1318
- RESOLVE = "RESOLVE",
1319
- REJECT = "REJECT"
1422
+ READY = "READY",
1423
+ RESOLVE = "RESOLVE",
1424
+ REJECT = "REJECT"
1320
1425
  }
1321
1426
  export enum MINIMAP_EVENT {
1322
- LOAD_MINIMAP = "LOAD_MINIMAP",
1323
- SHOW_MINIMAP = "SHOW_MINIMAP",
1324
- READY = "MINIMAP_READY",
1325
- CACHE_IMAGE = "CACHE_IMAGE"
1427
+ LOAD_MINIMAP = "LOAD_MINIMAP",
1428
+ SHOW_MINIMAP = "SHOW_MINIMAP",
1429
+ READY = "MINIMAP_READY",
1430
+ CACHE_IMAGE = "CACHE_IMAGE"
1326
1431
  }
1327
1432
  }
1328
1433
 
1329
1434
  declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1330
- import { IDirectionsResult, MappedinMap, MappedinNode, TBlueDotPositionUpdate, TBlueDotStateChange, TGetVenueOptions, TLabelPolygonOptions, TPathOptions, TShowVenueOptions, STATE, TGeolocationObject, TEnableBlueDotOptions, TLegacyLabelOptions, MappedinLocation } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
1435
+ import { IDirectionsResult, MappedinMap, MappedinNode, TBlueDotPositionUpdate, TBlueDotStateChange, TGetVenueOptions, TFloatingLabelPolygonOptions, TFlatLabelPolygonOptions, TAnimatePositionOptions, TPathOptions, TShowVenueOptions, STATE, TGeolocationObject, TEnableBlueDotOptions, MappedinLocation, TLabelAllLocationFloatingLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
1331
1436
  import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common/types';
1332
- import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT } from '@mappedin/react-native-sdk/wrappers/common';
1437
+ import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, TFocusOnOptionsLegacySerializable, TReactNativeFlatLabelAllLocationsLegacy, TReactNativeFlatLabelAllLocations } from '@mappedin/react-native-sdk/wrappers/common';
1333
1438
  import { TSerializableJourneyOptions, TFocusOnOptionsSerializable, TSerializedLocation, TSerializedNode, TSerializedPolygon } from '@mappedin/react-native-sdk/wrappers/common/types';
1334
1439
  export type BRIDGE_EVENT_PAYLOADS = {
1335
1440
  [BRIDGE_EVENT.READY]: {
@@ -1441,6 +1546,12 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1441
1546
  mapId: string;
1442
1547
  };
1443
1548
  };
1549
+ [EVENT.CAMERA_SET]: {
1550
+ msgID: string;
1551
+ data: {
1552
+ positionOptions?: TAnimatePositionOptions;
1553
+ };
1554
+ };
1444
1555
  [EVENT.SET_ROTATION]: {
1445
1556
  msgID: string;
1446
1557
  data: {
@@ -1453,12 +1564,35 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1453
1564
  tilt: number;
1454
1565
  };
1455
1566
  };
1567
+ [EVENT.CAMERA_SET_SAFE_AREA_INSETS]: {
1568
+ msgID: string;
1569
+ data: {
1570
+ safeAreaInsets: {
1571
+ top: number;
1572
+ bottom: number;
1573
+ left: number;
1574
+ right: number;
1575
+ };
1576
+ };
1577
+ };
1578
+ [EVENT.CLEAR_POLYGON_COLOR]: {
1579
+ msgID: string;
1580
+ data: {
1581
+ polygonId: string;
1582
+ };
1583
+ };
1456
1584
  [EVENT.FOCUS_ON]: {
1457
1585
  msgID: string;
1458
1586
  data: {
1459
1587
  focusOptions: TFocusOnOptionsSerializable;
1460
1588
  };
1461
1589
  };
1590
+ [EVENT.FOCUS_ON_LEGACY]: {
1591
+ msgID: string;
1592
+ data: {
1593
+ focusOptions: TFocusOnOptionsLegacySerializable;
1594
+ };
1595
+ };
1462
1596
  [EVENT.SET_POLYGON_COLOR]: {
1463
1597
  msgID: string;
1464
1598
  data: {
@@ -1488,21 +1622,12 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1488
1622
  msgID: string;
1489
1623
  data?: null;
1490
1624
  };
1491
- [EVENT.SET_SAFE_AREA]: {
1492
- msgID: string;
1493
- data?: {
1494
- padding: {
1495
- top: number;
1496
- bottom: number;
1497
- left: number;
1498
- right: number;
1499
- };
1500
- };
1501
- };
1502
1625
  [EVENT.LABEL_ALL_LOCATIONS]: {
1503
1626
  msgID: string;
1504
1627
  data: {
1505
- options: any;
1628
+ options?: (Omit<TReactNativeFlatLabelAllLocations, 'locations'> | Omit<TLabelAllLocationFloatingLabelOptions, 'locations'> | Omit<TReactNativeFlatLabelAllLocationsLegacy, 'locations'>) & {
1629
+ locations?: string[];
1630
+ };
1506
1631
  };
1507
1632
  };
1508
1633
  [EVENT.REMOVE_ALL_LABELS]: {
@@ -1513,7 +1638,12 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1513
1638
  msgID: string;
1514
1639
  data: {
1515
1640
  polygonId: string;
1516
- options: TLabelPolygonOptions | TLegacyLabelOptions;
1641
+ options: (TFloatingLabelPolygonOptions | TFlatLabelPolygonOptions) & {
1642
+ /**
1643
+ * @deprecated
1644
+ */
1645
+ legacyLabels?: boolean;
1646
+ };
1517
1647
  };
1518
1648
  };
1519
1649
  [EVENT.ENABLE_BLUE_DOT]: {
@@ -1544,10 +1674,30 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1544
1674
  msgID: string;
1545
1675
  data: null;
1546
1676
  };
1677
+ [EVENT.SET_MIN_ZOOM]: {
1678
+ msgID: string;
1679
+ data: {
1680
+ zoomLevel: number;
1681
+ };
1682
+ };
1683
+ [EVENT.SET_MAX_ZOOM]: {
1684
+ msgID: string;
1685
+ data: {
1686
+ zoomLevel: number;
1687
+ };
1688
+ };
1547
1689
  [EVENT.CREATE_MARKER]: {
1548
1690
  msgID: string;
1549
1691
  data: {
1550
- nodeIdOrCoordinate: any;
1692
+ nodeOrCoordinate: {
1693
+ type: 'Node';
1694
+ id: string;
1695
+ } | {
1696
+ type: 'Coordinate';
1697
+ mapId: string;
1698
+ lat: number;
1699
+ lon: number;
1700
+ };
1551
1701
  contentHtml: string;
1552
1702
  options: any;
1553
1703
  };
@@ -1610,13 +1760,18 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1610
1760
  }
1611
1761
 
1612
1762
  declare module '@mappedin/react-native-sdk/wrappers/common/types' {
1613
- import type { MappedinNode, MappedinPolygon, TFocusOnOptions, TJourneyOptions, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
1763
+ import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
1764
+ import type { MappedinNode, MappedinPolygon, TFocusOnOptions, TJourneyOptions, TFloatingLabelPolygonOptions, TFlatLabelPolygonOptions, TShowVenueOptions, TLabelAllLocationFlatLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
1614
1765
  export type TFocusOnOptionsSerializable = Omit<TFocusOnOptions, 'targets'> & {
1615
1766
  targets: {
1616
1767
  nodes?: MappedinNode['id'][];
1617
1768
  polygons?: MappedinPolygon['id'][];
1618
1769
  };
1619
1770
  };
1771
+ export type TFocusOnOptionsLegacySerializable = Omit<TFocusOptionsLegacy, 'nodes' | 'polygons'> & {
1772
+ nodes?: MappedinNode['id'][];
1773
+ polygons?: MappedinPolygon['id'][];
1774
+ };
1620
1775
  export type TSerializedNode = {
1621
1776
  id: string;
1622
1777
  type: 'Node';
@@ -1656,6 +1811,30 @@ declare module '@mappedin/react-native-sdk/wrappers/common/types' {
1656
1811
  noAuth?: boolean;
1657
1812
  language?: string;
1658
1813
  };
1814
+ export type TReactNativeFloatingLabelPolygonOptions = TFloatingLabelPolygonOptions & {
1815
+ /**
1816
+ * @deprecated
1817
+ */
1818
+ legacyLabels?: false | undefined;
1819
+ flatLabels?: false | undefined;
1820
+ };
1821
+ export type TReactNativeFlatLabelPolygonOptions = TFlatLabelPolygonOptions & ({
1822
+ /**
1823
+ * @deprecated
1824
+ */
1825
+ legacyLabels: true;
1826
+ } | {
1827
+ flatLabels: true;
1828
+ });
1829
+ export type TReactNativeFlatLabelAllLocationsLegacy = Omit<TLabelAllLocationFlatLabelOptions, 'flatLabels'> & {
1830
+ /**
1831
+ * @deprecated
1832
+ */
1833
+ legacyLabels: true;
1834
+ };
1835
+ export type TReactNativeFlatLabelAllLocations = TLabelAllLocationFlatLabelOptions & {
1836
+ flatLabels: true;
1837
+ };
1659
1838
  }
1660
1839
 
1661
1840
  declare module '@mappedin/react-native-sdk/wrappers/common/pub-sub' {
@@ -1670,63 +1849,260 @@ declare module '@mappedin/react-native-sdk/wrappers/common/pub-sub' {
1670
1849
  }
1671
1850
  }
1672
1851
 
1673
- declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types' {
1674
- export type TGetVenueOptions = {
1675
- accessToken?: string;
1676
- clientId?: string;
1677
- clientSecret?: string;
1678
- baseUrl?: string;
1679
- includeHidden?: boolean;
1680
- noAuth?: boolean;
1681
- perspective?: string;
1682
- language?: string;
1683
- headers?: {
1684
- [key in string]: string;
1685
- };
1686
- venue: string;
1687
- things?: any;
1688
- };
1689
- export type TGetVenueOptionsInternal = {
1690
- baseUrl?: string;
1691
- supplementaryUrl?: string;
1692
- noAuth?: boolean;
1693
- includeHidden?: boolean;
1694
- apiGateway?: string;
1695
- authorization?: string;
1696
- /**
1697
- * @deprecated 2D support will be removed in the future
1698
- */
1699
- do2D?: boolean;
1700
- things?: any;
1701
- headers?: any;
1852
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface' {
1853
+ import { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
1854
+ import CameraControls from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.CameraControls';
1855
+ import { Vector2, Vector3 } from 'three';
1856
+ import { changeListenerFn, TMapViewOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
1857
+ import RENDER from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.RenderTasks';
1858
+ import { INTERNAL_EVENT_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
1859
+ import { TPadding } from '@mappedin/react-native-sdk/core/packages/renderer';
1860
+ import Tween, { Easing } from '@tweenjs/tween.js';
1861
+ export type TFocusOptionsLegacy = {
1862
+ /**
1863
+ * An array of Nodes to focus in on
1864
+ */
1865
+ nodes?: (MappedinNode | MappedinNode['id'])[];
1866
+ /**
1867
+ * An array of Polygons to focus on. It's the center of the bounds of all Polygons, designed to fit everything into view.
1868
+ */
1869
+ polygons?: (MappedinPolygon | MappedinPolygon['id'])[];
1870
+ /**
1871
+ * The duration the focus animation should last for.
1872
+ * @defaultValue `100`
1873
+ */
1874
+ duration?: number;
1875
+ /**
1876
+ * Whether to zoom the camera in or out, or just pan it.
1877
+ * @defaultValue `true`
1878
+ */
1879
+ changeZoom?: boolean;
1880
+ /**
1881
+ * The animation curve to use for zooming in. Uses the animateCamera one by default.
1882
+ */
1883
+ curve?: typeof Easing;
1884
+ /**
1885
+ * Camera tilt between 0 (top-down) to 1 (from the side)
1886
+ */
1887
+ tilt?: number;
1888
+ /**
1889
+ * Rotation in degrees
1890
+ */
1891
+ rotation?: number;
1892
+ /**
1893
+ * You can overide the {{#crossLink "MapView/focusZoomFactor:property"}}{{/crossLink}} for a specific {{#crossLink "MapView/focusOn:method"}}{{/crossLink}} call, rather than globally, if you like.
1894
+ */
1895
+ focusZoomFactor?: number;
1896
+ /**
1897
+ * Sets a floor for how close you can zoom in on the scene. If it's lower than mapView.controls.minZoom, it's ignored.
1898
+ * @defaultValue: 0
1899
+ */
1900
+ minZoom?: number;
1901
+ padding?: TPadding;
1902
+ points?: any[];
1702
1903
  };
1703
- }
1704
-
1705
- declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
1706
- import { Navigator } from '@mappedin/react-native-sdk/core/packages/navigator';
1707
- import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
1708
- import { MappedinCategory } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCategory';
1709
- import { MappedinEvent } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinEvent';
1710
- import { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
1711
- import { MappedinLocationRankings } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocationRankings';
1712
- import { MappedinLocationState } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocationState';
1713
- import { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap';
1714
- import { MappedinMapGroup } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMapGroup';
1715
- import { MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode';
1716
- import { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolygon';
1717
- import { MappedinRankings } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinRankings';
1718
- import { MappedinTheme } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinTheme';
1719
- import { MappedinVenue } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVenue';
1720
- import { MappedinVortex } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVortex';
1721
- export const defaultOptions: TGetVenueOptionsInternal & TGetVenueOptions;
1722
- export enum CollectionType {
1723
- CATEGORY = "categories",
1724
- EVENT = "events",
1725
- LOCATION = "locations",
1726
- MAPGROUP = "mapGroups",
1727
- MAP = "maps",
1728
- NODE = "nodes",
1729
- POLYGON = "polygons",
1904
+ export interface ICore {
1905
+ new (container: HTMLElement, venue: Mappedin, options?: TMapViewOptions): ICore;
1906
+ /**
1907
+ * @internal
1908
+ */
1909
+ currentScale: number;
1910
+ imageFlippingEnabled: boolean;
1911
+ imageFlippingCache: any;
1912
+ cachedPadding: any;
1913
+ polygonMeshesById: any;
1914
+ textLabelsByPolygonId: any;
1915
+ renderer: any;
1916
+ scene: any;
1917
+ cameraParameters: Vector2;
1918
+ resolution: Vector2;
1919
+ determineNewLabelSize: any;
1920
+ on<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
1921
+ off<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
1922
+ publish<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, payload?: INTERNAL_EVENT_PAYLOAD[EVENT_NAME]): void;
1923
+ /**
1924
+ * Manual camera controls for MapView. Generally you should be using the functions on MapView like {{#crossLink "MapView/focusOn:method"}}{{/crossLink}},
1925
+ * but if you have some cool animations in mind, you can do it with the {{#crossLink "CameraControls"}}{{/crossLink}}.
1926
+ * Some of the functions don't do anything in 2D.
1927
+ *
1928
+ */
1929
+ controls?: typeof CameraControls;
1930
+ /**
1931
+ * The Venue data this MapView is using.
1932
+ *
1933
+ * @property venue {MappedinVenue}
1934
+ * @final
1935
+ */
1936
+ readonly venue: Mappedin;
1937
+ /**
1938
+ * The div MapView is using.
1939
+ *
1940
+ * @property container {Div}
1941
+ * @final
1942
+ */
1943
+ readonly container: HTMLElement;
1944
+ /**
1945
+ * The ID of the Map currently being displayed.
1946
+ *
1947
+ */
1948
+ readonly currentMap: string;
1949
+ /**
1950
+ * Change this factor to influence how much the camera zooms in on a {@link IMapView3D.focusOn} call.
1951
+ *
1952
+ * @property focusZoomFactor {Integer}
1953
+ * @default 3
1954
+ */
1955
+ focusZoomFactor: number;
1956
+ /**
1957
+ * Returns the value you should call {@link CameraControls.setZoom} on to fit the Polygon exactly.
1958
+ *
1959
+ * @return The zoom level that will fit the Polygon
1960
+ */
1961
+ getZoomLevelForPolygon(props: {
1962
+ /**
1963
+ * The Polygon or Polygon ID to get the zoom level for
1964
+ */
1965
+ polygonOrPolygonId: MappedinPolygon | string;
1966
+ }): number;
1967
+ /**
1968
+ * Returns the value you should call {@link CameraControls.setZoom} on to fit the {@link IMapView3D.currentMap} exactly.
1969
+ *
1970
+ * @return The zoom level that will fit the {@link IMapView3D.currentMap}.
1971
+ */
1972
+ getZoomLevelForCurrentMap(): number;
1973
+ /**
1974
+ * Returns the angle that points to north, in radians, from the default orientation.
1975
+ *
1976
+ * @return The angle to north from the default orientation, in radians.
1977
+ */
1978
+ getNorth(): number;
1979
+ /**
1980
+ * Takes an element on the DOM and rotates it such that the top is pointing north. It will rotate with the camera, staying locked
1981
+ * on north. If you would like to align it do a different direction, or a different side of the element, pass in an offset. This
1982
+ * is how you would do a compass rose.
1983
+ *
1984
+ * This will modify your element's transform.
1985
+ *
1986
+ * @param element The element on the page to rotate.
1987
+ * @param offset The amount to offset the rotation by, in radians.
1988
+ *
1989
+ */
1990
+ lockNorth(element: HTMLElement, offset?: number): void;
1991
+ /**
1992
+ * Stops the MapView from trying to rotate your element with the camera. Do this if you remove the element, or want to stop it from rotating.
1993
+ * @param element The node to stop rotating. It won't reset the transform, just leave it as is.
1994
+ */
1995
+ unlockNorth(element: HTMLElement): void;
1996
+ currentInteractionEvent: string;
1997
+ interactivePolygons: any;
1998
+ highlightedPolygons: any;
1999
+ cameraPlane: any;
2000
+ /**
2001
+ * This is called when an interactive Polygon is clicked on.
2002
+ * You will almost certainly want to replace this with your own function in your client app.
2003
+ * Return "false" if you have consumed the event and it shouldn't bubble down to other Polygons beneath this one.
2004
+ *
2005
+ * @param polygonId polygonId passed in when tapping an interactive polygon
2006
+ */
2007
+ onPolygonClicked(polygonId: string): boolean | void;
2008
+ onMapChanged(map: string): void;
2009
+ getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string): Vector3;
2010
+ getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
2011
+ convertTo3DMapPosition(nodeOrCoordinate: MappedinCoordinate | MappedinNode): Vector3;
2012
+ setPadding(padding: {
2013
+ top: number;
2014
+ left: number;
2015
+ bottom: number;
2016
+ right: number;
2017
+ }): void;
2018
+ /**
2019
+ * This is fired when the user taps/clicks on the MapView without hitting an interactive Polygon.
2020
+ * You will almost certainly want to replace this with your own function in your client app.
2021
+ * You would probably use this to clear any Polygon highlighting, in certain situations.
2022
+ */
2023
+ onNothingClicked(): void;
2024
+ smartCollisionEngine: any;
2025
+ mapObjects: any;
2026
+ /**
2027
+ * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about,
2028
+ * but if you are doing something weird, or have your own special tween for something, you will want to call this function.
2029
+ * You can call it as often as you want, it just sets a flag that we need to render again, and renders a few frames if we weren't already doing that.
2030
+ * Ignored in 2D.
2031
+ */
2032
+ tryRendering(renderMode?: typeof RENDER): void;
2033
+ setMap(mapOrMapId: MappedinMap | string): Promise<null>;
2034
+ getPositionNode(node: MappedinNode): Vector3;
2035
+ cameraObject: any;
2036
+ setBackgroundColor(color: number | string, alpha?: number): void;
2037
+ mapManager: any;
2038
+ focusOn(focusOptions: TFocusOptionsLegacy): Tween;
2039
+ canvasWidth: number;
2040
+ canvasHeight: number;
2041
+ /**
2042
+ * Resets the MapView to the default state.
2043
+ */
2044
+ resetState(): void;
2045
+ destroy(): void;
2046
+ }
2047
+ }
2048
+
2049
+ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types' {
2050
+ export type TGetVenueOptions = {
2051
+ accessToken?: string;
2052
+ clientId?: string;
2053
+ clientSecret?: string;
2054
+ baseUrl?: string;
2055
+ includeHidden?: boolean;
2056
+ noAuth?: boolean;
2057
+ perspective?: string;
2058
+ language?: string;
2059
+ headers?: {
2060
+ [key in string]: string;
2061
+ };
2062
+ venue: string;
2063
+ things?: any;
2064
+ };
2065
+ export type TGetVenueOptionsInternal = {
2066
+ baseUrl?: string;
2067
+ supplementaryUrl?: string;
2068
+ noAuth?: boolean;
2069
+ includeHidden?: boolean;
2070
+ apiGateway?: string;
2071
+ authorization?: string;
2072
+ /**
2073
+ * @deprecated 2D support will be removed in the future
2074
+ */
2075
+ do2D?: boolean;
2076
+ things?: any;
2077
+ headers?: any;
2078
+ };
2079
+ }
2080
+
2081
+ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2082
+ import { Navigator } from '@mappedin/react-native-sdk/core/packages/navigator';
2083
+ import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
2084
+ import { MappedinCategory } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCategory';
2085
+ import { MappedinEvent } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinEvent';
2086
+ import { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
2087
+ import { MappedinLocationRankings } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocationRankings';
2088
+ import { MappedinLocationState } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocationState';
2089
+ import { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap';
2090
+ import { MappedinMapGroup } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMapGroup';
2091
+ import { MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode';
2092
+ import { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolygon';
2093
+ import { MappedinRankings } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinRankings';
2094
+ import { MappedinTheme } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinTheme';
2095
+ import { MappedinVenue } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVenue';
2096
+ import { MappedinVortex } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVortex';
2097
+ export const defaultOptions: TGetVenueOptionsInternal & TGetVenueOptions;
2098
+ export enum CollectionType {
2099
+ CATEGORY = "categories",
2100
+ EVENT = "events",
2101
+ LOCATION = "locations",
2102
+ MAPGROUP = "mapGroups",
2103
+ MAP = "maps",
2104
+ NODE = "nodes",
2105
+ POLYGON = "polygons",
1730
2106
  VORTEX = "vortexes"
1731
2107
  }
1732
2108
  type TAccessors = {
@@ -1936,8 +2312,10 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
1936
2312
  /**
1937
2313
  *
1938
2314
  * [experimental] Hydrate the Mappedin instance using a response from either {@link IMappedin.toString()}, {@link getVenueBundle} or by downloading the bundle manually
2315
+ * @param mappedinSerializableData Mappedin data that was serialized or exported as JSON
2316
+ * @param shouldPopulateBundledImagesAsBlobs Takes the scenes and images from a bundle and maps them as blobs to where they exist as URLs in the bundle. False by default
1939
2317
  */
1940
- hydrate(mappedinSerializableData: string | object): Promise<undefined>;
2318
+ hydrate(mappedinSerializableData: string | object, shouldPopulateBundledImagesAsBlobs?: boolean): Promise<undefined>;
1941
2319
  images: any;
1942
2320
  scenes: any;
1943
2321
  fetch(): Promise<void>;
@@ -2012,7 +2390,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocat
2012
2390
  siblingGroups?: TSiblingGroup[] | undefined;
2013
2391
  gallery?: TGalleryImage[] | undefined;
2014
2392
  constructor(mappedin: Mappedin, data: any);
2015
- categories: TCategory[];
2393
+ categories: TCategory['id'][];
2016
2394
  /**
2017
2395
  * Polygons this Location is attached to.
2018
2396
  *
@@ -2162,6 +2540,14 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode'
2162
2540
  operationHours?: TOpeningHours[];
2163
2541
  externalId?: string;
2164
2542
  constructor(mappedin: Mappedin, data: any);
2543
+ /**
2544
+ * Latitude of node. This is expensive, especially if doing it for many/all nodes
2545
+ */
2546
+ get lat(): number;
2547
+ /**
2548
+ * Longitude of node. This is expensive, especially if doing it for many/all nodes
2549
+ */
2550
+ get lon(): number;
2165
2551
  /**
2166
2552
  * Adjacent Nodes.
2167
2553
  *
@@ -2244,7 +2630,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
2244
2630
  import type { MappedinMapGroup } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMapGroup';
2245
2631
  import { MappedinCoordinate } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoordinate';
2246
2632
  /**
2247
- * A {@link MappedinMap} belonging to a specific {@link MappedinVenue}. Typically represents a certain floor. Give this to a {@link MiMapView} to display to the user.
2633
+ * A {@link MappedinMap} belonging to a specific {@link MappedinVenue}. Typically represents a certain floor. Give this to a {@link MapView} to display to the user.
2248
2634
  *
2249
2635
  * A Map can have more properties such as 'elevation', 'name' (e.g. Level 1), and 'shortName' (e.g. L1). The elevation property can be used to determine the order of the floors (first, second, etc). Elevation is 0 based, going up and down in integers representing the number of floors above or below 0, which is ground level.
2250
2636
  *
@@ -2288,6 +2674,14 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
2288
2674
  * @property mapGroup {MappedinMapGroup}
2289
2675
  */
2290
2676
  get mapGroup(): MappedinMapGroup | null;
2677
+ /**
2678
+ * Create coordinate using mappedin units
2679
+ * @internal
2680
+ *
2681
+ * @param x x of coordinate
2682
+ * @param y y of coordinate
2683
+ */
2684
+ createCoordinateByXY(x: number, y: number): MappedinCoordinate;
2291
2685
  /**
2292
2686
  * Create coordinate using lat/lon
2293
2687
  *
@@ -2499,6 +2893,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinDirec
2499
2893
  }
2500
2894
 
2501
2895
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoordinate' {
2896
+ import { Mappedin, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
2502
2897
  import type { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap';
2503
2898
  /**
2504
2899
  * A {@link MappedinCoordinate} represents a coordinate on a map, created using lat/lon.
@@ -2506,6 +2901,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoord
2506
2901
  * @class MappedinCoordinate
2507
2902
  */
2508
2903
  export class MappedinCoordinate {
2904
+ #private;
2509
2905
  /**
2510
2906
  * ID of Map that the Node is located on.
2511
2907
  *
@@ -2530,7 +2926,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoord
2530
2926
  * Longitude
2531
2927
  */
2532
2928
  lon: number;
2533
- constructor(lat: number, lon: number, x: number, y: number, map: MappedinMap | string);
2929
+ constructor(lat: number, lon: number, x: number, y: number, map: MappedinMap | string, mappedin: Mappedin);
2534
2930
  /**
2535
2931
  *
2536
2932
  * Calculate distance between a coordinate and a {@link MappedinNode} or {@link MappedinCoordinate}
@@ -2539,6 +2935,10 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoord
2539
2935
  * @returns distance in meters
2540
2936
  */
2541
2937
  absoluteDistanceTo(destination: MappedinCoordinate): number;
2938
+ /**
2939
+ * Get Nearest Node to Coordinate, which can then be used for navigation
2940
+ */
2941
+ get nearestNode(): MappedinNode;
2542
2942
  }
2543
2943
  }
2544
2944
 
@@ -2823,13 +3223,13 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.
2823
3223
  };
2824
3224
  }
2825
3225
 
2826
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Label' {
2827
- import './Mappedin.Label.scss';
3226
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.FloatingLabel' {
3227
+ import './Mappedin.FloatingLabel.scss';
2828
3228
  import BaseCollider, { ICollider, TColliderStrategy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
2829
3229
  import { Vector3 } from 'three';
2830
3230
  import { TDrawFn } from '@mappedin/react-native-sdk/core/packages/renderer/internal/shave-text';
2831
3231
  import type { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
2832
- import { MapView3DLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/MapView.legacy.interface';
3232
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
2833
3233
  type TStyle = {
2834
3234
  top?: number;
2835
3235
  left?: number;
@@ -2851,7 +3251,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
2851
3251
  getCachedSymbol: (orientation: string, textAlign: TEXTALIGN, xCoordinate: number) => HTMLCanvasElement | OffscreenCanvas;
2852
3252
  draw: (context: CanvasRenderingContext2D) => void;
2853
3253
  }
2854
- export type TLabelAppearance = {
3254
+ export type TFloatingLabelAppearance = {
2855
3255
  /**
2856
3256
  * Margin around the label and marker. This will affect label density
2857
3257
  */
@@ -2901,11 +3301,11 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
2901
3301
  };
2902
3302
  backgroundColor?: {
2903
3303
  /**
2904
- * Foreground color of the marker when it is active
3304
+ * Background color of the marker when it is active
2905
3305
  */
2906
3306
  active?: string;
2907
3307
  /**
2908
- * Foreground color of the marker when it is inactive (grayed out due to being outranked by other labels around)
3308
+ * Background color of the marker when it is inactive (grayed out due to being outranked by other labels around)
2909
3309
  */
2910
3310
  inactive?: string;
2911
3311
  };
@@ -2933,7 +3333,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
2933
3333
  };
2934
3334
  };
2935
3335
  };
2936
- export type TLabelOptions = {
3336
+ export type TFloatingLabelOptionsInternal = {
2937
3337
  position?: Vector3;
2938
3338
  polygon: MappedinPolygon;
2939
3339
  polygonHeight?: number;
@@ -2945,7 +3345,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
2945
3345
  /**
2946
3346
  * Customize the appearance of the Smart Label and its marker
2947
3347
  */
2948
- appearance?: TLabelAppearance;
3348
+ appearance?: TFloatingLabelAppearance;
2949
3349
  createDespiteImage?: boolean;
2950
3350
  };
2951
3351
  enum PINVISIBILITY {
@@ -2957,21 +3357,20 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
2957
3357
  CENTER = "center",
2958
3358
  RIGHT = "right"
2959
3359
  }
2960
- class Label extends BaseCollider implements ISmarterLabel {
2961
- #private;
3360
+ class FloatingLabel extends BaseCollider implements ISmarterLabel {
2962
3361
  lines: number;
2963
- setColor: (textForegroundColor: any, textBackgroundColor?: any) => void;
2964
3362
  contextConfigured: boolean;
2965
3363
  fillText: TDrawFn | undefined;
2966
3364
  newStyle: {};
2967
3365
  style: TStyle;
3366
+ setColor: () => void;
2968
3367
  clearColor: () => void;
2969
3368
  zoomProportion: number;
2970
3369
  _cache: {};
2971
3370
  _dirty: boolean;
2972
3371
  appearance: TAppearanceFilledIn;
2973
- mapView: MapView3DLegacy;
2974
- constructor(options: TLabelOptions, mapView: MapView3DLegacy);
3372
+ mapView: ICore;
3373
+ constructor(options: TFloatingLabelOptionsInternal, mapView: ICore);
2975
3374
  enable(): void;
2976
3375
  get strategies(): TColliderStrategy[];
2977
3376
  getCachedSymbol(orientation: any, textAlign: any, xCoordinate: any): any;
@@ -2983,22 +3382,22 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
2983
3382
  colliderDidNotFindAHome(): void;
2984
3383
  disable(): void;
2985
3384
  draw(context: CanvasRenderingContext2D): void;
2986
- static original: Label;
2987
- static clone(options: TLabelOptions, mapView: MapView3DLegacy): any;
3385
+ static original: FloatingLabel;
3386
+ static clone(options: TFloatingLabelOptionsInternal, mapView: ICore): any;
2988
3387
  }
2989
- export default Label;
3388
+ export default FloatingLabel;
2990
3389
  }
2991
3390
 
2992
3391
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core' {
2993
3392
  import FakeGeolocation from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/fake-geolocation';
2994
3393
  import { IStateMachine } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.StateMachine';
2995
- import { E_MARKER_STATE, E_BLUEDOT_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
3394
+ import { E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
2996
3395
  import { IPubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub';
2997
3396
  import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub';
2998
3397
  import { MappedinMap, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
2999
3398
  import { TGeolocationObject } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
3000
3399
  import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer';
3001
- import { MapView3DLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/MapView.legacy.interface';
3400
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
3002
3401
  export const DEFAULT_BLUE_DOT_COLOR = 2254591;
3003
3402
  export interface IPositionUpdater extends IPubSub {
3004
3403
  /**
@@ -3135,7 +3534,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3135
3534
  /**
3136
3535
  * Visiblity State of the BlueDot marker
3137
3536
  */
3138
- markerVisibility?: E_MARKER_STATE;
3537
+ markerVisibility?: E_BLUEDOT_MARKER_STATE;
3139
3538
  /**
3140
3539
  * Reason why BlueDot may be in the current state
3141
3540
  */
@@ -3148,7 +3547,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3148
3547
  type TBlueDotProps = {
3149
3548
  data: any;
3150
3549
  mapView: MapView;
3151
- core: MapView3DLegacy;
3550
+ core: ICore;
3152
3551
  };
3153
3552
  export type TLatLonProps = [number, number];
3154
3553
  const BlueDot: {
@@ -3160,6 +3559,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3160
3559
 
3161
3560
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip' {
3162
3561
  import './Mappedin.SmartTooltip.scss';
3562
+ import { COLLISION_RANKING_TIERS } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
3163
3563
  import HTMLCollider, { IHTMLCollider } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.HTMLCollider';
3164
3564
  import { Vector3 } from 'three';
3165
3565
  import { TColliderStrategy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
@@ -3195,7 +3595,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3195
3595
  selector?: string;
3196
3596
  map: string;
3197
3597
  padding?: number;
3198
- collisionRank?: number;
3598
+ collisionRank?: COLLISION_RANKING_TIERS;
3199
3599
  defaultAnchorType?: string;
3200
3600
  enabledAnchorTypes?: {
3201
3601
  [type: string]: boolean;
@@ -3235,7 +3635,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3235
3635
  declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot' {
3236
3636
  import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
3237
3637
  import { E_BLUEDOT_EVENT_PAYLOAD, E_BLUEDOT_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer';
3238
- import { MapView3DLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/MapView.legacy.interface';
3638
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
3239
3639
  import { TEnableBlueDotOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
3240
3640
  import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed';
3241
3641
  class BlueDotLayer extends PubSub<E_BLUEDOT_EVENT_PAYLOAD, E_BLUEDOT_EVENT> {
@@ -3243,7 +3643,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot
3243
3643
  /**
3244
3644
  * @private
3245
3645
  */
3246
- constructor(mapView: MapView, core: MapView3DLegacy);
3646
+ constructor(mapView: MapView, core: ICore);
3247
3647
  /**
3248
3648
  * Enables Blue Dot. BlueDot then emits {@link TBlueDotStateChange} and {@link TBlueDotPositionUpdate} events via {@link E_BLUEDOT_EVENT}
3249
3649
  */
@@ -3260,13 +3660,13 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/Journey
3260
3660
  import { MapView, TJourneyOptions } from '@mappedin/react-native-sdk/core/packages/renderer';
3261
3661
  import { MappedinDirections } from '@mappedin/react-native-sdk/core/packages/get-venue';
3262
3662
  import { Journey } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Journey';
3263
- import { MapView3DLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/MapView.legacy.interface';
3663
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
3264
3664
  class JourneyLayer {
3265
3665
  #private;
3266
3666
  /**
3267
3667
  * @private
3268
3668
  */
3269
- constructor(mapView: MapView, core: MapView3DLegacy);
3669
+ constructor(mapView: MapView, core: ICore);
3270
3670
  /**
3271
3671
  * Draw a Journey
3272
3672
  */
@@ -3283,51 +3683,120 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/Journey
3283
3683
  export default JourneyLayer;
3284
3684
  }
3285
3685
 
3286
- declare module '@mappedin/react-native-sdk/core/packages/navigator/NavigationGraph' {
3287
- import Edge from '@mappedin/react-native-sdk/core/packages/navigator/Edge';
3288
- import IMap from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/IMap';
3289
- import INode from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/INode';
3290
- import IVortex from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/IVortex';
3291
- export function getMapScale(map: IMap): number;
3292
- export function getAngle(origin: INode, destination: INode): number;
3293
- class NavigationGraph {
3294
- edges: {
3295
- [propName: string]: Edge[];
3296
- };
3297
- nodesById: {
3298
- [propName: string]: INode;
3299
- };
3300
- mapsById: {
3301
- [propName: string]: IMap;
3302
- };
3303
- constructor({ nodes, vortexes, maps, showVortexNames, }: {
3304
- nodes: INode[];
3305
- vortexes: IVortex[];
3306
- maps: IMap[];
3307
- showVortexNames?: boolean;
3308
- });
3309
- /**
3310
- * aStar takes one or more origin node ids, one or more destination node ids
3311
- * and returns an array of nodes that define the shortest path from an origin
3312
- * a destination.
3313
- *
3314
- * @param originIds array - of one or more node ids
3315
- * @param destinationNodeIds array - of onr or more node ids
3316
- * @param accessible boolean - optional, if true directions will only take accessible route, defaults to false
3317
- */
3318
- aStar(originIds: string[], destinationNodeIds: string[], accessible: boolean): Edge[];
3319
- getDistance(origin: INode, destination: INode): number;
3320
- getShortestEuclideanDistance(origin: INode, destinations: INode[]): number;
3686
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.LabelAtlas' {
3687
+ export namespace DEFAULT_LABEL_SIZING {
3688
+ const MARGIN: number;
3689
+ const HEIGHT_MARGIN: number;
3690
+ const SIZE: number;
3321
3691
  }
3322
- export default NavigationGraph;
3323
- }
3324
-
3325
- declare module '@mappedin/react-native-sdk/core/packages/navigator/Navigator' {
3326
- import Directive from '@mappedin/react-native-sdk/core/packages/navigator/Directive';
3327
- import Edge from '@mappedin/react-native-sdk/core/packages/navigator/Edge';
3328
- import ILocation from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/ILocation';
3329
- import IMap from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/IMap';
3330
- import INode from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/INode';
3692
+ export class Atlas {
3693
+ layers: any[];
3694
+ canvas: HTMLCanvasElement;
3695
+ context: CanvasRenderingContext2D | null;
3696
+ addLabel(map: any, lines: any, font: any, size: any, scope: any, pixelsPerScale: any): Label | undefined;
3697
+ removeLayer(layer: any): void;
3698
+ measure(text: any, font: any, size: any): TextMetrics;
3699
+ onWebGLContextRestored(): void;
3700
+ dispose(): void;
3701
+ }
3702
+ export class FlatLabel {
3703
+ constructor(options: any, venue: any, mapObject: any, DEFAULT_FONT: any, polygonMeshesById: any, textLabelsByPolygonId: any, mapView: any, scope: any, atlas: any);
3704
+ text: any;
3705
+ stateText: string;
3706
+ font: any;
3707
+ atlas: any;
3708
+ canvasBounds: any;
3709
+ mapScale: any;
3710
+ margin: number;
3711
+ heightMargin: number;
3712
+ scaleMin: any;
3713
+ scaleStep: any;
3714
+ multiline: any;
3715
+ height: number | null;
3716
+ polygonMeshesById: any;
3717
+ polyId: any;
3718
+ map: any;
3719
+ color: Color;
3720
+ baseColor: Color;
3721
+ hideOnCreate: boolean;
3722
+ hoverLabelText: any;
3723
+ fontSize: number;
3724
+ hoverLabelMode: any;
3725
+ hoverLabelClass: any;
3726
+ showHoverLabel: boolean;
3727
+ hoverIfLabelFails: boolean;
3728
+ textLabelsByPolygonId: any;
3729
+ create(): void;
3730
+ invalid: boolean | undefined;
3731
+ label: any;
3732
+ created: boolean | undefined;
3733
+ flipIfNeeded(cameraAngle: any): void;
3734
+ removeSelf(bulk: any): void;
3735
+ doNotCreate: boolean | undefined;
3736
+ setColor(textColor: any): void;
3737
+ clearColor(): void;
3738
+ hide(): void;
3739
+ show(): void;
3740
+ toString(): any;
3741
+ }
3742
+ class Label {
3743
+ x: number;
3744
+ y: number;
3745
+ width: number;
3746
+ height: number;
3747
+ layer: any;
3748
+ index: any;
3749
+ layout(map: any, origin: any, size: any, rotation: any, uv: any, color: any): void;
3750
+ }
3751
+ import { Color } from "three/src/math/Color";
3752
+ export {};
3753
+ }
3754
+
3755
+ declare module '@mappedin/react-native-sdk/core/packages/navigator/NavigationGraph' {
3756
+ import Edge from '@mappedin/react-native-sdk/core/packages/navigator/Edge';
3757
+ import IMap from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/IMap';
3758
+ import INode from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/INode';
3759
+ import IVortex from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/IVortex';
3760
+ export function getMapScale(map: IMap): number;
3761
+ export function getAngle(origin: INode, destination: INode): number;
3762
+ class NavigationGraph {
3763
+ edges: {
3764
+ [propName: string]: Edge[];
3765
+ };
3766
+ nodesById: {
3767
+ [propName: string]: INode;
3768
+ };
3769
+ mapsById: {
3770
+ [propName: string]: IMap;
3771
+ };
3772
+ constructor({ nodes, vortexes, maps, showVortexNames, }: {
3773
+ nodes: INode[];
3774
+ vortexes: IVortex[];
3775
+ maps: IMap[];
3776
+ showVortexNames?: boolean;
3777
+ });
3778
+ /**
3779
+ * aStar takes one or more origin node ids, one or more destination node ids
3780
+ * and returns an array of nodes that define the shortest path from an origin
3781
+ * a destination.
3782
+ *
3783
+ * @param originIds array - of one or more node ids
3784
+ * @param destinationNodeIds array - of onr or more node ids
3785
+ * @param accessible boolean - optional, if true directions will only take accessible route, defaults to false
3786
+ */
3787
+ aStar(originIds: string[], destinationNodeIds: string[], accessible: boolean): Edge[];
3788
+ getDistance(origin: INode, destination: INode): number;
3789
+ getShortestEuclideanDistance(origin: INode, destinations: INode[]): number;
3790
+ }
3791
+ export default NavigationGraph;
3792
+ }
3793
+
3794
+ declare module '@mappedin/react-native-sdk/core/packages/navigator/Navigator' {
3795
+ import Directive from '@mappedin/react-native-sdk/core/packages/navigator/Directive';
3796
+ import Edge from '@mappedin/react-native-sdk/core/packages/navigator/Edge';
3797
+ import ILocation from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/ILocation';
3798
+ import IMap from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/IMap';
3799
+ import INode from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/INode';
3331
3800
  import IVortex from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/IVortex';
3332
3801
  export enum E_MESSAGES {
3333
3802
  NO_VALID_PATH = "No Valid Path Available"
@@ -3436,302 +3905,191 @@ declare module '@mappedin/react-native-sdk/core/packages/navigator/Directive' {
3436
3905
  export default Directive;
3437
3906
  }
3438
3907
 
3439
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/MapView.legacy.interface' {
3440
- import { Mappedin, MappedinDirections, MappedinLocation, MappedinNode, MappedinMap, MappedinPolygon, MappedinCoordinate } from '@mappedin/react-native-sdk/core/packages/get-venue';
3441
- import CameraControls from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.CameraControls';
3442
- import { Vector2, Vector3 } from 'three';
3443
- import Tween, { Easing } from '@tweenjs/tween.js';
3444
- import Label from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Label';
3445
- import { AtlasTextLabel } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.LabelAtlas';
3446
- import SmartTooltip, { TOOLTIP_ANCHOR } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip';
3447
- import Tooltip from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip';
3448
- import Marker from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Marker';
3449
- import { changeListenerFn, TCreateMarkerOptions, TJourneyOptions, TLabelAllLocationLegacyLabelOptions, TLabelAllLocationLabelOptions, TLegacyLabelOptions, TMapViewOptions, TPadding, TLabelPolygonOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
3450
- import { STATE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
3451
- import { COLLISION_RANKING_TIERS } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
3452
- import { TPathOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
3453
- import RENDER from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.RenderTasks';
3454
- import { INTERNAL_EVENT_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
3455
- export type TFocusOptionsLegacy = {
3908
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed' {
3909
+ export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD> {
3456
3910
  /**
3457
- * An array of Nodes to focus in on
3911
+ * @private
3458
3912
  */
3459
- nodes?: MappedinNode[];
3913
+ _subscribers: any;
3460
3914
  /**
3461
- * An array of Polygons to focus on. It's the center of the bounds of all Polygons, designed to fit everything into view.
3915
+ * @private
3462
3916
  */
3463
- polygons?: MappedinPolygon[] | string[];
3917
+ publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
3918
+ on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
3919
+ data: null;
3920
+ } ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
3921
+ off<EVENT_NAME extends keyof EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]) => void): void;
3464
3922
  /**
3465
- * The duration the focus animation should last for.
3466
- * @defaultValue `100`
3923
+ * @private
3467
3924
  */
3468
- duration?: number;
3925
+ destroy(): void;
3926
+ }
3927
+ }
3928
+
3929
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.CameraControls' {
3930
+ export default CameraControls;
3931
+ /**
3932
+ * The advanced, manual camera controls for {{#crossLink "MapView"}}{{/crossLink}}. You probably don't need to use this at all, instead relying on the MapView's {{#crossLink "MapView/focusOn:method"}}{{/crossLink}}, {{#crossLink "MapView/resetCamera:method"}}{{/crossLink}} and built in touch/mouse controls.
3933
+ * This class will let you do things like change the min/max zoom, tilt, and pan, attach to camera events, and move/animate the camera to specifc points.
3934
+ *
3935
+ * The camera works by setting an anchor point on the scene at ground level and pointing the camera at it. {{#crossLink "CameraControls/zoom:method"}}{{/crossLink}} controls how far the camera is from the anchor, and {{#crossLink "CameraControls/tilt:method"}}{{/crossLink}}/{{#crossLink "CameraControls/rotate:method"}}{{/crossLink}} controls the angle the camera is rotated about it.
3936
+ * The camera will always be pointed directly at the anchor point. {{#crossLink "CameraControls/pan:method"}}{{/crossLink}} or {{#crossLink "CameraControls/setPosition:method"}}{{/crossLink}} will move that anchor around on the 2D ground plane.
3937
+ *
3938
+ * Created for you automatically with a MapView, don't re-create yourself.
3939
+ * @type {any}
3940
+ *
3941
+ * @class CameraControls
3942
+ */
3943
+ let CameraControls: any;
3944
+ }
3945
+
3946
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.RenderTasks' {
3947
+ export default RENDER;
3948
+ namespace RENDER {
3949
+ const ANIMATED: string;
3950
+ const ALWAYS_ON_TOP: string;
3951
+ const ALL: string;
3952
+ const TWEEN: string;
3953
+ }
3954
+ }
3955
+
3956
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
3957
+ import './internal/Mappedin.css';
3958
+ import { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
3959
+ import { E_SDK_EVENT_PAYLOAD, TCreateCustomInnerHTMLTooltipOptions, TCreateCustomTooltipOptions, TCreateMarkerOptions, TCreateTextTooltipOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TFloatingLabelPolygonOptions, TMapViewOptions, TPathOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
3960
+ import { E_SDK_EVENT, STATE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
3961
+ import FloatingLabel from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.FloatingLabel';
3962
+ import Marker from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Marker';
3963
+ import SmartTooltip from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip';
3964
+ import Camera from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
3965
+ import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed';
3966
+ import BlueDotLayer from '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot';
3967
+ import JourneyLayer from '@mappedin/react-native-sdk/core/packages/renderer/layers/Journey';
3968
+ import { ThreeJSMarkerHandle } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.MapObject';
3969
+ import { TCreateThreeDMarkerOptions, TFlatLabel, TFlatLabelPolygonOptions, TFloatingLabel } from '@mappedin/react-native-sdk/core/packages/renderer';
3970
+ export enum INTERNAL_EVENT {
3971
+ CAMERA_MOVING = 0,
3972
+ SET_BLUE_DOT_SIZE_FROM_ZOOM = 1,
3973
+ PUBLISH_BLUE_DOT = 2,
3974
+ SET_STATE_SILENT = 3,
3975
+ BLUE_DOT_UPDATE_POSITION = 4,
3976
+ BLUE_DOT_SET_FOLLOWING = 5,
3977
+ CLEAR_MOUSE = 6
3978
+ }
3979
+ export type INTERNAL_EVENT_PAYLOAD = {
3980
+ [INTERNAL_EVENT.CAMERA_MOVING]: any;
3981
+ [INTERNAL_EVENT.SET_BLUE_DOT_SIZE_FROM_ZOOM]: number;
3982
+ [INTERNAL_EVENT.PUBLISH_BLUE_DOT]: undefined;
3983
+ [INTERNAL_EVENT.CLEAR_MOUSE]: undefined;
3984
+ [INTERNAL_EVENT.SET_STATE_SILENT]: {
3985
+ state: STATE;
3986
+ };
3987
+ [INTERNAL_EVENT.BLUE_DOT_UPDATE_POSITION]: {
3988
+ x: number;
3989
+ y: number;
3990
+ };
3991
+ [INTERNAL_EVENT.BLUE_DOT_SET_FOLLOWING]: boolean;
3992
+ };
3993
+ export class MapView extends PubSub<E_SDK_EVENT_PAYLOAD, E_SDK_EVENT> {
3994
+ #private;
3995
+ currentPath?: MappedinNode[];
3996
+ BlueDot: BlueDotLayer;
3997
+ Journey: JourneyLayer;
3998
+ Camera: Camera;
3999
+ options: TMapViewOptions;
4000
+ constructor(container: HTMLElement, venue: Mappedin, options?: TMapViewOptions & {
4001
+ onFirstMapLoaded: () => void;
4002
+ });
3469
4003
  /**
3470
- * Whether to zoom the camera in or out, or just pan it.
3471
- * @defaultValue `true`
4004
+ * Label all Locations using 2D floating labels
3472
4005
  */
3473
- changeZoom?: boolean;
4006
+ labelAllLocations(options?: TLabelAllLocationFloatingLabelOptions): FloatingLabel[];
3474
4007
  /**
3475
- * The animation curve to use for zooming in. Uses the animateCamera one by default.
4008
+ * Labels all Locations, in order of distance from the center of the Map. See {@link MapView.labelPolygon} for available label options.
4009
+ * The options are all optional, as the text and Polygon properties will be set for each Location.
3476
4010
  */
3477
- curve?: typeof Easing;
4011
+ labelAllLocations(options?: TLabelAllLocationFlatLabelOptions): TFlatLabel[];
3478
4012
  /**
3479
- * Camera tilt between 0 (top-down) to 1 (from the side)
4013
+ * Labels a specific Polygon using a floating 2D label that remains the same size regardless of zoom
3480
4014
  */
3481
- tilt?: number;
4015
+ labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TFloatingLabelPolygonOptions): TFloatingLabel;
3482
4016
  /**
3483
- * Rotation in degrees
4017
+ * Labels a specific Polygon (or area of 3D space) with a TextLabel that lives in 3D space. That means it will be smaller when the camera is further away, and the angle you see it at will change with the camera.
4018
+ * The text will flip 180 degrees when the camera rotates so it's never totally upside-down.
4019
+ *
4020
+ * It also sets the hover label (in 2D and 3D).
4021
+ * Many of these options do nothing in 2D, as TextLabels are not supported, but it won't break anything.
4022
+ *
4023
+ * You must provide text, and either a Polygon, or a canvasBounds and height
3484
4024
  */
3485
- rotation?: number;
4025
+ labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TFlatLabelPolygonOptions): TFlatLabel;
3486
4026
  /**
3487
- * You can overide the {{#crossLink "MapView/focusZoomFactor:property"}}{{/crossLink}} for a specific {{#crossLink "MapView/focusOn:method"}}{{/crossLink}} call, rather than globally, if you like.
4027
+ * Get Nearest Node to a screen coordinate x, y, map. Useful for doing directions from any place on the map
4028
+ *
4029
+ * @param x
4030
+ * @param y
4031
+ * @param mapOrMapId Map of MapId
3488
4032
  */
3489
- focusZoomFactor?: number;
4033
+ getNearestNodeByScreenCoordinates(x: number, y: number, mapOrMapId?: MappedinMap | MappedinMap['id']): MappedinNode;
3490
4034
  /**
3491
- * Sets a floor for how close you can zoom in on the scene. If it's lower than mapView.controls.minZoom, it's ignored.
3492
- * @defaultValue: 0
4035
+ * Add a ThreeJS object to the screen to be rendered on the marker layer.
3493
4036
  */
3494
- minZoom?: number;
3495
- padding?: TPadding;
3496
- points?: any[];
3497
- };
3498
- export interface MapView3DLegacy {
3499
- new (container: HTMLElement, venue: Mappedin, options?: TMapViewOptions): MapView3DLegacy;
4037
+ createThreeJSMarker(options: TCreateThreeDMarkerOptions): ThreeJSMarkerHandle;
3500
4038
  /**
3501
- * @internal
4039
+ * Remove a ThreeJS marker from the scene. This will be a no-op if the
4040
+ * map object associated with the marker has been destroyed.
4041
+ *
4042
+ * @param markerHandle marker to remove
4043
+ * @return true if the marker was removed, false if the marker or its map had already been removed
3502
4044
  */
3503
- currentScale: number;
3504
- cachedPadding: any;
3505
- polygonMeshesById: any;
3506
- textLabelsByPolygonId: any;
3507
- renderer: any;
3508
- scene: any;
3509
- cameraParameters: Vector2;
3510
- resolution: Vector2;
3511
- determineNewLabelSize: any;
3512
- getNearestNodeByScreenCoordinates(x: number, y: number, map?: MappedinMap | MappedinMap['id']): MappedinNode | undefined;
3513
- on<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
3514
- off<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
3515
- publish<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, payload?: INTERNAL_EVENT_PAYLOAD[EVENT_NAME]): void;
3516
- /**
3517
- * Set MapView3D state
3518
- */
3519
- setState(state: STATE): void;
3520
- readonly state: STATE;
3521
- /**
3522
- * Create Journey using a set of Directions.
3523
- * Draws path, adds markers and ranks labels .Singleton
3524
- * @deprecated Use {@link IMapView3D.Journey.draw} instead
3525
- */
3526
- createJourney(directions: MappedinDirections, options: TJourneyOptions): void;
4045
+ removeThreeJSMarker(markerHandle: ThreeJSMarkerHandle): boolean;
3527
4046
  /**
3528
- * Clears Journey
3529
- * @deprecated Use {@link IMapView3D.Journey.clear} instead
4047
+ * Remove all ThreeJS marker from the scene.
3530
4048
  */
3531
- clearJourney(): void;
4049
+ removeAllThreeJSMarkers(): void;
3532
4050
  /**
3533
- * Manual camera controls for MapView. Generally you should be using the functions on MapView like {{#crossLink "MapView/focusOn:method"}}{{/crossLink}},
3534
- * but if you have some cool animations in mind, you can do it with the {{#crossLink "CameraControls"}}{{/crossLink}}.
3535
- * Some of the functions don't do anything in 2D.
3536
- *
4051
+ * Unsubscribe from SDK events
3537
4052
  */
3538
- controls?: typeof CameraControls;
3539
- /**
3540
- * These are the default colours used by the MapView to control things like path and selection. You can override these here
3541
- * to quickly style your app, but most of them can also be set (especially for special cases) in their respective functions.
3542
- * The only value that MUST be set here is `hover`.
3543
- *
3544
- * @property colors {Object}
3545
- * @property colors.hover {Integer} The color a polygon changes to on mouse over. Defaults to `0xcccccc`
3546
- * @property colors.select The color used when you call setPolygonColor with no color parameter. Defaults to `0x4ca1fc`
3547
- * @property colors.text The color used for TextLabels, if you don't specify it in labelAllLocations/labelPolygons. Defaults to `0x000000`
3548
- * @property colors.path The color used for the path in drawPath/drawPathSegment if you don't specify it there. Defaults to `0xff834c`
3549
- * @property colors.pathPulse The color of the animated path pulse if not specified in drawPath/drawPathSegment. Defaults to `0xffffff`
3550
- * @property colors.textSelect The color a TextLabel is set to when you call setPolygonColor, if you don't specify it there. Defaults to `0xffffff`
3551
- */
3552
- colors: {
3553
- defaultHover2D?: number;
3554
- select?: number;
3555
- text?: number;
3556
- path?: number;
3557
- pathPulse?: number;
3558
- textSelect?: number;
3559
- };
4053
+ setState(state: STATE): void;
4054
+ get state(): STATE;
3560
4055
  /**
3561
4056
  * The Venue data this MapView is using.
3562
4057
  *
3563
4058
  * @property venue {MappedinVenue}
3564
4059
  * @final
3565
4060
  */
3566
- readonly venue: Mappedin;
4061
+ get venue(): Mappedin;
3567
4062
  /**
3568
4063
  * The div MapView is using.
3569
4064
  *
3570
4065
  * @property container {Div}
3571
4066
  * @final
3572
4067
  */
3573
- readonly container: HTMLElement;
4068
+ get container(): HTMLElement;
3574
4069
  /**
3575
- * The ID of the Map currently being displayed.
3576
- *
4070
+ * The current map being displayed
3577
4071
  */
3578
- readonly currentMap: string;
4072
+ get currentMap(): MappedinMap;
3579
4073
  /**
3580
4074
  * Remove all interactive polygons
3581
4075
  */
3582
4076
  removeAllInteractivePolygons(): void;
3583
- /**
3584
- * Change this factor to influence how much the camera zooms in on a {@link IMapView3D.focusOn} call.
3585
- *
3586
- * @property focusZoomFactor {Integer}
3587
- * @default 3
3588
- */
3589
- focusZoomFactor: number;
3590
4077
  /**
3591
4078
  * Change the currently displayed Map to a new one.
3592
4079
  *
3593
4080
  * @method setMap
3594
4081
  * @param mapOrMapId The Map ID or Map Object to change the Map to.
3595
- * @param callback Legacy - use promise instead
3596
- */
3597
- setMap(mapOrMapId: MappedinMap | string, cb?: () => void): Promise<null>;
3598
- /**
3599
- * Adds a Map
3600
- * @method addMap
3601
- * @param map {MappedinMap} Map to add
3602
- */
3603
- addMap(map: MappedinMap): void;
3604
- /**
3605
- * Removes a Map
3606
- *
3607
- * @method removeMap
3608
- * @param mapOrMapId map to remove
3609
- */
3610
- removeMap(mapOrMapId: MappedinMap | string): void;
3611
- /**
3612
- * Moves the camera to focus in on a specific Polygon
3613
- */
3614
- focusOnPolygon(props: {
3615
- /**
3616
- * The Polygon or Polygon ID to focus on. The camera will move to the centroid of Polygon.
3617
- */
3618
- polygonOrPolygonId: MappedinPolygon | string;
3619
- /**
3620
- * Whether to zoom the camera in or out so it fits the Polygon's bounds. Scaled by {@link IMapView3D.focusZoomFactor}.
3621
- * @default false
3622
- */
3623
- changeZoom?: boolean;
3624
- /**
3625
- * The time the camera should spend moving, in milliseconds.
3626
- * @default 100
3627
- */
3628
- duration?: number;
3629
- /**
3630
- * The animation curve to use.
3631
- * @default Easing.Quadratic.In
3632
- */
3633
- curve?: typeof Easing;
3634
- }): Tween;
3635
- /**
3636
- * Moves the camera to focus on an entire path and optionally it's starting and ending Polygon.
3637
- */
3638
- focusOnPath(props: {
3639
- /**
3640
- * The Nodes to fit the camera to.
3641
- */
3642
- path?: MappedinNode[];
3643
- /**
3644
- * The Polygon or Polygon ID to focus on. The camera will move to the centroid of Polygon.
3645
- */
3646
- polygonsOrPolygonIds?: MappedinPolygon[] | string[];
3647
- /**
3648
- * Whether to zoom the camera in or out so it fits the Polygon's bounds. Scaled by {@link IMapView3D.focusZoomFactor}.
3649
- * @default false
3650
- */
3651
- changeZoom?: boolean;
3652
- /**
3653
- * The time the camera should spend moving, in milliseconds.
3654
- * @default 100
3655
- */
3656
- duration?: number;
3657
- /**
3658
- * The animation curve to use.
3659
- * @default Easing.Quadratic.In
3660
- */
3661
- curve?: typeof Easing;
3662
- }): Tween;
3663
- /**
3664
- * A flexible function that will let you focus on collections of Nodes and/or Polygons.
3665
- * This will move the camera to the center of all items passed in, and by default.
3666
- * zoom the camera in or out to fit everything in view, scaled by {@link IMapView3D.focusZoomFactor}.
3667
- */
3668
- focusOn(options: TFocusOptionsLegacy): Tween;
3669
- /**
3670
- * Zoom out to show the entire Map.
3671
- */
3672
- showEntireMap(options: TFocusOptionsLegacy): Promise<typeof Tween>;
3673
- /**
3674
- * Set the padding to be used in future zoom calls.
3675
- */
3676
- setPadding(padding: TPadding): void;
3677
- /**
3678
- * Returns the value you should call {@link CameraControls.setZoom} on to fit the Polygon exactly.
3679
- *
3680
- * @return The zoom level that will fit the Polygon
3681
- */
3682
- getZoomLevelForPolygon(props: {
3683
- /**
3684
- * The Polygon or Polygon ID to get the zoom level for
3685
- */
3686
- polygonOrPolygonId: MappedinPolygon | string;
3687
- }): number;
3688
- /**
3689
- * Returns the value you should call {@link CameraControls.setZoom} on to fit the {@link IMapView3D.currentMap} exactly.
3690
- *
3691
- * @return The zoom level that will fit the {@link IMapView3D.currentMap}.
3692
- */
3693
- getZoomLevelForCurrentMap(): number;
3694
- /**
3695
- * Resets the pan, tilt and rotation of the camera and sets the zoom to fit the {@link IMapView3D.currentMap}.
3696
- *
3697
- * @param [forceOrigin=false] {Boolean} Flag to forcibly reset the camera to origin (0, 0) instead of the centre of the map's bounding box.
3698
- */
3699
- resetCamera(forceOrigin?: boolean): void;
3700
- /**
3701
- * Returns the angle that points to north, in radians, from the default orientation.
3702
- *
3703
- * @return The angle to north from the default orientation, in radians.
3704
- */
3705
- getNorth(): number;
3706
- /**
3707
- * Takes an element on the DOM and rotates it such that the top is pointing north. It will rotate with the camera, staying locked
3708
- * on north. If you would like to align it do a different direction, or a different side of the element, pass in an offset. This
3709
- * is how you would do a compass rose.
3710
- *
3711
- * This will modify your element's transform.
3712
- *
3713
- * @param element The element on the page to rotate.
3714
- * @param offset The amount to offset the rotation by, in radians.
3715
- *
3716
- */
3717
- lockNorth(element: HTMLElement, offset?: number): void;
3718
- /**
3719
- * Stops the MapView from trying to rotate your element with the camera. Do this if you remove the element, or want to stop it from rotating.
3720
- * @param element The node to stop rotating. It won't reset the transform, just leave it as is.
3721
4082
  */
3722
- unlockNorth(element: HTMLElement): void;
4083
+ setMap(mapOrMapId: MappedinMap | string): Promise<null>;
3723
4084
  /**
3724
4085
  * Given a polygon/polygon id, set it to a specific color, and set any text label associated with that polygon to another color.
3725
4086
  *
3726
4087
  * @param polygonOrPolygonId The Polygon/Polygon ID to change the color of.
3727
- * @param [color=IMapView3D.colors.select] The color to use.
3728
- * @param [textColor=IMapView3D.colors.textSelect]
4088
+ * @param color The color to use.
4089
+ * @param textColor
4090
+ * @param opacity
3729
4091
  */
3730
4092
  setPolygonColor(polygonOrPolygonId: MappedinPolygon | string, color: string, textColor?: string, opacity?: number): void;
3731
- currentInteractionEvent: string;
3732
- interactivePolygons: any;
3733
- highlightedPolygons: any;
3734
- cameraPlane: any;
3735
4093
  /**
3736
4094
  * Resets a Polygon back to it's original color.
3737
4095
  * If the user is hovering over a polygon, it will still have the hover effect.
@@ -3740,7 +4098,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/MapVi
3740
4098
  */
3741
4099
  clearPolygonColor(polygonOrPolygonId: MappedinPolygon | string): void;
3742
4100
  /**
3743
- * Resets ALL Polygons you have changed with {@link IMapView3D.setPolygonColor} back to their original color.
4101
+ * Resets ALL Polygons you have changed with {@link MapView.setPolygonColor} back to their original color.
3744
4102
  * The hover effect will still be present if the user is currently hovering over a Polygon.
3745
4103
  */
3746
4104
  clearAllPolygonColors(): void;
@@ -3751,7 +4109,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/MapVi
3751
4109
  addInteractivePolygon(polygonOrPolygonId: MappedinPolygon | string): void;
3752
4110
  /**
3753
4111
  * Makes all polygons attached to a location hoverable/clickable. Polygons you haven't called this on will be treated as non-interactive
3754
- * This is a convenience function for calling {@link IMapView3D.addInteractivePolygon} on all the polygons attached to all locations. You may also make individual polygons interactive with the addInteractivePolygon method instead of, or in addition to this method.
4112
+ * This is a convenience function for calling {@link MapView.addInteractivePolygon} on all the polygons attached to all locations. You may also make individual polygons interactive with the addInteractivePolygon method instead of, or in addition to this method.
3755
4113
  *
3756
4114
  */
3757
4115
  addInteractivePolygonsForAllLocations(options?: {
@@ -3770,85 +4128,40 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/MapVi
3770
4128
  * @param polygonOrPolygonId The previously interactive Polygon/Polygon ID to make non-interactive.
3771
4129
  */
3772
4130
  removeInteractivePolygon(polygonOrPolygonId: MappedinPolygon | string): void;
3773
- /**
3774
- * This is called when an interactive Polygon is clicked on.
3775
- * You will almost certainly want to replace this with your own function in your client app.
3776
- * Return "false" if you have consumed the event and it shouldn't bubble down to other Polygons beneath this one.
3777
- *
3778
- * @param polygonId polygonId passed in when tapping an interactive polygon
3779
- */
3780
- onPolygonClicked(polygonId: string): boolean | void;
3781
- onMapChanged(map: string): void;
3782
- /**
3783
- * This is fired when the user taps/clicks on the MapView without hitting an interactive Polygon.
3784
- * You will almost certainly want to replace this with your own function in your client app.
3785
- * You would probably use this to clear any Polygon highlighting, in certain situations.
3786
- */
3787
- onNothingClicked(): void;
3788
4131
  /**
3789
4132
  * Attach any HTML to a {@link MappedinNode}, and have the marker interact and collide with smart labels and tooltips
3790
- * @beta
3791
4133
  */
3792
- createMarker(node: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): Marker;
4134
+ createMarker(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): Marker;
3793
4135
  /**
3794
- *
4136
+ * Remove Marker
3795
4137
  */
3796
- removeMarker(marker: Marker | Marker['id']): void;
4138
+ removeMarker(markerOrMarkerId: Marker | Marker['id']): void;
3797
4139
  /**
3798
4140
  * Removes all Markers (from all Maps, not just the current one).
3799
4141
  *
3800
- * @method removeAllMarkers
3801
4142
  */
3802
4143
  removeAllMarkers(): void;
3803
4144
  /**
3804
- * Takes an x/y pair in Mappedin coordinate space and gives you an object suitable to use as a Marker's position.
3805
- * **Be careful about using this:** The coordinate system could change arbitrarily and without notice. You are better off
3806
- * using a specific Node or Polygon as an anchor. If you need to use this for some reason, talk to your Mappedin representative.
3807
- *
3808
- * @private
3809
- * @param mappedInCoordinate A coordinate in Mappedin 2D space.
3810
- * @return The position to anchor a Marker in 3D space.
3811
- */
3812
- convertTo3DMapPosition(mappedInCoordinate: {
3813
- x: number;
3814
- y: number;
3815
- }): Vector3;
3816
- /**
3817
- * Gives you the top center of a Polygon in 3d scene space. Suitable for use as a {@link Marker}'s position.
3818
- *
3819
- * @param polygonOrPolygonId Either the Polygon or Polygon ID you want the center of.
3820
- * @return The position to anchor a Marker in 3D space.
3821
- */
3822
- getPositionPolygon(polygonOrPolygonId: MappedinPolygon | string): Vector3;
3823
- /**
3824
- * Gets a position (to anchor a {{#crossLink "Marker"}}{{/crossLink}} usually) from a latitude and longitude.
3825
- *
3826
- * @method getPositionLatLon
3827
- * @param latitude Latitude of position
3828
- * @param longitude Longitude of position
3829
- * @returns A position you can use with a Marker either initially or to update later when the user (for example) moves
3830
- */
3831
- getPositionLatLon(latitude: number, longitude: number, map?: MappedinMap | string): Vector3;
3832
- /**
3833
- * Gives you the position of a Mappedin node in the 3D scene. Suitable for use as a {@link Marker}'s position.
3834
- *
3835
- * @param nodeOrNodeId Either the Node or Node ID you want the center of.
3836
- * @return The position to anchor a marker in 3D space.
4145
+ * Remove all tooltips
3837
4146
  */
3838
- getPositionNode(nodeOrNodeId: MappedinNode | string): Vector3;
4147
+ removeAllTooltips(): void;
3839
4148
  /**
3840
4149
  * A polygon can have state that renders the concept of being "closed", which is a generic blanket
3841
4150
  * term that can be used in general to inform the user that they can expect this polygon to not be
3842
4151
  * servicing customers.
3843
- *
3844
- * @param options {Object}
3845
- * @param options.polygon The polygon or polygon id whose state is being updated.
3846
- * @param options.closed If true, the polygon will be marked as being closed. If false, the polygon will be marked as being open.
3847
- * @param options.open If true, a convenience parameter that is the converse of `options.closed`. Note that if both are present, `closed` will receive higher precedence.
3848
4152
  */
3849
4153
  updateClosedStateForPolygon(options: {
4154
+ /**
4155
+ * The polygon or polygon id whose state is being updated.
4156
+ */
3850
4157
  polygon: MappedinPolygon | string;
4158
+ /**
4159
+ * If true, the polygon will be marked as being closed. If false, the polygon will be marked as being open.
4160
+ */
3851
4161
  closed: boolean;
4162
+ /**
4163
+ * If true, a convenience parameter that is the converse of `options.closed`. Note that if both are present, `closed` will receive higher precedence.
4164
+ */
3852
4165
  open?: boolean;
3853
4166
  }): void;
3854
4167
  /**
@@ -3856,29 +4169,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/MapVi
3856
4169
  *
3857
4170
  */
3858
4171
  openAllPolygons(): void;
3859
- /**
3860
- * Labels a specific Polygon (or area of 3D space) with a TextLabel that lives in 3D space. That means it will be smaller when the camera is further away, and the angle you see it at will change with the camera.
3861
- * The text will flip 180 degrees when the camera rotates so it's never totally upside-down.
3862
- *
3863
- * It also sets the hover label (in 2D and 3D).
3864
- * Many of these options do nothing in 2D, as TextLabels are not supported, but it won't break anything.
3865
- *
3866
- * You must provide text, and either a Polygon, or a canvasBounds and height
3867
- * */
3868
- labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TLegacyLabelOptions): AtlasTextLabel;
3869
- /**
3870
- * Labels a specific Polygon using a floating 2D label that remains the same size regardless of zoom
3871
- */
3872
- labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TLabelPolygonOptions): Label;
3873
- /**
3874
- * Labels all Locations, in order of distance from the center of the Map. See {{#crossLink "MapView/labelPolygon:method"}}{{/crossLink}} for available label options.
3875
- * The options are all optional, as the text and Polygon properties will be set for each Location.
3876
- */
3877
- labelAllLocations(options?: TLabelAllLocationLegacyLabelOptions): AtlasTextLabel[];
3878
- /**
3879
- * Label all Locations using 2D floating labels
3880
- */
3881
- labelAllLocations(options?: TLabelAllLocationLabelOptions): Label[];
3882
4172
  /**
3883
4173
  * Removes all labels from all Maps.
3884
4174
  *
@@ -3897,54 +4187,17 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/MapVi
3897
4187
  *
3898
4188
  * @return The Tooltip you created, which has already been added to the scene.
3899
4189
  */
3900
- createTooltip(node: MappedinNode | MappedinCoordinate, options: {
3901
- /**
3902
- * Pass in custom html for your marker, if using this method you must also pass in a selector for your content.
3903
- */
3904
- html?: string;
3905
- /**
3906
- * Used in conjuction with the html property to select the div for repositioning
3907
- */
3908
- selector?: string;
3909
- /**
3910
- * Use mappedin's default tooltip styling with custom inner html content
3911
- */
3912
- contentHtml?: string;
3913
- /**
3914
- * Instead of passing html pass in plain text to be displayed in the tooltip
3915
- */
3916
- text?: string;
3917
- /**
3918
- * should be something you got from {@link IMapView3D.getPositionPolygon} or {@link IMapView3D.getPositionNode}.
3919
- */
3920
- position: Vector3;
3921
- /**
3922
- * The map ID where the tooltip should be displayed
3923
- */
3924
- map: string;
3925
- /**
3926
- * The distance in pixel to offset the tooltip from the anchor point.
3927
- */
3928
- padding?: number;
3929
- /**
3930
- * An object used to disable certain anchor positions from being used.
3931
- */
3932
- enabledAnchorTypes?: TOOLTIP_ANCHOR;
3933
- /**
3934
- * Default (starting) anchor for tooltips
3935
- */
3936
- defaultAnchorType?: keyof TOOLTIP_ANCHOR;
3937
- /**
3938
- * The rank of the object used when comparing colliders to determine which should be shown.
3939
- */
3940
- collisionRank?: COLLISION_RANKING_TIERS;
3941
- }): Tooltip;
4190
+ createTooltip(
4191
+ /**
4192
+ * Node or Coordinate to attach the tooltip to
4193
+ */
4194
+ node: MappedinNode | MappedinCoordinate, options: TCreateTextTooltipOptions | TCreateCustomInnerHTMLTooltipOptions | TCreateCustomTooltipOptions): SmartTooltip;
3942
4195
  /**
3943
4196
  * Removes a {@link Tooltip} you have added previously.
3944
4197
  *
3945
- * @param tooltip {Tooltip} A Tooltip that has previously been returned from {@link IMapView3D.createTooltip}.
4198
+ * @param tooltipOrTooltipId A Tooltip that has previously been returned from {@link MapView.createTooltip}.
3946
4199
  */
3947
- removeTooltip(tooltip: SmartTooltip | SmartTooltip['id']): void;
4200
+ removeTooltip(tooltipOrTooltipId: SmartTooltip | SmartTooltip['id']): void;
3948
4201
  /**
3949
4202
  * Let any image attached to a Polygon attached to a Location flip 180 degrees with the camera so it's always upright.
3950
4203
  *
@@ -3959,7 +4212,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/MapVi
3959
4212
  */
3960
4213
  excludeTypes?: string[];
3961
4214
  /**
3962
- * An array of Location objects, or Location IDs. If excludeTypes is not sufficient you can explicitly set the Locations you are marking to flip. You can also call {@link IMapView3D.enableImageFlippingForPolygon} manually for every polygon you care about instead.
4215
+ * An array of Location objects, or Location IDs. If excludeTypes is not sufficient you can explicitly set the Locations you are marking to flip. You can also call {@link MapView.enableImageFlippingForPolygon} manually for every polygon you care about instead.
3963
4216
  */
3964
4217
  locations?: MappedinLocation[] | string[];
3965
4218
  }): void;
@@ -3977,68 +4230,41 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/MapVi
3977
4230
  */
3978
4231
  rotation?: number;
3979
4232
  }): void;
3980
- /**
3981
- * Create a font for use in 3D by passing in a JSON object generated from https://gero3.github.io/facetype.js/
3982
- * Ignored in 2D, retuning null
3983
- *
3984
- * @deprecated Use static method {@link IMapView3D.createFont} instead
3985
- * @param facetypeJson Convert a font into JSON with Facetype.js, and put it in here.
3986
- * @return {Font} Returns the ThreeJS Font object created with the JSON, or null in 2D
3987
- */
3988
- createFont(facetypeJson: unknown): unknown;
3989
- /**
3990
- * Calculates the length of the connected path in list of Nodes. Breaks in the path (to go to other floors) count as 0 distance. The Z value is also ignored.
3991
- *
3992
- * @param path An array of Nodes on a path, probably from a Node's {{#crossLink "MappedinNode/directionsTo:method"}}{{/crossLink}} call.
3993
- * @return The 2D length of the path
3994
- */
3995
- getPathLength(path: MappedinNode[]): number;
4233
+ disableImageFlippingForAllPolygons(): void;
3996
4234
  /**
3997
4235
  * Draws an entire path. It takes a list of Nodes and will break them into separate pathSegments on every map change, putting the resultant segment on the right Map.
3998
4236
  *
3999
- * If you have a special use case (like off graph nodes, or Venues with same Vortexes) use the {{#crossLink "MapView/drawPathSegment:method"}}{{/crossLink}} function.
4000
- *
4001
- * Returns an array of pathSegments if you want to customize the animation triggers. The pathSegements are added to the scene, chained together, and start animating automatically.
4002
- *
4003
4237
  * @param path An array of Nodes, probably from a Node's {@link MappedinNode.directionsTo} call.
4004
- * @param A list of style options for the path. Not everything is supported in 2D. See drawPath for available options. Note that drawDuration is per segment.
4005
- * @return An array of pathSegments.
4238
+ * @return An array of pathSegment ids.
4006
4239
  */
4007
4240
  drawPath(path: MappedinNode[], options?: TPathOptions): string;
4241
+ /**
4242
+ * Remove a path by id
4243
+ */
4008
4244
  removePath(pathId: string): void;
4009
- smartCollisionEngine: any;
4010
- mapObjects: any;
4011
4245
  /**
4012
4246
  * Removes all pathSegments from all Maps.
4013
4247
  *
4014
4248
  */
4015
4249
  removeAllPaths(): void;
4016
- /**
4017
- * Remove all tooltips
4018
- */
4019
- removeAllTooltips(): void;
4020
4250
  /**
4021
4251
  * Sets the clear color of the Map something else, it you want it to fit it more with your website. Otherwise the div will be white where there is no Map visible.
4022
4252
  *
4023
4253
  * @param color The color to use. Not an HTML color name.
4024
- * @param [alpha=1] Opacity between 0 and 1.
4254
+ * @param alpha Opacity between 0 and 1.
4025
4255
  */
4026
4256
  setBackgroundColor(color: number | string, alpha?: number): void;
4257
+ /**
4258
+ * Sets the color for hovering over polygons
4259
+ */
4260
+ setHoverColor(color: number | string): void;
4027
4261
  /**
4028
4262
  * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about,
4029
4263
  * but if you are doing something weird, or have your own special tween for something, you will want to call this function.
4030
4264
  * You can call it as often as you want, it just sets a flag that we need to render again, and renders a few frames if we weren't already doing that.
4031
4265
  * Ignored in 2D.
4032
4266
  */
4033
- tryRendering(renderMode?: typeof RENDER): void;
4034
- cameraObject: any;
4035
- mapManager: any;
4036
- canvasWidth: number;
4037
- canvasHeight: number;
4038
- /**
4039
- * Resets the MapView to the default state.
4040
- */
4041
- resetState(): void;
4267
+ tryRendering(renderMode?: any): void;
4042
4268
  /**
4043
4269
  * Finds the main Location associated with a Polygon. This means a Location
4044
4270
  * attached to the Polygon that has no parents, or, if there are none of those,
@@ -4047,32 +4273,61 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/MapVi
4047
4273
  * This means if there are multiple hierarchies of Locations attached to the Polygon,
4048
4274
  * the one that gets returned is not guaranteed to be what you want.
4049
4275
  *
4050
- * @param polygon {MappedinPolygon} The Polygon you want the primary Location of.
4276
+ * @param polygon The Polygon you want the primary Location of.
4051
4277
  */
4052
4278
  getPrimaryLocationForPolygon(polygon: MappedinPolygon): MappedinLocation;
4279
+ /**
4280
+ * Destroy instance and clean up memory
4281
+ */
4053
4282
  destroy(): void;
4054
4283
  }
4055
4284
  }
4056
4285
 
4057
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed' {
4058
- export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD> {
4059
- /**
4060
- * @private
4061
- */
4062
- _subscribers: any;
4063
- /**
4064
- * @private
4065
- */
4066
- publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
4067
- on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
4068
- data: null;
4069
- } ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
4070
- off<EVENT_NAME extends keyof EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]) => void): void;
4071
- /**
4072
- * @private
4073
- */
4074
- destroy(): void;
4075
- }
4286
+ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4287
+ import Search from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Search';
4288
+ import Analytics from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Analytics';
4289
+ import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
4290
+ import { getVenue, getVenueBundle, Mappedin, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
4291
+ import { PositionUpdater } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
4292
+ import type { TMapViewOptions, TJourneyOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4293
+ import { labelThemes } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4294
+ import { MARKER_ANCHOR } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Marker';
4295
+ export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator';
4296
+ export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator';
4297
+ export type TMappedinInitializeOutput = {
4298
+ mapView: MapView;
4299
+ venue: Mappedin;
4300
+ };
4301
+ type _TGetVenueOptions = TGetVenueOptions & {
4302
+ useVenueBundle?: false | undefined;
4303
+ };
4304
+ type _TGetVenueBundleOptions = TGetVenueBundleOptions & {
4305
+ useVenueBundle: true;
4306
+ };
4307
+ type TMappedinInitializeOptions = {
4308
+ mapView?: TMapViewOptions;
4309
+ venue: _TGetVenueOptions | _TGetVenueBundleOptions;
4310
+ firstMapSelector?: (venue: Mappedin) => MappedinMap | MappedinMap['id'];
4311
+ };
4312
+ /**
4313
+ *
4314
+ * @param el HTML Element where the mapView should be placed
4315
+ * @param venue Venue Object returned by {@link getVenue}
4316
+ * @param options MapView Options
4317
+ * @returns
4318
+ */
4319
+ function showVenue<T extends Mappedin>(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise<MapView>;
4320
+ export { COLLISION_RANKING_TIERS, STATE, E_SDK_EVENT, E_BLUEDOT_STATE_REASON, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_EVENT, E_BLUEDOT_STATE, E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
4321
+ export { Search, getVenue, getVenueBundle, showVenue, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
4322
+ export type { TMappedinDirective } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinDirections';
4323
+ export type { TMapViewOptions, TMappedinInitializeOptions, TJourneyOptions };
4324
+ export type { TBlueDotPositionUpdate, TBlueDotStateChange, TEnableBlueDotOptions } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
4325
+ export * from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4326
+ export type { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
4327
+ export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions, default as Camera } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
4328
+ export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
4329
+ export type { TGetVenueOptions, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
4330
+ export { Mappedin, MappedinDirections } from '@mappedin/react-native-sdk/core/packages/get-venue';
4076
4331
  }
4077
4332
 
4078
4333
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocationRankings' {
@@ -4125,7 +4380,6 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinTheme
4125
4380
  }
4126
4381
 
4127
4382
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider' {
4128
- import './Mappedin.Label.scss';
4129
4383
  import { ISmartCollisionEngine } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollisionEngine';
4130
4384
  import { Vector3 } from 'three';
4131
4385
  export type TRange = [number, number, number, number];
@@ -4260,7 +4514,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4260
4514
 
4261
4515
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.StateMachine' {
4262
4516
  import { IPubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub';
4263
- import { E_BLUEDOT_STATE, E_MARKER_STATE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
4517
+ import { E_BLUEDOT_STATE, E_BLUEDOT_MARKER_STATE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
4264
4518
  /**
4265
4519
  What we just learned about the user's position.
4266
4520
  */
@@ -4274,7 +4528,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4274
4528
  }
4275
4529
  export interface IStateMachine extends IPubSub {
4276
4530
  state: E_BLUEDOT_STATE;
4277
- markerState: E_MARKER_STATE | undefined;
4531
+ markerState: E_BLUEDOT_MARKER_STATE | undefined;
4278
4532
  transition: (action: ACTION) => void;
4279
4533
  reset: () => void;
4280
4534
  }
@@ -4302,419 +4556,41 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-s
4302
4556
  };
4303
4557
  }
4304
4558
  export class PubSub {
4305
- _subscribers: any;
4306
- publish(eventName: any, data: any): void;
4307
- on(eventName: any, fn: any): void;
4308
- off(eventName: any, fn: any): void;
4309
- destroy(): void;
4310
- }
4311
- export const PubSubLegacy: () => void;
4312
- export function tinyObservable<T>(store: T): T & IPubSub;
4313
- export {};
4314
- }
4315
-
4316
- declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4317
- import Search from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Search';
4318
- import Analytics from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Analytics';
4319
- import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
4320
- import { getVenue, Mappedin, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
4321
- import { PositionUpdater } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
4322
- import type { TMapViewOptions, TJourneyOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4323
- import { labelThemes } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4324
- import { MARKER_ANCHOR } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Marker';
4325
- export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator';
4326
- export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator';
4327
- export type TMappedinInitializeOutput = {
4328
- mapView: MapView;
4329
- venue: Mappedin;
4330
- };
4331
- type _TGetVenueOptions = TGetVenueOptions & {
4332
- useVenueBundle?: false | undefined;
4333
- };
4334
- type _TGetVenueBundleOptions = TGetVenueBundleOptions & {
4335
- useVenueBundle: true;
4336
- };
4337
- type TMappedinInitializeOptions = {
4338
- mapView?: TMapViewOptions;
4339
- venue: _TGetVenueOptions | _TGetVenueBundleOptions;
4340
- firstMapSelector?: (venue: Mappedin) => MappedinMap | MappedinMap['id'];
4341
- };
4342
- /**
4343
- *
4344
- * @param el HTML Element where the mapView should be placed
4345
- * @param venue Venue Object returned by {@link getVenue}
4346
- * @param options MapView Options
4347
- * @returns
4348
- */
4349
- function showVenue<T extends Mappedin>(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise<MapView>;
4350
- export { COLLISION_RANKING_TIERS, STATE, E_SDK_EVENT, E_BLUEDOT_STATE_REASON, E_MARKER_STATE, E_BLUEDOT_EVENT, E_BLUEDOT_STATE, E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
4351
- export { Search, getVenue, showVenue, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
4352
- export type { TMappedinDirective } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinDirections';
4353
- export type { TMapViewOptions, TMappedinInitializeOptions, TJourneyOptions };
4354
- export type { TBlueDotPositionUpdate, TBlueDotStateChange, TEnableBlueDotOptions } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
4355
- export * from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4356
- export type { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
4357
- export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions, default as Camera } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
4358
- export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
4359
- export type { TGetVenueOptions, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
4360
- export { Mappedin, MappedinDirections } from '@mappedin/react-native-sdk/core/packages/get-venue';
4361
- }
4362
-
4363
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.HTMLCollider' {
4364
- import './Mappedin.Label.scss';
4365
- import BaseCollider, { ICollider } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
4366
- export type TRange = [number, number, number, number];
4367
- export type TDimensions = {
4368
- width: number;
4369
- height: number;
4370
- };
4371
- export interface IHTMLCollider extends ICollider {
4372
- containerEl: any;
4373
- contentEl: any;
4374
- }
4375
- class HTMLCollider extends BaseCollider {
4376
- contentEl: any;
4377
- containerEl: any;
4378
- removeSelf(): void;
4379
- enable(): void;
4380
- disable(): void;
4381
- colliderDidGoOffscreen(): void;
4382
- colliderDidNotFindAHome(): void;
4383
- colliderDidUpdatePosition(x: any, y: any): void;
4384
- colliderDidMount(): void;
4385
- colliderDidUpdateVisiblity(): void;
4386
- }
4387
- export default HTMLCollider;
4388
- }
4389
-
4390
- declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
4391
- import { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
4392
- import { AtlasTextLabel } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.LabelAtlas';
4393
- import { E_SDK_EVENT_PAYLOAD, TCreateCustomInnerHTMLTooltipOptions, TCreateCustomTooltipOptions, TCreateMarkerOptions, TCreateTextTooltipOptions, TLabelAllLocationLegacyLabelOptions, TLabelAllLocationLabelOptions, TLegacyLabelOptions, TLabelPolygonOptions, TMapViewOptions, TPathOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4394
- import { E_SDK_EVENT, STATE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
4395
- import Label from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Label';
4396
- import Marker from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Marker';
4397
- import SmartTooltip from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip';
4398
- import Camera from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
4399
- import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed';
4400
- import BlueDotLayer from '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot';
4401
- import JourneyLayer from '@mappedin/react-native-sdk/core/packages/renderer/layers/Journey';
4402
- import { ThreeJSMarkerHandle } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.MapObject';
4403
- import { TCreateThreeDMarkerOptions } from '@mappedin/react-native-sdk/core/packages/renderer';
4404
- export enum INTERNAL_EVENT {
4405
- CAMERA_MOVING = 0,
4406
- SET_BLUE_DOT_SIZE_FROM_ZOOM = 1,
4407
- PUBLISH_BLUE_DOT = 2,
4408
- SET_STATE_SILENT = 3,
4409
- BLUE_DOT_UPDATE_POSITION = 4,
4410
- BLUE_DOT_SET_FOLLOWING = 5,
4411
- CLEAR_MOUSE = 6
4412
- }
4413
- export type INTERNAL_EVENT_PAYLOAD = {
4414
- [INTERNAL_EVENT.CAMERA_MOVING]: any;
4415
- [INTERNAL_EVENT.SET_BLUE_DOT_SIZE_FROM_ZOOM]: number;
4416
- [INTERNAL_EVENT.PUBLISH_BLUE_DOT]: undefined;
4417
- [INTERNAL_EVENT.CLEAR_MOUSE]: undefined;
4418
- [INTERNAL_EVENT.SET_STATE_SILENT]: {
4419
- state: STATE;
4420
- };
4421
- [INTERNAL_EVENT.BLUE_DOT_UPDATE_POSITION]: {
4422
- x: number;
4423
- y: number;
4424
- };
4425
- [INTERNAL_EVENT.BLUE_DOT_SET_FOLLOWING]: boolean;
4426
- };
4427
- export class MapView extends PubSub<E_SDK_EVENT_PAYLOAD, E_SDK_EVENT> {
4428
- #private;
4429
- currentPath?: MappedinNode[];
4430
- BlueDot: BlueDotLayer;
4431
- Journey: JourneyLayer;
4432
- Camera: Camera;
4433
- options: TMapViewOptions;
4434
- constructor(container: HTMLElement, venue: Mappedin, options?: TMapViewOptions & {
4435
- onFirstMapLoaded: () => void;
4436
- });
4437
- /**
4438
- * Label all Locations using 2D floating labels
4439
- */
4440
- labelAllLocations(options?: TLabelAllLocationLabelOptions): Label[];
4441
- /**
4442
- * Labels all Locations, in order of distance from the center of the Map. See {@link MapView.labelPolygon} for available label options.
4443
- * The options are all optional, as the text and Polygon properties will be set for each Location.
4444
- */
4445
- labelAllLocations(options?: TLabelAllLocationLegacyLabelOptions): AtlasTextLabel[];
4446
- /**
4447
- * Labels a specific Polygon using a floating 2D label that remains the same size regardless of zoom
4448
- */
4449
- labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TLabelPolygonOptions): Label;
4450
- /**
4451
- * Labels a specific Polygon (or area of 3D space) with a TextLabel that lives in 3D space. That means it will be smaller when the camera is further away, and the angle you see it at will change with the camera.
4452
- * The text will flip 180 degrees when the camera rotates so it's never totally upside-down.
4453
- *
4454
- * It also sets the hover label (in 2D and 3D).
4455
- * Many of these options do nothing in 2D, as TextLabels are not supported, but it won't break anything.
4456
- *
4457
- * You must provide text, and either a Polygon, or a canvasBounds and height
4458
- */
4459
- labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TLegacyLabelOptions): AtlasTextLabel;
4460
- /**
4461
- * Get Nearest Node to a screen coordinate x, y, map. Useful for doing directions from any place on the map
4462
- *
4463
- * @param x
4464
- * @param y
4465
- * @param mapOrMapId Map of MapId
4466
- */
4467
- getNearestNodeByScreenCoordinates(x: number, y: number, mapOrMapId?: MappedinMap | MappedinMap['id']): MappedinNode;
4468
- /**
4469
- * Add a ThreeJS object to the screen to be rendered on the marker layer.
4470
- */
4471
- createThreeJSMarker(options: TCreateThreeDMarkerOptions): ThreeJSMarkerHandle;
4472
- /**
4473
- * Remove a ThreeJS marker from the scene. This will be a no-op if the
4474
- * map object associated with the marker has been destroyed.
4475
- *
4476
- * @param markerHandle marker to remove
4477
- * @return true if the marker was removed, false if the marker or its map had already been removed
4478
- */
4479
- removeThreeJSMarker(markerHandle: ThreeJSMarkerHandle): boolean;
4480
- /**
4481
- * Remove all ThreeJS marker from the scene.
4482
- */
4483
- removeAllThreeJSMarkers(): void;
4484
- /**
4485
- * Unsubscribe from SDK events
4486
- */
4487
- setState(state: STATE): void;
4488
- get state(): STATE;
4489
- /**
4490
- * The Venue data this MapView is using.
4491
- *
4492
- * @property venue {MappedinVenue}
4493
- * @final
4494
- */
4495
- get venue(): Mappedin;
4496
- /**
4497
- * The div MapView is using.
4498
- *
4499
- * @property container {Div}
4500
- * @final
4501
- */
4502
- get container(): HTMLElement;
4503
- /**
4504
- * The current map being displayed
4505
- */
4506
- get currentMap(): MappedinMap;
4507
- /**
4508
- * Remove all interactive polygons
4509
- */
4510
- removeAllInteractivePolygons(): void;
4511
- /**
4512
- * Change the currently displayed Map to a new one.
4513
- *
4514
- * @method setMap
4515
- * @param mapOrMapId The Map ID or Map Object to change the Map to.
4516
- */
4517
- setMap(mapOrMapId: MappedinMap | string): Promise<null>;
4518
- /**
4519
- * Given a polygon/polygon id, set it to a specific color, and set any text label associated with that polygon to another color.
4520
- *
4521
- * @param polygonOrPolygonId The Polygon/Polygon ID to change the color of.
4522
- * @param color The color to use.
4523
- * @param textColor
4524
- * @param opacity
4525
- */
4526
- setPolygonColor(polygonOrPolygonId: MappedinPolygon | string, color: string, textColor?: string, opacity?: number): void;
4527
- /**
4528
- * Resets a Polygon back to it's original color.
4529
- * If the user is hovering over a polygon, it will still have the hover effect.
4530
- *
4531
- * @param polygonOrPolygonId The Polygon/Polygon ID to reset.
4532
- */
4533
- clearPolygonColor(polygonOrPolygonId: MappedinPolygon | string): void;
4534
- /**
4535
- * Resets ALL Polygons you have changed with {@link MapView.setPolygonColor} back to their original color.
4536
- * The hover effect will still be present if the user is currently hovering over a Polygon.
4537
- */
4538
- clearAllPolygonColors(): void;
4539
- /**
4540
- * Makes a single Polygon hoverable/clickable. Polygons you haven't called this on will be treated as non-interactive and not respond to any mouse events.
4541
- *
4542
- */
4543
- addInteractivePolygon(polygonOrPolygonId: MappedinPolygon | string): void;
4544
- /**
4545
- * Makes all polygons attached to a location hoverable/clickable. Polygons you haven't called this on will be treated as non-interactive
4546
- * This is a convenience function for calling {@link MapView.addInteractivePolygon} on all the polygons attached to all locations. You may also make individual polygons interactive with the addInteractivePolygon method instead of, or in addition to this method.
4547
- *
4548
- */
4549
- addInteractivePolygonsForAllLocations(options?: {
4550
- /**
4551
- * A list of Location types to skip. All locations of this type will be exluded from becoming interactive
4552
- */
4553
- excludeTypes?: string[];
4554
- /**
4555
- * An array of Location objects. Overrides the default of making all locations interactive, and instead applies to only the locations specified here.
4556
- */
4557
- locations?: MappedinLocation[];
4558
- }): void;
4559
- /**
4560
- * Makes a polygon no longer hoverable/clickable.
4561
- *
4562
- * @param polygonOrPolygonId The previously interactive Polygon/Polygon ID to make non-interactive.
4563
- */
4564
- removeInteractivePolygon(polygonOrPolygonId: MappedinPolygon | string): void;
4565
- /**
4566
- * Attach any HTML to a {@link MappedinNode}, and have the marker interact and collide with smart labels and tooltips
4567
- */
4568
- createMarker(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): Marker;
4569
- /**
4570
- * Remove Marker
4571
- */
4572
- removeMarker(markerOrMarkerId: Marker | Marker['id']): void;
4573
- /**
4574
- * Removes all Markers (from all Maps, not just the current one).
4575
- *
4576
- */
4577
- removeAllMarkers(): void;
4578
- /**
4579
- * Remove all tooltips
4580
- */
4581
- removeAllTooltips(): void;
4582
- /**
4583
- * A polygon can have state that renders the concept of being "closed", which is a generic blanket
4584
- * term that can be used in general to inform the user that they can expect this polygon to not be
4585
- * servicing customers.
4586
- */
4587
- updateClosedStateForPolygon(options: {
4588
- /**
4589
- * The polygon or polygon id whose state is being updated.
4590
- */
4591
- polygon: MappedinPolygon | string;
4592
- /**
4593
- * If true, the polygon will be marked as being closed. If false, the polygon will be marked as being open.
4594
- */
4595
- closed: boolean;
4596
- /**
4597
- * If true, a convenience parameter that is the converse of `options.closed`. Note that if both are present, `closed` will receive higher precedence.
4598
- */
4599
- open?: boolean;
4600
- }): void;
4601
- /**
4602
- * As the name suggests, all polygons will have their "closed" state set to "opened".
4603
- *
4604
- */
4605
- openAllPolygons(): void;
4606
- /**
4607
- * Removes all labels from all Maps.
4608
- *
4609
- */
4610
- removeAllLabels(): void;
4611
- /**
4612
- *
4613
- * This creates a tooltip that allows you to pass dynamic content which will attempt
4614
- * to position around an anchor in 3D space. The tooltip will be positioned based on one of four
4615
- * AnchorTypes (top, bottom, left, right).
4616
- *
4617
- *`options.defaultAnchorType` and `options.enabledAnchorTypes` should be one of the constants from Mappedin.Tooltip.ANCHOR
4618
- *
4619
- * `options.defaultAnchorType` will override `options.enabledAnchorTypes` if that anchor was disabled it will be automatically re-enabled
4620
- *
4621
- *
4622
- * @return The Tooltip you created, which has already been added to the scene.
4623
- */
4624
- createTooltip(
4625
- /**
4626
- * Node or Coordinate to attach the tooltip to
4627
- */
4628
- node: MappedinNode | MappedinCoordinate, options: TCreateTextTooltipOptions | TCreateCustomInnerHTMLTooltipOptions | TCreateCustomTooltipOptions): SmartTooltip;
4629
- /**
4630
- * Removes a {@link Tooltip} you have added previously.
4631
- *
4632
- * @param tooltipOrTooltipId A Tooltip that has previously been returned from {@link MapView.createTooltip}.
4633
- */
4634
- removeTooltip(tooltipOrTooltipId: SmartTooltip | SmartTooltip['id']): void;
4635
- /**
4636
- * Let any image attached to a Polygon attached to a Location flip 180 degrees with the camera so it's always upright.
4637
- *
4638
- * @method enableImageFlippingForAllLocations
4639
- * @param options
4640
- * @param [options.excludeTypes=[]] {[String]} A list of Location types to skip, if for some reason there are Locations that have logos that shouldn't flip.
4641
- * @param [options.locations] {[MappedinLocation]|[String]} An array of Location objects, or Location IDs. If excludeTypes is not sufficient you can explicitly set the Locations you are marking to flip. You can also call {{#crossLink "MapView/enableImageFlippingForPolygon:method"}}{{/crossLink}} manually for every polygon you care about instead.
4642
- */
4643
- enableImageFlippingForAllLocations(options?: {
4644
- /**
4645
- * A list of Location types to skip, if for some reason there are Locations that have logos that shouldn't flip.
4646
- */
4647
- excludeTypes?: string[];
4648
- /**
4649
- * An array of Location objects, or Location IDs. If excludeTypes is not sufficient you can explicitly set the Locations you are marking to flip. You can also call {@link MapView.enableImageFlippingForPolygon} manually for every polygon you care about instead.
4650
- */
4651
- locations?: MappedinLocation[] | string[];
4652
- }): void;
4653
- /**
4654
- * Mark a specific Polygon so, if it has an image, it rotates with the camera.
4655
- *
4656
- */
4657
- enableImageFlippingForPolygon(options: {
4658
- /**
4659
- * The ID of the Polygon who's image (if any) should rotate.
4660
- */
4661
- polygonId: string;
4662
- /**
4663
- * The how much the image has been rotated so that it's "up". Determined from the Polygon object itself typically, but can be set manually if needed.
4664
- */
4665
- rotation?: number;
4666
- }): void;
4667
- disableImageFlippingForAllPolygons(): void;
4668
- /**
4669
- * Draws an entire path. It takes a list of Nodes and will break them into separate pathSegments on every map change, putting the resultant segment on the right Map.
4670
- *
4671
- * @param path An array of Nodes, probably from a Node's {@link MappedinNode.directionsTo} call.
4672
- * @return An array of pathSegment ids.
4673
- */
4674
- drawPath(path: MappedinNode[], options?: TPathOptions): string;
4675
- /**
4676
- * Remove a path by id
4677
- */
4678
- removePath(pathId: string): void;
4679
- /**
4680
- * Removes all pathSegments from all Maps.
4681
- *
4682
- */
4683
- removeAllPaths(): void;
4684
- /**
4685
- * Sets the clear color of the Map something else, it you want it to fit it more with your website. Otherwise the div will be white where there is no Map visible.
4686
- *
4687
- * @param color The color to use. Not an HTML color name.
4688
- * @param alpha Opacity between 0 and 1.
4689
- */
4690
- setBackgroundColor(color: number | string, alpha?: number): void;
4691
- /**
4692
- * Sets the color for hovering over polygons
4693
- */
4694
- setHoverColor(color: number | string): void;
4695
- /**
4696
- * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about,
4697
- * but if you are doing something weird, or have your own special tween for something, you will want to call this function.
4698
- * You can call it as often as you want, it just sets a flag that we need to render again, and renders a few frames if we weren't already doing that.
4699
- * Ignored in 2D.
4700
- */
4701
- tryRendering(renderMode?: any): void;
4702
- /**
4703
- * Finds the main Location associated with a Polygon. This means a Location
4704
- * attached to the Polygon that has no parents, or, if there are none of those,
4705
- * a Location nearest the top of some hierarchy that does have the Polygon attached.
4706
- *
4707
- * This means if there are multiple hierarchies of Locations attached to the Polygon,
4708
- * the one that gets returned is not guaranteed to be what you want.
4709
- *
4710
- * @param polygon The Polygon you want the primary Location of.
4711
- */
4712
- getPrimaryLocationForPolygon(polygon: MappedinPolygon): MappedinLocation;
4713
- /**
4714
- * Destroy instance and clean up memory
4715
- */
4716
- destroy(): void;
4559
+ _subscribers: any;
4560
+ publish(eventName: any, data: any): void;
4561
+ on(eventName: any, fn: any): void;
4562
+ off(eventName: any, fn: any): void;
4563
+ destroy(): void;
4564
+ }
4565
+ export const PubSubLegacy: () => void;
4566
+ export function tinyObservable<T>(store: T): T & IPubSub;
4567
+ export {};
4568
+ }
4569
+
4570
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.HTMLCollider' {
4571
+ import BaseCollider, { ICollider } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
4572
+ export type TRange = [number, number, number, number];
4573
+ export type TDimensions = {
4574
+ width: number;
4575
+ height: number;
4576
+ };
4577
+ export interface IHTMLCollider extends ICollider {
4578
+ containerEl: any;
4579
+ contentEl: any;
4580
+ }
4581
+ class HTMLCollider extends BaseCollider {
4582
+ contentEl: any;
4583
+ containerEl: any;
4584
+ removeSelf(): void;
4585
+ enable(): void;
4586
+ disable(): void;
4587
+ colliderDidGoOffscreen(): void;
4588
+ colliderDidNotFindAHome(): void;
4589
+ colliderDidUpdatePosition(x: any, y: any): void;
4590
+ colliderDidMount(): void;
4591
+ colliderDidUpdateVisiblity(): void;
4717
4592
  }
4593
+ export default HTMLCollider;
4718
4594
  }
4719
4595
 
4720
4596
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Journey' {
@@ -4829,94 +4705,9 @@ declare module '@mappedin/react-native-sdk/core/packages/navigator/interfaces/IL
4829
4705
  export default ILocation;
4830
4706
  }
4831
4707
 
4832
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.CameraControls' {
4833
- export default CameraControls;
4834
- /**
4835
- * The advanced, manual camera controls for {{#crossLink "MapView"}}{{/crossLink}}. You probably don't need to use this at all, instead relying on the MapView's {{#crossLink "MapView/focusOn:method"}}{{/crossLink}}, {{#crossLink "MapView/resetCamera:method"}}{{/crossLink}} and built in touch/mouse controls.
4836
- * This class will let you do things like change the min/max zoom, tilt, and pan, attach to camera events, and move/animate the camera to specifc points.
4837
- *
4838
- * The camera works by setting an anchor point on the scene at ground level and pointing the camera at it. {{#crossLink "CameraControls/zoom:method"}}{{/crossLink}} controls how far the camera is from the anchor, and {{#crossLink "CameraControls/tilt:method"}}{{/crossLink}}/{{#crossLink "CameraControls/rotate:method"}}{{/crossLink}} controls the angle the camera is rotated about it.
4839
- * The camera will always be pointed directly at the anchor point. {{#crossLink "CameraControls/pan:method"}}{{/crossLink}} or {{#crossLink "CameraControls/setPosition:method"}}{{/crossLink}} will move that anchor around on the 2D ground plane.
4840
- *
4841
- * Created for you automatically with a MapView, don't re-create yourself.
4842
- * @type {any}
4843
- *
4844
- * @class CameraControls
4845
- */
4846
- let CameraControls: any;
4847
- }
4848
-
4849
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.LabelAtlas' {
4850
- export namespace DEFAULT_LABEL_SIZING {
4851
- const MARGIN: number;
4852
- const HEIGHT_MARGIN: number;
4853
- const SIZE: number;
4854
- }
4855
- export class Atlas {
4856
- layers: any[];
4857
- canvas: HTMLCanvasElement;
4858
- context: CanvasRenderingContext2D | null;
4859
- addLabel(map: any, lines: any, font: any, size: any, scope: any, pixelsPerScale: any): Label | undefined;
4860
- removeLayer(layer: any): void;
4861
- measure(text: any, font: any, size: any): TextMetrics;
4862
- onWebGLContextRestored(): void;
4863
- dispose(): void;
4864
- }
4865
- export class AtlasTextLabel {
4866
- constructor(options: any, venue: any, mapObject: any, DEFAULT_FONT: any, polygonMeshesById: any, textLabelsByPolygonId: any, mapView: any, scope: any, atlas: any);
4867
- text: any;
4868
- stateText: string;
4869
- font: any;
4870
- atlas: any;
4871
- canvasBounds: any;
4872
- mapScale: any;
4873
- margin: number;
4874
- heightMargin: number;
4875
- scaleMin: any;
4876
- scaleStep: any;
4877
- multiline: any;
4878
- height: number | null;
4879
- polygonMeshesById: any;
4880
- polyId: any;
4881
- map: any;
4882
- color: Color;
4883
- baseColor: Color;
4884
- hideOnCreate: boolean;
4885
- hoverLabelText: any;
4886
- fontSize: number;
4887
- hoverLabelMode: any;
4888
- hoverLabelClass: any;
4889
- showHoverLabel: boolean;
4890
- hoverIfLabelFails: boolean;
4891
- textLabelsByPolygonId: any;
4892
- create(): void;
4893
- invalid: boolean | undefined;
4894
- label: any;
4895
- created: boolean | undefined;
4896
- flipIfNeeded(cameraAngle: any): void;
4897
- removeSelf(bulk: any): void;
4898
- doNotCreate: boolean | undefined;
4899
- setColor(textColor: any): void;
4900
- clearColor(): void;
4901
- hide(): void;
4902
- show(): void;
4903
- toString(): any;
4904
- }
4905
- class Label {
4906
- x: number;
4907
- y: number;
4908
- width: number;
4909
- height: number;
4910
- layer: any;
4911
- index: any;
4912
- layout(map: any, origin: any, size: any, rotation: any, uv: any, color: any): void;
4913
- }
4914
- import { Color } from "three/src/math/Color";
4915
- export {};
4916
- }
4917
-
4918
4708
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Marker' {
4919
4709
  import './Mappedin.Marker.scss';
4710
+ import { COLLISION_RANKING_TIERS } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
4920
4711
  import HTMLCollider, { IHTMLCollider } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.HTMLCollider';
4921
4712
  import { Vector3 } from 'three';
4922
4713
  import { TColliderStrategy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
@@ -4946,7 +4737,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4946
4737
  mapId: string;
4947
4738
  id?: string;
4948
4739
  anchor?: MARKER_ANCHOR;
4949
- collisionRank?: number;
4740
+ collisionRank?: COLLISION_RANKING_TIERS;
4950
4741
  };
4951
4742
  type TTooltipStyle = {
4952
4743
  top?: string;
@@ -4974,79 +4765,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4974
4765
  export default Marker;
4975
4766
  }
4976
4767
 
4977
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.RenderTasks' {
4978
- export default RENDER;
4979
- namespace RENDER {
4980
- const ANIMATED: string;
4981
- const ALWAYS_ON_TOP: string;
4982
- const ALL: string;
4983
- const TWEEN: string;
4984
- }
4985
- }
4986
-
4987
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollisionEngine' {
4988
- import { Vector3 } from 'three';
4989
- import './Mappedin.SmartCollisionEngine.scss';
4990
- import { ICollider } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
4991
- export const COLLIDER_STRATEGY_LOW_PRIORITY = "LOW_PRIORITY";
4992
- type TProjectFn = ({ position, mapId }: {
4993
- position: Vector3;
4994
- mapId: string;
4995
- }) => [number, number];
4996
- export interface ISmartCollisionEngine {
4997
- add: (colliderId: string, collider: ICollider) => void;
4998
- remove: (colliderId: string) => void;
4999
- init: (container: HTMLElement, projectFn: TProjectFn) => void;
5000
- resize: (container: HTMLElement) => void;
5001
- resort: () => void;
5002
- updatePosition: () => void;
5003
- updateVisibility: () => void;
5004
- makeCollidersDirty: () => void;
5005
- update: () => void;
5006
- destroy: () => void;
5007
- makeCollidersDirtyThrottled: (time: number) => void;
5008
- _makeCollidersDirtyThrottled?: [() => void, number];
5009
- }
5010
- const SmartCollisionEngine: () => ISmartCollisionEngine;
5011
- export default SmartCollisionEngine;
5012
- }
5013
-
5014
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Search' {
5015
- export default Search;
5016
- /**
5017
- * A class to access the Mappedin Search API. This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initailize:method"}}{{/crossLink}}, but you can also create one manually.
5018
- *
5019
- * @class Search
5020
- * @type {any}
5021
- * @param options {Object} A list of configuration options for the search API.
5022
- @param [options.venue] {String} The venue slug to search for
5023
- @param [options.key] {String} Your search key
5024
- @param [options.secret] {String} Your search secret
5025
- @param [options.smart] {Boolean} Whether the new Smart Search should be used.
5026
- @param [options.endpoint] {String} The endpoint for search.
5027
- @param [options.locations] {Array} Array of MappedinLocations for this venue. This is optional, but will enable fallback search.
5028
- @param [options.categories] {Array} Array of MappedinCategorys for this venue. This is optional, but will enable fallback search.
5029
- */
5030
- let Search: any;
5031
- }
5032
-
5033
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Analytics' {
5034
- export default Analytics;
5035
- /**
5036
- * A class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights.
5037
- * This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initialize:method"}}{{/crossLink}}, but you can also create one manually. You are mostly going to use `locationSelected`.
5038
- *
5039
- * @type {any}
5040
- *
5041
- * @class Analytics
5042
- * @param options {Object} A list of configuration options for the Analytics API.
5043
- * @param [options.key] {String} The same key you are using for getVenue. Handled automatically in Mapview.initialize()
5044
- * @param [options.secret] {String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize()
5045
- * @param [options.venue] {String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize()
5046
- */
5047
- var Analytics: any;
5048
- }
5049
-
5050
4768
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.MapObject' {
5051
4769
  export const SCENE_FROM_LIVE_JSON: false;
5052
4770
  /**
@@ -5225,6 +4943,69 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5225
4943
  import { Vector3 } from "three/src/math/Vector3";
5226
4944
  }
5227
4945
 
4946
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Search' {
4947
+ export default Search;
4948
+ /**
4949
+ * A class to access the Mappedin Search API. This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initailize:method"}}{{/crossLink}}, but you can also create one manually.
4950
+ *
4951
+ * @class Search
4952
+ * @type {any}
4953
+ * @param options {Object} A list of configuration options for the search API.
4954
+ @param [options.venue] {String} The venue slug to search for
4955
+ @param [options.key] {String} Your search key
4956
+ @param [options.secret] {String} Your search secret
4957
+ @param [options.smart] {Boolean} Whether the new Smart Search should be used.
4958
+ @param [options.endpoint] {String} The endpoint for search.
4959
+ @param [options.locations] {Array} Array of MappedinLocations for this venue. This is optional, but will enable fallback search.
4960
+ @param [options.categories] {Array} Array of MappedinCategorys for this venue. This is optional, but will enable fallback search.
4961
+ */
4962
+ let Search: any;
4963
+ }
4964
+
4965
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Analytics' {
4966
+ export default Analytics;
4967
+ /**
4968
+ * A class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights.
4969
+ * This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initialize:method"}}{{/crossLink}}, but you can also create one manually. You are mostly going to use `locationSelected`.
4970
+ *
4971
+ * @type {any}
4972
+ *
4973
+ * @class Analytics
4974
+ * @param options {Object} A list of configuration options for the Analytics API.
4975
+ * @param [options.key] {String} The same key you are using for getVenue. Handled automatically in Mapview.initialize()
4976
+ * @param [options.secret] {String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize()
4977
+ * @param [options.venue] {String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize()
4978
+ */
4979
+ var Analytics: any;
4980
+ }
4981
+
4982
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollisionEngine' {
4983
+ import { Vector3 } from 'three';
4984
+ import './Mappedin.SmartCollisionEngine.scss';
4985
+ import { ICollider } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
4986
+ export const COLLIDER_STRATEGY_LOW_PRIORITY = "LOW_PRIORITY";
4987
+ type TProjectFn = ({ position, mapId }: {
4988
+ position: Vector3;
4989
+ mapId: string;
4990
+ }) => [number, number];
4991
+ export interface ISmartCollisionEngine {
4992
+ add: (colliderId: string, collider: ICollider) => void;
4993
+ remove: (colliderId: string) => void;
4994
+ init: (container: HTMLElement, projectFn: TProjectFn) => void;
4995
+ resize: (container: HTMLElement) => void;
4996
+ resort: () => void;
4997
+ updatePosition: () => void;
4998
+ updateVisibility: () => void;
4999
+ makeCollidersDirty: () => void;
5000
+ update: () => void;
5001
+ destroy: () => void;
5002
+ makeCollidersDirtyThrottled: (time: number) => void;
5003
+ _makeCollidersDirtyThrottled?: [() => void, number];
5004
+ }
5005
+ const SmartCollisionEngine: () => ISmartCollisionEngine;
5006
+ export default SmartCollisionEngine;
5007
+ }
5008
+
5228
5009
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.TaskScheduler' {
5229
5010
  export namespace UPDATE_ORDERING {
5230
5011
  const BEFORE_CAMERA: number;