@mappedin/react-native-sdk 4.1.0-beta.2 → 5.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  // ../three
7
7
  // ../@tweenjs/tween.js
8
8
  // ../three/src/math/Color
9
+ // ../geojson
9
10
  // ../three/src/core/Object3D
10
11
  // ../three/src/math/Vector3
11
12
 
@@ -18,7 +19,7 @@ declare module '@mappedin/react-native-sdk' {
18
19
  export { getVenue, getVenueBundle } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
19
20
  export type { TGetVenueOptions, TGetVenueBundleOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
20
21
  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_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
22
+ export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
22
23
  export type { TSerializableJourneyOptions, TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
23
24
  import type { TEnableBlueDotOptions as TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptions as TLabelAllLocationCommonOptionsBase } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
24
25
  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';
@@ -36,7 +37,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
36
37
  import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
37
38
  import { STATE } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
38
39
  import { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store';
39
- import type { TBlueDotPositionUpdate, TBlueDotStateChange, MappedinPolygon, MappedinMap, Mappedin } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
40
+ import type { TBlueDotPositionUpdate, TBlueDotStateChange, MappedinPolygon, MappedinMap, Mappedin, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
40
41
  import { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
41
42
  export type TMiMapViewProps = {
42
43
  /**
@@ -52,6 +53,13 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
52
53
  * @beta
53
54
  */
54
55
  useBundle?: boolean;
56
+ loadOptions?: {
57
+ /**
58
+ * By default, the SDK will merge all geometries by material to reduce the number of draw calls to the GPU
59
+ * To rever back to using a single geometry for every polygon, pass `MAP_RENDER_MODE.MULTI_GEOMETRY`
60
+ */
61
+ mapRenderStrategy?: MAP_RENDER_MODE;
62
+ };
55
63
  };
56
64
  /**
57
65
  * Venue Data to render inside the MapView. This is returned by {@link getVenue} or {@link getVenueBundle}
@@ -120,7 +128,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
120
128
  /**
121
129
  * @category Component
122
130
  */
123
- export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "options" | "style" | "onFirstMapLoaded" | "onDataLoaded" | "venueData" | "onPolygonClicked" | "onBlueDotStateChanged" | "onBlueDotPositionUpdated" | "onNothingClicked" | "onMapChanged" | "onStateChanged" | "onVenueLoadError"> & React.RefAttributes<MapViewStore>>>;
131
+ export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "options" | "style" | "onFirstMapLoaded" | "venueData" | "onPolygonClicked" | "onBlueDotStateChanged" | "onBlueDotPositionUpdated" | "onDataLoaded" | "onNothingClicked" | "onMapChanged" | "onStateChanged" | "onVenueLoadError"> & React.RefAttributes<MapViewStore>>>;
124
132
  }
125
133
 
126
134
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap' {
@@ -404,7 +412,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/index.rn' {
404
412
  export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator';
405
413
  export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator';
406
414
  export type { TGetVenueBundleOptions, TGetVenueOptions, TMappedinDirective, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
407
- export { MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinDirections, MappedinNavigatable, MappedinCoordinate, MappedinRankings } from '@mappedin/react-native-sdk/core/packages/get-venue';
415
+ export { MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinDirections, MappedinNavigatable, MappedinCoordinate, MappedinRankings, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue';
408
416
  export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
409
417
  export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
410
418
  }
@@ -439,7 +447,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src' {
439
447
  export { getVenue, getVenueBundle } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
440
448
  export type { TGetVenueOptions, TGetVenueBundleOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
441
449
  export { STATE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
442
- 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';
450
+ export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
443
451
  export type { TSerializableJourneyOptions, TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
444
452
  import type { TEnableBlueDotOptions as TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptions as TLabelAllLocationCommonOptionsBase } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
445
453
  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';
@@ -515,7 +523,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
515
523
  import type { TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
516
524
  import { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
517
525
  /** Classes */
518
- export { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
526
+ export { Mappedin, MappedinCollectionType } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
519
527
  export { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
520
528
  export { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolygon';
521
529
  export { MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode';
@@ -538,6 +546,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
538
546
  /** API data types */
539
547
  export type { TLocationType, TNode, TImage, TLogo, TGalleryImage, TPhone, TSocial, TColor, TVortex, TPicture, TOpeningHours, TSiblingGroup, TState, TCategory, TEvent, TGeoReference, TMap, TMapGroup, TBuilding, TLocation, TPolygon, TPolygonRanking, TVenue, TMappedinAPI } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.types';
540
548
  export type { TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
549
+ import { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
541
550
  export type TShowVenueOptions = {
542
551
  /**
543
552
  * Sets the initial background color of the map, including while loading.
@@ -549,14 +558,24 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
549
558
  */
550
559
  backgroundAlpha?: number;
551
560
  /**
552
- * Whether or not to display labels initially
561
+ * Whether or not to display default styled Floating Labels initially
553
562
  */
554
563
  labelAllLocationsOnInit?: boolean;
555
564
  /**
556
565
  * The id of the first map to show on map load
557
566
  */
558
567
  firstMapId?: string;
568
+ loadOptions?: {
569
+ /**
570
+ * Set the map render strategy in order to optimize FPS
571
+ *
572
+ * @beta
573
+ */
574
+ mapRenderStrategy?: MAP_RENDER_MODE;
575
+ };
559
576
  };
577
+ export { MAP_RENDER_MODE };
578
+ export function getVenueMVF(userOptions: TGetVenueOptions): Promise<Mappedin>;
560
579
  /**
561
580
  * Get Venue Data for a Mappedin Venue
562
581
  */
@@ -593,6 +612,23 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
593
612
  url: any;
594
613
  updated_at: any;
595
614
  }): Promise<Mappedin>;
615
+ /**
616
+ * Get the bundle URL and updated_at time.
617
+ * @internal
618
+ */
619
+ export function getVenueMVFURL(userOptions: TGetVenueBundleOptions): Promise<{
620
+ url: string;
621
+ updated_at: string;
622
+ }>;
623
+ /**
624
+ * @internal
625
+ */
626
+ export function downloadVenueBundleMVF(options: TGetVenueOptions,
627
+ /**
628
+ * use Web Workers to speed up MVF parsing. This is likely only benefitial for larger venues,
629
+ * and may be determental to smaller ones, hence it is off by default
630
+ */
631
+ useWorker?: boolean): Promise<unknown>;
596
632
  }
597
633
 
598
634
  declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums' {
@@ -625,30 +661,30 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
625
661
  CUSTOM_GEOLOCATION_PROVIDER_ERROR = 3
626
662
  }
627
663
  /**
628
- What we currently know about the user's position, and how confident we are.
664
+ What we currently know about the user's position and how confident we are.
629
665
  */
630
666
  export enum E_BLUEDOT_STATE {
631
667
  /**
632
- * We haven't started listening to position updates
668
+ * Not listening to Blue Dot position updates
633
669
  */
634
670
  NOT_LISTENING = 0,
635
671
  /**
636
- * We have started listening to position updates
672
+ * Listenign for listening to position updates but have not yet received a position
637
673
  */
638
674
  LISTENING = 1,
639
675
  /**
640
- * We've received relevant positions, and user is inside the venue
676
+ * Received relevant positions and user is in the venue
641
677
  */
642
678
  HAS_POSITION = 2,
643
679
  /**
644
680
  * We've received a relevant position, and we have enough information to determine
645
681
  * which floor the user is on - either because we received a floor level, the venue
646
- * only has one floor, or we're allowing implicit floor level.
682
+ * only has one floor or we're allowing implicit floor level detection.
647
683
  */
648
684
  HAS_INDOOR_POSITION = 3,
649
685
  /**
650
686
  * We are uncertain about the user's position, likely because we haven't received
651
- * a relevant position in a while
687
+ * a relevant position in a while. Blue Dot will be rendered grey to indicate uncertainty of the actual position.
652
688
  */
653
689
  LOCATION_UNCERTAIN = 4
654
690
  }
@@ -657,26 +693,29 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
657
693
  */
658
694
  export enum E_BLUEDOT_MARKER_STATE {
659
695
  /**
660
- * BlueDot is hidden
696
+ * Blue Dot is hidden
661
697
  */
662
698
  HIDDEN = 0,
663
699
  /**
664
- * BlueDot is transparent
700
+ * Blue Dot is transparent indicating the position is on a different floor
665
701
  */
666
702
  GHOST = 1,
667
703
  /**
668
- * BlueDot is visible and opaque
704
+ * Blue Dot is visible and opaque indicating accurate positioning on the current floor
669
705
  */
670
706
  NORMAL = 2,
671
707
  /**
672
- * BlueDot is grayed out
708
+ * Blue Dot is grayed out due to uncertainty about user's location, most likely due to not receiving recent position updates.
673
709
  */
674
710
  UNCERTAIN = 3
675
711
  }
676
712
  export enum STATE {
713
+ /**
714
+ * The map is in exploration mode where the user controls the camera position.
715
+ */
677
716
  EXPLORE = "explore",
678
717
  /**
679
- * FOLLOW state follows user's current location (BlueDot)
718
+ * Follows user's current location by keeping the camera centered on the Blue Dot.
680
719
  */
681
720
  FOLLOW = "follow"
682
721
  /**
@@ -692,19 +731,19 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
692
731
  }
693
732
  export enum E_SDK_EVENT {
694
733
  /**
695
- * Emitted when the map is clicked
734
+ * Emitted when the map is clicked or tapped on a touch screen.
696
735
  */
697
736
  CLICK = "CLICK",
698
737
  /**
699
- * Emitted when the {@link STATE | SDK state} changes
738
+ * Emitted when the {@link STATE | SDK state} changes.
700
739
  */
701
740
  STATE_CHANGE = "STATE_CHANGE",
702
741
  /**
703
- * Emitted when a polygon is clicked
742
+ * Emitted when an interactive {@link MappedinPolygon | polygon} is clicked
704
743
  */
705
744
  POLYGON_CLICKED = "POLYGON_CLICKED",
706
745
  /**
707
- * Emitted when nothing is clicked
746
+ * Emitted when nothing (outside of interactive polygons) is clicked
708
747
  */
709
748
  NOTHING_CLICKED = "NOTHING_CLICKED",
710
749
  /**
@@ -725,6 +764,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
725
764
  ROTATION_CHANGED = "ROTATION_CHANGED",
726
765
  TILT_CHANGED = "TILT_CHANGED"
727
766
  }
767
+ export { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue';
728
768
  }
729
769
 
730
770
  declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types' {
@@ -734,7 +774,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
734
774
  import { TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
735
775
  import { TOOLTIP_ANCHOR } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip';
736
776
  import type { Euler, Object3D, Vector3 } from 'three';
737
- 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';
777
+ import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
738
778
  export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
739
779
  /**
740
780
  An extension of the GeolocationPosition type.
@@ -1004,19 +1044,27 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1004
1044
  scale?: Vector3;
1005
1045
  };
1006
1046
  export type TMapViewOptions = {
1047
+ /**
1048
+ * Background color of the map in hex number or string e.g. `0x2e2e2e` or `#2e2e2e`.
1049
+ */
1007
1050
  backgroundColor?: number | string;
1008
1051
  /**
1009
1052
  * The opacity of the initial background color.
1010
1053
  */
1011
1054
  backgroundAlpha?: number;
1012
1055
  /**
1013
- * Controls whether antialiasing is on. Defaults to true, as long as devicePixelRatio is 1. This is very expensive on high resolution screens.
1056
+ * Controls whether antialiasing is on. Defaults to `true`, as long as devicePixelRatio is 1. This is very expensive on high resolution screens.
1014
1057
  * @default true
1015
1058
  */
1016
1059
  antialias?: boolean;
1017
1060
  disableHover?: boolean;
1018
1061
  disableZoomOnMapSizeChange?: boolean;
1019
1062
  loadOptions?: {
1063
+ /**
1064
+ * By default, the SDK will merge all geometries by material to reduce the number of draw calls to the GPU
1065
+ * To rever back to using a single geometry for every polygon, pass `MAP_RENDER_MODE.MULTI_GEOMETRY`
1066
+ */
1067
+ mapRenderStrategy?: MAP_RENDER_MODE;
1020
1068
  async?: boolean;
1021
1069
  zoomOverrides?: {
1022
1070
  zoomMultiplier?: number;
@@ -1025,7 +1073,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1025
1073
  };
1026
1074
  };
1027
1075
  /**
1028
- * What map should the SDK initialize to?
1076
+ * First map to be rendered
1029
1077
  */
1030
1078
  firstMap?: MappedinMap | string;
1031
1079
  /**
@@ -1044,6 +1092,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1044
1092
  onWebGLRendererError?: () => void;
1045
1093
  };
1046
1094
  export type TMapViewOptionsLegacy = {
1095
+ /**
1096
+ * Background color of the map in hex number or string e.g. `0x2e2e2e` or `#2e2e2e`.
1097
+ */
1047
1098
  backgroundColor?: number | string;
1048
1099
  /**
1049
1100
  * The opacity of the initial background color.
@@ -1077,7 +1128,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1077
1128
  };
1078
1129
  };
1079
1130
  /**
1080
- * What map should the SDK initialize to?
1131
+ * First map to be rendered
1081
1132
  */
1082
1133
  firstMap?: MappedinMap | string;
1083
1134
  /**
@@ -1147,21 +1198,21 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1147
1198
  */
1148
1199
  height?: number;
1149
1200
  /**
1150
- * The amount of space to leave before starting the text
1201
+ * The amount of space to leave before starting the text in pixels
1151
1202
  * @default 5
1152
1203
  */
1153
1204
  margin?: number;
1154
1205
  /**
1155
- * A optional color
1206
+ * Optional color in hexadecimal string e.g. `#2e2e2e`.
1156
1207
  */
1157
1208
  color?: string;
1158
1209
  /**
1159
- * How big to make the font. Defaults to 12
1210
+ * Size of the font in pixels.
1160
1211
  * @default 12
1161
1212
  */
1162
1213
  fontSize?: number;
1163
1214
  /**
1164
- * 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.
1215
+ * A CSS style string font, e.g. "sans-serif". You can specify your own font via @font-face rule with a font family, and then include that here.
1165
1216
  */
1166
1217
  font?: string;
1167
1218
  /**
@@ -1170,7 +1221,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1170
1221
  */
1171
1222
  scaleMin?: number;
1172
1223
  /**
1173
- * How much to decrement the scale each time it doesn't fit, so we don't end up with too many different font sizes on screen at once. If * you are only labeling a few Polygons rather than everything,
1224
+ * How much to decrement the scale each time it doesn't fit, so we don't end up with too many different font sizes on screen at once. If you are only labeling a few {@link MappedinPolygon}s rather than everything,
1174
1225
  * you can set this and and scaleMin to 0.1 to fit everything except really long names perfectly.
1175
1226
  * @default 0.25
1176
1227
  */
@@ -1180,7 +1231,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1180
1231
  scale?: number;
1181
1232
  flatLabels?: false | undefined;
1182
1233
  /**
1183
- * Custom Rank - this determines how likely a Floating Label will appear
1234
+ * Ranking tier to determine how likely a {@link FloatingLabel} will appear
1184
1235
  */
1185
1236
  rank?: COLLISION_RANKING_TIERS | number;
1186
1237
  /**
@@ -1215,7 +1266,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1215
1266
  [key in string]: string;
1216
1267
  };
1217
1268
  /**
1218
- * Display label despite the polygon having an image on it
1269
+ * Display label despite the {@link MappedinPolygon} having an image on it. Often these images represent store logos.
1219
1270
  * @default false
1220
1271
  */
1221
1272
  createDespiteImage?: boolean;
@@ -1250,7 +1301,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1250
1301
  longitude: number;
1251
1302
  };
1252
1303
  /**
1253
- * A list of MappedinPolygons corresponding to every polygon that a user's
1304
+ * A list of {@link MappedinPolygon}s corresponding to every polygon that a user's
1254
1305
  * click passed through. These are in order of first to last intersected.
1255
1306
  * Will be empty if no interactive polygons were clicked.
1256
1307
  */
@@ -1354,6 +1405,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1354
1405
  EASE_IN_OUT = "ease-in-out"
1355
1406
  }
1356
1407
  export type TCameraAnimationOptions = {
1408
+ /**
1409
+ * Animation duration in milliseconds
1410
+ */
1357
1411
  duration?: number;
1358
1412
  easing?: CAMERA_EASING_MODE;
1359
1413
  };
@@ -1390,27 +1444,27 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1390
1444
  */
1391
1445
  get zoom(): number;
1392
1446
  /**
1393
- * Current Camera rotation (in radians)
1447
+ * Current Camera rotation (in radians) from north
1394
1448
  */
1395
1449
  get rotation(): number;
1396
1450
  /**
1397
- * Current Camera tilt
1451
+ * Current Camera tilt between 0 (top-down) to 1 (from the side)
1398
1452
  */
1399
1453
  get tilt(): number;
1400
1454
  /**
1401
- * Minimum distance (in meters) the camera is allowed to get to the ground.
1455
+ * Get the minimum distance (in meters) the camera is allowed to get to the ground.
1402
1456
  */
1403
1457
  get minZoom(): number;
1404
1458
  /**
1405
- * Minimum distance (in meters) the camera is allowed to get to the ground.
1459
+ * Set the minimum distance (in meters) the camera is allowed to get to the ground.
1406
1460
  */
1407
1461
  set minZoom(meters: number);
1408
1462
  /**
1409
- * Maximum distance (in meters) the camera is allowed to get to the ground.
1463
+ * Get the maximum distance (in meters) the camera is allowed to get from the ground.
1410
1464
  */
1411
1465
  get maxZoom(): number;
1412
1466
  /**
1413
- * Maximum distance (in meters) the camera is allowed to get to the ground.
1467
+ * Set the maximum distance (in meters) the camera is allowed to get from the ground.
1414
1468
  */
1415
1469
  set maxZoom(meters: number);
1416
1470
  setSafeAreaInsets(insets: {
@@ -1421,7 +1475,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1421
1475
  }): void;
1422
1476
  getSafeAreaInsets(): any;
1423
1477
  /**
1424
- * Determine a new Camera view state based on a collection of targets, and start animating to that state.
1478
+ * Focus the Camera view on a collection of targets and animate to that state.
1425
1479
  * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
1426
1480
  */
1427
1481
  focusOn(options: TFocusOnOptions): Promise<any>;
@@ -1431,7 +1485,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1431
1485
  set(positionOptions?: TAnimatePositionOptions): void;
1432
1486
  /**
1433
1487
  * Animate the Camera's view to smoothly transition to a new state over time.
1434
- * Returns a promise that resolves when the animation completes and gets rejected if the animation is cancelled.
1435
1488
  *
1436
1489
  * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
1437
1490
  */
@@ -2302,7 +2355,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface
2302
2355
  */
2303
2356
  polygons?: (MappedinPolygon | MappedinPolygon['id'])[];
2304
2357
  /**
2305
- * The duration the focus animation should last for.
2358
+ * The duration (in ms) the focus animation should last for.
2306
2359
  * @defaultValue `100`
2307
2360
  */
2308
2361
  duration?: number;
@@ -2341,6 +2394,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface
2341
2394
  * @internal
2342
2395
  */
2343
2396
  currentScale: number;
2397
+ loadOptions?: TMapViewOptions['loadOptions'];
2344
2398
  imageFlippingEnabled: boolean;
2345
2399
  imageFlippingCache: any;
2346
2400
  cachedPadding: any;
@@ -2493,38 +2547,49 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface
2493
2547
 
2494
2548
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types' {
2495
2549
  export type TGetVenueOptions = {
2496
- accessToken?: string;
2497
- clientId?: string;
2498
- clientSecret?: string;
2499
- baseUrl?: string;
2500
- includeHidden?: boolean;
2501
- noAuth?: boolean;
2502
- perspective?: string;
2503
- language?: string;
2504
- headers?: {
2505
- [key in string]: string;
2506
- };
2507
- venue: string;
2508
- things?: any;
2550
+ accessToken?: string;
2551
+ clientId?: string;
2552
+ clientSecret?: string;
2553
+ baseUrl?: string;
2554
+ includeHidden?: boolean;
2555
+ noAuth?: boolean;
2556
+ perspective?: string;
2557
+ language?: string;
2558
+ headers?: {
2559
+ [key in string]: string;
2560
+ };
2561
+ venue: string;
2562
+ things?: any;
2509
2563
  };
2510
2564
  export type TGetVenueOptionsInternal = {
2511
- baseUrl?: string;
2512
- supplementaryUrl?: string;
2513
- noAuth?: boolean;
2514
- includeHidden?: boolean;
2515
- apiGateway?: string;
2516
- authorization?: string;
2517
- /**
2518
- * @deprecated 2D support will be removed in the future
2519
- */
2520
- do2D?: boolean;
2521
- things?: any;
2522
- headers?: any;
2565
+ baseUrl?: string;
2566
+ supplementaryUrl?: string;
2567
+ noAuth?: boolean;
2568
+ includeHidden?: boolean;
2569
+ apiGateway?: string;
2570
+ authorization?: string;
2571
+ /**
2572
+ * @deprecated 2D support will be removed in the future
2573
+ */
2574
+ do2D?: boolean;
2575
+ things?: any;
2576
+ headers?: any;
2523
2577
  };
2578
+ export enum MAP_RENDER_MODE {
2579
+ /** Each polygon, its geometry and mesh are sent to the GPU every render frame.
2580
+ * This was the default rendering mode before 4.0.17
2581
+ */
2582
+ MULTI_GEOMETRY = "MULTI_GEOMETRY",
2583
+ /** Polygons' geometries are grouped by material and merged together, resulting in far fewer
2584
+ * draw calls to the GPU. Default rendering mode since 4.0.17
2585
+ */
2586
+ SINGLE_GEOMETRY = "SINGLE_GEOMETRY"
2587
+ }
2524
2588
  }
2525
2589
 
2526
2590
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2527
2591
  import { Navigator } from '@mappedin/react-native-sdk/core/packages/navigator';
2592
+ import { MVFData } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.MVF.types';
2528
2593
  import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
2529
2594
  import { MappedinCategory } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCategory';
2530
2595
  import { MappedinEvent } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinEvent';
@@ -2540,7 +2605,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2540
2605
  import { MappedinVenue } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVenue';
2541
2606
  import { MappedinVortex } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVortex';
2542
2607
  export const defaultOptions: TGetVenueOptionsInternal & TGetVenueOptions;
2543
- export enum CollectionType {
2608
+ export enum MappedinCollectionType {
2544
2609
  CATEGORY = "categories",
2545
2610
  EVENT = "events",
2546
2611
  LOCATION = "locations",
@@ -2551,14 +2616,14 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2551
2616
  VORTEX = "vortexes"
2552
2617
  }
2553
2618
  type TAccessors = {
2554
- [CollectionType.CATEGORY]: MappedinCategory;
2555
- [CollectionType.EVENT]: MappedinEvent;
2556
- [CollectionType.LOCATION]: MappedinLocation;
2557
- [CollectionType.MAPGROUP]: MappedinMapGroup;
2558
- [CollectionType.MAP]: MappedinMap;
2559
- [CollectionType.NODE]: MappedinNode;
2560
- [CollectionType.POLYGON]: MappedinPolygon;
2561
- [CollectionType.VORTEX]: MappedinVortex;
2619
+ [MappedinCollectionType.CATEGORY]: MappedinCategory;
2620
+ [MappedinCollectionType.EVENT]: MappedinEvent;
2621
+ [MappedinCollectionType.LOCATION]: MappedinLocation;
2622
+ [MappedinCollectionType.MAPGROUP]: MappedinMapGroup;
2623
+ [MappedinCollectionType.MAP]: MappedinMap;
2624
+ [MappedinCollectionType.NODE]: MappedinNode;
2625
+ [MappedinCollectionType.POLYGON]: MappedinPolygon;
2626
+ [MappedinCollectionType.VORTEX]: MappedinVortex;
2562
2627
  };
2563
2628
  const THINGS: {
2564
2629
  categories: typeof MappedinCategory;
@@ -2754,6 +2819,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2754
2819
  [id: string]: MappedinRankings;
2755
2820
  };
2756
2821
  getCollectionItemById<T extends keyof TAccessors, I extends string>(name: T, id: I): TAccessors[T] | null;
2822
+ /**
2823
+ * @hidden
2824
+ * @internal
2825
+ */
2826
+ hydrateFromMVF(mvfData: MVFData): Promise<undefined>;
2757
2827
  /**
2758
2828
  *
2759
2829
  * [experimental] Hydrate the Mappedin instance using a response from either {@link IMappedin.toString()}, {@link getVenueBundle} or by downloading the bundle manually
@@ -2888,6 +2958,59 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolyg
2888
2958
  export class MappedinPolygon extends MappedinNavigatable {
2889
2959
  #private;
2890
2960
  geometry: any;
2961
+ image?: {
2962
+ visible: boolean;
2963
+ url: string | Blob;
2964
+ original: string | Blob;
2965
+ useLocalScaling: boolean;
2966
+ viewBox: {
2967
+ width: number;
2968
+ height: number;
2969
+ };
2970
+ scale: {
2971
+ x: number;
2972
+ y: number;
2973
+ };
2974
+ fitToBounds: boolean;
2975
+ position: {
2976
+ x: number;
2977
+ y: number;
2978
+ z: number;
2979
+ };
2980
+ rotation: {
2981
+ x: number;
2982
+ y: number;
2983
+ z: number;
2984
+ };
2985
+ };
2986
+ holes?: unknown[];
2987
+ textures?: {
2988
+ image: any;
2989
+ name: 'front' | 'side';
2990
+ useFrontFaceImage?: boolean;
2991
+ }[];
2992
+ material: {
2993
+ color: string;
2994
+ opacity?: number;
2995
+ };
2996
+ label?: {
2997
+ visible: boolean;
2998
+ text: string;
2999
+ align: string;
3000
+ position: {
3001
+ x: number;
3002
+ y: number;
3003
+ z: number;
3004
+ };
3005
+ rotation: {
3006
+ x: number;
3007
+ y: number;
3008
+ z: number;
3009
+ };
3010
+ fontFamily: string;
3011
+ fontSize: number;
3012
+ color: string;
3013
+ };
2891
3014
  /**
2892
3015
  * Node ID.
2893
3016
  *
@@ -3074,6 +3197,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
3074
3197
  import type { TGeoReference } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.types';
3075
3198
  import type { MappedinMapGroup } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMapGroup';
3076
3199
  import { MappedinCoordinate } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoordinate';
3200
+ import { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue';
3077
3201
  /**
3078
3202
  * 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.
3079
3203
  *
@@ -3100,6 +3224,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
3100
3224
  shortName: string;
3101
3225
  elevation: number;
3102
3226
  scale?: number;
3227
+ layers: {
3228
+ visible: boolean;
3229
+ name: string;
3230
+ id: string;
3231
+ }[];
3103
3232
  x_scale?: number;
3104
3233
  perspectiveId?: string;
3105
3234
  scene: any;
@@ -3114,6 +3243,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
3114
3243
  * @property polygons {[MappedinPolygon]}
3115
3244
  */
3116
3245
  get polygons(): MappedinPolygon[] | undefined;
3246
+ /**
3247
+ * Locations on this map
3248
+ */
3249
+ get locations(): MappedinLocation[];
3250
+ get nodes(): import("./MappedinNode").MappedinNode[];
3117
3251
  /**
3118
3252
  * Map Group this map belongs to.
3119
3253
  *
@@ -3151,28 +3285,56 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinEvent
3151
3285
  import type { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
3152
3286
  import type { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
3153
3287
  /**
3154
- * An event.
3288
+ * An event such as a promotion attached to a location in a venue for a period of time. Events can be created in the Mappedin CMS.
3155
3289
  *
3156
3290
  * @class MappedinEvent
3157
3291
  */
3158
3292
  export class MappedinEvent {
3159
3293
  #private;
3294
+ /**
3295
+ * Unique id string of the event.
3296
+ */
3160
3297
  id: string;
3161
3298
  type: string;
3299
+ /**
3300
+ * Event name
3301
+ */
3162
3302
  name: string;
3303
+ /**
3304
+ * Optional, longer description of the event.
3305
+ */
3163
3306
  description?: string | undefined;
3307
+ /**
3308
+ * Optional image to be used for displaying the event.
3309
+ */
3164
3310
  image?: TImage | undefined;
3311
+ /**
3312
+ * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC.
3313
+ */
3165
3314
  startDate?: number | undefined;
3315
+ /**
3316
+ * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC.
3317
+ */
3166
3318
  endDate?: number | undefined;
3319
+ /**
3320
+ * Timestamp when the event should be displayed. Javascript date in milliseconds since 1 January 1970 UTC.
3321
+ */
3167
3322
  showDate?: number | undefined;
3323
+ /**
3324
+ * @internal
3325
+ */
3168
3326
  constructor(mappedin: Mappedin, data: any);
3169
3327
  /**
3170
- * Location this Event is occuring at.
3171
- *
3172
- * @property location {MappedinLocation}
3328
+ * Location this event is occuring at.
3173
3329
  */
3174
3330
  location(): MappedinLocation | undefined;
3331
+ /**
3332
+ * @internal
3333
+ */
3175
3334
  static hydrate(events: any, mappedin: Mappedin): MappedinEvent[];
3335
+ /**
3336
+ * @internal
3337
+ */
3176
3338
  static fetch(mappedin: Mappedin): Promise<MappedinEvent[]>;
3177
3339
  toJSON(): any;
3178
3340
  }
@@ -3579,9 +3741,6 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.
3579
3741
  export type TMapGroup = {
3580
3742
  name: string;
3581
3743
  id: string;
3582
- maps: {
3583
- id: TMap['id'];
3584
- }[];
3585
3744
  };
3586
3745
  export type TBuilding = TLocation & {
3587
3746
  groupId: string;
@@ -3634,27 +3793,32 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.
3634
3793
  entranceNodeId: string;
3635
3794
  score: number;
3636
3795
  };
3637
- export type TVenue = {
3638
- address: string;
3639
- city: string;
3640
- countrycode: string;
3641
- defaultMap: string;
3642
- externalId: string;
3796
+ export type TLocationState = {
3643
3797
  id: string;
3644
- latitude: number;
3645
- logo: TLogo;
3646
- longitude: number;
3647
- metadata?: any;
3648
3798
  name: string;
3649
- operationHours: TOpeningHours[];
3650
- postal: string;
3651
- slug: string;
3652
- state: string;
3653
- telephone: string;
3654
- tzid: string;
3655
- tzidOverride: string;
3656
- utcOffset: string;
3657
- website: string;
3799
+ value: string;
3800
+ };
3801
+ export type TVenue = {
3802
+ address?: string;
3803
+ city?: string;
3804
+ countrycode?: string;
3805
+ defaultMap?: string;
3806
+ externalId?: string;
3807
+ id?: string;
3808
+ latitude?: number;
3809
+ logo?: TLogo;
3810
+ longitude?: number;
3811
+ metadata?: any;
3812
+ name?: string;
3813
+ operationHours?: TOpeningHours[];
3814
+ postal?: string;
3815
+ slug?: string;
3816
+ state?: string;
3817
+ telephone?: string;
3818
+ tzid?: string;
3819
+ tzidOverride?: string;
3820
+ utcOffset?: string;
3821
+ website?: string;
3658
3822
  };
3659
3823
  export type TMappedinAPI = {
3660
3824
  nodes: TNode[];
@@ -3666,6 +3830,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.
3666
3830
  themes: any;
3667
3831
  venue: TVenue;
3668
3832
  vortexes: TVortex[];
3833
+ locationStates?: TLocationState[];
3669
3834
  };
3670
3835
  }
3671
3836
 
@@ -3804,6 +3969,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3804
3969
  RIGHT = "right"
3805
3970
  }
3806
3971
  class FloatingLabel extends BaseCollider implements ISmarterLabel {
3972
+ #private;
3807
3973
  lines: number;
3808
3974
  contextConfigured: boolean;
3809
3975
  fillText: TDrawFn | undefined;
@@ -3957,19 +4123,19 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3957
4123
  }
3958
4124
  export type TBlueDotPositionUpdate = {
3959
4125
  /**
3960
- * What Map is Blue Dot on
4126
+ * The {@link MappedinMap} Blue Dot position is on
3961
4127
  */
3962
4128
  map?: MappedinMap;
3963
4129
  /**
3964
- * The nearest Node to the BlueDot
4130
+ * The nearest {@link MappedinNode} to the Blue Dot position
3965
4131
  */
3966
4132
  nearestNode?: MappedinNode;
3967
4133
  /**
3968
- * Actual position of BlueDot (post smoothing, if smoothing is on)
4134
+ * Actual position of Blue Dot (post smoothing, if smoothing is enabled)
3969
4135
  */
3970
4136
  position?: TGeolocationObject;
3971
4137
  /**
3972
- * Current BlueDot bearing
4138
+ * Current Blue Dot bearing
3973
4139
  */
3974
4140
  bearing?: number;
3975
4141
  };
@@ -3979,11 +4145,11 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3979
4145
  */
3980
4146
  name: E_BLUEDOT_STATE;
3981
4147
  /**
3982
- * Visiblity State of the BlueDot marker
4148
+ * Visiblity state of the Blue Dot marker
3983
4149
  */
3984
4150
  markerVisibility?: E_BLUEDOT_MARKER_STATE;
3985
4151
  /**
3986
- * Reason why BlueDot may be in the current state
4152
+ * Reason why Blue Dot may be in the current state
3987
4153
  */
3988
4154
  reason?: E_BLUEDOT_STATE_REASON;
3989
4155
  /**
@@ -4012,71 +4178,75 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4012
4178
  import { Vector3 } from 'three';
4013
4179
  import { TColliderStrategy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
4014
4180
  /**
4015
- *
4016
- * A Tooltip is an html element that attempts to orient itself around an anchor in 3D space. It will always maintain the same size on the screen, but will attempt to change its orientation based on other colliders in the scene.
4017
- *
4018
- * Make your own and add it directly to the map with {{#crossLink "MapView/createTooltip:method"}}{{/crossLink}}, or use the constructor and add it when you want.
4019
- *
4020
- * You will need to specify at least `options.position` and one of `options.html` and `options.selector` OR `options.contentHtml`.
4021
- *
4022
- *
4023
- * @class Tooltip
4024
- *
4025
- * @constructor
4026
- * @param options {Object} Passes on options (e.g. html, text, position, map, padding, defaultAnchorType, enabledAnchorTypes, collisionRank) to MapView.Tooltip's options argument.
4027
- * @param [options.html] Pass in custom html for your marker, if using this method you must also pass in a selector for your content.
4028
- * @param [options.selector] Used in conjuction with the html property to select the div for repositioning
4029
- * @param [options.contentHtml] Use mappedin's default tooltip styling with custom inner html content
4030
- * @param [options.text] Instead of passing html pass in plain text to be displayed in the tooltip
4031
- * @param [options.position] should be something you got from {{#crossLink "MapView/getPositionPolygon:method"}}{{/crossLink}} or {{#crossLink "MapView/getPositionNode:method"}}{{/crossLink}}.
4032
- * @param [options.map] The map ID where the tooltip should be displayed
4033
- * @param [options.defaultAnchorType] The default orientation to place the tooltip.
4034
- * @param [options.padding] The distance in pixel to offset the tooltip from the anchor point.
4035
- * @param [options.enabledAnchorTypes] An object used to disable certain anchor positions from being used.
4036
- * @param [options.collisionRank] The rank of the object used when comparing colliders to determine which should be shown.
4037
- */
4181
+ *
4182
+ * A Tooltip is an html element that attempts to orient itself around an anchor in 3D space. It will always maintain the same size on the screen, but will attempt to change its orientation based on other colliders in the scene.
4183
+ *
4184
+ * Make your own and add it directly to the map with {{#crossLink "MapView/createTooltip:method"}}{{/crossLink}}, or use the constructor and add it when you want.
4185
+ *
4186
+ * You will need to specify at least `options.position` and one of `options.html` and `options.selector` OR `options.contentHtml`.
4187
+ *
4188
+ *
4189
+ * @class Tooltip
4190
+ *
4191
+ * @constructor
4192
+ * @param options {Object} Passes on options (e.g. html, text, position, map, padding, defaultAnchorType, enabledAnchorTypes, collisionRank) to MapView.Tooltip's options argument.
4193
+ * @param [options.html] Pass in custom html for your marker, if using this method you must also pass in a selector for your content.
4194
+ * @param [options.selector] Used in conjuction with the html property to select the div for repositioning
4195
+ * @param [options.contentHtml] Use mappedin's default tooltip styling with custom inner html content
4196
+ * @param [options.text] Instead of passing html pass in plain text to be displayed in the tooltip
4197
+ * @param [options.position] should be something you got from {{#crossLink "MapView/getPositionPolygon:method"}}{{/crossLink}} or {{#crossLink "MapView/getPositionNode:method"}}{{/crossLink}}.
4198
+ * @param [options.map] The map ID where the tooltip should be displayed
4199
+ * @param [options.defaultAnchorType] The default orientation to place the tooltip.
4200
+ * @param [options.padding] The distance in pixel to offset the tooltip from the anchor point.
4201
+ * @param [options.enabledAnchorTypes] An object used to disable certain anchor positions from being used.
4202
+ * @param [options.collisionRank] The rank of the object used when comparing colliders to determine which should be shown.
4203
+ */
4038
4204
  export type TSmartTooltipOptions = {
4039
- html?: string;
4040
- contentHtml?: string;
4041
- text?: string;
4042
- position: Vector3;
4043
- selector?: string;
4044
- map: string;
4045
- padding?: number;
4046
- alwaysVisible?: boolean;
4047
- collisionRank?: COLLISION_RANKING_TIERS;
4048
- defaultAnchorType?: string;
4049
- enabledAnchorTypes?: {
4050
- [type: string]: boolean;
4051
- };
4205
+ html?: string;
4206
+ contentHtml?: string;
4207
+ text?: string;
4208
+ position: Vector3;
4209
+ selector?: string;
4210
+ map: string;
4211
+ padding?: number;
4212
+ alwaysVisible?: boolean;
4213
+ collisionRank?: COLLISION_RANKING_TIERS;
4214
+ defaultAnchorType?: string;
4215
+ enabledAnchorTypes?: {
4216
+ [type: string]: boolean;
4217
+ };
4052
4218
  };
4053
4219
  type TTooltipStyle = {
4054
- top?: string;
4055
- left?: string;
4220
+ top?: string;
4221
+ left?: string;
4056
4222
  };
4057
4223
  export type TOOLTIP_ANCHOR = {
4058
- top?: boolean;
4059
- left?: boolean;
4060
- topLeft?: boolean;
4061
- right?: boolean;
4062
- topRight?: boolean;
4063
- bottom?: boolean;
4064
- bottomLeft?: boolean;
4065
- bottomRight?: boolean;
4224
+ top?: boolean;
4225
+ left?: boolean;
4226
+ topLeft?: boolean;
4227
+ right?: boolean;
4228
+ topRight?: boolean;
4229
+ bottom?: boolean;
4230
+ bottomLeft?: boolean;
4231
+ bottomRight?: boolean;
4066
4232
  };
4067
4233
  class SmartTooltip extends HTMLCollider implements IHTMLCollider {
4068
- #private;
4069
- className: string;
4070
- _el: Element | null;
4071
- style: TTooltipStyle;
4072
- constructor(options: TSmartTooltipOptions);
4073
- updateClassName: (className: any) => void;
4074
- get strategies(): TColliderStrategy[];
4075
- colliderDidMount(): void;
4076
- setAction(action: any): void;
4077
- colliderDidNotFindAHome(): void;
4078
- colliderDidGoOffscreen(): void;
4079
- colliderDidUpdateVisiblity(): void;
4234
+ #private;
4235
+ className: string;
4236
+ _el: Element | null;
4237
+ style: TTooltipStyle;
4238
+ constructor(options: TSmartTooltipOptions);
4239
+ updateClassName: (className: any) => void;
4240
+ get strategies(): TColliderStrategy[];
4241
+ colliderDidMount(): void;
4242
+ /**
4243
+ * @internal
4244
+ */
4245
+ updateDimensionsImmediately(): void;
4246
+ setAction(action: any): void;
4247
+ colliderDidNotFindAHome(): void;
4248
+ colliderDidGoOffscreen(): void;
4249
+ colliderDidUpdateVisiblity(): void;
4080
4250
  }
4081
4251
  export default SmartTooltip;
4082
4252
  }
@@ -4088,6 +4258,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot
4088
4258
  import { TEnableBlueDotOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4089
4259
  import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed';
4090
4260
  import EventSystemLayer from '@mappedin/react-native-sdk/core/packages/renderer/layers/EventSystem';
4261
+ /**
4262
+ * Blue Dot Layer used for controlling the Blue Dot and listening to Blue Dot state change and position update events. Use the {@link on}-method to set listeners for {@link TBlueDotStateChange} and {@link TBlueDotPositionUpdate} events.
4263
+ */
4091
4264
  class BlueDotLayer extends PubSub<E_BLUEDOT_EVENT_PAYLOAD, E_BLUEDOT_EVENT> {
4092
4265
  #private;
4093
4266
  /**
@@ -4099,7 +4272,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot
4099
4272
  */
4100
4273
  enable(options?: TEnableBlueDotOptions): void;
4101
4274
  /**
4102
- * Disable BlueDot
4275
+ * Disables Blue Dot and stops emitting events.
4103
4276
  */
4104
4277
  disable(): void;
4105
4278
  }
@@ -4118,7 +4291,17 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/Journey
4118
4291
  */
4119
4292
  constructor(mapView: MapView, core: ICore);
4120
4293
  /**
4121
- * Draw a Journey
4294
+ * Draw a Journey based on directions. Example usage:
4295
+ *
4296
+ * ```typescript
4297
+ * const startLocation = venue.locations.find(location => location.name === "Cleo");
4298
+ * const endLocation = venue.locations.find(location => location.name === "American Eagle");
4299
+ *
4300
+ * const directions = startLocation.directionsTo(endLocation);
4301
+ * mapView.Journey.draw(directions);
4302
+ * ```
4303
+ *
4304
+ * Use options to set connection (such as elevators and escalators) HTML tooltip template, departure and destination marker templates, path style and polygon higlight color. If no options are set, sane defaults are used to draw markers, tooltips and polygon highlights.
4122
4305
  */
4123
4306
  draw(directions: MappedinDirections | MappedinDirections[], options?: TJourneyOptions): Journey;
4124
4307
  /**
@@ -4151,8 +4334,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4151
4334
  }
4152
4335
  export class FlatLabel {
4153
4336
  constructor(options: any, venue: any, mapObject: any, DEFAULT_FONT: any, polygonMeshesById: any, textLabelsByPolygonId: any, mapView: any, scope: any, atlas: any);
4337
+ id: any;
4154
4338
  text: any;
4155
4339
  stateText: string;
4340
+ fullText: any;
4156
4341
  font: any;
4157
4342
  atlas: any;
4158
4343
  canvasBounds: any;
@@ -4750,7 +4935,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4750
4935
  import Search from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Search';
4751
4936
  import Analytics from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Analytics';
4752
4937
  import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
4753
- import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
4938
+ import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
4754
4939
  import { PositionUpdater } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
4755
4940
  import type { TMapViewOptions, TJourneyOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4756
4941
  import { labelThemes } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
@@ -4781,9 +4966,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4781
4966
  */
4782
4967
  function showVenue<T extends Mappedin>(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise<MapView>;
4783
4968
  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';
4784
- export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
4969
+ export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
4785
4970
  import DefaultAssetManager from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager';
4786
- const setAssetManager: (am: any) => void;
4971
+ const setAssetManager: <T extends DefaultAssetManager>(am: T) => void;
4787
4972
  /**
4788
4973
  * @internal
4789
4974
  */
@@ -4798,7 +4983,210 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4798
4983
  export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions, default as Camera } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
4799
4984
  export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
4800
4985
  export type { TGetVenueOptions, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
4801
- export { Mappedin, MappedinDirections } from '@mappedin/react-native-sdk/core/packages/get-venue';
4986
+ export { Mappedin, MappedinDirections, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue';
4987
+ }
4988
+
4989
+ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.MVF.types' {
4990
+ import { FeatureCollection, Polygon, Point, MultiPolygon } from 'geojson';
4991
+ type ManifestFile = {
4992
+ type: 'file';
4993
+ name: string;
4994
+ };
4995
+ type ManifestFolder = {
4996
+ type: 'folder';
4997
+ name: string;
4998
+ children: ManifestFile[];
4999
+ };
5000
+ type OpeningHours = {
5001
+ opens: string;
5002
+ closes: string;
5003
+ dayOfWeek: string;
5004
+ validFrom?: string;
5005
+ validThrough?: string;
5006
+ };
5007
+ type Image = {
5008
+ original?: string;
5009
+ xlarge?: string;
5010
+ xxlarge?: string;
5011
+ medium?: string;
5012
+ '140x140'?: string;
5013
+ xsmall?: string;
5014
+ xxsmall?: string;
5015
+ '66x66'?: string;
5016
+ small?: string;
5017
+ large?: string;
5018
+ };
5019
+ type PolygonImage = string;
5020
+ type Phone = {
5021
+ number: string;
5022
+ extension?: string;
5023
+ };
5024
+ type Link = {
5025
+ label: string;
5026
+ url: string;
5027
+ };
5028
+ type Social = {
5029
+ facebook?: string;
5030
+ twitter?: string;
5031
+ instagram?: string;
5032
+ website?: string;
5033
+ };
5034
+ type LocationState = {
5035
+ type: string;
5036
+ start?: string;
5037
+ end?: string;
5038
+ };
5039
+ type ImageTransform = {
5040
+ position: {
5041
+ x: number;
5042
+ y: number;
5043
+ z: number;
5044
+ };
5045
+ rotation: number;
5046
+ scale: {
5047
+ x: number;
5048
+ y: number;
5049
+ };
5050
+ };
5051
+ type SiblingGroup = {
5052
+ label: string;
5053
+ siblings: string[];
5054
+ };
5055
+ export type MILocationProperties = {
5056
+ id: string;
5057
+ address?: string | null;
5058
+ categories: string[];
5059
+ description?: string | null;
5060
+ email?: string | null;
5061
+ externalId?: string | null;
5062
+ hours?: OpeningHours[] | null;
5063
+ links?: Link[] | null;
5064
+ logo?: Image | null;
5065
+ name: string;
5066
+ phone?: Phone | null;
5067
+ picture?: Image | null;
5068
+ services?: string | null;
5069
+ siblingGroups?: SiblingGroup[] | null;
5070
+ social?: Social | null;
5071
+ spaces?: TLocationSpaceReference[] | null;
5072
+ states?: LocationState[] | null;
5073
+ type: string;
5074
+ };
5075
+ export type MICategoryProperties = {
5076
+ id: string;
5077
+ name: string;
5078
+ picture?: Image;
5079
+ };
5080
+ export type MIBuildingProperties = {
5081
+ id: string;
5082
+ name: string;
5083
+ venue: string;
5084
+ };
5085
+ export type MILevelProperties = {
5086
+ id: string;
5087
+ abbreviation?: string;
5088
+ building?: string;
5089
+ elevation?: number;
5090
+ name: string;
5091
+ };
5092
+ export type MIPolygonlikeProperties = {
5093
+ id: string;
5094
+ altitude?: string;
5095
+ color?: string;
5096
+ externalId?: string | null;
5097
+ height?: string;
5098
+ layer?: string;
5099
+ level: string;
5100
+ parent?: string | null;
5101
+ };
5102
+ type TPseudoNodeSpaceReference = {
5103
+ node: string;
5104
+ map: string;
5105
+ };
5106
+ export type TRealSpaceReference = {
5107
+ id: string;
5108
+ map: string;
5109
+ };
5110
+ type TLocationSpaceReference = TPseudoNodeSpaceReference | TRealSpaceReference;
5111
+ export type TEntrances = {
5112
+ id: string;
5113
+ level: string;
5114
+ };
5115
+ export type MISpaceProperties = MIPolygonlikeProperties & {
5116
+ entrances: TEntrances[];
5117
+ };
5118
+ export type MIObstructionProperties = MIPolygonlikeProperties;
5119
+ export type MIConnectionProperties = {
5120
+ id: string;
5121
+ accessible: boolean;
5122
+ destinations: string[];
5123
+ level: string;
5124
+ multiplier: number;
5125
+ name: string;
5126
+ type: string;
5127
+ weight: number;
5128
+ };
5129
+ export type MINodeProperties = {
5130
+ id: string;
5131
+ accessible: boolean;
5132
+ externalId: string | null;
5133
+ level: string;
5134
+ multiplier: number;
5135
+ neighbors: string[];
5136
+ weight: number;
5137
+ };
5138
+ export type MIManifestProperties = {
5139
+ name: string;
5140
+ folder_struct: (ManifestFolder | ManifestFile)[];
5141
+ version: string;
5142
+ time: string;
5143
+ };
5144
+ export type MILayerStyleProperties = {
5145
+ layer: string;
5146
+ altitude: number;
5147
+ color: string;
5148
+ height: number;
5149
+ opacity: number;
5150
+ };
5151
+ export type MIPolygonStyleProperties = {
5152
+ id: string;
5153
+ altitude: number;
5154
+ color: string;
5155
+ height: number;
5156
+ image: PolygonImage;
5157
+ imageTransform: ImageTransform;
5158
+ opacity: number;
5159
+ };
5160
+ export type MIGeoJSONManifestCollection = FeatureCollection<Point, MIManifestProperties>;
5161
+ export type MIGeoJSONBuildingCollection = FeatureCollection<Polygon, MIBuildingProperties>;
5162
+ export type MIGeoJSONConnectionCollection = FeatureCollection<Point, MIConnectionProperties>;
5163
+ export type MIGeoJSONLevelCollection = FeatureCollection<Polygon | MultiPolygon, MILevelProperties>;
5164
+ export type MIGeoJSONSpaceCollection = FeatureCollection<Polygon, MISpaceProperties>;
5165
+ export type MIGeoJSONObstructionCollection = FeatureCollection<Polygon, MIObstructionProperties>;
5166
+ export type MIGeoJSONNodeCollection = FeatureCollection<Point, MINodeProperties>;
5167
+ export type MIGeoJSONLocationCollection = FeatureCollection<null, MILocationProperties>;
5168
+ export type MIGeoJSONCategoryCollection = FeatureCollection<null, MICategoryProperties>;
5169
+ export type MIGeoJSONLayerStyleCollection = FeatureCollection<null, MILayerStyleProperties>;
5170
+ export type MIGeoJSONPolygonStyleCollection = FeatureCollection<null, MIPolygonStyleProperties>;
5171
+ export type WithIDs<T> = Map<string, T>;
5172
+ /**
5173
+ * The entire data collection for an MVF, in a single JSON collection.
5174
+ *
5175
+ */
5176
+ export type MVFData = {
5177
+ connection: WithIDs<MIGeoJSONConnectionCollection>;
5178
+ level: WithIDs<MIGeoJSONLevelCollection>;
5179
+ node: WithIDs<MIGeoJSONNodeCollection>;
5180
+ obstruction: WithIDs<MIGeoJSONObstructionCollection>;
5181
+ polygonStyle: WithIDs<MIGeoJSONPolygonStyleCollection>;
5182
+ space: WithIDs<MIGeoJSONSpaceCollection>;
5183
+ building: MIGeoJSONBuildingCollection;
5184
+ category: MIGeoJSONCategoryCollection;
5185
+ layerStyle: MIGeoJSONLayerStyleCollection;
5186
+ location: MIGeoJSONLocationCollection;
5187
+ manifest: MIGeoJSONManifestCollection;
5188
+ };
5189
+ export {};
4802
5190
  }
4803
5191
 
4804
5192
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocationRankings' {
@@ -5439,6 +5827,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5439
5827
  _started: boolean;
5440
5828
  _loaderPromise: null;
5441
5829
  _promiseResolve: null;
5830
+ hoverableMeshChildren: any[];
5442
5831
  objectsDictionary: {};
5443
5832
  north: null;
5444
5833
  mapScale: null;
@@ -5459,6 +5848,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5459
5848
  loadAsync: any;
5460
5849
  _taskScheduler: any;
5461
5850
  id: any;
5851
+ mapRenderingStrategy: any;
5462
5852
  _highPriorityTasks: FrameTaskGroup;
5463
5853
  _lowPriorityTasks: FrameTaskGroup;
5464
5854
  _markerTasks: FrameTaskGroup;
@@ -5466,6 +5856,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5466
5856
  _visibilityLatch: boolean | null;
5467
5857
  _objLoadedComplete: boolean;
5468
5858
  _objLoaded(object: any): any;
5859
+ _objLoadedMerged(object: any): void;
5469
5860
  enableImageFlipping(polygonId: any, rotation: any): void;
5470
5861
  elements: any;
5471
5862
  boundingBox: {
@@ -5624,12 +6015,12 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5624
6015
  }
5625
6016
 
5626
6017
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager' {
5627
- import { TextureLoader } from 'three';
6018
+ import { Texture, TextureLoader } from 'three';
5628
6019
  import type { MappedinMap } from '@mappedin/react-native-sdk/core/packages/renderer';
5629
6020
  export default class DefaultAssetManager {
5630
6021
  textureLoader: TextureLoader;
5631
6022
  loadMapPolygons(map: MappedinMap): Promise<any>;
5632
- loadImage(url: string): Promise<unknown>;
6023
+ loadImage(url: string): Promise<Texture>;
5633
6024
  }
5634
6025
  }
5635
6026