@mappedin/react-native-sdk 5.22.0 → 5.24.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
|
@@ -666,7 +666,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
|
|
|
666
666
|
pulseColor?: string;
|
|
667
667
|
/**
|
|
668
668
|
* Number of iterations to pulse to indicate direction
|
|
669
|
-
* @defaultValue
|
|
669
|
+
* @defaultValue 1
|
|
670
670
|
*/
|
|
671
671
|
pulseIterations?: number;
|
|
672
672
|
/**
|
|
@@ -794,7 +794,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
|
|
|
794
794
|
/**
|
|
795
795
|
* What color to highlight departure and destination polygons
|
|
796
796
|
* Pass false to disable
|
|
797
|
-
* @default '#
|
|
797
|
+
* @default '#7babc8'
|
|
798
798
|
*/
|
|
799
799
|
polygonHighlightColor?: string | false;
|
|
800
800
|
/**
|
|
@@ -893,6 +893,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
|
|
|
893
893
|
* @default false
|
|
894
894
|
*/
|
|
895
895
|
interactive?: boolean;
|
|
896
|
+
/**
|
|
897
|
+
* Optional layer to attach the {@link Marker} to.
|
|
898
|
+
*/
|
|
899
|
+
layer?: string;
|
|
896
900
|
};
|
|
897
901
|
/**
|
|
898
902
|
* Configurations for an animation
|
|
@@ -932,6 +936,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
|
|
|
932
936
|
* The rank of the object used when comparing colliders to determine which should be shown.
|
|
933
937
|
*/
|
|
934
938
|
collisionRank?: COLLISION_RANKING_TIERS;
|
|
939
|
+
/**
|
|
940
|
+
* Optional layer to attach the Tooltip to.
|
|
941
|
+
*/
|
|
942
|
+
layer?: string;
|
|
935
943
|
};
|
|
936
944
|
export type TCreateTooltipOptions = TCreateTooltipCommonOptions & {
|
|
937
945
|
/**
|
|
@@ -1073,26 +1081,32 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
|
|
|
1073
1081
|
*/
|
|
1074
1082
|
dynamicFocus?: {
|
|
1075
1083
|
/**
|
|
1076
|
-
* The Dynamic Focus Map to always be visible
|
|
1084
|
+
* The Dynamic Focus Map to always be visible.
|
|
1077
1085
|
*/
|
|
1078
1086
|
baseMap?: MappedinMap;
|
|
1079
1087
|
/**
|
|
1080
|
-
* Mercator Zoom level where the indoors are fully visible
|
|
1088
|
+
* Mercator Zoom level where the indoors are fully visible.
|
|
1081
1089
|
*/
|
|
1082
1090
|
indoorsFullyVisibleZoomLevel?: number;
|
|
1083
1091
|
/**
|
|
1084
|
-
* Mercator Zoom level when the outdoors geometry is fully visible
|
|
1092
|
+
* Mercator Zoom level when the outdoors geometry is fully visible.
|
|
1085
1093
|
*/
|
|
1086
1094
|
buildingFullyVisibleZoomLevel?: number;
|
|
1087
1095
|
/**
|
|
1088
|
-
* Level at which the map is "set", and colliders become visible
|
|
1096
|
+
* Level at which the map is "set", and colliders become visible.
|
|
1089
1097
|
*/
|
|
1090
1098
|
setMapAtZoomLevel?: number;
|
|
1091
1099
|
/**
|
|
1092
|
-
* Whether we should preload the default maps of each building
|
|
1093
|
-
* This will incur a cost up-front, but make transitions smoother
|
|
1100
|
+
* Whether we should preload the default maps of each building.
|
|
1101
|
+
* This will incur a cost up-front, but make transitions smoother.
|
|
1102
|
+
* @default false
|
|
1094
1103
|
*/
|
|
1095
1104
|
preloadDefaultMaps?: boolean;
|
|
1105
|
+
/**
|
|
1106
|
+
* An array of base map layer names which should remain active when the focus has changed to a building map.
|
|
1107
|
+
* This could include outdoor {@link FloatingLabel}s or {@link Marker}s that are attached to the base map.
|
|
1108
|
+
*/
|
|
1109
|
+
keepLayersActiveOnBaseMap?: string[];
|
|
1096
1110
|
};
|
|
1097
1111
|
/**
|
|
1098
1112
|
* @experimental
|
|
@@ -1365,6 +1379,11 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
|
|
|
1365
1379
|
* @default false
|
|
1366
1380
|
*/
|
|
1367
1381
|
interactive?: boolean;
|
|
1382
|
+
/**
|
|
1383
|
+
* Optional layer to attach the FloatingLabel to.
|
|
1384
|
+
* If not provided, this will be empty or the layer of the {@link MappedinPolygon} that the label is attached to.
|
|
1385
|
+
*/
|
|
1386
|
+
layer?: string;
|
|
1368
1387
|
};
|
|
1369
1388
|
export type TLabelAllLocationCommonOptions = {
|
|
1370
1389
|
/**
|
|
@@ -1577,6 +1596,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
|
|
|
1577
1596
|
import type { TGetVenueOptions, TVenueMetadata } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
|
|
1578
1597
|
import { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
|
|
1579
1598
|
import { defaultThings } from '@mappedin/react-native-sdk/core/packages/get-venue/default-things';
|
|
1599
|
+
import { GET_VENUE_EVENT } from '@mappedin/react-native-sdk/core/packages/get-venue/internal';
|
|
1580
1600
|
/**
|
|
1581
1601
|
* This is how we can avoid bundling in node-fetch (via isomorphic fetch),
|
|
1582
1602
|
* which keeps popping up in security advisories
|
|
@@ -1587,8 +1607,14 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
|
|
|
1587
1607
|
*/
|
|
1588
1608
|
export function isomorphicFetch(): Window['fetch'];
|
|
1589
1609
|
/**
|
|
1590
|
-
*
|
|
1591
|
-
*
|
|
1610
|
+
* Overwrite the internal `fetch` function with your own. Typically for use in Node.js and Jest.
|
|
1611
|
+
*
|
|
1612
|
+
* @example
|
|
1613
|
+
* ```js
|
|
1614
|
+
* const { getVenue } = require("@mappedin/mappedin-js/lib/node/index");
|
|
1615
|
+
* setFetchFn(require("node-fetch-commonjs"));
|
|
1616
|
+
* ```
|
|
1617
|
+
*
|
|
1592
1618
|
*/
|
|
1593
1619
|
export function setFetchFn(fetchFn: any): void;
|
|
1594
1620
|
/** Classes */
|
|
@@ -1664,7 +1690,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
|
|
|
1664
1690
|
*/
|
|
1665
1691
|
xRayPath?: boolean;
|
|
1666
1692
|
};
|
|
1667
|
-
export { MAP_RENDER_MODE };
|
|
1693
|
+
export { MAP_RENDER_MODE, GET_VENUE_EVENT };
|
|
1668
1694
|
/**
|
|
1669
1695
|
* @internal
|
|
1670
1696
|
*/
|
|
@@ -1689,6 +1715,10 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
|
|
|
1689
1715
|
};
|
|
1690
1716
|
export type TGetVenueMVFOptions = TGetVenueBundleOptions & {
|
|
1691
1717
|
onMVFParsed?: (mvf: ParsedMVF) => void;
|
|
1718
|
+
/**
|
|
1719
|
+
* Override initial MVF data
|
|
1720
|
+
*/
|
|
1721
|
+
override?: Partial<Pick<ParsedMVF, 'styles.json'>>;
|
|
1692
1722
|
};
|
|
1693
1723
|
/**
|
|
1694
1724
|
* @deprecated
|
|
@@ -2666,6 +2696,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
|
|
|
2666
2696
|
*/
|
|
2667
2697
|
searchOptions?: TMappedinOfflineSearchOptions;
|
|
2668
2698
|
};
|
|
2699
|
+
context: string;
|
|
2669
2700
|
};
|
|
2670
2701
|
[EVENT.SHOW_VENUE]: {
|
|
2671
2702
|
venueData: string;
|
|
@@ -3475,6 +3506,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
|
|
|
3475
3506
|
prepareSearch?: boolean;
|
|
3476
3507
|
searchOptions?: Partial<import("../react-native-sdk/src").TMappedinOfflineSearchAllOptions>;
|
|
3477
3508
|
};
|
|
3509
|
+
context: string;
|
|
3478
3510
|
};
|
|
3479
3511
|
};
|
|
3480
3512
|
SHOW_VENUE: {
|
|
@@ -4095,6 +4127,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
4095
4127
|
*/
|
|
4096
4128
|
appearance?: TFloatingLabelAppearance;
|
|
4097
4129
|
createDespiteImage?: boolean;
|
|
4130
|
+
layer?: string;
|
|
4098
4131
|
};
|
|
4099
4132
|
enum PINVISIBILITY {
|
|
4100
4133
|
OPAQUE = 1,
|
|
@@ -4148,6 +4181,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
4148
4181
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core' {
|
|
4149
4182
|
import { IStateMachine } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.StateMachine';
|
|
4150
4183
|
import { E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
|
|
4184
|
+
import PositionSmoothing from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/position-smoothing';
|
|
4151
4185
|
import { PubSub, IPubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub';
|
|
4152
4186
|
import { MappedinMap, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
4153
4187
|
import { TGeolocationObject } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
@@ -4212,16 +4246,17 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
4212
4246
|
*/
|
|
4213
4247
|
useRotationMode?: boolean;
|
|
4214
4248
|
};
|
|
4215
|
-
type TUserData = {
|
|
4249
|
+
export type TUserData = {
|
|
4216
4250
|
state: E_BLUEDOT_STATE;
|
|
4217
4251
|
position: TGeolocationObject | null;
|
|
4218
4252
|
map: MappedinMap | null;
|
|
4219
4253
|
bearing: any;
|
|
4220
4254
|
nearestNode: any;
|
|
4255
|
+
forceBlueDot: boolean;
|
|
4221
4256
|
};
|
|
4222
4257
|
export interface IBlueDotCore extends IPubSub {
|
|
4223
4258
|
positionUpdater: IPositionUpdater | null;
|
|
4224
|
-
positionSmoothing:
|
|
4259
|
+
positionSmoothing: PositionSmoothing;
|
|
4225
4260
|
locationUncertainTimeoutPeriod: number;
|
|
4226
4261
|
fallbackToGPSTimeoutPeriod: number;
|
|
4227
4262
|
enableBlueDot: (options?: TEnableBlueDotOptions) => void;
|
|
@@ -4309,7 +4344,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
4309
4344
|
}
|
|
4310
4345
|
|
|
4311
4346
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/private/controllers/PathsController' {
|
|
4312
|
-
import { MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
4347
|
+
import { MappedinNode, MappedinCoordinate } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
4313
4348
|
import type { ICore, TPathOptions } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
4314
4349
|
import { ANIMATION_TWEENS } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
4315
4350
|
/**
|
|
@@ -4329,7 +4364,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/contro
|
|
|
4329
4364
|
*/
|
|
4330
4365
|
export type TInternalPathSegment = {
|
|
4331
4366
|
id: string;
|
|
4332
|
-
nodes: MappedinNode[];
|
|
4367
|
+
nodes: (MappedinNode | MappedinCoordinate)[];
|
|
4333
4368
|
mapId?: string;
|
|
4334
4369
|
isConnectionPathSegment?: boolean;
|
|
4335
4370
|
reset: () => void;
|
|
@@ -4354,6 +4389,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/contro
|
|
|
4354
4389
|
* A {@link MappedinNode}[] representing the nodes in the path
|
|
4355
4390
|
*/
|
|
4356
4391
|
get nodes(): MappedinNode[];
|
|
4392
|
+
/**
|
|
4393
|
+
* A {@link MappedinCoordinate}[] representing the coordinates in the path
|
|
4394
|
+
*/
|
|
4395
|
+
get coordinates(): MappedinCoordinate[];
|
|
4357
4396
|
}
|
|
4358
4397
|
/**
|
|
4359
4398
|
* @hidden
|
|
@@ -4364,9 +4403,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/contro
|
|
|
4364
4403
|
export class InternalPath {
|
|
4365
4404
|
id: string;
|
|
4366
4405
|
nodes: MappedinNode[];
|
|
4406
|
+
coordinates: MappedinCoordinate[];
|
|
4367
4407
|
pathSegments: TInternalPathSegment[];
|
|
4368
4408
|
options: TPathOptionsInternal;
|
|
4369
|
-
constructor(
|
|
4409
|
+
constructor(path: (MappedinNode | MappedinCoordinate)[], pathSegments: TInternalPathSegment[], options: TPathOptionsInternal);
|
|
4370
4410
|
}
|
|
4371
4411
|
/**
|
|
4372
4412
|
* @hidden
|
|
@@ -4422,7 +4462,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/contro
|
|
|
4422
4462
|
*
|
|
4423
4463
|
* @returns {Array} Array of Tween segments representing paths drawn on screen
|
|
4424
4464
|
*/
|
|
4425
|
-
drawPath(path: MappedinNode[], options?: TPathOptionsInternal): Path;
|
|
4465
|
+
drawPath(path: (MappedinNode | MappedinCoordinate)[], options?: TPathOptionsInternal): Path;
|
|
4426
4466
|
/**
|
|
4427
4467
|
* Redraw an existing path with optional new options. This avoids changing its ID or reference.
|
|
4428
4468
|
*/
|
|
@@ -4477,6 +4517,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
4477
4517
|
[type: string]: boolean;
|
|
4478
4518
|
};
|
|
4479
4519
|
interactive?: boolean;
|
|
4520
|
+
layer?: string;
|
|
4480
4521
|
};
|
|
4481
4522
|
type TTooltipStyle = {
|
|
4482
4523
|
top?: string;
|
|
@@ -4758,13 +4799,14 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.type
|
|
|
4758
4799
|
declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
|
|
4759
4800
|
import { Navigator } from '@mappedin/react-native-sdk/core/packages/navigator';
|
|
4760
4801
|
import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
|
|
4761
|
-
import type { MappedinNode, MappedinPolygon, MappedinLocation, MappedinCategory, MappedinVortex, MappedinVenue, MappedinTheme, MappedinRankings, MappedinLocationRankings, MappedinEvent, MappedinLocationState, MappedinMap, MappedinMapGroup } from '@mappedin/react-native-sdk/core/packages/get-venue/internal';
|
|
4762
|
-
import { TAccessors } from '@mappedin/react-native-sdk/core/packages/get-venue/internal';
|
|
4802
|
+
import type { MappedinNode, MappedinPolygon, MappedinLocation, MappedinCategory, MappedinVortex, MappedinVenue, MappedinTheme, MappedinRankings, MappedinLocationRankings, MappedinEvent, MappedinLocationState, MappedinMap, MappedinMapGroup, GET_VENUE_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/get-venue/internal';
|
|
4803
|
+
import { TAccessors, GET_VENUE_EVENT } from '@mappedin/react-native-sdk/core/packages/get-venue/internal';
|
|
4763
4804
|
import { IAnalytics } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.CustomerAnalytics';
|
|
4764
4805
|
import { ParsedMVF } from '@mappedin/mvf';
|
|
4765
4806
|
import { ParsedMVFv1 } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.MVF.types';
|
|
4807
|
+
import { PubSub } from '@mappedin/react-native-sdk/core/packages/get-venue/pub-sub.typed';
|
|
4766
4808
|
export const defaultOptions: TGetVenueOptionsInternal & TGetVenueOptions;
|
|
4767
|
-
export class Mappedin {
|
|
4809
|
+
export class Mappedin extends PubSub<GET_VENUE_PAYLOAD, GET_VENUE_EVENT> {
|
|
4768
4810
|
#private;
|
|
4769
4811
|
perspective: any;
|
|
4770
4812
|
things: any;
|
|
@@ -4782,6 +4824,10 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
|
|
|
4782
4824
|
themes: MappedinTheme[];
|
|
4783
4825
|
locationStates: MappedinLocationState[];
|
|
4784
4826
|
rankings?: MappedinRankings;
|
|
4827
|
+
currentLanguage: {
|
|
4828
|
+
name: string;
|
|
4829
|
+
code: string;
|
|
4830
|
+
};
|
|
4785
4831
|
/**
|
|
4786
4832
|
* @hidden
|
|
4787
4833
|
* @internal
|
|
@@ -4969,6 +5015,14 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
|
|
|
4969
5015
|
* @internal
|
|
4970
5016
|
*/
|
|
4971
5017
|
hydrateFromMVFv1(mvfData: ParsedMVFv1): Promise<undefined>;
|
|
5018
|
+
/**
|
|
5019
|
+
* Change the language of the venue. This will trigger a re-fetch of the venue data and emit a
|
|
5020
|
+
* {GET_VENUE_EVENT.LANGUAGE_CHANGED} event.
|
|
5021
|
+
*
|
|
5022
|
+
* @param languageCode The language code to change to
|
|
5023
|
+
* @param cache Whether or not to cache the current language so it doesn't need to be re-fetched
|
|
5024
|
+
*/
|
|
5025
|
+
changeLanguage(languageCode: string, cache?: boolean): Promise<void>;
|
|
4972
5026
|
/**
|
|
4973
5027
|
*
|
|
4974
5028
|
* @experimental Hydrate the Mappedin instance using a response from either {@link Mappedin.toString}, {@link getVenueBundle} or by downloading the bundle manually
|
|
@@ -5072,6 +5126,15 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/internal' {
|
|
|
5072
5126
|
};
|
|
5073
5127
|
export type TTHINGS = keyof typeof THINGS;
|
|
5074
5128
|
export type { TDirectionToOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavigatable';
|
|
5129
|
+
export enum GET_VENUE_EVENT {
|
|
5130
|
+
LANGUAGE_CHANGED = 0
|
|
5131
|
+
}
|
|
5132
|
+
export type GET_VENUE_PAYLOAD = {
|
|
5133
|
+
[GET_VENUE_EVENT.LANGUAGE_CHANGED]: {
|
|
5134
|
+
name: string;
|
|
5135
|
+
code: string;
|
|
5136
|
+
};
|
|
5137
|
+
};
|
|
5075
5138
|
export { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
|
|
5076
5139
|
}
|
|
5077
5140
|
|
|
@@ -5143,7 +5206,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Cust
|
|
|
5143
5206
|
* This method should be called whenever the user's position changes. This information will be sent when a track call is made.
|
|
5144
5207
|
* @param position {AnalyticsUserPosition} The user's current position.
|
|
5145
5208
|
*/
|
|
5146
|
-
updateAnalyticsUserPosition(position: AnalyticsUserPosition | undefined): void;
|
|
5209
|
+
updateAnalyticsUserPosition(position: Omit<AnalyticsUserPosition, 'bluedotTimestamp'> | undefined): void;
|
|
5147
5210
|
/**
|
|
5148
5211
|
* Whenever a location is selected, you should fire this event. What "selected" means can vary by venue,
|
|
5149
5212
|
* but a good rule of thumb is that you fire the event whenever you would show the location's details.
|
|
@@ -5372,7 +5435,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocat
|
|
|
5372
5435
|
*/
|
|
5373
5436
|
directionsTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): MappedinDirections;
|
|
5374
5437
|
directionsTo(destination: MappedinDestinationSet, options?: TDirectionToOptions): MappedinDirections[];
|
|
5375
|
-
|
|
5438
|
+
/**
|
|
5439
|
+
*
|
|
5440
|
+
* Calculate distance between 2 nodes, polygons or locations
|
|
5441
|
+
*/
|
|
5442
|
+
distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): number;
|
|
5376
5443
|
toJSON(): any;
|
|
5377
5444
|
}
|
|
5378
5445
|
}
|
|
@@ -5928,6 +5995,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/contro
|
|
|
5928
5995
|
text: string;
|
|
5929
5996
|
createDespiteImage: boolean | undefined;
|
|
5930
5997
|
coordinate?: MappedinCoordinate;
|
|
5998
|
+
layer?: string;
|
|
5931
5999
|
};
|
|
5932
6000
|
class FloatingLabelsController {
|
|
5933
6001
|
#private;
|
|
@@ -6162,7 +6230,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal' {
|
|
|
6162
6230
|
import { STATE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
|
|
6163
6231
|
import { TMapClickEvent } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
6164
6232
|
import { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
6165
|
-
export { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
6233
|
+
export { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode, MappedinLocation, MappedinVenue, } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
6166
6234
|
export type { TEnableBlueDotOptions, TFloatingLabelAppearance, TGeolocationObject, TPathOptions, TConnectionProps, TConnectionTemplateFn, TMarkerTemplateProps, TMarkerTemplateFn, TJourneyOptions, TPadding, TCreateMarkerOptions, TAnimationOptions, TCreateTooltipInternalOptions, TCreateTooltipCommonOptions, TCreateTooltipOptions, TCreateTextTooltipOptions, TCreateCustomInnerHTMLTooltipOptions, TCreateCustomTooltipOptions, TCreateThreeDMarkerOptions, TGetPolygonsAtCoordinateOptions, TMapViewOptions, TMapViewOptionsLegacy, TFlatLabelOptions, TFlatLabelAppearance, TFloatingLabelPolygonOptions, TAddFlatLabelOptions, TAddFloatingLabelOptions, TLabelAllLocationCommonOptions, TLabelAllLocationFloatingLabelOptions, TLabelAllLocationFlatLabelOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, changeListenerFn, TMapClickEvent, E_SDK_EVENT_PAYLOAD, E_BLUEDOT_EVENT_PAYLOAD, CAMERA_EVENT_PAYLOAD, } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
6167
6235
|
export { labelThemes } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
6168
6236
|
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, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE, CAMERA_EASING_MODE, MAP_RENDER_MODE, ANIMATION_TWEENS, STACKED_MAPS_STATE, } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
|
|
@@ -6171,7 +6239,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal' {
|
|
|
6171
6239
|
export { FrameUpdate, FrameTask, TaskScheduler } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.TaskScheduler';
|
|
6172
6240
|
export { default as SceneManager } from '@mappedin/react-native-sdk/core/packages/renderer/private/scene-manager/MapView.SceneManager';
|
|
6173
6241
|
export { default as DynamicFocusSceneManager } from '@mappedin/react-native-sdk/core/packages/renderer/private/scene-manager/MapView.DynamicFocusSceneManager';
|
|
6174
|
-
export { PubSub } from '@mappedin/react-native-sdk/core/packages/
|
|
6242
|
+
export { PubSub } from '@mappedin/react-native-sdk/core/packages/get-venue/pub-sub.typed';
|
|
6175
6243
|
export { default as MapObject } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.MapObject';
|
|
6176
6244
|
export { default as CAMERA_LAYER } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.CameraLayers';
|
|
6177
6245
|
export { default as AssetManager } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager';
|
|
@@ -6564,8 +6632,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/contro
|
|
|
6564
6632
|
accessible: boolean;
|
|
6565
6633
|
activeDirections: MappedinDirections;
|
|
6566
6634
|
get isMultiFloor(): boolean;
|
|
6567
|
-
get mapsInJourney():
|
|
6568
|
-
get buildingsInJourney():
|
|
6635
|
+
get mapsInJourney(): import("../../internal").MappedinMap[];
|
|
6636
|
+
get buildingsInJourney(): {};
|
|
6569
6637
|
get mapIdsInvolvedInJourney(): string[];
|
|
6570
6638
|
constructor(directions: MappedinDirections | MappedinDirections[], options: TJourneyOptions, core: ICore);
|
|
6571
6639
|
setStep: (step: any) => void;
|
|
@@ -6577,7 +6645,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/contro
|
|
|
6577
6645
|
}
|
|
6578
6646
|
|
|
6579
6647
|
declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.MVF.types' {
|
|
6580
|
-
import { MapId } from '@mappedin/mvf';
|
|
6648
|
+
import { MapId, ObstructionCollection, EntranceCollection, SpaceCollection, Style } from '@mappedin/mvf';
|
|
6581
6649
|
import { FeatureCollection, MultiPolygon, Point, Polygon } from 'geojson';
|
|
6582
6650
|
import { TImage, TMap, TNode, TOpeningHours, TPhone, TSiblingGroup, TSocial } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.types';
|
|
6583
6651
|
export type WithIDs<T> = Map<string, T>;
|
|
@@ -6590,6 +6658,13 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.MVF.
|
|
|
6590
6658
|
name: string;
|
|
6591
6659
|
children: ManifestFile[];
|
|
6592
6660
|
};
|
|
6661
|
+
export type MVFStyle = Style & {
|
|
6662
|
+
type: string;
|
|
6663
|
+
width?: number;
|
|
6664
|
+
};
|
|
6665
|
+
export type MVFObstructionFeature = ObstructionCollection['features'][number];
|
|
6666
|
+
export type MVFEntranceFeature = EntranceCollection['features'][number];
|
|
6667
|
+
export type MVFSpaceFeature = SpaceCollection['features'][number];
|
|
6593
6668
|
export type MVFv1PolygonLikeProperties = {
|
|
6594
6669
|
id: string;
|
|
6595
6670
|
altitude?: number;
|
|
@@ -6793,6 +6868,27 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.MVF.
|
|
|
6793
6868
|
export {};
|
|
6794
6869
|
}
|
|
6795
6870
|
|
|
6871
|
+
declare module '@mappedin/react-native-sdk/core/packages/get-venue/pub-sub.typed' {
|
|
6872
|
+
export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD> {
|
|
6873
|
+
/**
|
|
6874
|
+
* @private
|
|
6875
|
+
*/
|
|
6876
|
+
_subscribers: any;
|
|
6877
|
+
/**
|
|
6878
|
+
* @private
|
|
6879
|
+
*/
|
|
6880
|
+
publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
|
|
6881
|
+
on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
|
|
6882
|
+
data: null;
|
|
6883
|
+
} ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
6884
|
+
off<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
6885
|
+
/**
|
|
6886
|
+
* @private
|
|
6887
|
+
*/
|
|
6888
|
+
destroy(): void;
|
|
6889
|
+
}
|
|
6890
|
+
}
|
|
6891
|
+
|
|
6796
6892
|
declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavigatable' {
|
|
6797
6893
|
import type { MappedinNode, MappedinPolygon, MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/internal';
|
|
6798
6894
|
import { MappedinDirections, MappedinDestinationSet, Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/internal';
|
|
@@ -6830,7 +6926,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavig
|
|
|
6830
6926
|
*
|
|
6831
6927
|
* Calculate distance between 2 nodes, polygons or locations
|
|
6832
6928
|
*/
|
|
6833
|
-
distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options
|
|
6929
|
+
distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): number;
|
|
6834
6930
|
}
|
|
6835
6931
|
}
|
|
6836
6932
|
|
|
@@ -6909,7 +7005,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode'
|
|
|
6909
7005
|
*/
|
|
6910
7006
|
directionsTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): MappedinDirections;
|
|
6911
7007
|
directionsTo(destination: MappedinDestinationSet, options?: TDirectionToOptions): MappedinDirections[];
|
|
6912
|
-
|
|
7008
|
+
/**
|
|
7009
|
+
*
|
|
7010
|
+
* Calculate distance between 2 nodes, polygons or locations
|
|
7011
|
+
*/
|
|
7012
|
+
distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): number;
|
|
6913
7013
|
toJSON(): any;
|
|
6914
7014
|
}
|
|
6915
7015
|
}
|
|
@@ -7050,7 +7150,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolyg
|
|
|
7050
7150
|
*/
|
|
7051
7151
|
directionsTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): MappedinDirections;
|
|
7052
7152
|
directionsTo(destination: MappedinDestinationSet, options?: TDirectionToOptions): MappedinDirections[];
|
|
7053
|
-
|
|
7153
|
+
/**
|
|
7154
|
+
*
|
|
7155
|
+
* Calculate distance between 2 nodes, polygons or locations
|
|
7156
|
+
*/
|
|
7157
|
+
distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): number;
|
|
7054
7158
|
toJSON(): any;
|
|
7055
7159
|
}
|
|
7056
7160
|
}
|
|
@@ -7194,6 +7298,10 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVenue
|
|
|
7194
7298
|
utcOffset: string;
|
|
7195
7299
|
website: string;
|
|
7196
7300
|
secureContentStorage: boolean;
|
|
7301
|
+
defaultLanguage: {
|
|
7302
|
+
code: string;
|
|
7303
|
+
name: string;
|
|
7304
|
+
};
|
|
7197
7305
|
languages: {
|
|
7198
7306
|
name: string;
|
|
7199
7307
|
code: string;
|
|
@@ -7474,7 +7582,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMapGr
|
|
|
7474
7582
|
declare module '@mappedin/react-native-sdk/core/packages/get-venue/utils' {
|
|
7475
7583
|
import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
|
|
7476
7584
|
import type { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue/internal';
|
|
7477
|
-
import { MappedinNavigatable, MappedinNode, MappedinCoordinate } from '@mappedin/react-native-sdk/core/packages/get-venue/internal';
|
|
7585
|
+
import { Mappedin, MappedinNavigatable, MappedinNode, MappedinPolygon, MappedinLocation, MappedinCoordinate } from '@mappedin/react-native-sdk/core/packages/get-venue/internal';
|
|
7478
7586
|
export function isGatewayKey(key: string): boolean;
|
|
7479
7587
|
export function stringifyQuery(query: any, gateway?: boolean): string;
|
|
7480
7588
|
export function buildUrl(options: TGetVenueOptionsInternal & TGetVenueOptions, pathname: string, query: any, supplementary?: boolean): string;
|
|
@@ -7529,6 +7637,21 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/utils' {
|
|
|
7529
7637
|
* @returns the normalized value
|
|
7530
7638
|
*/
|
|
7531
7639
|
export function normalizeCategoryRank(sortOrder: number, min: number, max: number, polygonRank?: number): number;
|
|
7640
|
+
export function getDeviceID(): string;
|
|
7641
|
+
export function getSessionID(): string;
|
|
7642
|
+
/**
|
|
7643
|
+
* Finds the main Location associated with a Polygon. This means a Location
|
|
7644
|
+
* attached to the Polygon that has no parents, or, if there are none of those,
|
|
7645
|
+
* a Location nearest the top of some hierarchy that does have the Polygon attached.
|
|
7646
|
+
*
|
|
7647
|
+
* This means if there are multiple hierarchies of Locations attached to the Polygon,
|
|
7648
|
+
* the one that gets returned is not guaranteed to be what you want.
|
|
7649
|
+
*
|
|
7650
|
+
* @method getPrimaryLocationForPolygon
|
|
7651
|
+
* @param polygon {MappedinPolygon} The Polygon you want the primary Location of.
|
|
7652
|
+
* @return {MappedinLocation}
|
|
7653
|
+
*/
|
|
7654
|
+
export const getPrimaryLocationForPolygon: (polygon: MappedinPolygon | string | undefined, venue: Mappedin) => MappedinLocation | null;
|
|
7532
7655
|
}
|
|
7533
7656
|
|
|
7534
7657
|
declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.cache' {
|
|
@@ -7571,6 +7694,9 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.cach
|
|
|
7571
7694
|
rankings: {
|
|
7572
7695
|
[id: string]: MappedinRankings;
|
|
7573
7696
|
};
|
|
7697
|
+
languages: {
|
|
7698
|
+
[id: string]: string;
|
|
7699
|
+
};
|
|
7574
7700
|
get polygonsByMapId(): Map<string, MappedinPolygon[]>;
|
|
7575
7701
|
get nodesByMapId(): Map<string, MappedinNode[]>;
|
|
7576
7702
|
findNearestNodeOnMap(mapId: string, coordinate: MappedinCoordinate): MappedinNode;
|
|
@@ -7578,6 +7704,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.cach
|
|
|
7578
7704
|
static instances: Map<Mappedin, MappedinCache>;
|
|
7579
7705
|
static create(mappedin: Mappedin): MappedinCache;
|
|
7580
7706
|
static clear(): void;
|
|
7707
|
+
static clearInstance(mappedin: Mappedin): void;
|
|
7581
7708
|
}
|
|
7582
7709
|
export default MappedinCache;
|
|
7583
7710
|
}
|
|
@@ -7749,7 +7876,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
7749
7876
|
ALWAYS_ON_TOP = "always_on_top",
|
|
7750
7877
|
ALL = "all",
|
|
7751
7878
|
TWEEN = "tween",
|
|
7752
|
-
|
|
7879
|
+
COMPOSITE = "composite"
|
|
7753
7880
|
}
|
|
7754
7881
|
export default RENDER;
|
|
7755
7882
|
}
|
|
@@ -8284,7 +8411,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Task
|
|
|
8284
8411
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/private/scene-manager/MapView.SceneManager' {
|
|
8285
8412
|
import { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
8286
8413
|
import type { ICore, TCameraAnimationOptions, TFocusOnCameraOptions, TCameraTargets } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
8287
|
-
import { MapViewScene } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
8414
|
+
import { MapObject, MapViewScene } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
8288
8415
|
export type TSceneTransitionOptions = {
|
|
8289
8416
|
/**
|
|
8290
8417
|
* Map to set as active during the transition. This will decide where the camera will be positioned, as well as which
|
|
@@ -8325,7 +8452,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/scene-
|
|
|
8325
8452
|
}
|
|
8326
8453
|
|
|
8327
8454
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/private/scene-manager/MapView.DynamicFocusSceneManager' {
|
|
8328
|
-
import { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
8455
|
+
import { MappedinMap, MappedinMapGroup } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
8329
8456
|
import type { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
8330
8457
|
import { MapViewScene, DynamicFocusScene } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
8331
8458
|
class DynamicFocusSceneManager {
|
|
@@ -8337,9 +8464,11 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/scene-
|
|
|
8337
8464
|
get currentScene(): {
|
|
8338
8465
|
resize: () => void;
|
|
8339
8466
|
currentMap: MappedinMap;
|
|
8340
|
-
mapObjects: Map<string, MapObject>;
|
|
8467
|
+
mapObjects: Map<string, import("../../internal/Mappedin.MapObject").default>;
|
|
8341
8468
|
};
|
|
8342
8469
|
get currentMap(): MappedinMap;
|
|
8470
|
+
setDefaultMapForMapGroup(mapGroup: MappedinMapGroup, map: MappedinMap): void;
|
|
8471
|
+
resetDefaultMapForMapGroup(mapGroup: MappedinMapGroup): void;
|
|
8343
8472
|
determineTargetMap(): void;
|
|
8344
8473
|
update(): void;
|
|
8345
8474
|
transitionTo(scene?: MapViewScene): Promise<void>;
|
|
@@ -8347,25 +8476,292 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/scene-
|
|
|
8347
8476
|
export default DynamicFocusSceneManager;
|
|
8348
8477
|
}
|
|
8349
8478
|
|
|
8350
|
-
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/
|
|
8351
|
-
|
|
8479
|
+
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.MapObject' {
|
|
8480
|
+
import { Group, Box3, Mesh, MeshLambertMaterial, Object3D, Vector3 } from 'three';
|
|
8481
|
+
import { FrameTaskGroup } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.TaskScheduler';
|
|
8482
|
+
import { Element, FlippableImage, MappedinMap, TaskScheduler, FlatLabel, SmartTooltip, ICore, FloatingLabel } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
8483
|
+
import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub';
|
|
8484
|
+
import { TCreateThreeDMarkerOptions } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
8485
|
+
/**
|
|
8486
|
+
* Some preset priorities for tasks.
|
|
8487
|
+
*/
|
|
8488
|
+
export const TASK_PRIORITY: {
|
|
8489
|
+
VISIBLE_MAP_HIGH: number;
|
|
8490
|
+
VISIBLE_MAP_LOW: number;
|
|
8491
|
+
VISIBLE_MAP_MARKER: number;
|
|
8492
|
+
ASYNC_MAP_HIGH: number;
|
|
8493
|
+
ASYNC_MAP_LOW: number;
|
|
8494
|
+
ASYNC_MAP_MARKER: number;
|
|
8495
|
+
MAP_LOADED: number;
|
|
8496
|
+
};
|
|
8497
|
+
export const RENDER_ORDER: {
|
|
8498
|
+
MAP_ELEMENT: number;
|
|
8499
|
+
BUILDING_OUTLINE: number;
|
|
8500
|
+
MAP_HOVER: number;
|
|
8501
|
+
POLYGON_IMAGE: number;
|
|
8502
|
+
};
|
|
8503
|
+
export function convertToShortHandInterpolation(interpolation: any[]): any;
|
|
8504
|
+
export const SCENE_FROM_LIVE_JSON = false;
|
|
8505
|
+
type InterpolationFunctionType = (zoomLevel: number) => any;
|
|
8506
|
+
export class LayerGroup {
|
|
8507
|
+
mergedObjectsGroup: Group;
|
|
8508
|
+
hoverObjectsGroup: Group;
|
|
8509
|
+
objectsByMaterials: Map<MeshLambertMaterial, Element[]>;
|
|
8510
|
+
hoverableMeshChildren: Mesh;
|
|
8511
|
+
_isVisible: boolean;
|
|
8512
|
+
needsUpdate: boolean;
|
|
8513
|
+
userData: any;
|
|
8514
|
+
opacity: number;
|
|
8515
|
+
core: ICore;
|
|
8516
|
+
mapObject: MapObject;
|
|
8517
|
+
name: string;
|
|
8518
|
+
layers: string[];
|
|
8519
|
+
interpolationFn: InterpolationFunctionType | null;
|
|
8520
|
+
opacityInterpolation?: {
|
|
8521
|
+
zoomLevel: number;
|
|
8522
|
+
opacity: number;
|
|
8523
|
+
}[] | {
|
|
8524
|
+
inputZoomLevel: number[];
|
|
8525
|
+
outputOpacity: number[];
|
|
8526
|
+
};
|
|
8527
|
+
set isVisible(value: boolean);
|
|
8528
|
+
get isVisible(): boolean;
|
|
8529
|
+
constructor(mapObject: MapObject, name: string, layers: string[], visible: boolean);
|
|
8530
|
+
dispose(): void;
|
|
8531
|
+
setOpacity(opacity: any): void;
|
|
8532
|
+
}
|
|
8533
|
+
export interface LoadOptions {
|
|
8534
|
+
async?: boolean;
|
|
8535
|
+
taskScheduler: TaskScheduler;
|
|
8536
|
+
mapRenderStrategy?: string;
|
|
8537
|
+
}
|
|
8538
|
+
interface BoundingBox {
|
|
8539
|
+
min: Vector3;
|
|
8540
|
+
max: Vector3;
|
|
8541
|
+
}
|
|
8542
|
+
interface FadeOptions {
|
|
8543
|
+
onComplete?: () => void;
|
|
8544
|
+
duration: number;
|
|
8545
|
+
}
|
|
8546
|
+
class MapObject extends PubSub {
|
|
8547
|
+
_flippableImagedById: any;
|
|
8548
|
+
_started: boolean;
|
|
8549
|
+
_loaderPromise: Promise<MapObject>;
|
|
8550
|
+
_promiseResolve: (value?: void | PromiseLike<void> | MapObject) => void;
|
|
8551
|
+
_showCount: number;
|
|
8552
|
+
_taskScheduler: TaskScheduler;
|
|
8553
|
+
_highPriorityTasks: FrameTaskGroup;
|
|
8554
|
+
_lowPriorityTasks: FrameTaskGroup;
|
|
8555
|
+
_markerTasks: FrameTaskGroup;
|
|
8556
|
+
_mapLoadedTasks: FrameTaskGroup;
|
|
8557
|
+
_visibilityLatch: boolean | null;
|
|
8558
|
+
_objLoadedComplete: boolean;
|
|
8559
|
+
_hoverableMeshChildren: Mesh[];
|
|
8560
|
+
imageMeshesById: Record<string, Mesh>;
|
|
8561
|
+
visible: boolean;
|
|
8562
|
+
objectsDictionary: Record<string, Mesh>;
|
|
8563
|
+
north: number;
|
|
8564
|
+
mapScale: number | null;
|
|
8565
|
+
object: Object3D;
|
|
8566
|
+
labels: Set<FloatingLabel>;
|
|
8567
|
+
tooltips: Set<SmartTooltip>;
|
|
8568
|
+
markers: Set<unknown>;
|
|
8569
|
+
box: Box3;
|
|
8570
|
+
textObjects: FlatLabel[];
|
|
8571
|
+
labelBatchCreator: any;
|
|
8572
|
+
imagesToFlip: (typeof FlippableImage)[];
|
|
8573
|
+
seenByCamera: boolean;
|
|
8574
|
+
threeJSMarkers: Map<ThreeJSMarkerHandle, {
|
|
8575
|
+
object: Object3D;
|
|
8576
|
+
}>;
|
|
8577
|
+
core: ICore;
|
|
8578
|
+
mapClass: MappedinMap;
|
|
8579
|
+
polygonMeshesById: Record<string, Mesh>;
|
|
8580
|
+
loadMethod: string;
|
|
8581
|
+
loadAsync: boolean;
|
|
8582
|
+
id: string;
|
|
8583
|
+
mapRenderingStrategy: string;
|
|
8584
|
+
needsUpdate: boolean;
|
|
8585
|
+
layerGroups: Map<string, LayerGroup>;
|
|
8586
|
+
loadedLayerNames: string[];
|
|
8587
|
+
loadedElements: Element[];
|
|
8588
|
+
boundingBox: BoundingBox | undefined;
|
|
8589
|
+
elements: Element[];
|
|
8590
|
+
loadMethodUsed: string;
|
|
8591
|
+
mapLoaded: any;
|
|
8592
|
+
constructor(mapClass: MappedinMap, polygonMeshesById: Record<string, Mesh>, showCount: number, core: ICore, loadOptions: LoadOptions);
|
|
8593
|
+
fade(layerGroupName: string | string[], { direction, onComplete, duration }: {
|
|
8594
|
+
direction?: string;
|
|
8595
|
+
onComplete?: () => void;
|
|
8596
|
+
duration?: number;
|
|
8597
|
+
}): {
|
|
8598
|
+
start: () => Promise<void>;
|
|
8599
|
+
};
|
|
8600
|
+
/**
|
|
8601
|
+
* Fade a layer group or number of layer groups in
|
|
8602
|
+
* @param {string|string[]} layerGroupNames
|
|
8603
|
+
* @returns
|
|
8604
|
+
*/
|
|
8605
|
+
fadeIn(layerGroupNames?: string | string[], options?: FadeOptions): {
|
|
8606
|
+
start: () => Promise<void>;
|
|
8607
|
+
};
|
|
8352
8608
|
/**
|
|
8353
|
-
*
|
|
8609
|
+
* Fade a layer group or number of layer groups out
|
|
8610
|
+
* @param {string|string[]} layerGroupNames
|
|
8611
|
+
* @returns
|
|
8354
8612
|
*/
|
|
8355
|
-
|
|
8613
|
+
fadeOut(layerGroupNames?: string | string[], options?: FadeOptions): {
|
|
8614
|
+
start: () => Promise<void>;
|
|
8615
|
+
};
|
|
8616
|
+
renderLayerGroup(include?: string[], exclude?: string[]): void;
|
|
8617
|
+
processLayers(allLayers: string[], include?: string[], exclude?: string[]): string[];
|
|
8618
|
+
processLayerGroup(name?: string, include?: string[], exclude?: string[], visible?: boolean, elements?: Element[], defaultRenderOrder?: number): LayerGroup;
|
|
8619
|
+
get hoverableMeshChildren(): Mesh[];
|
|
8620
|
+
_objLoadedMerged(object: Object3D): Promise<void>;
|
|
8621
|
+
_objLoaded(object: Object3D): void;
|
|
8622
|
+
loadPolygonNow(polygonId: string): void;
|
|
8623
|
+
_addElementToScene(element: Element): void;
|
|
8624
|
+
/** *
|
|
8625
|
+
Load the map, if it's not already loaded. Returns the old promise if it's already done, so you can safely call it whenever needed.
|
|
8626
|
+
|
|
8627
|
+
If needed, this could be modified to
|
|
8628
|
+
|
|
8629
|
+
Returns a Promise that will be Done when the OBJ, MTL and textures have been downloaded, and the objectsDictionary has been generated.
|
|
8630
|
+
|
|
8631
|
+
**/
|
|
8632
|
+
load(): Promise<MapObject>;
|
|
8633
|
+
_dispose(objectToDispose: Object3D): void;
|
|
8634
|
+
destroy(): void;
|
|
8635
|
+
add(childObjectToAdd: Object3D): void;
|
|
8356
8636
|
/**
|
|
8357
|
-
*
|
|
8637
|
+
* Convert lat/lon to local map position vector
|
|
8358
8638
|
*/
|
|
8359
|
-
|
|
8360
|
-
on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
|
|
8361
|
-
data: null;
|
|
8362
|
-
} ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
8363
|
-
off<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
8639
|
+
getPositionLatLon(lat: number, lon: number): Vector3;
|
|
8364
8640
|
/**
|
|
8365
|
-
*
|
|
8641
|
+
* Previously, each map was centered around 0,0,0 and scaled to fit the map.
|
|
8642
|
+
* With scene manager, each map is positioned and scaled relative to the base map/world
|
|
8643
|
+
* Since most 3D objects (like blue dot) are added to the map via `getPositionLatLon`, they already
|
|
8644
|
+
* have the map's matrix applied, on top of being affected as a child of the map's own transform
|
|
8645
|
+
* This method inverts the map's matrix to resolve the double matrix application issue.
|
|
8646
|
+
* TODO: investigate a better way to handle this
|
|
8366
8647
|
*/
|
|
8367
|
-
|
|
8648
|
+
addToObject(child: Object3D): void;
|
|
8649
|
+
/**
|
|
8650
|
+
* Translates objects that are added to the map (such as blue dot), assuming they are added via `getPositionLatLon`,
|
|
8651
|
+
* or `convertTo3DMapPosition`, where the map's matrix has already been applied.
|
|
8652
|
+
*/
|
|
8653
|
+
translateChild(child: Object3D, position: Vector3): void;
|
|
8654
|
+
getMapScale(): number;
|
|
8655
|
+
getNorth(): number;
|
|
8656
|
+
enableImageFlipping(polygonId: string, rotation?: number): void;
|
|
8657
|
+
disableAllImageFlipping(): void;
|
|
8658
|
+
/**
|
|
8659
|
+
* Return true if this map has been loaded to the point where it can be
|
|
8660
|
+
* manipulated as a complete object. In synchronous mode, this requires all
|
|
8661
|
+
* loading tasks to be completed, but in async mode, only high-priority
|
|
8662
|
+
* tasks (adding polygons to the world) have to be completed.
|
|
8663
|
+
*/
|
|
8664
|
+
isReady(): boolean;
|
|
8665
|
+
/**
|
|
8666
|
+
* Return true if this map has been loaded to the point where the only tasks
|
|
8667
|
+
* remaining are marker tasks.
|
|
8668
|
+
*/
|
|
8669
|
+
isFullyLoaded(): boolean;
|
|
8670
|
+
/**
|
|
8671
|
+
* A function that should be called when the map is made visible, in order
|
|
8672
|
+
* to kick off its tasks.
|
|
8673
|
+
*/
|
|
8674
|
+
onVisible(): void;
|
|
8675
|
+
/**
|
|
8676
|
+
* A function that should be called when the map is made invisible, in order
|
|
8677
|
+
* to postpone its tasks.
|
|
8678
|
+
*/
|
|
8679
|
+
onInvisible(): void;
|
|
8680
|
+
/**
|
|
8681
|
+
* Queue a task on this map that will be executed when the high and low
|
|
8682
|
+
* priority tasks have been processed.
|
|
8683
|
+
*/
|
|
8684
|
+
addPendingMarkerTask(marker: string, callback: (...args: any[]) => any): void;
|
|
8685
|
+
/**
|
|
8686
|
+
* Queue a task on this map that must be completed before the map will be
|
|
8687
|
+
* considered `isReady` in synchronous loading mode.
|
|
8688
|
+
*/
|
|
8689
|
+
addPendingLowPriorityTask(name: string, callback: (...args: any[]) => any): void;
|
|
8690
|
+
/**
|
|
8691
|
+
* Queue a task on this map that will be queued when the map is loaded, or
|
|
8692
|
+
* immediately if the map has already been loaded.
|
|
8693
|
+
*/
|
|
8694
|
+
addPendingMapLoadedTask(name: string, callback: (...args: any[]) => any): void;
|
|
8695
|
+
/**
|
|
8696
|
+
* Queue a task on this map that must be completed before the map will be
|
|
8697
|
+
* considered `isReady`, and will be evaluated before any low-priority
|
|
8698
|
+
* tasks.
|
|
8699
|
+
*/
|
|
8700
|
+
_addPendingHighPriorityTask(name: string, callback: (...args: any[]) => any): void;
|
|
8701
|
+
/**
|
|
8702
|
+
* Add a ThreeJS marker to this map object. This should be called through
|
|
8703
|
+
* the `MapView3D`.
|
|
8704
|
+
*
|
|
8705
|
+
* @method addThreeJSMarker
|
|
8706
|
+
* @param {Object} options
|
|
8707
|
+
* @param {Object3D} [options.object] the marker object to add to the scene
|
|
8708
|
+
* @param {Vector3} [options.position=null] if provided, sets the object's position on the map
|
|
8709
|
+
* @param {Euler} [options.rotation=null] if provided, sets the object's rotation relative to the map
|
|
8710
|
+
* @param {Vector3} [options.scale=null] if provided, sets the object's scale relative to the map
|
|
8711
|
+
* @return {ThreeJSMarkerHandle} a unique identifier for the marker
|
|
8712
|
+
*/
|
|
8713
|
+
addThreeJSMarker(options: TCreateThreeDMarkerOptions): ThreeJSMarkerHandle;
|
|
8714
|
+
/**
|
|
8715
|
+
* Remove the given `ThreeJSMarker` from this map.
|
|
8716
|
+
*
|
|
8717
|
+
* @method removeThreeJSMarker
|
|
8718
|
+
* @param {ThreeJSMarkerHandle} markerHandle the marker to remove
|
|
8719
|
+
* @return {boolean} true if the marker existed on the map and was removed;
|
|
8720
|
+
* false if the marker does not exist on the map
|
|
8721
|
+
*/
|
|
8722
|
+
removeThreeJSMarker(markerHandle: ThreeJSMarkerHandle): boolean;
|
|
8723
|
+
/**
|
|
8724
|
+
* Remove all `ThreeJSMarker` from this map.
|
|
8725
|
+
*
|
|
8726
|
+
* @method removeThreeJSMarker
|
|
8727
|
+
*/
|
|
8728
|
+
_removeThreeJSMarkers(): void;
|
|
8729
|
+
removeLabels(): void;
|
|
8730
|
+
/**
|
|
8731
|
+
* Called when a task group that may be required for map loading completes,
|
|
8732
|
+
* to see if all the relevant task groups have been completed.
|
|
8733
|
+
*/
|
|
8734
|
+
_checkIfLoaded(): void;
|
|
8735
|
+
/**
|
|
8736
|
+
* Called when the root ThreeJS object has been created, and child elements
|
|
8737
|
+
* may be added.
|
|
8738
|
+
*/
|
|
8739
|
+
_onRootObjectCreated(): void;
|
|
8740
|
+
_popinChildObjects(): void;
|
|
8741
|
+
}
|
|
8742
|
+
/**
|
|
8743
|
+
* A handle to a 3D marker added to a map.
|
|
8744
|
+
*
|
|
8745
|
+
* @class ThreeJSMarkerHandle
|
|
8746
|
+
*/
|
|
8747
|
+
export class ThreeJSMarkerHandle {
|
|
8748
|
+
_deleted: boolean;
|
|
8749
|
+
_mapId: string | null;
|
|
8750
|
+
_object: Object3D;
|
|
8751
|
+
constructor(args: {
|
|
8752
|
+
mapId: string;
|
|
8753
|
+
object: Object3D;
|
|
8754
|
+
});
|
|
8755
|
+
/**
|
|
8756
|
+
* Return the ThreeJS object associated with this marker, so that it
|
|
8757
|
+
* can be moved around, scaled, etc.
|
|
8758
|
+
*
|
|
8759
|
+
* @property {Object3D} object
|
|
8760
|
+
*/
|
|
8761
|
+
get object(): Object3D;
|
|
8762
|
+
_destroy(): void;
|
|
8368
8763
|
}
|
|
8764
|
+
export default MapObject;
|
|
8369
8765
|
}
|
|
8370
8766
|
|
|
8371
8767
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager' {
|
|
@@ -8640,6 +9036,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
8640
9036
|
id?: string;
|
|
8641
9037
|
anchor?: MARKER_ANCHOR;
|
|
8642
9038
|
collisionRank?: COLLISION_RANKING_TIERS;
|
|
9039
|
+
layer?: string;
|
|
8643
9040
|
};
|
|
8644
9041
|
type TTooltipStyle = {
|
|
8645
9042
|
top?: string;
|
|
@@ -8784,6 +9181,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
8784
9181
|
material: MeshLambertMaterial | MeshLambertMaterial[];
|
|
8785
9182
|
labelMesh?: Mesh;
|
|
8786
9183
|
imageMesh?: Mesh;
|
|
9184
|
+
sortScore: number | null;
|
|
8787
9185
|
static materials: {
|
|
8788
9186
|
[key in string]: MeshLambertMaterial | MeshLambertMaterial[];
|
|
8789
9187
|
};
|
|
@@ -8834,7 +9232,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/scene-
|
|
|
8834
9232
|
layerGroup: LayerGroup;
|
|
8835
9233
|
mapGroup: MappedinMapGroup;
|
|
8836
9234
|
defaultMap: MappedinMap;
|
|
8837
|
-
activeMap
|
|
9235
|
+
activeMap?: MappedinMap;
|
|
8838
9236
|
visibleMap?: MappedinMap;
|
|
8839
9237
|
readonly startingMap: MappedinMap;
|
|
8840
9238
|
baseMap: MappedinMap;
|
|
@@ -8855,6 +9253,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/scene-
|
|
|
8855
9253
|
*/
|
|
8856
9254
|
setBuildingOutlineOpacity(opacity: number): void;
|
|
8857
9255
|
get activeMapObject(): MapObject;
|
|
9256
|
+
get visibleMapObject(): MapObject;
|
|
8858
9257
|
get defaultMapObject(): MapObject;
|
|
8859
9258
|
get baseMapObject(): MapObject;
|
|
8860
9259
|
state: string;
|
|
@@ -8891,6 +9290,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/scene-
|
|
|
8891
9290
|
setMapAtZoomLevel: number;
|
|
8892
9291
|
baseMap: MappedinMap;
|
|
8893
9292
|
preloadDefaultMaps: boolean;
|
|
9293
|
+
keepLayersActiveOnBaseMap: string[];
|
|
8894
9294
|
};
|
|
8895
9295
|
constructor(core: ICore, baseMap: MappedinMap);
|
|
8896
9296
|
resize: () => void;
|
|
@@ -8919,10 +9319,18 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/scene-
|
|
|
8919
9319
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/private/controllers/PolygonColorsController' {
|
|
8920
9320
|
import { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/renderer';
|
|
8921
9321
|
import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/private/Core.interface';
|
|
9322
|
+
type SetPolygonColorParam = [MappedinPolygon | string, string, {
|
|
9323
|
+
highlighted?: boolean;
|
|
9324
|
+
visible?: boolean;
|
|
9325
|
+
}?];
|
|
8922
9326
|
class PolygonColorsController {
|
|
8923
9327
|
#private;
|
|
8924
9328
|
constructor(core: ICore);
|
|
8925
|
-
|
|
9329
|
+
/**
|
|
9330
|
+
* Given a polygon, set it to a specific color.
|
|
9331
|
+
* @param color - color value in hex
|
|
9332
|
+
*/
|
|
9333
|
+
setPolygonColor(...params: SetPolygonColorParam): Promise<void>;
|
|
8926
9334
|
clearPolygonColor(polygon: any): void;
|
|
8927
9335
|
clearAllPolygonColors(): void;
|
|
8928
9336
|
setPolygonOutlineColor(color: string): void;
|
|
@@ -9115,54 +9523,67 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
9115
9523
|
import { FloatingLabel, InternalMarker, SmartTooltip } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
9116
9524
|
export type Collider = InternalMarker | SmartTooltip | FloatingLabel;
|
|
9117
9525
|
export type ColliderQuadTree = QuadTree<{
|
|
9118
|
-
|
|
9526
|
+
collider: Collider;
|
|
9119
9527
|
}>;
|
|
9120
9528
|
export const COLLIDER_STRATEGY_LOW_PRIORITY = "LOW_PRIORITY";
|
|
9121
9529
|
class SmartCollisionEngine {
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9530
|
+
#private;
|
|
9531
|
+
colliderCanvas: HTMLCanvasElement;
|
|
9532
|
+
debugCanvas: HTMLCanvasElement;
|
|
9533
|
+
colliderCanvasContext: CanvasRenderingContext2D;
|
|
9534
|
+
debugCanvasContext: CanvasRenderingContext2D;
|
|
9535
|
+
collisionEngineContainerEl: HTMLDivElement;
|
|
9536
|
+
stepsX: any;
|
|
9537
|
+
stepsY: any;
|
|
9538
|
+
totalWidth: any;
|
|
9539
|
+
totalHeight: any;
|
|
9540
|
+
project: any;
|
|
9541
|
+
colliders: Map<string, Collider>;
|
|
9542
|
+
offscreenRanges: TRange[];
|
|
9543
|
+
get sortedColliders(): Collider[];
|
|
9544
|
+
initialized: boolean;
|
|
9545
|
+
core: ICore;
|
|
9546
|
+
screen: Rectangle;
|
|
9547
|
+
debouncedUpdate: () => void;
|
|
9548
|
+
constructor(core: ICore);
|
|
9549
|
+
updateStartEvents: {
|
|
9550
|
+
[key: string]: boolean;
|
|
9551
|
+
};
|
|
9552
|
+
updateEndEvents: {
|
|
9553
|
+
[key: string]: boolean;
|
|
9554
|
+
};
|
|
9555
|
+
beginUpdate(): void;
|
|
9556
|
+
init: (container: HTMLDivElement, projectFn: (position: TColliderPosition, mapId: MappedinMap['id']) => {
|
|
9557
|
+
x: number;
|
|
9558
|
+
y: number;
|
|
9559
|
+
}) => void;
|
|
9560
|
+
handleBeginUpdate: (args: any) => void;
|
|
9561
|
+
handleEndUpdate: (args: any) => void;
|
|
9562
|
+
qtree: QuadTree;
|
|
9563
|
+
interactiveCollidersQTree: ColliderQuadTree;
|
|
9564
|
+
recompute: () => void;
|
|
9565
|
+
draw: () => void;
|
|
9566
|
+
reposition: () => void;
|
|
9567
|
+
add: (colliderId: string, collider: Collider) => void;
|
|
9568
|
+
remove: (colliderId: string) => void;
|
|
9569
|
+
updateMap: (colliderId: string, from: string, to: string) => void;
|
|
9570
|
+
update: () => void;
|
|
9571
|
+
resize: (container: any) => void;
|
|
9572
|
+
destroy: () => void;
|
|
9165
9573
|
}
|
|
9574
|
+
/**
|
|
9575
|
+
* Determines collider visibility based on the current mapId, dynamicFocus options, and visibleLayersInCurrentScene.
|
|
9576
|
+
* 1. If the collider is on the base map and has a layer included in keepLayersActiveOnBaseMap, show it.
|
|
9577
|
+
* 2. Otherwise, if the collider is on the current map and has a layer included in visibleLayersInCurrentScene, show it.
|
|
9578
|
+
* 3. Otherwise, if the collider has no layer and is on the current map, show it.
|
|
9579
|
+
* 4. Otherwise, hide it.
|
|
9580
|
+
*/
|
|
9581
|
+
export function isColliderVisible(collider: Collider, mapId: string, dynamicFocusOptions: ICore['options']['dynamicFocus'], visibleLayersInCurrentScene: ICore['visibleLayersInCurrentScene']): boolean;
|
|
9582
|
+
/**
|
|
9583
|
+
* Determines if a collider should be shown on the base map, even when the dynamicFocus has setMap to a different map.
|
|
9584
|
+
* Collider must have an assigned layer included in the keepLayersActiveOnBaseMap option & matching mapId to the base map.
|
|
9585
|
+
*/
|
|
9586
|
+
export function shouldKeepActiveOnBaseMap(collider: Collider, dynamicFocusOptions: ICore['options']['dynamicFocus']): boolean;
|
|
9166
9587
|
export default SmartCollisionEngine;
|
|
9167
9588
|
}
|
|
9168
9589
|
|
|
@@ -9301,6 +9722,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/contro
|
|
|
9301
9722
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/private/controllers/LayerController' {
|
|
9302
9723
|
import type { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/private/Core.interface';
|
|
9303
9724
|
import { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
9725
|
+
import { Feature, FeatureCollection, GeoJsonProperties, Polygon } from 'geojson';
|
|
9304
9726
|
class LayerController {
|
|
9305
9727
|
#private;
|
|
9306
9728
|
constructor(core: ICore);
|
|
@@ -9316,6 +9738,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/contro
|
|
|
9316
9738
|
* which is why its synchronous
|
|
9317
9739
|
*/
|
|
9318
9740
|
getVisibleLayersForLoadedMap(map: MappedinMap): string[];
|
|
9741
|
+
addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void>;
|
|
9319
9742
|
}
|
|
9320
9743
|
export default LayerController;
|
|
9321
9744
|
}
|
|
@@ -9354,6 +9777,163 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
9354
9777
|
export default BlueDotUI;
|
|
9355
9778
|
}
|
|
9356
9779
|
|
|
9780
|
+
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/utils' {
|
|
9781
|
+
import { Box3, Vector3, Object3D, Material } from 'three';
|
|
9782
|
+
import { Mappedin, MapObject, MappedinMap, TMapViewOptions } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
9783
|
+
import { Camera } from '@mappedin/react-native-sdk/core/packages/renderer/public/api/Camera';
|
|
9784
|
+
/**
|
|
9785
|
+
* Utils function listing
|
|
9786
|
+
*
|
|
9787
|
+
* - scrubMaterial
|
|
9788
|
+
* - getObjectID
|
|
9789
|
+
* - getObject
|
|
9790
|
+
* - getBoundingBox
|
|
9791
|
+
* - getBiggestBoundingBox
|
|
9792
|
+
* - upackBoundingBox
|
|
9793
|
+
* - getMapScale
|
|
9794
|
+
* - throttle -> taken from lodash.js
|
|
9795
|
+
* - getProjectionScaleFactor
|
|
9796
|
+
* - getZoom
|
|
9797
|
+
*/
|
|
9798
|
+
export function isGatewayKey(key: string): boolean;
|
|
9799
|
+
export function getCombinedBoundingBox(objects: Object3D[]): Box3;
|
|
9800
|
+
export function getMapsBoundingBox(maps: MapObject[], mapPadding: number): Box3;
|
|
9801
|
+
export function scrubMaterial(material: Material): void;
|
|
9802
|
+
/**
|
|
9803
|
+
* Takes a Mappedin Object or id and returns the ID, so our functions can take bottomRight
|
|
9804
|
+
* @template T extends string | {id: string}
|
|
9805
|
+
* @param {T} object - input can be object containing id or the id itself
|
|
9806
|
+
* @return {string}
|
|
9807
|
+
*/
|
|
9808
|
+
export function getObjectId(object: any): string;
|
|
9809
|
+
/**
|
|
9810
|
+
* Takes a Mappedin object or ID and the array to look in and retuns the Object, so our functions can take both
|
|
9811
|
+
* @template K extends {id: string}
|
|
9812
|
+
* @template T extends K | string
|
|
9813
|
+
* @param {T} obj
|
|
9814
|
+
* @param {Array<K> | undefined} array
|
|
9815
|
+
* @returns {K | undefined}
|
|
9816
|
+
*/
|
|
9817
|
+
export function getObject(obj: any, array: any[] | undefined): any;
|
|
9818
|
+
export function getBoundingBox(object: Object3D): Box3;
|
|
9819
|
+
/**
|
|
9820
|
+
* Function pushes the items of the second array onto the first array (inplace).
|
|
9821
|
+
* @template T
|
|
9822
|
+
* @param {Array.<T>} arr1 - base array
|
|
9823
|
+
* @param {Array.<T>} arr2 - array which items will be pushed to arr1
|
|
9824
|
+
*/
|
|
9825
|
+
export function appendItems<T>(arr1: T[], arr2: T[]): void;
|
|
9826
|
+
export function getBiggestBoundingBox(objects: Object3D[]): {
|
|
9827
|
+
min: any;
|
|
9828
|
+
max: any;
|
|
9829
|
+
};
|
|
9830
|
+
export function unpackBoundingBox(boundingBox: Box3): Vector3[];
|
|
9831
|
+
export function getMapScale(map: MappedinMap): number;
|
|
9832
|
+
export function getNorth(map: MappedinMap): number;
|
|
9833
|
+
export function throttle<T>(func: () => void, wait: number, options?: any): () => void;
|
|
9834
|
+
export function debounce<T>(func: () => void, wait: number, immediate?: boolean): () => void;
|
|
9835
|
+
export function flatten(list: any[]): any[];
|
|
9836
|
+
export function uniq(arr: any[]): any[];
|
|
9837
|
+
export function toStyleString(styles: Record<string, string>): string;
|
|
9838
|
+
/**
|
|
9839
|
+
/* getProjectionScaleFactor()
|
|
9840
|
+
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
9841
|
+
/*
|
|
9842
|
+
* R
|
|
9843
|
+
* /|
|
|
9844
|
+
* C : Camera / |
|
|
9845
|
+
* PQ : Projection Plane / |
|
|
9846
|
+
* OR : Origin / |
|
|
9847
|
+
* F : FOV / |
|
|
9848
|
+
* Q / |
|
|
9849
|
+
* /| |
|
|
9850
|
+
* / | |
|
|
9851
|
+
* / | |
|
|
9852
|
+
* / | |
|
|
9853
|
+
* / | |
|
|
9854
|
+
* / F/2 | |
|
|
9855
|
+
* C ------------P------------ O
|
|
9856
|
+
*
|
|
9857
|
+
*
|
|
9858
|
+
* ProjectionScaleFactor = ( OR / PQ )
|
|
9859
|
+
* PQ = canvasHeight / 2
|
|
9860
|
+
* CQ = zoom
|
|
9861
|
+
*
|
|
9862
|
+
* OR / C0 = tan(F/2)
|
|
9863
|
+
* so OR = CO * tan(F/2)
|
|
9864
|
+
*/
|
|
9865
|
+
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
9866
|
+
/** getZoom
|
|
9867
|
+
*
|
|
9868
|
+
* C - Camera, OP -- picture plane (canvas), S - origin,
|
|
9869
|
+
* QR - front side of maps Bounding Box, F: FOV
|
|
9870
|
+
*
|
|
9871
|
+
* Z-axis
|
|
9872
|
+
* R_____|______
|
|
9873
|
+
* /| | |
|
|
9874
|
+
* / | | |
|
|
9875
|
+
* P/ | | | maps BB
|
|
9876
|
+
* /| | | |
|
|
9877
|
+
* / | | | |
|
|
9878
|
+
* / | | | |
|
|
9879
|
+
* / F |E |T |S |
|
|
9880
|
+
* C /--------|-----|-----|-----|------ orthogonal to Y axis, midpoint of focus maps
|
|
9881
|
+
* \ | | | |
|
|
9882
|
+
* \ | | | |
|
|
9883
|
+
* \ | | | |
|
|
9884
|
+
* \ | | | |
|
|
9885
|
+
* \| | | |
|
|
9886
|
+
* O\ | | |
|
|
9887
|
+
* \ | | |
|
|
9888
|
+
* \|_____|_____|
|
|
9889
|
+
* Q
|
|
9890
|
+
*
|
|
9891
|
+
*
|
|
9892
|
+
* We want to get CS, which is the camera zoom
|
|
9893
|
+
*
|
|
9894
|
+
*/
|
|
9895
|
+
export function getZoom(focusBox: Box3, focusBoxHeight: number, FOV: number): number;
|
|
9896
|
+
interface CalculateTwoDProjectionsParams {
|
|
9897
|
+
maps: MapObject[];
|
|
9898
|
+
width: number;
|
|
9899
|
+
height: number;
|
|
9900
|
+
camera: Camera;
|
|
9901
|
+
}
|
|
9902
|
+
export function calculateTwoDProjections({ maps, width, height, camera }: CalculateTwoDProjectionsParams): {
|
|
9903
|
+
min: {
|
|
9904
|
+
x: number;
|
|
9905
|
+
y: number;
|
|
9906
|
+
};
|
|
9907
|
+
max: {
|
|
9908
|
+
x: number;
|
|
9909
|
+
y: number;
|
|
9910
|
+
};
|
|
9911
|
+
}[];
|
|
9912
|
+
export function splitLine(startNode: Vector3, endNode: Vector3, segments: number): Vector3[];
|
|
9913
|
+
export function isObject(item: any): boolean;
|
|
9914
|
+
export const determineStartingMap: (venue: Mappedin, options: TMapViewOptions) => MappedinMap;
|
|
9915
|
+
export function cyrb53(str: string, seed?: number): number;
|
|
9916
|
+
export function addMarginMultiplierToBoundingBox(bbox: Box3, multiplier: number): Box3;
|
|
9917
|
+
export function tweenPromise({ from, to, duration, easing, delay, onUpdate, onStart, onComplete, }: {
|
|
9918
|
+
from: any;
|
|
9919
|
+
to: any;
|
|
9920
|
+
duration?: number;
|
|
9921
|
+
easing?: any;
|
|
9922
|
+
delay?: number;
|
|
9923
|
+
onUpdate?: (_: any) => void;
|
|
9924
|
+
onStart?: () => void;
|
|
9925
|
+
onComplete?: () => void;
|
|
9926
|
+
}): {
|
|
9927
|
+
start(core: any): Promise<void>;
|
|
9928
|
+
};
|
|
9929
|
+
export const linearEase: (t: number) => number;
|
|
9930
|
+
export const quadEaseIn: (t: number) => number;
|
|
9931
|
+
export const quadEaseOut: (t: number) => number;
|
|
9932
|
+
export function interpolate(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number, easeFunc?: (t: number) => number): number;
|
|
9933
|
+
export function interpolateMulti(value: number, inputRange: number[], outputRange: number[], easeFunc?: (t: number) => number): number;
|
|
9934
|
+
export {};
|
|
9935
|
+
}
|
|
9936
|
+
|
|
9357
9937
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/public/MapView' {
|
|
9358
9938
|
import '../internal/Mappedin.css';
|
|
9359
9939
|
import { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
@@ -9361,7 +9941,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/public/MapView
|
|
|
9361
9941
|
import { E_SDK_EVENT, STATE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
|
|
9362
9942
|
import SmartTooltip from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip';
|
|
9363
9943
|
import { Marker } from '@mappedin/react-native-sdk/core/packages/renderer/private/controllers/MarkersController';
|
|
9364
|
-
import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal
|
|
9944
|
+
import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
9365
9945
|
import Journey from '@mappedin/react-native-sdk/core/packages/renderer/public/api/Journey';
|
|
9366
9946
|
import { TGetPolygonsAtCoordinateOptions } from '@mappedin/react-native-sdk/core/packages/renderer';
|
|
9367
9947
|
import { IFlatLabels } from '@mappedin/react-native-sdk/core/packages/renderer/public/api/FlatLabels';
|
|
@@ -10047,8 +10627,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/outdo
|
|
|
10047
10627
|
_renderVisibleTiles(): void;
|
|
10048
10628
|
cachedZoomLevel: number;
|
|
10049
10629
|
visible: boolean;
|
|
10050
|
-
fadeOut():
|
|
10051
|
-
fadeIn():
|
|
10630
|
+
fadeOut(): Promise<void>;
|
|
10631
|
+
fadeIn(): Promise<void>;
|
|
10052
10632
|
fetchTiles(): void;
|
|
10053
10633
|
zoomLevelToAltitudeMap: number[][];
|
|
10054
10634
|
plane: Object3D;
|
|
@@ -10174,7 +10754,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/Core'
|
|
|
10174
10754
|
/**
|
|
10175
10755
|
* Get all maps that are "visible" in the scene.
|
|
10176
10756
|
*/
|
|
10177
|
-
get visibleMapsInCurrentScene():
|
|
10757
|
+
get visibleMapsInCurrentScene(): MappedinMap[];
|
|
10178
10758
|
get visibleMapObjectsInCurrentScene(): MapObject[];
|
|
10179
10759
|
/**
|
|
10180
10760
|
* Returns all currently visible layers
|
|
@@ -10209,15 +10789,15 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/Core'
|
|
|
10209
10789
|
* @param longitude {Number} Longitude of position
|
|
10210
10790
|
* @returns A position you can use with a Marker either initially or to update later when the user (for example) moves
|
|
10211
10791
|
*/
|
|
10212
|
-
getPositionLatLon: (lat: number, lon: number, map?: string | MappedinMap | null) =>
|
|
10792
|
+
getPositionLatLon: (lat: number, lon: number, map?: string | MappedinMap | null) => Vector3;
|
|
10213
10793
|
lockNorth: (element: any, offset?: number) => void;
|
|
10214
10794
|
unlockNorth: (element: any) => void;
|
|
10215
10795
|
convertTo3DMapPosition: (nodeOrCoordinate: MappedinNode | MappedinCoordinate) => any;
|
|
10216
10796
|
/**
|
|
10217
10797
|
* Converts a 2D x,y screen position into a 3D MappedinCoordinate using projection
|
|
10218
10798
|
*/
|
|
10219
|
-
convertScreenCoordinateToMapCoordinate: (x: number, y: number, map: MappedinMap) =>
|
|
10220
|
-
convert3DMapPositionToCoordinate: (coord: any, mapClass?: MappedinMap | null | undefined) =>
|
|
10799
|
+
convertScreenCoordinateToMapCoordinate: (x: number, y: number, map: MappedinMap) => MappedinCoordinate;
|
|
10800
|
+
convert3DMapPositionToCoordinate: (coord: any, mapClass?: MappedinMap | null | undefined) => MappedinCoordinate;
|
|
10221
10801
|
getPositionPolygon: (polygon: any) => any;
|
|
10222
10802
|
getPositionNode: (node: any) => any;
|
|
10223
10803
|
hideAllLabels: () => void;
|
|
@@ -10250,8 +10830,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/private/Core'
|
|
|
10250
10830
|
determineNewLabelSize: () => void;
|
|
10251
10831
|
mapSetInProgress: Promise<any>;
|
|
10252
10832
|
mapSetResolved: any;
|
|
10253
|
-
setMap: (map: string | MappedinMap) => any
|
|
10254
|
-
setMapWithReason: (map: string | MappedinMap, reason: E_MAP_CHANGED_REASON) => any
|
|
10833
|
+
setMap: (map: string | MappedinMap) => Promise<any>;
|
|
10834
|
+
setMapWithReason: (map: string | MappedinMap, reason: E_MAP_CHANGED_REASON) => Promise<any>;
|
|
10255
10835
|
getPolygonsAtScreenCoordinate: (x: number, y: number, options?: TGetPolygonsAtCoordinateOptions) => any;
|
|
10256
10836
|
getPolygonsAtCoordinate: (coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions) => any;
|
|
10257
10837
|
getNearestNodeByScreenCoordinate(x: number, y: number, mapOrMapId?: MappedinMap | MappedinMap['id']): MappedinNode;
|
|
@@ -10677,7 +11257,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/public/api/Mar
|
|
|
10677
11257
|
}
|
|
10678
11258
|
|
|
10679
11259
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/public/api/Paths' {
|
|
10680
|
-
import { MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
11260
|
+
import { MappedinCoordinate, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
10681
11261
|
import { TPathOptions } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
10682
11262
|
import PathsController, { Path } from '@mappedin/react-native-sdk/core/packages/renderer/private/controllers/PathsController';
|
|
10683
11263
|
/**
|
|
@@ -10709,7 +11289,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/public/api/Pat
|
|
|
10709
11289
|
* @param nodes A {@link MappedinNode} array, probably from a {@link MappedinDirections} instance.
|
|
10710
11290
|
* @param options
|
|
10711
11291
|
*/
|
|
10712
|
-
add(nodes: MappedinNode[], options?: TPathOptions): Path;
|
|
11292
|
+
add(nodes: (MappedinNode | MappedinCoordinate)[], options?: TPathOptions): Path;
|
|
10713
11293
|
/**
|
|
10714
11294
|
* Remove a {@link Path} from all maps it exists on.
|
|
10715
11295
|
*
|
|
@@ -10885,11 +11465,22 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/public/api/Out
|
|
|
10885
11465
|
* @returns
|
|
10886
11466
|
*/
|
|
10887
11467
|
setAttributionPosition(position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'): void;
|
|
11468
|
+
/**
|
|
11469
|
+
* Show the outdoor view. Outdoor view must first be enabled in {@link TMapViewOptions} during {@link showVenue}.
|
|
11470
|
+
* See also {@link hide}.
|
|
11471
|
+
*/
|
|
11472
|
+
show(): void;
|
|
11473
|
+
/**
|
|
11474
|
+
* Hide the outdoor view. Outdoor view must first be enabled in {@link TMapViewOptions} during {@link showVenue}.
|
|
11475
|
+
* See also {@link show}.
|
|
11476
|
+
*/
|
|
11477
|
+
hide(): void;
|
|
10888
11478
|
}
|
|
10889
11479
|
export default OutdoorView;
|
|
10890
11480
|
}
|
|
10891
11481
|
|
|
10892
11482
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/public/api/DynamicFocus' {
|
|
11483
|
+
import { MappedinMap, MappedinMapGroup } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
10893
11484
|
import { DynamicFocusSceneManager } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
10894
11485
|
/**
|
|
10895
11486
|
* @experimental
|
|
@@ -10949,11 +11540,20 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/public/api/Dyn
|
|
|
10949
11540
|
* ```
|
|
10950
11541
|
*/
|
|
10951
11542
|
update(): void;
|
|
11543
|
+
/**
|
|
11544
|
+
* Set the default map for a map group. This map will be set when the user pans over the map group.
|
|
11545
|
+
*/
|
|
11546
|
+
setDefaultMapForMapGroup(mapGroup: MappedinMapGroup, map: MappedinMap): void;
|
|
11547
|
+
/**
|
|
11548
|
+
* Reset the default map for a map group. This map will be set when the user pans over the map group.
|
|
11549
|
+
*/
|
|
11550
|
+
resetDefaultMapForMapGroup(mapGroup: MappedinMapGroup): void;
|
|
10952
11551
|
}
|
|
10953
11552
|
export { DynamicFocus };
|
|
10954
11553
|
}
|
|
10955
11554
|
|
|
10956
11555
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/public/api/Layers' {
|
|
11556
|
+
import { Feature, FeatureCollection, GeoJsonProperties, Polygon } from 'geojson';
|
|
10957
11557
|
import { LayerController, MappedinMap } from '@mappedin/react-native-sdk/core/packages/renderer/internal';
|
|
10958
11558
|
/**
|
|
10959
11559
|
* @experimental
|
|
@@ -10977,6 +11577,11 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/public/api/Lay
|
|
|
10977
11577
|
* Re-renders the map only showing the layers specified in the array. This will discard any polygons that have been highlighted.
|
|
10978
11578
|
*/
|
|
10979
11579
|
showLayers(layers: string[]): void;
|
|
11580
|
+
/**
|
|
11581
|
+
* @experimental
|
|
11582
|
+
* Adds a GeoJSON Feature or FeatureCollection to the map as a layer. The layer name must be unique
|
|
11583
|
+
*/
|
|
11584
|
+
addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void>;
|
|
10980
11585
|
}
|
|
10981
11586
|
export default LayerController;
|
|
10982
11587
|
}
|