@mappedin/react-native-sdk 5.32.0 → 5.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts
CHANGED
|
@@ -3642,7 +3642,10 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
3642
3642
|
* An object containing all outlined polygons.
|
|
3643
3643
|
*/
|
|
3644
3644
|
outlinedPolygons: Map<string, MappedinPolygon>;
|
|
3645
|
-
|
|
3645
|
+
/**
|
|
3646
|
+
* A plane that is parallel to the ground and is used for raycasting.
|
|
3647
|
+
*/
|
|
3648
|
+
worldPlane: Mesh;
|
|
3646
3649
|
getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string | null): Vector3;
|
|
3647
3650
|
currentScale: number;
|
|
3648
3651
|
getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
|
|
@@ -5251,6 +5254,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.type
|
|
|
5251
5254
|
clientId: string;
|
|
5252
5255
|
clientSecret: string;
|
|
5253
5256
|
venue: string;
|
|
5257
|
+
accessToken: string;
|
|
5254
5258
|
};
|
|
5255
5259
|
export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & {
|
|
5256
5260
|
perspective?: string;
|
|
@@ -7285,7 +7289,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
7285
7289
|
resolution: Vector2;
|
|
7286
7290
|
cameraParameters: any;
|
|
7287
7291
|
controls: typeof Mappedin.CameraControls;
|
|
7288
|
-
|
|
7292
|
+
worldPlane: Mesh;
|
|
7289
7293
|
canvasWidth: number;
|
|
7290
7294
|
canvasHeight: number;
|
|
7291
7295
|
cachedPadding: TPadding;
|
|
@@ -7624,7 +7628,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/pub-sub.typed
|
|
|
7624
7628
|
* @template EVENT_PAYLOAD - The type of the event payload.
|
|
7625
7629
|
* @template EVENT - The type of the event.
|
|
7626
7630
|
*/
|
|
7627
|
-
export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD> {
|
|
7631
|
+
export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
|
|
7628
7632
|
/**
|
|
7629
7633
|
* @private
|
|
7630
7634
|
* @internal
|
|
@@ -10233,73 +10237,76 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
10233
10237
|
import type { ICore, MappedinPolygon, Collider } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
10234
10238
|
import { BlueDotManager, Path } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
10235
10239
|
class EventSystem {
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10240
|
+
core: ICore;
|
|
10241
|
+
blueDotManager?: BlueDotManager;
|
|
10242
|
+
rendererDomElement: any;
|
|
10243
|
+
currentHover: string | null;
|
|
10244
|
+
hoverLabel: any;
|
|
10245
|
+
hoverColor: Color;
|
|
10246
|
+
options: {
|
|
10247
|
+
disableHover: boolean;
|
|
10248
|
+
};
|
|
10249
|
+
constructor(core: ICore);
|
|
10250
|
+
setBlueDotManager: (blueDotManager: any) => void;
|
|
10251
|
+
touchCount: number;
|
|
10252
|
+
zoomOut(): void;
|
|
10253
|
+
zoomIn(event: any): void;
|
|
10254
|
+
onPointerMove: (event: any) => void;
|
|
10255
|
+
onPointerUp: (event: any) => void;
|
|
10256
|
+
/**
|
|
10257
|
+
* We've confirmed that a map click has occured, so handle that here
|
|
10258
|
+
*/
|
|
10259
|
+
handleMapClick(event: any): void;
|
|
10260
|
+
onPointerDown: (event: any) => void;
|
|
10261
|
+
incrementTouches: (event: any) => void;
|
|
10262
|
+
decrementTouches: (event: any) => void;
|
|
10263
|
+
clearMouse: () => void;
|
|
10264
|
+
getMousePos: (event: any) => {
|
|
10265
|
+
x: any;
|
|
10266
|
+
y: any;
|
|
10267
|
+
};
|
|
10268
|
+
getScaledMousePos: (event: any) => {
|
|
10269
|
+
x: number;
|
|
10270
|
+
y: number;
|
|
10271
|
+
};
|
|
10272
|
+
cursorPos: {
|
|
10273
|
+
x: number;
|
|
10274
|
+
y: number;
|
|
10275
|
+
};
|
|
10276
|
+
mouse: {
|
|
10277
|
+
x: number;
|
|
10278
|
+
y: number;
|
|
10279
|
+
};
|
|
10280
|
+
mouseDownStart: {
|
|
10281
|
+
time: number;
|
|
10282
|
+
clientX: number;
|
|
10283
|
+
clientY: number;
|
|
10284
|
+
};
|
|
10285
|
+
scaledCursorPos: {
|
|
10286
|
+
x: number;
|
|
10287
|
+
y: number;
|
|
10288
|
+
};
|
|
10289
|
+
hasTouched: boolean;
|
|
10290
|
+
calculateMouseCoordinates: (event: any) => void;
|
|
10291
|
+
getMouseRayIntersects: (objects: Object3D | Object3D[]) => import("three").Intersection<Object3D<import("three").Object3DEventMap>>[];
|
|
10292
|
+
detectCollidersUnderMouse: () => Collider[];
|
|
10293
|
+
detectPolygonsUnderMouse: () => string[];
|
|
10294
|
+
detectPathsUnderMouse: () => Path[];
|
|
10295
|
+
detectWatermarkUnderMouse: () => boolean;
|
|
10296
|
+
detectMapsUnderMouse: () => import("../../internal").MappedinMap[];
|
|
10297
|
+
/**
|
|
10298
|
+
* Gets mouse click position in x y map coordinates
|
|
10299
|
+
*/
|
|
10300
|
+
getMouseMapPosition: () => {
|
|
10301
|
+
x: number;
|
|
10302
|
+
y: number;
|
|
10303
|
+
};
|
|
10304
|
+
checkMouseIntersectsBlueDot: () => boolean;
|
|
10305
|
+
doHoverEffect: () => void;
|
|
10306
|
+
onPolygonHoverOut: (polygonId: string) => boolean;
|
|
10307
|
+
onPolygonHoverOver: (polygon: MappedinPolygon | string) => boolean;
|
|
10308
|
+
setHoverColor: (color: string) => void;
|
|
10309
|
+
destroy(): void;
|
|
10303
10310
|
}
|
|
10304
10311
|
export default EventSystem;
|
|
10305
10312
|
}
|
|
@@ -10415,115 +10422,141 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
10415
10422
|
import { STACKED_MAPS_STATE, MapViewScene, MapViewStackScene, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
10416
10423
|
import type { ICore, TCameraTransform } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
10417
10424
|
enum ACTION {
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10425
|
+
enable = "enable",
|
|
10426
|
+
disable = "disable",
|
|
10427
|
+
showOverview = "showOverview",
|
|
10428
|
+
zoomInToMap = "zoomInToMap",
|
|
10429
|
+
scrollToMap = "scrollToMap",
|
|
10430
|
+
restack = "restack"
|
|
10423
10431
|
}
|
|
10424
10432
|
type TTargetTransitionFunction = ((options: TParams) => () => Promise<void>) | ((options: TParams) => void);
|
|
10425
10433
|
type TParams = {
|
|
10426
|
-
|
|
10434
|
+
map: MappedinMap;
|
|
10427
10435
|
} | {
|
|
10428
|
-
|
|
10436
|
+
directions: MappedinDirections | MappedinDirections[];
|
|
10429
10437
|
} | {
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10438
|
+
stackScene: MapViewStackScene;
|
|
10439
|
+
directions: MappedinDirections | MappedinDirections[];
|
|
10440
|
+
verticalDistanceBetweenMaps?: number;
|
|
10433
10441
|
} | {
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10442
|
+
stackScene: MapViewStackScene;
|
|
10443
|
+
verticalDistanceBetweenMaps?: number;
|
|
10444
|
+
map: MappedinMap;
|
|
10445
|
+
nodes: MappedinNode[];
|
|
10438
10446
|
} | {
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10447
|
+
stackScene: MapViewStackScene;
|
|
10448
|
+
map: MappedinMap;
|
|
10449
|
+
nodes: MappedinNode[];
|
|
10450
|
+
rotation: number;
|
|
10451
|
+
cameraTransform?: TCameraTransform;
|
|
10452
|
+
verticalDistanceBetweenMaps?: number;
|
|
10445
10453
|
};
|
|
10446
10454
|
type TActionFn = [STACKED_MAPS_STATE, TTargetTransitionFunction[]];
|
|
10447
10455
|
type TState = {
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10456
|
+
[stateName in STACKED_MAPS_STATE]?: {
|
|
10457
|
+
actions: {
|
|
10458
|
+
[actionName in ACTION]?: TActionFn;
|
|
10459
|
+
};
|
|
10451
10460
|
};
|
|
10452
|
-
};
|
|
10453
10461
|
};
|
|
10454
10462
|
export type TInternalTransitionOptions = {
|
|
10455
|
-
|
|
10463
|
+
animate?: boolean;
|
|
10456
10464
|
};
|
|
10457
10465
|
export type TStackedMapsOptions = {
|
|
10458
|
-
|
|
10459
|
-
|
|
10466
|
+
/**
|
|
10467
|
+
* The vertical distance between maps in overview, in metres.
|
|
10468
|
+
* @default 50
|
|
10469
|
+
*/
|
|
10470
|
+
verticalDistanceBetweenMaps?: number;
|
|
10471
|
+
/**
|
|
10472
|
+
* Whether to show map level labels in overview.
|
|
10473
|
+
* @default true
|
|
10474
|
+
*/
|
|
10475
|
+
mapLabels?: boolean;
|
|
10476
|
+
/**
|
|
10477
|
+
* Whether to show only Journey maps in the stack if a Journey is active and the current map is part of the Journey.
|
|
10478
|
+
* @default true
|
|
10479
|
+
*/
|
|
10480
|
+
prioritizeJourneyMaps?: boolean;
|
|
10460
10481
|
};
|
|
10461
10482
|
class StackedMapsController {
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
};
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10483
|
+
#private;
|
|
10484
|
+
options: TStackedMapsOptions;
|
|
10485
|
+
enabled: boolean;
|
|
10486
|
+
stackScene: MapViewStackScene;
|
|
10487
|
+
constructor(core: ICore);
|
|
10488
|
+
needsUpdate: boolean;
|
|
10489
|
+
currentState: STACKED_MAPS_STATE;
|
|
10490
|
+
mapsInStack: MappedinMap[];
|
|
10491
|
+
getZoomIntoMapOptions: (params: TParams) => (MapViewScene | {
|
|
10492
|
+
activeMap: MappedinMap;
|
|
10493
|
+
focusOn: {
|
|
10494
|
+
targets: {
|
|
10495
|
+
nodes: MappedinNode[];
|
|
10496
|
+
};
|
|
10497
|
+
options: {
|
|
10498
|
+
zoom?: number;
|
|
10499
|
+
tilt: number;
|
|
10500
|
+
rotation: number;
|
|
10501
|
+
position?: MappedinNode | import("../../internal").MappedinCoordinate;
|
|
10502
|
+
easing: CAMERA_EASING_MODE;
|
|
10503
|
+
};
|
|
10504
|
+
};
|
|
10505
|
+
})[];
|
|
10506
|
+
getDisableOptions: (params: TParams) => (MapViewScene | {
|
|
10507
|
+
activeMap: MappedinMap;
|
|
10508
|
+
})[];
|
|
10509
|
+
getShowOverviewOptions: (params: TParams) => (MapViewStackScene | {
|
|
10510
|
+
activeMap: MappedinMap;
|
|
10511
|
+
focusOn: {
|
|
10512
|
+
options: {
|
|
10513
|
+
tilt: number;
|
|
10514
|
+
duration: number;
|
|
10515
|
+
};
|
|
10516
|
+
};
|
|
10517
|
+
verticalDistanceBetweenMaps: number;
|
|
10518
|
+
})[];
|
|
10519
|
+
getScrollToMapOptions: (params: TParams) => (MapViewStackScene | {
|
|
10520
|
+
focusOn: {
|
|
10521
|
+
targets: {
|
|
10522
|
+
nodes: MappedinNode[];
|
|
10523
|
+
};
|
|
10524
|
+
options: {
|
|
10525
|
+
tilt: number;
|
|
10526
|
+
easing: CAMERA_EASING_MODE;
|
|
10527
|
+
};
|
|
10528
|
+
};
|
|
10529
|
+
activeMap: MappedinMap;
|
|
10530
|
+
})[];
|
|
10531
|
+
getRestackOptions: (params: TParams) => (MapViewStackScene | {
|
|
10532
|
+
activeMap: MappedinMap;
|
|
10533
|
+
focusOn: {
|
|
10534
|
+
options: {
|
|
10535
|
+
tilt: number;
|
|
10536
|
+
duration: number;
|
|
10537
|
+
};
|
|
10538
|
+
};
|
|
10539
|
+
verticalDistanceBetweenMaps: number;
|
|
10540
|
+
})[];
|
|
10541
|
+
getEnableOptions: () => void;
|
|
10542
|
+
getShowOverviewTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
|
|
10543
|
+
getZoomInToMapTransition: (options: any) => () => Promise<void>;
|
|
10544
|
+
getScrollToMapTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
|
|
10545
|
+
getRestackTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
|
|
10546
|
+
getDisableTransition: (options: any) => () => Promise<void>;
|
|
10547
|
+
getEnableTransition: () => () => void;
|
|
10548
|
+
states: TState;
|
|
10549
|
+
get determineMapStack(): MappedinMap[];
|
|
10550
|
+
transition(currentState: STACKED_MAPS_STATE, actionName: ACTION): TTargetTransitionFunction[] | void;
|
|
10551
|
+
exec(transitions: TTargetTransitionFunction[] | void, params: TParams): Promise<void>;
|
|
10552
|
+
disable: () => Promise<void>;
|
|
10553
|
+
enable: (opts?: TStackedMapsOptions) => Promise<void>;
|
|
10554
|
+
get nodesInJourneyOrMap(): any[];
|
|
10555
|
+
showOverview: () => Promise<void>;
|
|
10556
|
+
scrollToMap: (map: MappedinMap) => Promise<void>;
|
|
10557
|
+
restack: (options?: TStackedMapsOptions) => Promise<void>;
|
|
10558
|
+
zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
|
|
10559
|
+
get currentMap(): MappedinMap;
|
|
10527
10560
|
}
|
|
10528
10561
|
export default StackedMapsController;
|
|
10529
10562
|
}
|
|
@@ -10551,7 +10584,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
10551
10584
|
/**
|
|
10552
10585
|
* Exports the current scene as a GLTF file.
|
|
10553
10586
|
*/
|
|
10554
|
-
getCurrentSceneGLTF(userOptions: TGLTFExportOptions)
|
|
10587
|
+
getCurrentSceneGLTF: (userOptions: TGLTFExportOptions) => Promise<Blob>;
|
|
10555
10588
|
}
|
|
10556
10589
|
}
|
|
10557
10590
|
|
|
@@ -10575,6 +10608,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
10575
10608
|
*/
|
|
10576
10609
|
getVisibleLayersForLoadedMap(map: MappedinMap): string[];
|
|
10577
10610
|
addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void>;
|
|
10611
|
+
removeGeoJSONLayer(layerName: string): Promise<void>;
|
|
10578
10612
|
}
|
|
10579
10613
|
export default LayerController;
|
|
10580
10614
|
}
|
|
@@ -11913,6 +11947,26 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/
|
|
|
11913
11947
|
* @returns Promise when all animations are complete.
|
|
11914
11948
|
*/
|
|
11915
11949
|
zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
|
|
11950
|
+
/**
|
|
11951
|
+
* @experimental
|
|
11952
|
+
*
|
|
11953
|
+
* Used when in {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW} state to replace the maps in the
|
|
11954
|
+
* current stack if there is a new Journey or Journey is cleared.
|
|
11955
|
+
*
|
|
11956
|
+
* @param options - Options to adjust the overview. Each option defaults to the setting passed in {@link enable}, unless provided.
|
|
11957
|
+
*
|
|
11958
|
+
* @example
|
|
11959
|
+
* ```ts
|
|
11960
|
+
* mapView.Journey.draw(...);
|
|
11961
|
+
* mapView.StackedMaps.enable();
|
|
11962
|
+
* mapView.StackedMaps.showOverview();
|
|
11963
|
+
* mapView.Journey.clear();
|
|
11964
|
+
* mapView.StackedMaps.restack();
|
|
11965
|
+
* ```
|
|
11966
|
+
*
|
|
11967
|
+
* @returns Promise when all animations are complete.
|
|
11968
|
+
*/
|
|
11969
|
+
restack: (options?: TStackedMapsOptions) => Promise<void>;
|
|
11916
11970
|
/**
|
|
11917
11971
|
* @experimental
|
|
11918
11972
|
*
|
|
@@ -12077,6 +12131,12 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/
|
|
|
12077
12131
|
* Adds a GeoJSON Feature or FeatureCollection to the map as a layer. The layer name must be unique
|
|
12078
12132
|
*/
|
|
12079
12133
|
addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void>;
|
|
12134
|
+
/**
|
|
12135
|
+
* @experimental
|
|
12136
|
+
* Hides a GeoJSON layer from the map and removes it from the list of layers.
|
|
12137
|
+
* It will not appear in {@link getAllLayersForMap} afterwards and can be overwritten by a new layer with the same name.
|
|
12138
|
+
*/
|
|
12139
|
+
removeGeoJSONLayer(layerName: string): Promise<void>;
|
|
12080
12140
|
}
|
|
12081
12141
|
export default LayerController;
|
|
12082
12142
|
}
|