@mappedin/react-native-sdk 4.0.9 → 4.0.10
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 +934 -344
- package/dist/index.js +197 -201
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -44,7 +44,13 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
44
44
|
/**
|
|
45
45
|
* Options to initialze MiMapView with
|
|
46
46
|
*/
|
|
47
|
-
options: TMiMapViewOptions
|
|
47
|
+
options: TMiMapViewOptions & {
|
|
48
|
+
/**
|
|
49
|
+
* Use a bundle for venue loading and cache it for faster subsequent loading
|
|
50
|
+
* @beta
|
|
51
|
+
*/
|
|
52
|
+
useBundle?: boolean;
|
|
53
|
+
};
|
|
48
54
|
/**
|
|
49
55
|
* Venue Data to render inside the MapView. This is returned by {@link getVenue} or {@link getVenueBundle}
|
|
50
56
|
*/
|
|
@@ -102,14 +108,14 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
102
108
|
/**
|
|
103
109
|
* @category Component
|
|
104
110
|
*/
|
|
105
|
-
export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "
|
|
111
|
+
export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "venueData" | "options" | "style" | "onPolygonClicked" | "onBlueDotStateChanged" | "onBlueDotPositionUpdated" | "onDataLoaded" | "onNothingClicked" | "onFirstMapLoaded" | "onMapChanged" | "onStateChanged"> & React.RefAttributes<MapViewStore>>>;
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap' {
|
|
109
|
-
import React from
|
|
110
|
-
import { TMiMapViewOptions } from
|
|
111
|
-
import { TFocusOnOptions } from
|
|
112
|
-
import type { MappedinLocation, Mappedin } from
|
|
115
|
+
import React from 'react';
|
|
116
|
+
import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
|
|
117
|
+
import { TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
118
|
+
import type { MappedinLocation, Mappedin } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
113
119
|
export type TMiMiniMapProps = {
|
|
114
120
|
/**
|
|
115
121
|
* Options to initialze MiMapView with
|
|
@@ -125,7 +131,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniM
|
|
|
125
131
|
* Venue Data to render inside the MapView. This is returned by {@link getVenue}
|
|
126
132
|
*/
|
|
127
133
|
venueData?: Mappedin;
|
|
128
|
-
location: MappedinLocation[
|
|
134
|
+
location: MappedinLocation['id'] | MappedinLocation;
|
|
129
135
|
focusOptions?: TFocusOnOptions;
|
|
130
136
|
};
|
|
131
137
|
/**
|
|
@@ -140,12 +146,12 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniM
|
|
|
140
146
|
}
|
|
141
147
|
|
|
142
148
|
declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store' {
|
|
143
|
-
import {
|
|
149
|
+
import { RNMappedinController } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MappedinController';
|
|
144
150
|
import { TReactNativeFlatLabelAllLocations, TReactNativeFlatLabelAllLocationsLegacy, TReactNativeFlatLabelPolygonOptions, TReactNativeFloatingLabelPolygonOptions, TSerializableJourneyOptions } from '@mappedin/react-native-sdk/wrappers/common';
|
|
145
151
|
import type { TGeolocationObject, TEnableBlueDotOptions, TPathOptions, TFocusOnOptions, TAnimatePositionOptions, TLabelAllLocationFloatingLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
146
152
|
import { STATE, Mappedin, MappedinNode, MappedinMap, MappedinLocation, MappedinDirections, MappedinPolygon, TGetVenueOptions, TShowVenueOptions, MappedinCoordinate, MappedinDestinationSet, TCreateMarkerOptions, E_BLUEDOT_STATE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
147
153
|
import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
|
|
148
|
-
export class MapViewStore extends
|
|
154
|
+
export class MapViewStore extends RNMappedinController {
|
|
149
155
|
#private;
|
|
150
156
|
state: STATE;
|
|
151
157
|
/**
|
|
@@ -156,10 +162,6 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
156
162
|
* @hidden
|
|
157
163
|
*/
|
|
158
164
|
constructor();
|
|
159
|
-
/**
|
|
160
|
-
* Venue Data
|
|
161
|
-
*/
|
|
162
|
-
venueData?: Mappedin;
|
|
163
165
|
/**
|
|
164
166
|
* Current map of Venue
|
|
165
167
|
*/
|
|
@@ -174,6 +176,11 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
174
176
|
* @hidden
|
|
175
177
|
*/
|
|
176
178
|
showVenue(venueData: Mappedin, showVenueOptions: TShowVenueOptions): Promise<void>;
|
|
179
|
+
/**
|
|
180
|
+
* Clear any cached venue bundles that were downloaded as part of LOAD_VENUE with useBundle: true
|
|
181
|
+
* This ensure that the next time keys are passed in, we get a fresh bundle
|
|
182
|
+
*/
|
|
183
|
+
clearBundleCache(): Promise<void>;
|
|
177
184
|
/**
|
|
178
185
|
* Create a marker attached to a {@link MappedinNode}, with any abitrary HTML code inside.
|
|
179
186
|
* @returns markerId This marker id can later be used to remove the marker
|
|
@@ -257,12 +264,12 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
257
264
|
*/
|
|
258
265
|
setTilt: (tilt: number) => Promise<undefined>;
|
|
259
266
|
/**
|
|
260
|
-
* The current rotation in
|
|
267
|
+
* The current rotation in radians from north.
|
|
261
268
|
* @deprecated Use CameraControls.rotation instead
|
|
262
269
|
*/
|
|
263
270
|
rotation: number;
|
|
264
271
|
/**
|
|
265
|
-
* @param rotation The new value to set the rotation to, in
|
|
272
|
+
* @param rotation The new value to set the rotation to, in radians from north..
|
|
266
273
|
* @deprecated Use CameraControls.setRotation instead
|
|
267
274
|
*/
|
|
268
275
|
setRotation: (rotation: number) => Promise<undefined>;
|
|
@@ -280,7 +287,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
280
287
|
*/
|
|
281
288
|
set: (positionOptions?: TAnimatePositionOptions | undefined) => Promise<unknown>;
|
|
282
289
|
/**
|
|
283
|
-
* The current rotation in
|
|
290
|
+
* The current rotation in radians from north.
|
|
284
291
|
*/
|
|
285
292
|
rotation: number;
|
|
286
293
|
/**
|
|
@@ -410,15 +417,15 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src' {
|
|
|
410
417
|
declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MappedinController' {
|
|
411
418
|
import WebView from 'react-native-webview';
|
|
412
419
|
import { WebViewMessage } from 'react-native-webview/lib/WebViewTypes';
|
|
413
|
-
import { BRIDGE_EVENT_PAYLOADS } from '@mappedin/react-native-sdk/wrappers/common';
|
|
414
|
-
import {
|
|
415
|
-
|
|
416
|
-
export class
|
|
420
|
+
import { BRIDGE_EVENT_PAYLOADS, PubSub } from '@mappedin/react-native-sdk/wrappers/common';
|
|
421
|
+
import { MappedinController } from '@mappedin/react-native-sdk/wrappers/common/controller';
|
|
422
|
+
import { Mappedin } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
|
|
423
|
+
export class RNMappedinController extends MappedinController {
|
|
417
424
|
#private;
|
|
418
425
|
/**
|
|
419
426
|
* @hidden
|
|
420
427
|
*/
|
|
421
|
-
|
|
428
|
+
publicEventBus: PubSub<BRIDGE_EVENT_PAYLOADS[keyof BRIDGE_EVENT_PAYLOADS]>;
|
|
422
429
|
/**
|
|
423
430
|
* @hidden
|
|
424
431
|
*/
|
|
@@ -428,27 +435,32 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/Mappedi
|
|
|
428
435
|
*/
|
|
429
436
|
_setiFrame(iframe: any): void;
|
|
430
437
|
/**
|
|
438
|
+
* Override how we handle messages we receive from the native side here
|
|
431
439
|
* @hidden
|
|
432
440
|
*/
|
|
433
|
-
|
|
441
|
+
onMessageReceived(data: WebViewMessage['data']): void;
|
|
434
442
|
/**
|
|
435
|
-
*
|
|
443
|
+
* Venue Data
|
|
436
444
|
*/
|
|
437
|
-
|
|
445
|
+
venueData?: Mappedin;
|
|
438
446
|
/**
|
|
439
447
|
* @hidden
|
|
440
448
|
*/
|
|
441
|
-
|
|
449
|
+
constructor();
|
|
442
450
|
/**
|
|
451
|
+
* Override how we send the message to the native side
|
|
443
452
|
* @hidden
|
|
444
453
|
*/
|
|
445
|
-
|
|
454
|
+
sendMessage<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: {
|
|
455
|
+
msgID?: string;
|
|
456
|
+
data: BRIDGE_EVENT_PAYLOADS[EVENT_NAME] | null;
|
|
457
|
+
}): void;
|
|
446
458
|
}
|
|
447
459
|
}
|
|
448
460
|
|
|
449
461
|
declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types' {
|
|
450
|
-
import { MappedinNode, MappedinPolygon } from
|
|
451
|
-
import { TFocusOptionsLegacy } from
|
|
462
|
+
import { MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
|
|
463
|
+
import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
|
|
452
464
|
export type TPolygonColorOptions = {
|
|
453
465
|
color: string;
|
|
454
466
|
opacity?: number;
|
|
@@ -527,6 +539,22 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
|
|
|
527
539
|
* Note 2: This may behave a lot slower for large venues, especially those with many images. We are actively working on improving load times.
|
|
528
540
|
*/
|
|
529
541
|
export function getVenueBundle(userOptions: TGetVenueBundleOptions): Promise<Mappedin>;
|
|
542
|
+
/**
|
|
543
|
+
* Get the bundle URL and updated_at time.
|
|
544
|
+
* @internal
|
|
545
|
+
*/
|
|
546
|
+
export function getVenueBundleURL(userOptions: TGetVenueBundleOptions): Promise<{
|
|
547
|
+
url: string;
|
|
548
|
+
updated_at: string;
|
|
549
|
+
}>;
|
|
550
|
+
/**
|
|
551
|
+
* Download a bundle and return a Mappedin instance
|
|
552
|
+
* @internal
|
|
553
|
+
*/
|
|
554
|
+
export function downloadBundle(userOptions: any, { url, updated_at }: {
|
|
555
|
+
url: any;
|
|
556
|
+
updated_at: any;
|
|
557
|
+
}): Promise<Mappedin>;
|
|
530
558
|
}
|
|
531
559
|
|
|
532
560
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums' {
|
|
@@ -625,6 +653,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
|
|
|
625
653
|
RIGHT = 4
|
|
626
654
|
}
|
|
627
655
|
export enum E_SDK_EVENT {
|
|
656
|
+
/**
|
|
657
|
+
* Emitted when the map is clicked
|
|
658
|
+
*/
|
|
659
|
+
CLICK = "CLICK",
|
|
628
660
|
/**
|
|
629
661
|
* Emitted when the {@link STATE | SDK state} changes
|
|
630
662
|
*/
|
|
@@ -649,6 +681,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
|
|
|
649
681
|
export enum E_CAMERA_EVENT {
|
|
650
682
|
USER_INTERACTION_START = "USER_INTERACTION_START",
|
|
651
683
|
USER_INTERACTION_END = "USER_INTERACTION_END",
|
|
684
|
+
/** @private */
|
|
652
685
|
POSITION_CHANGED = "POSITION_CHANGED",
|
|
653
686
|
ZOOM_CHANGED = "ZOOM_CHANGED",
|
|
654
687
|
ROTATION_CHANGED = "ROTATION_CHANGED",
|
|
@@ -1162,7 +1195,29 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
|
|
|
1162
1195
|
appearance?: TFlatLabelAppearance;
|
|
1163
1196
|
};
|
|
1164
1197
|
export type changeListenerFn<PAYLOAD> = (update: PAYLOAD) => void;
|
|
1198
|
+
export type TMapClickEvent = {
|
|
1199
|
+
/**
|
|
1200
|
+
* The latitude / longitude of where the user clicked the map.
|
|
1201
|
+
* Both components may be NaN if unable to compute these components.
|
|
1202
|
+
*/
|
|
1203
|
+
position: {
|
|
1204
|
+
latitude: number;
|
|
1205
|
+
longitude: number;
|
|
1206
|
+
};
|
|
1207
|
+
/**
|
|
1208
|
+
* A list of MappedinPolygons corresponding to every polygon that a user's
|
|
1209
|
+
* click passed through. These are in order of first to last intersected.
|
|
1210
|
+
* Will be empty if no interactive polygons were clicked.
|
|
1211
|
+
*/
|
|
1212
|
+
polygons: MappedinPolygon[];
|
|
1213
|
+
/**
|
|
1214
|
+
* Indicates whether the user clicked close to the Blue Dot object on the
|
|
1215
|
+
* map, if present. If Blue Dot is disabled, this will always be false.
|
|
1216
|
+
*/
|
|
1217
|
+
nearBlueDot: boolean;
|
|
1218
|
+
};
|
|
1165
1219
|
export type E_SDK_EVENT_PAYLOAD = {
|
|
1220
|
+
[E_SDK_EVENT.CLICK]: TMapClickEvent;
|
|
1166
1221
|
[E_SDK_EVENT.STATE_CHANGE]: STATE;
|
|
1167
1222
|
[E_SDK_EVENT.POLYGON_CLICKED]: MappedinPolygon;
|
|
1168
1223
|
[E_SDK_EVENT.NOTHING_CLICKED]: undefined;
|
|
@@ -1181,6 +1236,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
|
|
|
1181
1236
|
export type CAMERA_EVENT_PAYLOAD = {
|
|
1182
1237
|
[E_CAMERA_EVENT.USER_INTERACTION_START]: void;
|
|
1183
1238
|
[E_CAMERA_EVENT.USER_INTERACTION_END]: void;
|
|
1239
|
+
/** @private */
|
|
1184
1240
|
[E_CAMERA_EVENT.POSITION_CHANGED]: {
|
|
1185
1241
|
x: number;
|
|
1186
1242
|
y: number;
|
|
@@ -1348,7 +1404,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
|
|
|
1348
1404
|
|
|
1349
1405
|
declare module '@mappedin/react-native-sdk/wrappers/common/events' {
|
|
1350
1406
|
export enum EVENT {
|
|
1351
|
-
READY = "READY",
|
|
1352
1407
|
LOAD_VENUE = "LOAD_VENUE",
|
|
1353
1408
|
SHOW_VENUE = "SHOW_VENUE",
|
|
1354
1409
|
POLYGON_CLICKED = "POLYGON_CLICKED",
|
|
@@ -1385,9 +1440,21 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
|
|
|
1385
1440
|
LABEL_POLYGON = "LABEL_POLYGON",
|
|
1386
1441
|
ENABLE_BLUE_DOT = "ENABLE_BLUE_DOT",
|
|
1387
1442
|
DISABLE_BLUE_DOT = "DISABLE_BLUE_DOT",
|
|
1443
|
+
/**
|
|
1444
|
+
* @deprecated
|
|
1445
|
+
*/
|
|
1388
1446
|
ENABLE_BEARING = "ENABLE_BEARING",
|
|
1447
|
+
/**
|
|
1448
|
+
* @deprecated
|
|
1449
|
+
*/
|
|
1389
1450
|
GET_NEAREST_NODE = "GET_NEAREST_NODE",
|
|
1451
|
+
/**
|
|
1452
|
+
* @deprecated
|
|
1453
|
+
*/
|
|
1390
1454
|
GET_BLUE_DOT_IS_FOLLOWING = "GET_BLUE_DOT_IS_FOLLOWING",
|
|
1455
|
+
/**
|
|
1456
|
+
* @deprecated
|
|
1457
|
+
*/
|
|
1391
1458
|
SET_BLUE_DOT_IS_FOLLOWING = "SET_BLUE_DOT_IS_FOLLOWING",
|
|
1392
1459
|
GET_DIRECTIONS = "GET_DIRECTIONS",
|
|
1393
1460
|
DESTROY = "DESTROY",
|
|
@@ -1407,7 +1474,8 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
|
|
|
1407
1474
|
DRAW_JOURNEY = "DRAW_JOURNEY",
|
|
1408
1475
|
CLEAR_JOURNEY = "CLEAR_JOURNEY",
|
|
1409
1476
|
SET_COOKIE = "SET_COOKIE",
|
|
1410
|
-
GET_NEAREST_NODE_BY_SCREEN_COORDINATES = "GET_NEAREST_NODE_BY_SCREEN_COORDINATES"
|
|
1477
|
+
GET_NEAREST_NODE_BY_SCREEN_COORDINATES = "GET_NEAREST_NODE_BY_SCREEN_COORDINATES",
|
|
1478
|
+
CLEAR_BUNDLE_CACHE = "CLEAR_BUNDLE_CACHE"
|
|
1411
1479
|
}
|
|
1412
1480
|
export enum WAYFINDING_EVENT {
|
|
1413
1481
|
GET_MAPS_IN_NAVIGATION = "GET_MAPS_IN_NAVIGATION",
|
|
@@ -1419,7 +1487,6 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
|
|
|
1419
1487
|
EXIT_NAVIGATION = "EXIT_NAVIGATION"
|
|
1420
1488
|
}
|
|
1421
1489
|
export enum BRIDGE_EVENT {
|
|
1422
|
-
READY = "READY",
|
|
1423
1490
|
RESOLVE = "RESOLVE",
|
|
1424
1491
|
REJECT = "REJECT"
|
|
1425
1492
|
}
|
|
@@ -1429,333 +1496,221 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
|
|
|
1429
1496
|
READY = "MINIMAP_READY",
|
|
1430
1497
|
CACHE_IMAGE = "CACHE_IMAGE"
|
|
1431
1498
|
}
|
|
1499
|
+
export enum NATIVE_EVENT {
|
|
1500
|
+
LOG = "LOG",
|
|
1501
|
+
READY = "READY",
|
|
1502
|
+
GET_MAP_POLYGONS = "GET_MAP_POLYGONS",
|
|
1503
|
+
GET_IMAGE = "GET_IMAGE"
|
|
1504
|
+
}
|
|
1432
1505
|
}
|
|
1433
1506
|
|
|
1434
1507
|
declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
|
|
1435
1508
|
import { IDirectionsResult, MappedinMap, MappedinNode, TBlueDotPositionUpdate, TBlueDotStateChange, TGetVenueOptions, TFloatingLabelPolygonOptions, TFlatLabelPolygonOptions, TAnimatePositionOptions, TPathOptions, TShowVenueOptions, STATE, TGeolocationObject, TEnableBlueDotOptions, MappedinLocation, TLabelAllLocationFloatingLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
1436
1509
|
import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common/types';
|
|
1437
|
-
import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, TFocusOnOptionsLegacySerializable, TReactNativeFlatLabelAllLocationsLegacy, TReactNativeFlatLabelAllLocations } from '@mappedin/react-native-sdk/wrappers/common';
|
|
1510
|
+
import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, TFocusOnOptionsLegacySerializable, TReactNativeFlatLabelAllLocationsLegacy, TReactNativeFlatLabelAllLocations, NATIVE_EVENT } from '@mappedin/react-native-sdk/wrappers/common';
|
|
1438
1511
|
import { TSerializableJourneyOptions, TFocusOnOptionsSerializable, TSerializedLocation, TSerializedNode, TSerializedPolygon } from '@mappedin/react-native-sdk/wrappers/common/types';
|
|
1439
1512
|
export type BRIDGE_EVENT_PAYLOADS = {
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
payload?: string;
|
|
1447
|
-
data?: null;
|
|
1448
|
-
};
|
|
1449
|
-
[BRIDGE_EVENT.RESOLVE]: {
|
|
1450
|
-
msgID: string;
|
|
1451
|
-
payload?: unknown;
|
|
1452
|
-
data?: null;
|
|
1453
|
-
};
|
|
1454
|
-
[MINIMAP_EVENT.SHOW_MINIMAP]: {
|
|
1455
|
-
msgID: string;
|
|
1456
|
-
data: {
|
|
1457
|
-
format: 'jsonstring';
|
|
1458
|
-
venueData: string;
|
|
1459
|
-
options: TMiMapViewOptions;
|
|
1513
|
+
[BRIDGE_EVENT.REJECT]: any;
|
|
1514
|
+
[BRIDGE_EVENT.RESOLVE]: any;
|
|
1515
|
+
[NATIVE_EVENT.READY]: null;
|
|
1516
|
+
[NATIVE_EVENT.LOG]: string;
|
|
1517
|
+
[NATIVE_EVENT.GET_IMAGE]: {
|
|
1518
|
+
fileName: string;
|
|
1460
1519
|
};
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
msgID: string;
|
|
1464
|
-
data: {
|
|
1465
|
-
options: TGetVenueOptions;
|
|
1520
|
+
[NATIVE_EVENT.GET_MAP_POLYGONS]: {
|
|
1521
|
+
mapId: string;
|
|
1466
1522
|
};
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
locationId: MappedinLocation['id'];
|
|
1473
|
-
polygonHighlightColor?: string;
|
|
1474
|
-
focusOptions?: TFocusOnOptionsSerializable;
|
|
1523
|
+
[MINIMAP_EVENT.READY]: null;
|
|
1524
|
+
[MINIMAP_EVENT.SHOW_MINIMAP]: {
|
|
1525
|
+
format: 'jsonstring';
|
|
1526
|
+
venueData: string;
|
|
1527
|
+
options: TMiMapViewOptions;
|
|
1475
1528
|
};
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
data: null;
|
|
1479
|
-
};
|
|
1480
|
-
[EVENT.STATE_CHANGED]: {
|
|
1481
|
-
state: STATE;
|
|
1482
|
-
data?: null;
|
|
1483
|
-
};
|
|
1484
|
-
[EVENT.DATA_LOADED]: {
|
|
1485
|
-
venueData: any;
|
|
1486
|
-
data?: null;
|
|
1487
|
-
};
|
|
1488
|
-
[EVENT.FIRST_MAP_LOADED]: {
|
|
1489
|
-
venueData: any;
|
|
1490
|
-
data?: null;
|
|
1491
|
-
};
|
|
1492
|
-
[EVENT.MAP_CHANGED]: {
|
|
1493
|
-
mapId: string;
|
|
1494
|
-
data?: null;
|
|
1495
|
-
};
|
|
1496
|
-
[EVENT.POLYGON_CLICKED]: {
|
|
1497
|
-
polygonId: string;
|
|
1498
|
-
data?: null;
|
|
1499
|
-
};
|
|
1500
|
-
[EVENT.ROTATION_CHANGED]: {
|
|
1501
|
-
rotation: number;
|
|
1502
|
-
data?: null;
|
|
1503
|
-
};
|
|
1504
|
-
[EVENT.TILT_CHANGED]: {
|
|
1505
|
-
tilt: number;
|
|
1506
|
-
data?: null;
|
|
1507
|
-
};
|
|
1508
|
-
[EVENT.UPDATE_GEOLOCATION]: {
|
|
1509
|
-
data: unknown;
|
|
1510
|
-
};
|
|
1511
|
-
[EVENT.BLUEDOT_STATE_CHANGE]: {
|
|
1512
|
-
stateChange: TBlueDotStateChange;
|
|
1513
|
-
data?: null;
|
|
1514
|
-
};
|
|
1515
|
-
[EVENT.BLUEDOT_POSITION_UPDATE]: {
|
|
1516
|
-
update: Omit<TBlueDotPositionUpdate, 'nearestNode' | 'map'> & {
|
|
1517
|
-
nearestNode?: MappedinNode['id'];
|
|
1518
|
-
map?: MappedinMap['id'];
|
|
1529
|
+
[MINIMAP_EVENT.LOAD_MINIMAP]: {
|
|
1530
|
+
options: TGetVenueOptions;
|
|
1519
1531
|
};
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1532
|
+
[MINIMAP_EVENT.CACHE_IMAGE]: {
|
|
1533
|
+
url?: string;
|
|
1534
|
+
options: TGetVenueOptions;
|
|
1535
|
+
locationId: MappedinLocation['id'];
|
|
1536
|
+
polygonHighlightColor?: string;
|
|
1537
|
+
focusOptions?: Omit<TFocusOnOptionsSerializable, 'targets'>;
|
|
1526
1538
|
};
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
options: TGetVenueOptions;
|
|
1532
|
-
showVenueOptions: TShowVenueOptions;
|
|
1539
|
+
[EVENT.CLEAR_BUNDLE_CACHE]: null;
|
|
1540
|
+
[EVENT.NOTHING_CLICKED]: null;
|
|
1541
|
+
[EVENT.STATE_CHANGED]: {
|
|
1542
|
+
state: STATE;
|
|
1533
1543
|
};
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
msgID: string;
|
|
1537
|
-
data: {
|
|
1538
|
-
venueData: string;
|
|
1539
|
-
format: 'jsonstring';
|
|
1540
|
-
showVenueOptions: TShowVenueOptions;
|
|
1544
|
+
[EVENT.DATA_LOADED]: {
|
|
1545
|
+
venueData: any;
|
|
1541
1546
|
};
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
msgID: string;
|
|
1545
|
-
data: {
|
|
1546
|
-
mapId: string;
|
|
1547
|
+
[EVENT.FIRST_MAP_LOADED]: {
|
|
1548
|
+
venueData?: any;
|
|
1547
1549
|
};
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
msgID: string;
|
|
1551
|
-
data: {
|
|
1552
|
-
positionOptions?: TAnimatePositionOptions;
|
|
1550
|
+
[EVENT.MAP_CHANGED]: {
|
|
1551
|
+
mapId: string;
|
|
1553
1552
|
};
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
msgID: string;
|
|
1557
|
-
data: {
|
|
1558
|
-
rotation: number;
|
|
1553
|
+
[EVENT.POLYGON_CLICKED]: {
|
|
1554
|
+
polygonId: string;
|
|
1559
1555
|
};
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
msgID: string;
|
|
1563
|
-
data: {
|
|
1564
|
-
tilt: number;
|
|
1556
|
+
[EVENT.ROTATION_CHANGED]: {
|
|
1557
|
+
rotation: number;
|
|
1565
1558
|
};
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
msgID: string;
|
|
1569
|
-
data: {
|
|
1570
|
-
safeAreaInsets: {
|
|
1571
|
-
top: number;
|
|
1572
|
-
bottom: number;
|
|
1573
|
-
left: number;
|
|
1574
|
-
right: number;
|
|
1575
|
-
};
|
|
1559
|
+
[EVENT.TILT_CHANGED]: {
|
|
1560
|
+
tilt: number;
|
|
1576
1561
|
};
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
data: {
|
|
1581
|
-
polygonId: string;
|
|
1562
|
+
[EVENT.UPDATE_GEOLOCATION]: {
|
|
1563
|
+
msgID: undefined;
|
|
1564
|
+
data: unknown;
|
|
1582
1565
|
};
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
msgID: string;
|
|
1586
|
-
data: {
|
|
1587
|
-
focusOptions: TFocusOnOptionsSerializable;
|
|
1566
|
+
[EVENT.BLUEDOT_STATE_CHANGE]: {
|
|
1567
|
+
stateChange: TBlueDotStateChange;
|
|
1588
1568
|
};
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1569
|
+
[EVENT.BLUEDOT_POSITION_UPDATE]: {
|
|
1570
|
+
update: Omit<TBlueDotPositionUpdate, 'nearestNode' | 'map'> & {
|
|
1571
|
+
nearestNode?: MappedinNode['id'];
|
|
1572
|
+
map?: MappedinMap['id'];
|
|
1573
|
+
};
|
|
1594
1574
|
};
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
msgID: string;
|
|
1598
|
-
data: {
|
|
1599
|
-
polygonId: string;
|
|
1600
|
-
color: string;
|
|
1601
|
-
textColor?: string;
|
|
1602
|
-
opacity?: number;
|
|
1575
|
+
[EVENT.SET_JOURNEY_STEP]: {
|
|
1576
|
+
step: number;
|
|
1603
1577
|
};
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1578
|
+
[EVENT.LOAD_VENUE]: {
|
|
1579
|
+
options: TGetVenueOptions & {
|
|
1580
|
+
useBundle?: boolean;
|
|
1581
|
+
};
|
|
1582
|
+
showVenueOptions: TShowVenueOptions;
|
|
1609
1583
|
};
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
};
|
|
1615
|
-
[EVENT.ADD_INTERACTIVE_POLYGON]: {
|
|
1616
|
-
msgID: string;
|
|
1617
|
-
data: {
|
|
1618
|
-
polygonId: string;
|
|
1584
|
+
[EVENT.SHOW_VENUE]: {
|
|
1585
|
+
venueData: string;
|
|
1586
|
+
format: 'jsonstring';
|
|
1587
|
+
showVenueOptions: TShowVenueOptions;
|
|
1619
1588
|
};
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
msgID: string;
|
|
1623
|
-
data?: null;
|
|
1624
|
-
};
|
|
1625
|
-
[EVENT.LABEL_ALL_LOCATIONS]: {
|
|
1626
|
-
msgID: string;
|
|
1627
|
-
data: {
|
|
1628
|
-
options?: (Omit<TReactNativeFlatLabelAllLocations, 'locations'> | Omit<TLabelAllLocationFloatingLabelOptions, 'locations'> | Omit<TReactNativeFlatLabelAllLocationsLegacy, 'locations'>) & {
|
|
1629
|
-
locations?: string[];
|
|
1630
|
-
};
|
|
1589
|
+
[EVENT.SET_MAP]: {
|
|
1590
|
+
mapId: string;
|
|
1631
1591
|
};
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
msgID: string;
|
|
1635
|
-
data?: null;
|
|
1636
|
-
};
|
|
1637
|
-
[EVENT.LABEL_POLYGON]: {
|
|
1638
|
-
msgID: string;
|
|
1639
|
-
data: {
|
|
1640
|
-
polygonId: string;
|
|
1641
|
-
options: (TFloatingLabelPolygonOptions | TFlatLabelPolygonOptions) & {
|
|
1642
|
-
/**
|
|
1643
|
-
* @deprecated
|
|
1644
|
-
*/
|
|
1645
|
-
legacyLabels?: boolean;
|
|
1646
|
-
};
|
|
1592
|
+
[EVENT.CAMERA_SET]: {
|
|
1593
|
+
positionOptions?: TAnimatePositionOptions;
|
|
1647
1594
|
};
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
msgID: string;
|
|
1651
|
-
data: {
|
|
1652
|
-
options?: TEnableBlueDotOptions;
|
|
1595
|
+
[EVENT.SET_ROTATION]: {
|
|
1596
|
+
rotation: number;
|
|
1653
1597
|
};
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
msgID: string;
|
|
1657
|
-
data?: null;
|
|
1658
|
-
};
|
|
1659
|
-
[EVENT.SET_BLUE_DOT_IS_FOLLOWING]: {
|
|
1660
|
-
msgID: string;
|
|
1661
|
-
data: {
|
|
1662
|
-
isFollowing: boolean;
|
|
1598
|
+
[EVENT.SET_TILT]: {
|
|
1599
|
+
tilt: number;
|
|
1663
1600
|
};
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1601
|
+
[EVENT.CAMERA_SET_SAFE_AREA_INSETS]: {
|
|
1602
|
+
safeAreaInsets: {
|
|
1603
|
+
top: number;
|
|
1604
|
+
bottom: number;
|
|
1605
|
+
left: number;
|
|
1606
|
+
right: number;
|
|
1607
|
+
};
|
|
1671
1608
|
};
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
msgID: string;
|
|
1675
|
-
data: null;
|
|
1676
|
-
};
|
|
1677
|
-
[EVENT.SET_MIN_ZOOM]: {
|
|
1678
|
-
msgID: string;
|
|
1679
|
-
data: {
|
|
1680
|
-
zoomLevel: number;
|
|
1609
|
+
[EVENT.CLEAR_POLYGON_COLOR]: {
|
|
1610
|
+
polygonId: string;
|
|
1681
1611
|
};
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
msgID: string;
|
|
1685
|
-
data: {
|
|
1686
|
-
zoomLevel: number;
|
|
1612
|
+
[EVENT.FOCUS_ON]: {
|
|
1613
|
+
focusOptions: TFocusOnOptionsSerializable;
|
|
1687
1614
|
};
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
msgID: string;
|
|
1691
|
-
data: {
|
|
1692
|
-
nodeOrCoordinate: {
|
|
1693
|
-
type: 'Node';
|
|
1694
|
-
id: string;
|
|
1695
|
-
} | {
|
|
1696
|
-
type: 'Coordinate';
|
|
1697
|
-
mapId: string;
|
|
1698
|
-
lat: number;
|
|
1699
|
-
lon: number;
|
|
1700
|
-
};
|
|
1701
|
-
contentHtml: string;
|
|
1702
|
-
options: any;
|
|
1615
|
+
[EVENT.FOCUS_ON_LEGACY]: {
|
|
1616
|
+
focusOptions: TFocusOnOptionsLegacySerializable;
|
|
1703
1617
|
};
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1618
|
+
[EVENT.SET_POLYGON_COLOR]: {
|
|
1619
|
+
polygonId: string;
|
|
1620
|
+
color: string;
|
|
1621
|
+
textColor?: string;
|
|
1622
|
+
opacity?: number;
|
|
1709
1623
|
};
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
msgID: string;
|
|
1713
|
-
data: {
|
|
1714
|
-
location: TGeolocationObject;
|
|
1624
|
+
[EVENT.SET_BACKGROUND_COLOR]: {
|
|
1625
|
+
backgroundColor: string;
|
|
1715
1626
|
};
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
data: {
|
|
1720
|
-
path: MappedinNode['id'][];
|
|
1721
|
-
pathOptions: TPathOptions;
|
|
1627
|
+
[EVENT.CLEAR_ALL_POLYGON_COLORS]: null;
|
|
1628
|
+
[EVENT.ADD_INTERACTIVE_POLYGON]: {
|
|
1629
|
+
polygonId: string;
|
|
1722
1630
|
};
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1631
|
+
[EVENT.REMOVE_INTERACTIVE_POLYGONS]: null;
|
|
1632
|
+
[EVENT.LABEL_ALL_LOCATIONS]: {
|
|
1633
|
+
options?: (Omit<TReactNativeFlatLabelAllLocations, 'locations'> | Omit<TLabelAllLocationFloatingLabelOptions, 'locations'> | Omit<TReactNativeFlatLabelAllLocationsLegacy, 'locations'>) & {
|
|
1634
|
+
locations?: string[];
|
|
1635
|
+
/**
|
|
1636
|
+
* @deprecated
|
|
1637
|
+
*/
|
|
1638
|
+
legacyLabels?: boolean;
|
|
1639
|
+
flatLabels?: boolean;
|
|
1640
|
+
};
|
|
1732
1641
|
};
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
options: TSerializableJourneyOptions;
|
|
1642
|
+
[EVENT.REMOVE_ALL_LABELS]: null;
|
|
1643
|
+
[EVENT.LABEL_POLYGON]: {
|
|
1644
|
+
polygonId: string;
|
|
1645
|
+
options: (TFloatingLabelPolygonOptions | TFlatLabelPolygonOptions) & {
|
|
1646
|
+
/**
|
|
1647
|
+
* @deprecated
|
|
1648
|
+
*/
|
|
1649
|
+
legacyLabels?: boolean;
|
|
1650
|
+
};
|
|
1743
1651
|
};
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
msgID: string;
|
|
1747
|
-
data: {
|
|
1748
|
-
cookie: any;
|
|
1652
|
+
[EVENT.ENABLE_BLUE_DOT]: {
|
|
1653
|
+
options?: TEnableBlueDotOptions;
|
|
1749
1654
|
};
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1655
|
+
[EVENT.DISABLE_BLUE_DOT]: null;
|
|
1656
|
+
[EVENT.ENABLE_BEARING]: any;
|
|
1657
|
+
[EVENT.GET_NEAREST_NODE]: any;
|
|
1658
|
+
[EVENT.GET_BLUE_DOT_IS_FOLLOWING]: any;
|
|
1659
|
+
[EVENT.SET_BLUE_DOT_IS_FOLLOWING]: {
|
|
1660
|
+
isFollowing: boolean;
|
|
1661
|
+
};
|
|
1662
|
+
[EVENT.GET_DIRECTIONS]: {
|
|
1663
|
+
to: TSerializedNode | TSerializedLocation | TSerializedPolygon;
|
|
1664
|
+
from: TSerializedNode | TSerializedLocation | TSerializedPolygon;
|
|
1665
|
+
accessible?: boolean;
|
|
1666
|
+
};
|
|
1667
|
+
[EVENT.DESTROY]: null;
|
|
1668
|
+
[EVENT.SET_MIN_ZOOM]: {
|
|
1669
|
+
zoomLevel: number;
|
|
1670
|
+
};
|
|
1671
|
+
[EVENT.SET_MAX_ZOOM]: {
|
|
1672
|
+
zoomLevel: number;
|
|
1673
|
+
};
|
|
1674
|
+
[EVENT.CREATE_MARKER]: {
|
|
1675
|
+
nodeOrCoordinate: {
|
|
1676
|
+
type: 'Node';
|
|
1677
|
+
id: string;
|
|
1678
|
+
} | {
|
|
1679
|
+
type: 'Coordinate';
|
|
1680
|
+
mapId: string;
|
|
1681
|
+
lat: number;
|
|
1682
|
+
lon: number;
|
|
1683
|
+
};
|
|
1684
|
+
contentHtml: string;
|
|
1685
|
+
options: any;
|
|
1686
|
+
};
|
|
1687
|
+
[EVENT.REMOVE_MARKER]: {
|
|
1688
|
+
markerId: string;
|
|
1689
|
+
};
|
|
1690
|
+
[EVENT.OVERRIDE_LOCATION]: {
|
|
1691
|
+
location: TGeolocationObject;
|
|
1692
|
+
};
|
|
1693
|
+
[EVENT.DRAW_PATH]: {
|
|
1694
|
+
path: MappedinNode['id'][];
|
|
1695
|
+
pathOptions: TPathOptions;
|
|
1696
|
+
};
|
|
1697
|
+
[EVENT.REMOVE_ALL_PATHS]: null;
|
|
1698
|
+
[EVENT.SET_STATE]: {
|
|
1699
|
+
state: STATE;
|
|
1700
|
+
};
|
|
1701
|
+
[EVENT.CLEAR_JOURNEY]: null;
|
|
1702
|
+
[EVENT.DRAW_JOURNEY]: {
|
|
1703
|
+
directions: IDirectionsResult;
|
|
1704
|
+
options: TSerializableJourneyOptions;
|
|
1705
|
+
};
|
|
1706
|
+
[EVENT.SET_COOKIE]: {
|
|
1707
|
+
cookie: any;
|
|
1708
|
+
};
|
|
1709
|
+
[EVENT.GET_NEAREST_NODE_BY_SCREEN_COORDINATES]: {
|
|
1710
|
+
x: number;
|
|
1711
|
+
y: number;
|
|
1712
|
+
map?: MappedinMap['id'];
|
|
1757
1713
|
};
|
|
1758
|
-
};
|
|
1759
1714
|
};
|
|
1760
1715
|
}
|
|
1761
1716
|
|
|
@@ -1840,15 +1795,449 @@ declare module '@mappedin/react-native-sdk/wrappers/common/types' {
|
|
|
1840
1795
|
declare module '@mappedin/react-native-sdk/wrappers/common/pub-sub' {
|
|
1841
1796
|
export class PubSub<EVENT_PAYLOAD> {
|
|
1842
1797
|
_subscribers: any;
|
|
1843
|
-
publish<EVENT_NAME extends keyof EVENT_PAYLOAD>(eventName: EVENT_NAME, data
|
|
1844
|
-
on<EVENT_NAME extends keyof EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]
|
|
1845
|
-
data: null;
|
|
1846
|
-
} ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
1798
|
+
publish<EVENT_NAME extends keyof EVENT_PAYLOAD>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
|
|
1799
|
+
on<EVENT_NAME extends keyof EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
1847
1800
|
off<EVENT_NAME extends keyof EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
1848
1801
|
destroy(): void;
|
|
1849
1802
|
}
|
|
1850
1803
|
}
|
|
1851
1804
|
|
|
1805
|
+
declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
|
|
1806
|
+
import { BRIDGE_EVENT, BRIDGE_EVENT_PAYLOADS } from '@mappedin/react-native-sdk/wrappers/common';
|
|
1807
|
+
import { PubSub } from '@mappedin/react-native-sdk/wrappers/common';
|
|
1808
|
+
export function uuid(): string;
|
|
1809
|
+
export class MappedinController {
|
|
1810
|
+
#private;
|
|
1811
|
+
privateEventBus: PubSub<{
|
|
1812
|
+
REJECT: {
|
|
1813
|
+
msgID?: string | undefined;
|
|
1814
|
+
data: any;
|
|
1815
|
+
};
|
|
1816
|
+
RESOLVE: {
|
|
1817
|
+
msgID?: string | undefined;
|
|
1818
|
+
data: any;
|
|
1819
|
+
};
|
|
1820
|
+
READY: {
|
|
1821
|
+
msgID?: string | undefined;
|
|
1822
|
+
data: null;
|
|
1823
|
+
};
|
|
1824
|
+
LOG: {
|
|
1825
|
+
msgID?: string | undefined;
|
|
1826
|
+
data: string;
|
|
1827
|
+
};
|
|
1828
|
+
GET_IMAGE: {
|
|
1829
|
+
msgID?: string | undefined;
|
|
1830
|
+
data: {
|
|
1831
|
+
fileName: string;
|
|
1832
|
+
};
|
|
1833
|
+
};
|
|
1834
|
+
GET_MAP_POLYGONS: {
|
|
1835
|
+
msgID?: string | undefined;
|
|
1836
|
+
data: {
|
|
1837
|
+
mapId: string;
|
|
1838
|
+
};
|
|
1839
|
+
};
|
|
1840
|
+
MINIMAP_READY: {
|
|
1841
|
+
msgID?: string | undefined;
|
|
1842
|
+
data: null;
|
|
1843
|
+
};
|
|
1844
|
+
SHOW_MINIMAP: {
|
|
1845
|
+
msgID?: string | undefined;
|
|
1846
|
+
data: {
|
|
1847
|
+
format: "jsonstring";
|
|
1848
|
+
venueData: string;
|
|
1849
|
+
options: import("./types").TMiMapViewOptions;
|
|
1850
|
+
};
|
|
1851
|
+
};
|
|
1852
|
+
LOAD_MINIMAP: {
|
|
1853
|
+
msgID?: string | undefined;
|
|
1854
|
+
data: {
|
|
1855
|
+
options: import("../react-native-sdk/src").TGetVenueOptions;
|
|
1856
|
+
};
|
|
1857
|
+
};
|
|
1858
|
+
CACHE_IMAGE: {
|
|
1859
|
+
msgID?: string | undefined;
|
|
1860
|
+
data: {
|
|
1861
|
+
url?: string | undefined;
|
|
1862
|
+
options: import("../react-native-sdk/src").TGetVenueOptions;
|
|
1863
|
+
locationId: string;
|
|
1864
|
+
polygonHighlightColor?: string | undefined;
|
|
1865
|
+
focusOptions?: Omit<import("./types").TFocusOnOptionsSerializable, "targets"> | undefined;
|
|
1866
|
+
};
|
|
1867
|
+
};
|
|
1868
|
+
CLEAR_BUNDLE_CACHE: {
|
|
1869
|
+
msgID?: string | undefined;
|
|
1870
|
+
data: null;
|
|
1871
|
+
};
|
|
1872
|
+
NOTHING_CLICKED: {
|
|
1873
|
+
msgID?: string | undefined;
|
|
1874
|
+
data: null;
|
|
1875
|
+
};
|
|
1876
|
+
STATE_CHANGED: {
|
|
1877
|
+
msgID?: string | undefined;
|
|
1878
|
+
data: {
|
|
1879
|
+
state: import("../react-native-sdk/src").STATE;
|
|
1880
|
+
};
|
|
1881
|
+
};
|
|
1882
|
+
DATA_LOADED: {
|
|
1883
|
+
msgID?: string | undefined;
|
|
1884
|
+
data: {
|
|
1885
|
+
venueData: any;
|
|
1886
|
+
};
|
|
1887
|
+
};
|
|
1888
|
+
FIRST_MAP_LOADED: {
|
|
1889
|
+
msgID?: string | undefined;
|
|
1890
|
+
data: {
|
|
1891
|
+
venueData?: any;
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1894
|
+
MAP_CHANGED: {
|
|
1895
|
+
msgID?: string | undefined;
|
|
1896
|
+
data: {
|
|
1897
|
+
mapId: string;
|
|
1898
|
+
};
|
|
1899
|
+
};
|
|
1900
|
+
POLYGON_CLICKED: {
|
|
1901
|
+
msgID?: string | undefined;
|
|
1902
|
+
data: {
|
|
1903
|
+
polygonId: string;
|
|
1904
|
+
};
|
|
1905
|
+
};
|
|
1906
|
+
ROTATION_CHANGED: {
|
|
1907
|
+
msgID?: string | undefined;
|
|
1908
|
+
data: {
|
|
1909
|
+
rotation: number;
|
|
1910
|
+
};
|
|
1911
|
+
};
|
|
1912
|
+
TILT_CHANGED: {
|
|
1913
|
+
msgID?: string | undefined;
|
|
1914
|
+
data: {
|
|
1915
|
+
tilt: number;
|
|
1916
|
+
};
|
|
1917
|
+
};
|
|
1918
|
+
UPDATE_GEOLOCATION: {
|
|
1919
|
+
msgID?: string | undefined;
|
|
1920
|
+
data: {
|
|
1921
|
+
msgID: undefined;
|
|
1922
|
+
data: unknown;
|
|
1923
|
+
};
|
|
1924
|
+
};
|
|
1925
|
+
BLUEDOT_STATE_CHANGE: {
|
|
1926
|
+
msgID?: string | undefined;
|
|
1927
|
+
data: {
|
|
1928
|
+
stateChange: import("../../core/packages/renderer").TBlueDotStateChange;
|
|
1929
|
+
};
|
|
1930
|
+
};
|
|
1931
|
+
BLUEDOT_POSITION_UPDATE: {
|
|
1932
|
+
msgID?: string | undefined;
|
|
1933
|
+
data: {
|
|
1934
|
+
update: Omit<import("../../core/packages/renderer").TBlueDotPositionUpdate, "map" | "nearestNode"> & {
|
|
1935
|
+
nearestNode?: string | undefined;
|
|
1936
|
+
map?: string | undefined;
|
|
1937
|
+
};
|
|
1938
|
+
};
|
|
1939
|
+
};
|
|
1940
|
+
SET_JOURNEY_STEP: {
|
|
1941
|
+
msgID?: string | undefined;
|
|
1942
|
+
data: {
|
|
1943
|
+
step: number;
|
|
1944
|
+
};
|
|
1945
|
+
};
|
|
1946
|
+
LOAD_VENUE: {
|
|
1947
|
+
msgID?: string | undefined;
|
|
1948
|
+
data: {
|
|
1949
|
+
options: import("../react-native-sdk/src").TGetVenueOptions & {
|
|
1950
|
+
useBundle?: boolean | undefined;
|
|
1951
|
+
};
|
|
1952
|
+
showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions;
|
|
1953
|
+
};
|
|
1954
|
+
};
|
|
1955
|
+
SHOW_VENUE: {
|
|
1956
|
+
msgID?: string | undefined;
|
|
1957
|
+
data: {
|
|
1958
|
+
venueData: string;
|
|
1959
|
+
format: "jsonstring";
|
|
1960
|
+
showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions;
|
|
1961
|
+
};
|
|
1962
|
+
};
|
|
1963
|
+
SET_MAP: {
|
|
1964
|
+
msgID?: string | undefined;
|
|
1965
|
+
data: {
|
|
1966
|
+
mapId: string;
|
|
1967
|
+
};
|
|
1968
|
+
};
|
|
1969
|
+
CAMERA_SET: {
|
|
1970
|
+
msgID?: string | undefined;
|
|
1971
|
+
data: {
|
|
1972
|
+
positionOptions?: import("../react-native-sdk/src").TAnimatePositionOptions | undefined;
|
|
1973
|
+
};
|
|
1974
|
+
};
|
|
1975
|
+
SET_ROTATION: {
|
|
1976
|
+
msgID?: string | undefined;
|
|
1977
|
+
data: {
|
|
1978
|
+
rotation: number;
|
|
1979
|
+
};
|
|
1980
|
+
};
|
|
1981
|
+
SET_TILT: {
|
|
1982
|
+
msgID?: string | undefined;
|
|
1983
|
+
data: {
|
|
1984
|
+
tilt: number;
|
|
1985
|
+
};
|
|
1986
|
+
};
|
|
1987
|
+
CAMERA_SET_SAFE_AREA_INSETS: {
|
|
1988
|
+
msgID?: string | undefined;
|
|
1989
|
+
data: {
|
|
1990
|
+
safeAreaInsets: {
|
|
1991
|
+
top: number;
|
|
1992
|
+
bottom: number;
|
|
1993
|
+
left: number;
|
|
1994
|
+
right: number;
|
|
1995
|
+
};
|
|
1996
|
+
};
|
|
1997
|
+
};
|
|
1998
|
+
CLEAR_POLYGON_COLOR: {
|
|
1999
|
+
msgID?: string | undefined;
|
|
2000
|
+
data: {
|
|
2001
|
+
polygonId: string;
|
|
2002
|
+
};
|
|
2003
|
+
};
|
|
2004
|
+
FOCUS_ON: {
|
|
2005
|
+
msgID?: string | undefined;
|
|
2006
|
+
data: {
|
|
2007
|
+
focusOptions: import("./types").TFocusOnOptionsSerializable;
|
|
2008
|
+
};
|
|
2009
|
+
};
|
|
2010
|
+
FOCUS_ON_LEGACY: {
|
|
2011
|
+
msgID?: string | undefined;
|
|
2012
|
+
data: {
|
|
2013
|
+
focusOptions: import("./types").TFocusOnOptionsLegacySerializable;
|
|
2014
|
+
};
|
|
2015
|
+
};
|
|
2016
|
+
SET_POLYGON_COLOR: {
|
|
2017
|
+
msgID?: string | undefined;
|
|
2018
|
+
data: {
|
|
2019
|
+
polygonId: string;
|
|
2020
|
+
color: string;
|
|
2021
|
+
textColor?: string | undefined;
|
|
2022
|
+
opacity?: number | undefined;
|
|
2023
|
+
};
|
|
2024
|
+
};
|
|
2025
|
+
SET_BACKGROUND_COLOR: {
|
|
2026
|
+
msgID?: string | undefined;
|
|
2027
|
+
data: {
|
|
2028
|
+
backgroundColor: string;
|
|
2029
|
+
};
|
|
2030
|
+
};
|
|
2031
|
+
CLEAR_ALL_POLYGON_COLORS: {
|
|
2032
|
+
msgID?: string | undefined;
|
|
2033
|
+
data: null;
|
|
2034
|
+
};
|
|
2035
|
+
ADD_INTERACTIVE_POLYGON: {
|
|
2036
|
+
msgID?: string | undefined;
|
|
2037
|
+
data: {
|
|
2038
|
+
polygonId: string;
|
|
2039
|
+
};
|
|
2040
|
+
};
|
|
2041
|
+
REMOVE_INTERACTIVE_POLYGONS: {
|
|
2042
|
+
msgID?: string | undefined;
|
|
2043
|
+
data: null;
|
|
2044
|
+
};
|
|
2045
|
+
LABEL_ALL_LOCATIONS: {
|
|
2046
|
+
msgID?: string | undefined;
|
|
2047
|
+
data: {
|
|
2048
|
+
options?: ((Omit<import("./types").TReactNativeFlatLabelAllLocations, "locations"> | Omit<import("../react-native-sdk/src").TLabelAllLocationFloatingLabelOptions, "locations"> | Omit<import("./types").TReactNativeFlatLabelAllLocationsLegacy, "locations">) & {
|
|
2049
|
+
locations?: string[] | undefined;
|
|
2050
|
+
legacyLabels?: boolean | undefined;
|
|
2051
|
+
flatLabels?: boolean | undefined;
|
|
2052
|
+
}) | undefined;
|
|
2053
|
+
};
|
|
2054
|
+
};
|
|
2055
|
+
REMOVE_ALL_LABELS: {
|
|
2056
|
+
msgID?: string | undefined;
|
|
2057
|
+
data: null;
|
|
2058
|
+
};
|
|
2059
|
+
LABEL_POLYGON: {
|
|
2060
|
+
msgID?: string | undefined;
|
|
2061
|
+
data: {
|
|
2062
|
+
polygonId: string;
|
|
2063
|
+
options: (import("../react-native-sdk/src").TFloatingLabelPolygonOptions | import("../react-native-sdk/src").TFlatLabelPolygonOptions) & {
|
|
2064
|
+
legacyLabels?: boolean | undefined;
|
|
2065
|
+
};
|
|
2066
|
+
};
|
|
2067
|
+
};
|
|
2068
|
+
ENABLE_BLUE_DOT: {
|
|
2069
|
+
msgID?: string | undefined;
|
|
2070
|
+
data: {
|
|
2071
|
+
options?: import("../react-native-sdk/src").TEnableBlueDotOptionsBase | undefined;
|
|
2072
|
+
};
|
|
2073
|
+
};
|
|
2074
|
+
DISABLE_BLUE_DOT: {
|
|
2075
|
+
msgID?: string | undefined;
|
|
2076
|
+
data: null;
|
|
2077
|
+
};
|
|
2078
|
+
ENABLE_BEARING: {
|
|
2079
|
+
msgID?: string | undefined;
|
|
2080
|
+
data: any;
|
|
2081
|
+
};
|
|
2082
|
+
GET_NEAREST_NODE: {
|
|
2083
|
+
msgID?: string | undefined;
|
|
2084
|
+
data: any;
|
|
2085
|
+
};
|
|
2086
|
+
GET_BLUE_DOT_IS_FOLLOWING: {
|
|
2087
|
+
msgID?: string | undefined;
|
|
2088
|
+
data: any;
|
|
2089
|
+
};
|
|
2090
|
+
SET_BLUE_DOT_IS_FOLLOWING: {
|
|
2091
|
+
msgID?: string | undefined;
|
|
2092
|
+
data: {
|
|
2093
|
+
isFollowing: boolean;
|
|
2094
|
+
};
|
|
2095
|
+
};
|
|
2096
|
+
GET_DIRECTIONS: {
|
|
2097
|
+
msgID?: string | undefined;
|
|
2098
|
+
data: {
|
|
2099
|
+
to: import("./types").TSerializedNode | import("./types").TSerializedLocation | import("./types").TSerializedPolygon;
|
|
2100
|
+
from: import("./types").TSerializedNode | import("./types").TSerializedLocation | import("./types").TSerializedPolygon;
|
|
2101
|
+
accessible?: boolean | undefined;
|
|
2102
|
+
};
|
|
2103
|
+
};
|
|
2104
|
+
DESTROY: {
|
|
2105
|
+
msgID?: string | undefined;
|
|
2106
|
+
data: null;
|
|
2107
|
+
};
|
|
2108
|
+
SET_MIN_ZOOM: {
|
|
2109
|
+
msgID?: string | undefined;
|
|
2110
|
+
data: {
|
|
2111
|
+
zoomLevel: number;
|
|
2112
|
+
};
|
|
2113
|
+
};
|
|
2114
|
+
SET_MAX_ZOOM: {
|
|
2115
|
+
msgID?: string | undefined;
|
|
2116
|
+
data: {
|
|
2117
|
+
zoomLevel: number;
|
|
2118
|
+
};
|
|
2119
|
+
};
|
|
2120
|
+
CREATE_MARKER: {
|
|
2121
|
+
msgID?: string | undefined;
|
|
2122
|
+
data: {
|
|
2123
|
+
nodeOrCoordinate: {
|
|
2124
|
+
type: "Node";
|
|
2125
|
+
id: string;
|
|
2126
|
+
} | {
|
|
2127
|
+
type: "Coordinate";
|
|
2128
|
+
mapId: string;
|
|
2129
|
+
lat: number;
|
|
2130
|
+
lon: number;
|
|
2131
|
+
};
|
|
2132
|
+
contentHtml: string;
|
|
2133
|
+
options: any;
|
|
2134
|
+
};
|
|
2135
|
+
};
|
|
2136
|
+
REMOVE_MARKER: {
|
|
2137
|
+
msgID?: string | undefined;
|
|
2138
|
+
data: {
|
|
2139
|
+
markerId: string;
|
|
2140
|
+
};
|
|
2141
|
+
};
|
|
2142
|
+
OVERRIDE_LOCATION: {
|
|
2143
|
+
msgID?: string | undefined;
|
|
2144
|
+
data: {
|
|
2145
|
+
location: import("../react-native-sdk/src").TGeolocationObject;
|
|
2146
|
+
};
|
|
2147
|
+
};
|
|
2148
|
+
DRAW_PATH: {
|
|
2149
|
+
msgID?: string | undefined;
|
|
2150
|
+
data: {
|
|
2151
|
+
path: string[];
|
|
2152
|
+
pathOptions: import("../react-native-sdk/src").TPathOptions;
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
REMOVE_ALL_PATHS: {
|
|
2156
|
+
msgID?: string | undefined;
|
|
2157
|
+
data: null;
|
|
2158
|
+
};
|
|
2159
|
+
SET_STATE: {
|
|
2160
|
+
msgID?: string | undefined;
|
|
2161
|
+
data: {
|
|
2162
|
+
state: import("../react-native-sdk/src").STATE;
|
|
2163
|
+
};
|
|
2164
|
+
};
|
|
2165
|
+
CLEAR_JOURNEY: {
|
|
2166
|
+
msgID?: string | undefined;
|
|
2167
|
+
data: null;
|
|
2168
|
+
};
|
|
2169
|
+
DRAW_JOURNEY: {
|
|
2170
|
+
msgID?: string | undefined;
|
|
2171
|
+
data: {
|
|
2172
|
+
directions: import("../react-native-sdk/src").IDirectionsResult;
|
|
2173
|
+
options: import("./types").TSerializableJourneyOptions;
|
|
2174
|
+
};
|
|
2175
|
+
};
|
|
2176
|
+
SET_COOKIE: {
|
|
2177
|
+
msgID?: string | undefined;
|
|
2178
|
+
data: {
|
|
2179
|
+
cookie: any;
|
|
2180
|
+
};
|
|
2181
|
+
};
|
|
2182
|
+
GET_NEAREST_NODE_BY_SCREEN_COORDINATES: {
|
|
2183
|
+
msgID?: string | undefined;
|
|
2184
|
+
data: {
|
|
2185
|
+
x: number;
|
|
2186
|
+
y: number;
|
|
2187
|
+
map?: string | undefined;
|
|
2188
|
+
};
|
|
2189
|
+
};
|
|
2190
|
+
}>;
|
|
2191
|
+
/**
|
|
2192
|
+
* Message received from the other side of the bridge
|
|
2193
|
+
* @hidden
|
|
2194
|
+
*/
|
|
2195
|
+
onMessageReceived<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload: {
|
|
2196
|
+
data: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
|
|
2197
|
+
msgID?: string;
|
|
2198
|
+
}): void;
|
|
2199
|
+
/**
|
|
2200
|
+
* Send a message to the other side of the bridge
|
|
2201
|
+
*
|
|
2202
|
+
* @hidden
|
|
2203
|
+
*/
|
|
2204
|
+
sendMessage<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: {
|
|
2205
|
+
msgID?: string;
|
|
2206
|
+
data: BRIDGE_EVENT_PAYLOADS[EVENT_NAME] | null;
|
|
2207
|
+
}): void;
|
|
2208
|
+
/**
|
|
2209
|
+
* Handle resolution from the other side, with a value if one was expected
|
|
2210
|
+
* @hidden
|
|
2211
|
+
*/
|
|
2212
|
+
protected handleResolution: <EVENT_NAME extends BRIDGE_EVENT>(payload: {
|
|
2213
|
+
msgID: string;
|
|
2214
|
+
data: {
|
|
2215
|
+
payload: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
|
|
2216
|
+
};
|
|
2217
|
+
}) => void;
|
|
2218
|
+
/**
|
|
2219
|
+
* Handle rejection from the other side, typically when the request results in an error
|
|
2220
|
+
* @hidden
|
|
2221
|
+
*/
|
|
2222
|
+
protected handleRejection: <EVENT_NAME extends BRIDGE_EVENT>(payload: {
|
|
2223
|
+
msgID: string;
|
|
2224
|
+
data: {
|
|
2225
|
+
payload: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
|
|
2226
|
+
};
|
|
2227
|
+
}) => void;
|
|
2228
|
+
/**
|
|
2229
|
+
* Emitting a message without expecting a response
|
|
2230
|
+
* @hidden
|
|
2231
|
+
*/
|
|
2232
|
+
emit<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): void;
|
|
2233
|
+
/**
|
|
2234
|
+
* Emitting a message and waiting for a reponse, via a promise
|
|
2235
|
+
* @hidden
|
|
2236
|
+
*/
|
|
2237
|
+
emitAsync<T, EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): Promise<T>;
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
|
|
1852
2241
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface' {
|
|
1853
2242
|
import { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
1854
2243
|
import CameraControls from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.CameraControls';
|
|
@@ -1997,6 +2386,17 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface
|
|
|
1997
2386
|
interactivePolygons: any;
|
|
1998
2387
|
highlightedPolygons: any;
|
|
1999
2388
|
cameraPlane: any;
|
|
2389
|
+
/**
|
|
2390
|
+
* Called any time a user touches or clicks the map. Only fires on "single" touches/clicks.
|
|
2391
|
+
*
|
|
2392
|
+
* @param position Object containing the latitude & longitude of the location touched on the map
|
|
2393
|
+
* @param polygons Array of polygon IDs that were touched, in order of front to back.
|
|
2394
|
+
* @param nearBlueDot Whether the touch was close enough to the Blue Dot to be considered a touch on the Blue Dot.
|
|
2395
|
+
*/
|
|
2396
|
+
onMapClicked(position: {
|
|
2397
|
+
latitude: number;
|
|
2398
|
+
longitude: number;
|
|
2399
|
+
}, polygons: string[], nearBlueDot: boolean): void;
|
|
2000
2400
|
/**
|
|
2001
2401
|
* This is called when an interactive Polygon is clicked on.
|
|
2002
2402
|
* You will almost certainly want to replace this with your own function in your client app.
|
|
@@ -2657,6 +3057,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
|
|
|
2657
3057
|
scale?: number;
|
|
2658
3058
|
x_scale?: number;
|
|
2659
3059
|
perspectiveId?: string;
|
|
3060
|
+
scene: any;
|
|
2660
3061
|
width: number;
|
|
2661
3062
|
height: number;
|
|
2662
3063
|
georeference: TGeoReference[];
|
|
@@ -2691,7 +3092,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
|
|
|
2691
3092
|
createCoordinate(lat: number, lon: number): MappedinCoordinate;
|
|
2692
3093
|
/**
|
|
2693
3094
|
*
|
|
2694
|
-
* @returns map rotation in
|
|
3095
|
+
* @returns map rotation in radians from north
|
|
2695
3096
|
*/
|
|
2696
3097
|
getNorth(): any;
|
|
2697
3098
|
static hydrate(maps: any, mappedin: Mappedin): MappedinMap[];
|
|
@@ -3398,6 +3799,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
3398
3799
|
import { TGeolocationObject } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
3399
3800
|
import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer';
|
|
3400
3801
|
import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
|
|
3802
|
+
import BlueDotManager from '@mappedin/react-native-sdk/core/packages/renderer/internal/blue-dot-manager';
|
|
3401
3803
|
export const DEFAULT_BLUE_DOT_COLOR = 2254591;
|
|
3402
3804
|
export interface IPositionUpdater extends IPubSub {
|
|
3403
3805
|
/**
|
|
@@ -3548,6 +3950,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
3548
3950
|
data: any;
|
|
3549
3951
|
mapView: MapView;
|
|
3550
3952
|
core: ICore;
|
|
3953
|
+
manager: BlueDotManager;
|
|
3551
3954
|
};
|
|
3552
3955
|
export type TLatLonProps = [number, number];
|
|
3553
3956
|
const BlueDot: {
|
|
@@ -3638,12 +4041,13 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot
|
|
|
3638
4041
|
import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
|
|
3639
4042
|
import { TEnableBlueDotOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
3640
4043
|
import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed';
|
|
4044
|
+
import EventSystemLayer from '@mappedin/react-native-sdk/core/packages/renderer/layers/EventSystem';
|
|
3641
4045
|
class BlueDotLayer extends PubSub<E_BLUEDOT_EVENT_PAYLOAD, E_BLUEDOT_EVENT> {
|
|
3642
4046
|
#private;
|
|
3643
4047
|
/**
|
|
3644
4048
|
* @private
|
|
3645
4049
|
*/
|
|
3646
|
-
constructor(mapView: MapView, core: ICore);
|
|
4050
|
+
constructor(mapView: MapView, core: ICore, eventsLayer: EventSystemLayer);
|
|
3647
4051
|
/**
|
|
3648
4052
|
* Enables Blue Dot. BlueDot then emits {@link TBlueDotStateChange} and {@link TBlueDotPositionUpdate} events via {@link E_BLUEDOT_EVENT}
|
|
3649
4053
|
*/
|
|
@@ -3769,7 +4173,7 @@ declare module '@mappedin/react-native-sdk/core/packages/navigator/NavigationGra
|
|
|
3769
4173
|
mapsById: {
|
|
3770
4174
|
[propName: string]: IMap;
|
|
3771
4175
|
};
|
|
3772
|
-
constructor({ nodes, vortexes, maps, showVortexNames
|
|
4176
|
+
constructor({ nodes, vortexes, maps, showVortexNames }: {
|
|
3773
4177
|
nodes: INode[];
|
|
3774
4178
|
vortexes: IVortex[];
|
|
3775
4179
|
maps: IMap[];
|
|
@@ -3808,7 +4212,7 @@ declare module '@mappedin/react-native-sdk/core/packages/navigator/Navigator' {
|
|
|
3808
4212
|
instructions: Directive[];
|
|
3809
4213
|
}
|
|
3810
4214
|
class Navigator {
|
|
3811
|
-
constructor({ locations, nodes, vortexes, maps, showVortexNames
|
|
4215
|
+
constructor({ locations, nodes, vortexes, maps, showVortexNames }: {
|
|
3812
4216
|
locations: ILocation[];
|
|
3813
4217
|
nodes: INode[];
|
|
3814
4218
|
vortexes: IVortex[];
|
|
@@ -3830,7 +4234,7 @@ declare module '@mappedin/react-native-sdk/core/packages/navigator/Navigator' {
|
|
|
3830
4234
|
* @param departFrom ILocation - optional, id and name of a location to represent start of journey
|
|
3831
4235
|
* @param arriveAt ILocation - optional, id and name of a location to represent end of journey
|
|
3832
4236
|
*/
|
|
3833
|
-
getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt
|
|
4237
|
+
getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt }: {
|
|
3834
4238
|
originIds: string[];
|
|
3835
4239
|
destinationNodeIds: string[];
|
|
3836
4240
|
accessible: boolean;
|
|
@@ -3894,7 +4298,7 @@ declare module '@mappedin/react-native-sdk/core/packages/navigator/Directive' {
|
|
|
3894
4298
|
atLocation?: ILocation;
|
|
3895
4299
|
type?: BEARING_TYPE;
|
|
3896
4300
|
distance: number;
|
|
3897
|
-
constructor({ origin, action, distance, atLocation, instruction
|
|
4301
|
+
constructor({ origin, action, distance, atLocation, instruction }: {
|
|
3898
4302
|
origin?: INode;
|
|
3899
4303
|
action?: IAction;
|
|
3900
4304
|
distance?: number;
|
|
@@ -4287,7 +4691,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
|
|
|
4287
4691
|
import Search from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Search';
|
|
4288
4692
|
import Analytics from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Analytics';
|
|
4289
4693
|
import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
|
|
4290
|
-
import { getVenue, getVenueBundle, Mappedin, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
4694
|
+
import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
4291
4695
|
import { PositionUpdater } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
|
|
4292
4696
|
import type { TMapViewOptions, TJourneyOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
4293
4697
|
import { labelThemes } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
@@ -4295,33 +4699,41 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
|
|
|
4295
4699
|
export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator';
|
|
4296
4700
|
export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator';
|
|
4297
4701
|
export type TMappedinInitializeOutput = {
|
|
4298
|
-
|
|
4299
|
-
|
|
4702
|
+
mapView: MapView;
|
|
4703
|
+
venue: Mappedin;
|
|
4300
4704
|
};
|
|
4301
4705
|
type _TGetVenueOptions = TGetVenueOptions & {
|
|
4302
|
-
|
|
4706
|
+
useVenueBundle?: false | undefined;
|
|
4303
4707
|
};
|
|
4304
4708
|
type _TGetVenueBundleOptions = TGetVenueBundleOptions & {
|
|
4305
|
-
|
|
4709
|
+
useVenueBundle: true;
|
|
4306
4710
|
};
|
|
4307
4711
|
type TMappedinInitializeOptions = {
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4712
|
+
mapView?: TMapViewOptions;
|
|
4713
|
+
venue: _TGetVenueOptions | _TGetVenueBundleOptions;
|
|
4714
|
+
firstMapSelector?: (venue: Mappedin) => MappedinMap | MappedinMap['id'];
|
|
4311
4715
|
};
|
|
4312
4716
|
/**
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4717
|
+
*
|
|
4718
|
+
* @param el HTML Element where the mapView should be placed
|
|
4719
|
+
* @param venue Venue Object returned by {@link getVenue}
|
|
4720
|
+
* @param options MapView Options
|
|
4721
|
+
* @returns
|
|
4722
|
+
*/
|
|
4319
4723
|
function showVenue<T extends Mappedin>(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise<MapView>;
|
|
4320
4724
|
export { COLLISION_RANKING_TIERS, STATE, E_SDK_EVENT, E_BLUEDOT_STATE_REASON, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_EVENT, E_BLUEDOT_STATE, E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
|
|
4321
|
-
export { Search, getVenue, getVenueBundle, showVenue, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
|
|
4725
|
+
export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
|
|
4726
|
+
import DefaultAssetManager from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager';
|
|
4727
|
+
const setAssetManager: (am: any) => void;
|
|
4728
|
+
/**
|
|
4729
|
+
* @internal
|
|
4730
|
+
*/
|
|
4731
|
+
export { setAssetManager, DefaultAssetManager as AssetManager };
|
|
4322
4732
|
export type { TMappedinDirective } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinDirections';
|
|
4323
4733
|
export type { TMapViewOptions, TMappedinInitializeOptions, TJourneyOptions };
|
|
4324
4734
|
export type { TBlueDotPositionUpdate, TBlueDotStateChange, TEnableBlueDotOptions } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
|
|
4735
|
+
import FloatingLabel from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.FloatingLabel';
|
|
4736
|
+
export type { FloatingLabel };
|
|
4325
4737
|
export * from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
4326
4738
|
export type { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
|
|
4327
4739
|
export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions, default as Camera } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
|
|
@@ -4567,6 +4979,111 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-s
|
|
|
4567
4979
|
export {};
|
|
4568
4980
|
}
|
|
4569
4981
|
|
|
4982
|
+
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/blue-dot-manager' {
|
|
4983
|
+
export const DEFAULT_MIN_RADIUS: 8;
|
|
4984
|
+
export const DEFAULT_MAX_RADIUS: 65;
|
|
4985
|
+
export const DEFAULT_RADIUS_UPDATE_INTERVAL: 3;
|
|
4986
|
+
export default BlueDotManager;
|
|
4987
|
+
/**
|
|
4988
|
+
* @private
|
|
4989
|
+
* An interface for showing a position (typically the user's position) on a 3D map.
|
|
4990
|
+
* Constructed automatically by {{#crossLink "MapView3D"}}{{/crossLink}}.
|
|
4991
|
+
*
|
|
4992
|
+
* @class BlueDotManager
|
|
4993
|
+
*/
|
|
4994
|
+
class BlueDotManager extends PubSub {
|
|
4995
|
+
/**
|
|
4996
|
+
* @param [options.minRadius] The ring around the blue dot will only be drawn if `options.radius` is greater than or equal to this value, in metres. Must be >= 0.
|
|
4997
|
+
* @param [options.radiusUpdateInterval] The width of radius update steps, in metres. For example, if interval is 3 and assume `minRadius` is 8, then the radius will be updated on 8, 11, 14, 17, etc. Must be >= 0.
|
|
4998
|
+
*/
|
|
4999
|
+
constructor({ mapManager, mapView, core, minRadius, maxRadius, radiusUpdateInterval, radiusTweenOptions }?: {
|
|
5000
|
+
mapManager: any;
|
|
5001
|
+
mapView: any;
|
|
5002
|
+
core: any;
|
|
5003
|
+
minRadius?: number | undefined;
|
|
5004
|
+
maxRadius?: number | undefined;
|
|
5005
|
+
radiusUpdateInterval?: number | undefined;
|
|
5006
|
+
radiusTweenOptions?: {
|
|
5007
|
+
duration: number;
|
|
5008
|
+
easing: any;
|
|
5009
|
+
} | undefined;
|
|
5010
|
+
});
|
|
5011
|
+
mapManager: any;
|
|
5012
|
+
mapView: any;
|
|
5013
|
+
core: any;
|
|
5014
|
+
minRadius: number;
|
|
5015
|
+
maxRadius: number;
|
|
5016
|
+
radiusUpdateInterval: number;
|
|
5017
|
+
radiusTweenOptions: {
|
|
5018
|
+
duration: number;
|
|
5019
|
+
easing: any;
|
|
5020
|
+
};
|
|
5021
|
+
/**
|
|
5022
|
+
* The current state of the 3D blue dots. Null if blue dot is not currently being displayed.
|
|
5023
|
+
*/
|
|
5024
|
+
state: any;
|
|
5025
|
+
/**
|
|
5026
|
+
* The last known radius that was set, in the original metres units.
|
|
5027
|
+
*/
|
|
5028
|
+
prevRadius: any;
|
|
5029
|
+
/**
|
|
5030
|
+
* Used to animate the blue dot accuracy ring size change.
|
|
5031
|
+
*/
|
|
5032
|
+
radiusTween: any;
|
|
5033
|
+
/**
|
|
5034
|
+
* The last known bearing angle that was set, in degrees.
|
|
5035
|
+
*/
|
|
5036
|
+
prevBearing: any;
|
|
5037
|
+
/**
|
|
5038
|
+
* Used to animate the blue dot bearing angle change.
|
|
5039
|
+
*/
|
|
5040
|
+
bearingTween: any;
|
|
5041
|
+
/**
|
|
5042
|
+
The current zoom level, so new dots can be added at the proper size.
|
|
5043
|
+
*/
|
|
5044
|
+
currentX: any;
|
|
5045
|
+
updateBlueDotSize(): void;
|
|
5046
|
+
setBlueDotSizeFromZoom(cameraX: any): void;
|
|
5047
|
+
/**
|
|
5048
|
+
* Update the state of the 3D blue dot, creating blue dots if necessary.
|
|
5049
|
+
*
|
|
5050
|
+
* @method update
|
|
5051
|
+
* @param {Object} options
|
|
5052
|
+
* @param {Coordinates} options.coordinates The lat-long coordinates for the blue dot. Follows the Coordinates Web API.
|
|
5053
|
+
* @param {string} [options.mode]
|
|
5054
|
+
* @param {number} [options.bearing] The angle in degrees around the blue dot at which the bearing indicator should appear.
|
|
5055
|
+
* @param {number} options.radius The outer radius of the blue dot, in metres.
|
|
5056
|
+
* @param {string} [options.mapId] The primary map of the blue dot. Specify this or options.map.
|
|
5057
|
+
* @param {MapObject} [options.map] The primary map of the blue dot. Specify this or options.mapId.
|
|
5058
|
+
* @param {number} [options.minRadius] The ring around the blue dot will only be drawn if `options.radius` is greater than or equal to this value. Must be >= 0.
|
|
5059
|
+
* @param {number} [options.minRadiusDelta] The minimum amount by which the radius must change in order for the blue dot ring radius to be updated. Must be >= 0.
|
|
5060
|
+
* @param {number | string} [options.baseColor] Base Color of Active Blue Dot that we use to interpolate into other variants
|
|
5061
|
+
*/
|
|
5062
|
+
update(options: {
|
|
5063
|
+
coordinates: any;
|
|
5064
|
+
mode?: string | undefined;
|
|
5065
|
+
bearing?: number | undefined;
|
|
5066
|
+
radius: number;
|
|
5067
|
+
mapId?: string | undefined;
|
|
5068
|
+
map?: any;
|
|
5069
|
+
minRadius?: number | undefined;
|
|
5070
|
+
minRadiusDelta?: number | undefined;
|
|
5071
|
+
baseColor?: string | number | undefined;
|
|
5072
|
+
}): void;
|
|
5073
|
+
blueDots: any[] | undefined;
|
|
5074
|
+
positionTween: any;
|
|
5075
|
+
currentPositionLatLon: any;
|
|
5076
|
+
getBlueDotForMap(mapOrMapId: any): any;
|
|
5077
|
+
/**
|
|
5078
|
+
* Remove the 3D blue dot from the maps.
|
|
5079
|
+
*
|
|
5080
|
+
* @method cleanup
|
|
5081
|
+
*/
|
|
5082
|
+
cleanup(): void;
|
|
5083
|
+
}
|
|
5084
|
+
import { PubSub } from "@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub";
|
|
5085
|
+
}
|
|
5086
|
+
|
|
4570
5087
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.HTMLCollider' {
|
|
4571
5088
|
import BaseCollider, { ICollider } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
|
|
4572
5089
|
export type TRange = [number, number, number, number];
|
|
@@ -4593,6 +5110,69 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
4593
5110
|
export default HTMLCollider;
|
|
4594
5111
|
}
|
|
4595
5112
|
|
|
5113
|
+
declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/EventSystem' {
|
|
5114
|
+
import { Object3D, Raycaster } from 'three';
|
|
5115
|
+
import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer';
|
|
5116
|
+
import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
|
|
5117
|
+
import BlueDotManager from '@mappedin/react-native-sdk/core/packages/renderer/internal/blue-dot-manager';
|
|
5118
|
+
export const raycaster: Raycaster;
|
|
5119
|
+
class EventSystemLayer {
|
|
5120
|
+
mapView: MapView;
|
|
5121
|
+
core: ICore;
|
|
5122
|
+
blueDotManager?: BlueDotManager;
|
|
5123
|
+
rendererDomElement: any;
|
|
5124
|
+
currentHover: null;
|
|
5125
|
+
hoverLabel: any;
|
|
5126
|
+
hoverColor: string | number;
|
|
5127
|
+
options: {
|
|
5128
|
+
disableHover: boolean;
|
|
5129
|
+
};
|
|
5130
|
+
blueDot?: Object3D;
|
|
5131
|
+
constructor(mapView: MapView, core: ICore);
|
|
5132
|
+
setBlueDotManager: (blueDotManager: any) => void;
|
|
5133
|
+
touchCount: number;
|
|
5134
|
+
onMouseMove: (event: any) => void;
|
|
5135
|
+
onTouchEnd: (event: any) => void;
|
|
5136
|
+
onMouseUp: (event: any) => void;
|
|
5137
|
+
onMouseDown: (event: any) => void;
|
|
5138
|
+
onTouchStart: (event: any) => void;
|
|
5139
|
+
incrementTouches: (event: any) => void;
|
|
5140
|
+
decrementTouches: (event: any) => void;
|
|
5141
|
+
clearMouse: () => void;
|
|
5142
|
+
getMousePos: (event: any) => {
|
|
5143
|
+
x: number;
|
|
5144
|
+
y: number;
|
|
5145
|
+
};
|
|
5146
|
+
cursorPos: {
|
|
5147
|
+
x: number;
|
|
5148
|
+
y: number;
|
|
5149
|
+
};
|
|
5150
|
+
mouse: {
|
|
5151
|
+
x: number;
|
|
5152
|
+
y: number;
|
|
5153
|
+
};
|
|
5154
|
+
mouseDownStart: {
|
|
5155
|
+
time: number;
|
|
5156
|
+
clientX: number;
|
|
5157
|
+
clientY: number;
|
|
5158
|
+
};
|
|
5159
|
+
hasTouched: boolean;
|
|
5160
|
+
calculateMouseCoordinates: (event: any) => void;
|
|
5161
|
+
getMouseRayIntersects: (objects: Object3D | Object3D[]) => import("three").Intersection[];
|
|
5162
|
+
detectPolygonsUnderMouse: () => any[];
|
|
5163
|
+
getMouseMapPosition: () => {
|
|
5164
|
+
x: number;
|
|
5165
|
+
y: number;
|
|
5166
|
+
};
|
|
5167
|
+
checkMouseIntersectsBlueDot: () => boolean;
|
|
5168
|
+
doHoverEffect: () => void;
|
|
5169
|
+
onPolygonHoverOut: (polygonId: any) => false | undefined;
|
|
5170
|
+
onPolygonHoverOver: (polygon: any) => false | undefined;
|
|
5171
|
+
destroy(): void;
|
|
5172
|
+
}
|
|
5173
|
+
export default EventSystemLayer;
|
|
5174
|
+
}
|
|
5175
|
+
|
|
4596
5176
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Journey' {
|
|
4597
5177
|
import type Directive from '@mappedin/react-native-sdk/core/packages/navigator/Directive';
|
|
4598
5178
|
import type INode from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/INode';
|
|
@@ -4636,7 +5216,7 @@ declare module '@mappedin/react-native-sdk/core/packages/navigator/Edge' {
|
|
|
4636
5216
|
distance: number;
|
|
4637
5217
|
angle: number;
|
|
4638
5218
|
weight: number;
|
|
4639
|
-
constructor({ origin, destination, vortex, elevationDelta, distance, angle
|
|
5219
|
+
constructor({ origin, destination, vortex, elevationDelta, distance, angle }: {
|
|
4640
5220
|
origin: INode;
|
|
4641
5221
|
destination: INode;
|
|
4642
5222
|
vortex?: IVortex;
|
|
@@ -4979,6 +5559,16 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
4979
5559
|
var Analytics: any;
|
|
4980
5560
|
}
|
|
4981
5561
|
|
|
5562
|
+
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager' {
|
|
5563
|
+
import { TextureLoader } from 'three';
|
|
5564
|
+
import type { MappedinMap } from '@mappedin/react-native-sdk/core/packages/renderer';
|
|
5565
|
+
export default class DefaultAssetManager {
|
|
5566
|
+
textureLoader: TextureLoader;
|
|
5567
|
+
loadMapPolygons(map: MappedinMap): Promise<any>;
|
|
5568
|
+
loadImage(url: string): Promise<unknown>;
|
|
5569
|
+
}
|
|
5570
|
+
}
|
|
5571
|
+
|
|
4982
5572
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollisionEngine' {
|
|
4983
5573
|
import { Vector3 } from 'three';
|
|
4984
5574
|
import './Mappedin.SmartCollisionEngine.scss';
|