@mappedin/mappedin-js 6.0.1-alpha.2 → 6.0.1-alpha.21
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/README.md +1 -1
- package/lib/esm/GLTFExporter-CJKR5WGG.js +1 -0
- package/lib/esm/GLTFLoader-H7ZE3A4X.js +1 -0
- package/lib/esm/{PerformanceController-VMCH7DPO.js → PerformanceController-WFRTDYOP.js} +1 -1
- package/lib/esm/{browser-G6HNHS3R.js → browser-7NYRKP6F.js} +1 -1
- package/lib/esm/chunk-2X6TZZIR.js +1 -0
- package/lib/esm/chunk-AIIHKMIL.js +1 -0
- package/lib/esm/chunk-IKFT423T.js +1 -0
- package/lib/esm/chunk-ZIBVJYLJ.js +1 -0
- package/lib/esm/index.css +1 -1
- package/lib/esm/index.d.ts +1685 -928
- package/lib/esm/index.js +1 -1
- package/lib/esm/outdoor-context-OKBFJPVG.js +1 -0
- package/lib/esm/outdoor-context-v4-SVGMPV2P.js +1 -0
- package/lib/index.css +1 -1
- package/package.json +13 -6
- package/CHANGELOG.md +0 -54
- package/lib/esm/GLTFExporter-6MY3TTW5.js +0 -1
- package/lib/esm/chunk-ISNJUESV.js +0 -1
- package/lib/esm/chunk-SVP2SCIT.js +0 -1
- package/lib/esm/chunk-VSBVGSLC.js +0 -1
- package/lib/esm/outdoor-context-HUI6WIRE.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
// ../maker/@mappedin/mvf
|
|
4
4
|
// ../maker/geojson
|
|
5
5
|
// ../maker/three
|
|
6
|
+
// ../maker/@mappedin/core-sdk
|
|
6
7
|
// ../maker/minisearch
|
|
7
8
|
// ../maker/@turf/turf
|
|
8
9
|
// ../maker/@tweenjs/tween.js
|
|
10
|
+
// ../maker/lil-gui
|
|
11
|
+
// ../maker/@packages/internal/common
|
|
9
12
|
// ../maker/n8ao
|
|
10
13
|
// ../maker/postprocessing
|
|
11
14
|
|
|
@@ -18,6 +21,7 @@ declare module '@mappedin/mappedin-js' {
|
|
|
18
21
|
import { Floor } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
19
22
|
import type { ParsedMVF as TMVF } from '@mappedin/mvf';
|
|
20
23
|
import { TShowWatermarkOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/WatermarkController';
|
|
24
|
+
import { MapViewGeoJson } from '@mappedin/mappedin-js/maker/src/map-view-geojson';
|
|
21
25
|
/**
|
|
22
26
|
* Represents all the available antialiasing options.
|
|
23
27
|
*/
|
|
@@ -222,6 +226,8 @@ declare module '@mappedin/mappedin-js' {
|
|
|
222
226
|
* const mapContainer = document.getQuerySelector('body');
|
|
223
227
|
* const map = await show3dMap(mapContainer, mapData, { auto: true });
|
|
224
228
|
*/
|
|
229
|
+
export const show3dMapCms: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
230
|
+
export const show3dMapGeojson: (el: HTMLElement, mapData: MapData) => Promise<MapViewGeoJson>;
|
|
225
231
|
export const show3dMap: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
226
232
|
export { parseMVF, unzipMVF };
|
|
227
233
|
export type { MapView, MapData, TEvents, TShow3DMapOptions, TGetMapDataOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, };
|
|
@@ -240,6 +246,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
|
|
|
240
246
|
import MapData from '@mappedin/mappedin-js/maker/src/map-data';
|
|
241
247
|
import { ICamera, ILabels, IMapView, IMarkers, IPaths, TUpdateState, TNavigationTarget, TGetDirectionsOptions, INavigation } from '@mappedin/mappedin-js/maker/src/map-view-interface';
|
|
242
248
|
import { Directions, Label } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
249
|
+
import { Exporter } from '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Exporter';
|
|
243
250
|
/**
|
|
244
251
|
* Represents a map with all the interactive features, controls, and actions.
|
|
245
252
|
*/
|
|
@@ -270,6 +277,10 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
|
|
|
270
277
|
* @type {INavigation}
|
|
271
278
|
*/
|
|
272
279
|
Navigation: INavigation;
|
|
280
|
+
/**
|
|
281
|
+
* Export controller for the map.
|
|
282
|
+
*/
|
|
283
|
+
Exporter: Exporter;
|
|
273
284
|
/**
|
|
274
285
|
* Constructs a {@link MapView} instance
|
|
275
286
|
*
|
|
@@ -285,7 +296,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
|
|
|
285
296
|
/**
|
|
286
297
|
* @internal - unused until we use GeoJSON API underneath
|
|
287
298
|
*/
|
|
288
|
-
addMap(mapData: MapData)
|
|
299
|
+
addMap: (mapData: MapData) => Promise<MapData>;
|
|
289
300
|
/**
|
|
290
301
|
* Updates the state {@link TUpdateState} of a given target on the map.
|
|
291
302
|
*
|
|
@@ -326,6 +337,9 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
|
|
|
326
337
|
* const floor = map.currentFloor;
|
|
327
338
|
*/
|
|
328
339
|
get currentFloor(): Floor;
|
|
340
|
+
get mapData(): {
|
|
341
|
+
[key: string]: MapData;
|
|
342
|
+
};
|
|
329
343
|
/**
|
|
330
344
|
* Sets the current floor of the map.
|
|
331
345
|
*/
|
|
@@ -485,10 +499,20 @@ declare module '@mappedin/mappedin-js/maker/src/events' {
|
|
|
485
499
|
*/
|
|
486
500
|
'user-interaction-end': undefined;
|
|
487
501
|
};
|
|
502
|
+
export type GeoJSONTEvents = TEvents & {
|
|
503
|
+
hover: {
|
|
504
|
+
coordinate: Coordinate;
|
|
505
|
+
spaces: Space[];
|
|
506
|
+
objects: MapObject[];
|
|
507
|
+
markers: Marker[];
|
|
508
|
+
labels: Label[];
|
|
509
|
+
floors: Floor[];
|
|
510
|
+
};
|
|
511
|
+
};
|
|
488
512
|
}
|
|
489
513
|
|
|
490
514
|
declare module '@mappedin/mappedin-js/packages/get-venue' {
|
|
491
|
-
import type { TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
515
|
+
import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata, ThingsOption } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
492
516
|
import { Mappedin } from '@mappedin/mappedin-js/packages/get-venue/Mappedin';
|
|
493
517
|
import { defaultThings } from '@mappedin/mappedin-js/packages/get-venue/default-things';
|
|
494
518
|
import { GET_VENUE_EVENT } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
@@ -526,6 +550,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue' {
|
|
|
526
550
|
export type { TOperationHoursMap } from '@mappedin/mappedin-js/packages/get-venue/MappedinLocation';
|
|
527
551
|
export type { TMappedinCoordinateOptions } from '@mappedin/mappedin-js/packages/get-venue/MappedinCoordinate';
|
|
528
552
|
export type { TDirectionToOptions, TTHINGS, TAccessors } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
553
|
+
export type { ThingsOption };
|
|
529
554
|
export { OfflineSearch } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.OfflineSearch';
|
|
530
555
|
export type { TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions, } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.OfflineSearch';
|
|
531
556
|
export { defaultThings };
|
|
@@ -535,7 +560,10 @@ declare module '@mappedin/mappedin-js/packages/get-venue' {
|
|
|
535
560
|
import { MAP_RENDER_MODE } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
536
561
|
import { ParsedMVF } from '@mappedin/mvf';
|
|
537
562
|
export { MAP_RENDER_MODE, GET_VENUE_EVENT };
|
|
538
|
-
|
|
563
|
+
/**
|
|
564
|
+
* @internal
|
|
565
|
+
*/
|
|
566
|
+
export function parseOptions<T extends TAllGetVenueOptions>(options: T): TGetVenueOptionsInternal<T>;
|
|
539
567
|
/**
|
|
540
568
|
* @internal
|
|
541
569
|
*/
|
|
@@ -637,7 +665,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue' {
|
|
|
637
665
|
* Download a bundle and return a Mappedin instance
|
|
638
666
|
* @internal
|
|
639
667
|
*/
|
|
640
|
-
export function downloadBundle(userOptions:
|
|
668
|
+
export function downloadBundle(userOptions: TGetVenueBundleOptions, { url, updated_at }: {
|
|
641
669
|
url: any;
|
|
642
670
|
updated_at: any;
|
|
643
671
|
}): Promise<Mappedin>;
|
|
@@ -688,7 +716,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue' {
|
|
|
688
716
|
}
|
|
689
717
|
|
|
690
718
|
declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF' {
|
|
691
|
-
import { Connections, Map as MVFMap, NodeCollection, ObstructionCollection, ParsedMVF, RawMVF, SpaceCollection } from '@mappedin/mvf';
|
|
719
|
+
import { Connections, Map as MVFMap, NodeCollection, ObstructionCollection, ParsedMVF, RawMVF, SpaceCollection, StyleCollection } from '@mappedin/mvf';
|
|
692
720
|
import { Position } from 'geojson';
|
|
693
721
|
import { TCategory, TLocation, TMap, TMappedinAPI, TNode, TPolygon, TVortex } from '@mappedin/mappedin-js/packages/get-venue';
|
|
694
722
|
import { MVFv1ConnectionCollection, MVFv1LevelCollection, MVFv1NodeCollection, ParsedMVFv1, RawMVFv1, WithIDs, MVFStyle } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.types';
|
|
@@ -755,7 +783,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF' {
|
|
|
755
783
|
};
|
|
756
784
|
}[];
|
|
757
785
|
}
|
|
758
|
-
export function convertNodes(
|
|
786
|
+
export function convertNodes(nodesById: WithIDs<NodeCollection['features'][number]>, converters: Map<string, CoordinateConverter>): TNode[];
|
|
759
787
|
export function convertNodes_MVFv1(node: MVFv1NodeCollection, map: string, converter: CoordinateConverter): TNode[];
|
|
760
788
|
type MapExtent = {
|
|
761
789
|
minLat: number;
|
|
@@ -763,8 +791,8 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF' {
|
|
|
763
791
|
maxLat: number;
|
|
764
792
|
maxLong: number;
|
|
765
793
|
};
|
|
766
|
-
export function convertPolygons(map: string, mvfObstructions: ObstructionCollection, mvfSpaces: SpaceCollection, deskEntrances: Map<string, TPolygon['entrances']>, styles: WithIDs<MVFStyle>, converter: CoordinateConverter): TPolygon[];
|
|
767
|
-
export function convertVortexes(mvfConnections: Connections): TVortex[];
|
|
794
|
+
export function convertPolygons(map: string, mvfObstructions: ObstructionCollection, mvfSpaces: SpaceCollection, deskEntrances: Map<string, TPolygon['entrances']>, styles: WithIDs<MVFStyle>, layerStyles: StyleCollection, converter: CoordinateConverter): TPolygon[];
|
|
795
|
+
export function convertVortexes(mvfConnections: Connections, nodesById: WithIDs<NodeCollection['features'][number]>): TVortex[];
|
|
768
796
|
export function convertVortexes_MVFv1(mvfConnections: MVFv1ConnectionCollection): TVortex[];
|
|
769
797
|
export function overrideMVF(mvf: ParsedMVF, override?: Partial<Pick<ParsedMVF, 'styles.json'>>): ParsedMVF;
|
|
770
798
|
/**
|
|
@@ -803,6 +831,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects' {
|
|
|
803
831
|
import Hyperlink from '@mappedin/mappedin-js/maker/src/map-data-objects/hyperlink';
|
|
804
832
|
import Image from '@mappedin/mappedin-js/maker/src/map-data-objects/image';
|
|
805
833
|
import { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap } from '@mappedin/mvf';
|
|
834
|
+
import { MapDataObjects } from '@mappedin/mappedin-js/maker/src/map-data-objects/types';
|
|
806
835
|
/**
|
|
807
836
|
* Internal class representing detailed map data.
|
|
808
837
|
*
|
|
@@ -907,6 +936,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects' {
|
|
|
907
936
|
getById(type: 'object', id: string): MapObject | undefined;
|
|
908
937
|
getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
|
|
909
938
|
getById(type: 'annotation', id: string): Annotation | undefined;
|
|
939
|
+
getMapDataById(id: string): MapDataObjects | undefined;
|
|
910
940
|
/**
|
|
911
941
|
* Retrieves a feature by its type and ID from the Mappedin Venue Format (MVF) data.
|
|
912
942
|
*
|
|
@@ -931,6 +961,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects' {
|
|
|
931
961
|
}
|
|
932
962
|
export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, };
|
|
933
963
|
export type { TSpaceType } from '@mappedin/mappedin-js/maker/src/map-data-objects/space';
|
|
964
|
+
export type { MapDataObjects };
|
|
934
965
|
}
|
|
935
966
|
|
|
936
967
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/WatermarkController' {
|
|
@@ -938,25 +969,177 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
938
969
|
import { Sprite } from 'three';
|
|
939
970
|
type TPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center' | 'top' | 'bottom' | 'left' | 'right';
|
|
940
971
|
export type TShowWatermarkOptions = {
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
972
|
+
/**
|
|
973
|
+
* Padding in pixels. Can be a number or an object with top, right, bottom, and left properties.
|
|
974
|
+
* @default 16
|
|
975
|
+
* @example
|
|
976
|
+
* ```ts
|
|
977
|
+
* // Watermark with 20 pixels of padding on all sides
|
|
978
|
+
* __showWatermark({
|
|
979
|
+
* padding: 20,
|
|
980
|
+
* });
|
|
981
|
+
* ```
|
|
982
|
+
* @example
|
|
983
|
+
* ```ts
|
|
984
|
+
* // Watermark with unique top, right, bottom, left padding
|
|
985
|
+
* __showWatermark({
|
|
986
|
+
* padding: {
|
|
987
|
+
* top: 10,
|
|
988
|
+
* right: 20,
|
|
989
|
+
* bottom: 30,
|
|
990
|
+
* left: 40,
|
|
991
|
+
* },
|
|
992
|
+
* });
|
|
993
|
+
* ```
|
|
994
|
+
*/
|
|
995
|
+
padding?: number | {
|
|
996
|
+
top?: number;
|
|
997
|
+
right?: number;
|
|
998
|
+
bottom?: number;
|
|
999
|
+
left?: number;
|
|
1000
|
+
};
|
|
1001
|
+
/**
|
|
1002
|
+
* Position of the watermark on the screen.
|
|
1003
|
+
* @default 'bottom-left'
|
|
1004
|
+
*/
|
|
1005
|
+
position?: TPosition;
|
|
1006
|
+
/**
|
|
1007
|
+
* Show only the Mappedin icon without text.
|
|
1008
|
+
* @default false
|
|
1009
|
+
*/
|
|
1010
|
+
iconOnly?: boolean;
|
|
1011
|
+
/**
|
|
1012
|
+
* Scale of the watermark between 0.5 and 1.5.
|
|
1013
|
+
* @default 1
|
|
1014
|
+
*/
|
|
1015
|
+
scale?: number;
|
|
1016
|
+
/**
|
|
1017
|
+
* Callback when the watermark is clicked.
|
|
1018
|
+
*/
|
|
1019
|
+
onClick?: () => void;
|
|
946
1020
|
};
|
|
947
1021
|
class WatermarkController {
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1022
|
+
#private;
|
|
1023
|
+
static ENABLED: boolean;
|
|
1024
|
+
static OPTIONS: Required<TShowWatermarkOptions>;
|
|
1025
|
+
object?: Sprite;
|
|
1026
|
+
constructor(core: ICore);
|
|
1027
|
+
show: () => void;
|
|
1028
|
+
hide: () => void;
|
|
1029
|
+
resize: () => void;
|
|
956
1030
|
}
|
|
957
1031
|
export default WatermarkController;
|
|
958
1032
|
}
|
|
959
1033
|
|
|
1034
|
+
declare module '@mappedin/mappedin-js/maker/src/map-view-geojson' {
|
|
1035
|
+
import { PubSub } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
1036
|
+
import { GeoJSONTEvents as TEvents } from '@mappedin/mappedin-js/maker/src/events';
|
|
1037
|
+
import { Floor, MapObject, Space } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
1038
|
+
import MapData from '@mappedin/mappedin-js/maker/src/map-data';
|
|
1039
|
+
import { ICamera, IMapView, IMarkers, IPaths, TUpdateState, INavigation, TNavigationTarget, TGetDirectionsOptions, TGeometryState, TLabelState } from '@mappedin/mappedin-js/maker/src/map-view-interface';
|
|
1040
|
+
import { Directions, Label } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
1041
|
+
import type { RendererCore } from '@mappedin/core-sdk';
|
|
1042
|
+
import { LabelsApi } from '@mappedin/mappedin-js/maker/src/api-geojson/labels';
|
|
1043
|
+
import { Inspector } from '@mappedin/mappedin-js/maker/src/api-geojson';
|
|
1044
|
+
/**
|
|
1045
|
+
* Represents a map with all the interactive features, controls, and actions.
|
|
1046
|
+
*/
|
|
1047
|
+
export class MapViewGeoJson extends PubSub<TEvents> implements IMapView {
|
|
1048
|
+
/**
|
|
1049
|
+
* Controls for the map's labels *{@link ILabels}).
|
|
1050
|
+
* @type {ILabels}
|
|
1051
|
+
*/
|
|
1052
|
+
Labels: LabelsApi;
|
|
1053
|
+
/**
|
|
1054
|
+
* Controls for the map's markers ({@link IMarkers}).
|
|
1055
|
+
* @type {IMarkers}
|
|
1056
|
+
*/
|
|
1057
|
+
Markers: IMarkers;
|
|
1058
|
+
/**
|
|
1059
|
+
* Camera ({@link ICamera}) controls for the map.
|
|
1060
|
+
* @type {ICamera}
|
|
1061
|
+
*/
|
|
1062
|
+
Camera: ICamera;
|
|
1063
|
+
/**
|
|
1064
|
+
* Controls for the map's ({@link IPaths}).
|
|
1065
|
+
* @type {IPaths}
|
|
1066
|
+
*/
|
|
1067
|
+
Paths: IPaths;
|
|
1068
|
+
/**
|
|
1069
|
+
* Navigation ({@link INavigation}) controls for the map.
|
|
1070
|
+
* @type {INavigation}
|
|
1071
|
+
*/
|
|
1072
|
+
Navigation: INavigation;
|
|
1073
|
+
Inspector: Inspector;
|
|
1074
|
+
/**
|
|
1075
|
+
* Constructs a {@link MapView} instance
|
|
1076
|
+
*
|
|
1077
|
+
* @param el The HTMLElement where the map will be rendered.
|
|
1078
|
+
* @param options The options to customize the map display.
|
|
1079
|
+
* @internal
|
|
1080
|
+
*/
|
|
1081
|
+
constructor(rendererCore: RendererCore);
|
|
1082
|
+
/**
|
|
1083
|
+
* @internal - unused until we use GeoJSON API underneath
|
|
1084
|
+
*/
|
|
1085
|
+
addMap(mapData: MapData): Promise<MapData>;
|
|
1086
|
+
/**
|
|
1087
|
+
* Updates the state {@link TUpdateState} of a given target on the map.
|
|
1088
|
+
*
|
|
1089
|
+
* The following table maps targets to states.
|
|
1090
|
+
*
|
|
1091
|
+
* | target | state |
|
|
1092
|
+
* |-----------|----------------|
|
|
1093
|
+
* | {@link Label} | {@link TLabelState} |
|
|
1094
|
+
* | {@link MapObject} | {@link TGeometryState} |
|
|
1095
|
+
* | {@link Space} | {@link TGeometryState} |
|
|
1096
|
+
*
|
|
1097
|
+
* @param target The target to update.
|
|
1098
|
+
* @param state The new state to apply to the target.
|
|
1099
|
+
* @example
|
|
1100
|
+
* // Update the color of a space to red.
|
|
1101
|
+
* map.updateState(space, { color: 'red' });
|
|
1102
|
+
*/
|
|
1103
|
+
updateState<T extends Space | MapObject | Label | string>(target: T, state: TUpdateState<T>): void;
|
|
1104
|
+
setHoverColor(c: string): void;
|
|
1105
|
+
getHoverColor(): string | undefined;
|
|
1106
|
+
getState(id: string): TGeometryState | TLabelState | undefined;
|
|
1107
|
+
getState(target: Space | Label | MapObject): TGeometryState | TLabelState;
|
|
1108
|
+
/**
|
|
1109
|
+
* Retrieves the current floor of the map.
|
|
1110
|
+
*
|
|
1111
|
+
* @returns The current floor of the map.
|
|
1112
|
+
* @example
|
|
1113
|
+
* // Get the current floor of the map.
|
|
1114
|
+
* const floor = map.currentFloor;
|
|
1115
|
+
*/
|
|
1116
|
+
get currentFloor(): Floor;
|
|
1117
|
+
get mapData(): {
|
|
1118
|
+
[key: string]: MapData;
|
|
1119
|
+
};
|
|
1120
|
+
/**
|
|
1121
|
+
* Sets the current floor of the map.
|
|
1122
|
+
*/
|
|
1123
|
+
setFloor(floor: Floor | string): void;
|
|
1124
|
+
/**
|
|
1125
|
+
* Retrieves {@link Directions} from one navigatable point {@link TNavigationTarget} to another
|
|
1126
|
+
* {@link TNavigationTarget} on the map.
|
|
1127
|
+
*
|
|
1128
|
+
* @param from The starting point for navigation.
|
|
1129
|
+
* @param to The destination point.
|
|
1130
|
+
* @param options Optional parameters for getting directions.
|
|
1131
|
+
* @returns Directions from the start to the destination point.
|
|
1132
|
+
* @example
|
|
1133
|
+
* // Get directions from space1 to space2.
|
|
1134
|
+
* const directions = await map.getDirections(space1, space2);
|
|
1135
|
+
*/
|
|
1136
|
+
getDirections(from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], options?: TGetDirectionsOptions): Directions | undefined;
|
|
1137
|
+
Outdoor: {
|
|
1138
|
+
setStyle: (style: any) => void;
|
|
1139
|
+
};
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
960
1143
|
declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
961
1144
|
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
962
1145
|
import { Label, Marker, Path, Directions } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
@@ -988,7 +1171,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
988
1171
|
* // Add all the labels to the map
|
|
989
1172
|
* map.Labels.all();
|
|
990
1173
|
*/
|
|
991
|
-
all: () =>
|
|
1174
|
+
all: () => Label[];
|
|
992
1175
|
/**
|
|
993
1176
|
* Adds a label to the map.
|
|
994
1177
|
*
|
|
@@ -1015,7 +1198,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1015
1198
|
* @example
|
|
1016
1199
|
* map.Labels.removeAll();
|
|
1017
1200
|
*/
|
|
1018
|
-
removeAll: () =>
|
|
1201
|
+
removeAll: () => Label[];
|
|
1019
1202
|
}
|
|
1020
1203
|
/**
|
|
1021
1204
|
* Interface defining the controls and actions for markers ({@link Marker}) on the map.
|
|
@@ -1096,6 +1279,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1096
1279
|
* Defines the state for a label when its appearance is updated.
|
|
1097
1280
|
*/
|
|
1098
1281
|
export type TLabelState = {
|
|
1282
|
+
type: 'label';
|
|
1099
1283
|
/**
|
|
1100
1284
|
* Appearance settings for the label.
|
|
1101
1285
|
*/
|
|
@@ -1104,28 +1288,31 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1104
1288
|
* Priority level of the label, used for determining display order.
|
|
1105
1289
|
*/
|
|
1106
1290
|
priority: number | 'initial';
|
|
1291
|
+
interactive: boolean;
|
|
1107
1292
|
};
|
|
1108
1293
|
/**
|
|
1109
1294
|
* Defines the state for geometry elements like {@link Space} when updated.
|
|
1110
1295
|
*/
|
|
1111
1296
|
export type TGeometryState = {
|
|
1297
|
+
type: 'geometry';
|
|
1112
1298
|
/**
|
|
1113
|
-
* Color of the geometry element.
|
|
1299
|
+
* Color of the geometry element. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1114
1300
|
*/
|
|
1115
1301
|
color: string | 'initial';
|
|
1116
1302
|
/**
|
|
1117
|
-
* Color of the geometry element when hovered over.
|
|
1303
|
+
* Color of the geometry element when hovered over. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1118
1304
|
*/
|
|
1119
1305
|
hoverColor: string | 'initial';
|
|
1120
1306
|
/**
|
|
1121
|
-
* Indicates if the geometry element is interactive.
|
|
1307
|
+
* Indicates if the geometry element is interactive. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1122
1308
|
*/
|
|
1123
1309
|
interactive: boolean;
|
|
1124
1310
|
};
|
|
1125
1311
|
/**
|
|
1126
1312
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
1127
1313
|
*/
|
|
1128
|
-
export type TUpdateState<T> = T extends ILabel ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : never;
|
|
1314
|
+
export type TUpdateState<T> = T extends ILabel ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
|
|
1315
|
+
export type TGetState<T> = T extends Label ? TLabelState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | undefined : never;
|
|
1129
1316
|
/**
|
|
1130
1317
|
* Options for {@link ICamera} animations on the map.
|
|
1131
1318
|
*/
|
|
@@ -1314,6 +1501,11 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1314
1501
|
* @internal
|
|
1315
1502
|
*/
|
|
1316
1503
|
auto(): void;
|
|
1504
|
+
/**
|
|
1505
|
+
* Get the current floor
|
|
1506
|
+
*/
|
|
1507
|
+
currentFloor: Floor;
|
|
1508
|
+
setFloor(floor: Floor): void;
|
|
1317
1509
|
/**
|
|
1318
1510
|
* @internal - unused until we use GeoJSON API underneath
|
|
1319
1511
|
*/
|
|
@@ -1340,7 +1532,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1340
1532
|
* // Update the color of a space to red.
|
|
1341
1533
|
* map.updateState(space, { color: 'red' });
|
|
1342
1534
|
*/
|
|
1343
|
-
updateState: <T extends Space | Label>(object: T, state: TUpdateState<T>) => void;
|
|
1535
|
+
updateState: <T extends Space | MapObject | Label>(object: T, state: TUpdateState<T>) => void;
|
|
1344
1536
|
/**
|
|
1345
1537
|
* Retrieves {@link Directions} from one navigation point {@link TNavigationTarget} to another
|
|
1346
1538
|
* {@link TNavigationTarget} on the map.
|
|
@@ -1352,80 +1544,80 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1352
1544
|
* // Get directions from space1 to space2.
|
|
1353
1545
|
* const directions = await map.getDirections(space1, space2);
|
|
1354
1546
|
*/
|
|
1355
|
-
getDirections: (from: TNavigationTarget, to: TNavigationTarget) =>
|
|
1547
|
+
getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], options?: TGetDirectionsOptions) => Directions | undefined;
|
|
1356
1548
|
}
|
|
1357
1549
|
/**
|
|
1358
1550
|
* Options for controlling the behavior of a {@link Path}.
|
|
1359
1551
|
*/
|
|
1360
1552
|
export type TAddPathOptions = {
|
|
1361
1553
|
/**
|
|
1362
|
-
* Path Colour
|
|
1554
|
+
* Path Colour. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1363
1555
|
*
|
|
1364
1556
|
* @defaultValue #4b90e2
|
|
1365
1557
|
*/
|
|
1366
1558
|
color?: string;
|
|
1367
1559
|
/**
|
|
1368
|
-
* Colour of path pulse
|
|
1560
|
+
* Colour of path pulse. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1369
1561
|
*
|
|
1370
1562
|
* @defaultValue '#ffffff'
|
|
1371
1563
|
*/
|
|
1372
1564
|
pulseColor?: string;
|
|
1373
1565
|
/**
|
|
1374
|
-
* Number of iterations to pulse to indicate direction
|
|
1566
|
+
* Number of iterations to pulse to indicate direction.
|
|
1375
1567
|
*
|
|
1376
1568
|
* @defaultValue 1
|
|
1377
1569
|
*/
|
|
1378
1570
|
pulseIterations?: number;
|
|
1379
1571
|
/**
|
|
1380
|
-
* How many milliseconds to wait before starting the next pulse after the current pulse travels the entirety of the path
|
|
1572
|
+
* How many milliseconds to wait before starting the next pulse after the current pulse travels the entirety of the path.
|
|
1381
1573
|
*
|
|
1382
1574
|
* @defaultValue 750
|
|
1383
1575
|
*/
|
|
1384
1576
|
pulsePauseDuration?: number;
|
|
1385
1577
|
/**
|
|
1386
|
-
* Radius of path at nearest zoom, in metres
|
|
1578
|
+
* Radius of path at nearest zoom, in metres.
|
|
1387
1579
|
*
|
|
1388
1580
|
* @defaultValue 1.8
|
|
1389
1581
|
*/
|
|
1390
1582
|
nearRadius?: number;
|
|
1391
1583
|
/**
|
|
1392
|
-
* Radius of path at furthest zoom, in metres
|
|
1584
|
+
* Radius of path at furthest zoom, in metres.
|
|
1393
1585
|
*
|
|
1394
1586
|
* @defaultValue 2.3 times nearRadius
|
|
1395
1587
|
*/
|
|
1396
1588
|
farRadius?: number;
|
|
1397
1589
|
/**
|
|
1398
|
-
* Zoom level in meters where the path size is `nearRadius
|
|
1590
|
+
* Zoom level in meters where the path size is `nearRadius`.
|
|
1399
1591
|
*
|
|
1400
1592
|
* @defaultValue 375
|
|
1401
1593
|
*/
|
|
1402
1594
|
nearZoom?: number;
|
|
1403
1595
|
/**
|
|
1404
|
-
* Zoom level in meters where the path size is `farRadius
|
|
1596
|
+
* Zoom level in meters where the path size is `farRadius`.
|
|
1405
1597
|
*
|
|
1406
1598
|
* @defaultValue 10000
|
|
1407
1599
|
*/
|
|
1408
1600
|
farZoom?: number;
|
|
1409
1601
|
/**
|
|
1410
|
-
* Duration of path drawing
|
|
1602
|
+
* Duration of path drawing in milliseconds.
|
|
1411
1603
|
*
|
|
1412
1604
|
* @defaultValue 1500
|
|
1413
1605
|
*/
|
|
1414
1606
|
drawDuration?: number;
|
|
1415
1607
|
/**
|
|
1416
|
-
* Show arrows on path
|
|
1608
|
+
* Show arrows on path.
|
|
1417
1609
|
*
|
|
1418
1610
|
* @defaultValue false
|
|
1419
1611
|
*/
|
|
1420
1612
|
displayArrowsOnPath?: boolean;
|
|
1421
1613
|
/**
|
|
1422
|
-
* Animate arrows on path
|
|
1614
|
+
* Animate arrows on path.
|
|
1423
1615
|
*
|
|
1424
1616
|
* @defaultValue true
|
|
1425
1617
|
*/
|
|
1426
1618
|
animateArrowsOnPath?: boolean;
|
|
1427
1619
|
/**
|
|
1428
|
-
* Flatten the path to a 2D line
|
|
1620
|
+
* Flatten the path to a 2D line.
|
|
1429
1621
|
*
|
|
1430
1622
|
* @defaultValue false
|
|
1431
1623
|
*/
|
|
@@ -1449,21 +1641,21 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1449
1641
|
*/
|
|
1450
1642
|
interactive?: boolean;
|
|
1451
1643
|
/**
|
|
1452
|
-
* The path will be adjusted vertically to the tallest
|
|
1644
|
+
* The path will be adjusted vertically to the tallest altitude along the path.
|
|
1453
1645
|
* The altitude is in meters.
|
|
1454
1646
|
*
|
|
1455
1647
|
* @defaultValue false
|
|
1456
1648
|
*/
|
|
1457
1649
|
adjustedAltitude?: boolean;
|
|
1458
1650
|
/**
|
|
1459
|
-
* The maximum altitude of the path in meters
|
|
1651
|
+
* The maximum altitude of the path in meters.
|
|
1460
1652
|
* The altitude is in meters.
|
|
1461
1653
|
*
|
|
1462
1654
|
* @defaultValue Infinite
|
|
1463
1655
|
*/
|
|
1464
1656
|
maxAdjustedAltitude?: number;
|
|
1465
1657
|
/**
|
|
1466
|
-
* The minimum altitude of the path in meters
|
|
1658
|
+
* The minimum altitude of the path in meters.
|
|
1467
1659
|
* The altitude is in meters.
|
|
1468
1660
|
*
|
|
1469
1661
|
* @defaultValue -Infinite
|
|
@@ -1481,7 +1673,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1481
1673
|
margin?: number;
|
|
1482
1674
|
text?: {
|
|
1483
1675
|
/**
|
|
1484
|
-
* Number of lines to display when text spans multiple lines
|
|
1676
|
+
* Number of lines to display when text spans multiple lines.
|
|
1485
1677
|
*/
|
|
1486
1678
|
numLines?: number;
|
|
1487
1679
|
/**
|
|
@@ -1489,21 +1681,21 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1489
1681
|
*/
|
|
1490
1682
|
size?: number;
|
|
1491
1683
|
/**
|
|
1492
|
-
* Maxiumum width of text in pixels
|
|
1684
|
+
* Maxiumum width of text in pixels.
|
|
1493
1685
|
*/
|
|
1494
1686
|
maxWidth?: number;
|
|
1495
1687
|
/**
|
|
1496
|
-
* Line height sets the height of a line box. It's commonly used to set the distance between lines of text
|
|
1688
|
+
* Line height sets the height of a line box. It's commonly used to set the distance between lines of text.
|
|
1497
1689
|
*
|
|
1498
1690
|
* @default 1.2
|
|
1499
1691
|
*/
|
|
1500
1692
|
lineHeight?: number;
|
|
1501
1693
|
/**
|
|
1502
|
-
* Text foreground color
|
|
1694
|
+
* Text foreground color. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1503
1695
|
*/
|
|
1504
1696
|
foregroundColor?: string;
|
|
1505
1697
|
/**
|
|
1506
|
-
* Text background color
|
|
1698
|
+
* Text background color. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1507
1699
|
*/
|
|
1508
1700
|
backgroundColor?: string;
|
|
1509
1701
|
};
|
|
@@ -1515,39 +1707,66 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1515
1707
|
size?: number;
|
|
1516
1708
|
foregroundColor?: {
|
|
1517
1709
|
/**
|
|
1518
|
-
* Foreground color of the marker
|
|
1710
|
+
* Foreground color of the marker when it is active. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1519
1711
|
*/
|
|
1520
1712
|
active?: string;
|
|
1521
1713
|
/**
|
|
1522
|
-
* Foreground color of the marker
|
|
1714
|
+
* Foreground color of the marker when it is inactive (grayed out due to being outranked by other labels around). Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1523
1715
|
*/
|
|
1524
1716
|
inactive?: string;
|
|
1525
1717
|
};
|
|
1526
1718
|
backgroundColor?: {
|
|
1527
1719
|
/**
|
|
1528
|
-
* Background color of the marker
|
|
1720
|
+
* Background color of the marker when it is active. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1529
1721
|
*/
|
|
1530
1722
|
active?: string;
|
|
1531
1723
|
/**
|
|
1532
|
-
* Background color of the marker
|
|
1724
|
+
* Background color of the marker when it is inactive (grayed out due to being outranked by other labels around). Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1533
1725
|
*/
|
|
1534
1726
|
inactive?: string;
|
|
1535
1727
|
};
|
|
1536
1728
|
/**
|
|
1537
|
-
* Size of bounding box of
|
|
1729
|
+
* Size of bounding box of the icon in pixels
|
|
1730
|
+
* @default 10
|
|
1538
1731
|
*/
|
|
1539
1732
|
iconSize?: number;
|
|
1540
1733
|
/**
|
|
1541
|
-
* SVG
|
|
1734
|
+
* Icon to be placed inside label. Supports SVG or a URL to png or jpeg.
|
|
1735
|
+
*
|
|
1736
|
+
* @example
|
|
1737
|
+
* ```ts
|
|
1738
|
+
* // SVG
|
|
1739
|
+
* mapView.Labels.add(space, space.name, {
|
|
1740
|
+
* appearance: {
|
|
1741
|
+
* icon: `<svg>...</svg>`
|
|
1742
|
+
* },
|
|
1743
|
+
* });
|
|
1744
|
+
* ```
|
|
1542
1745
|
*
|
|
1543
1746
|
* @example
|
|
1544
|
-
*
|
|
1545
|
-
*
|
|
1546
|
-
*
|
|
1547
|
-
*
|
|
1548
|
-
*
|
|
1747
|
+
* ```ts
|
|
1748
|
+
* // Image URL
|
|
1749
|
+
* mapView.Labels.add(space, space.name, {
|
|
1750
|
+
* appearance: {
|
|
1751
|
+
* icon: 'https://example.com/icon.png',
|
|
1752
|
+
* },
|
|
1753
|
+
* });
|
|
1754
|
+
* ```
|
|
1549
1755
|
*/
|
|
1550
1756
|
icon?: string;
|
|
1757
|
+
/**
|
|
1758
|
+
* How the icon should fit inside the marker.
|
|
1759
|
+
* - `fill` will stretch the icon to fill the marker.
|
|
1760
|
+
* - `cover` will maintain aspect ratio and fill the marker.
|
|
1761
|
+
* - `contain` will maintain aspect ratio and fit the icon inside the marker.
|
|
1762
|
+
* @default 'cover'
|
|
1763
|
+
*/
|
|
1764
|
+
iconFit?: 'contain' | 'fill' | 'cover';
|
|
1765
|
+
/**
|
|
1766
|
+
* Padding around the icon, in pixels.
|
|
1767
|
+
* @default 4
|
|
1768
|
+
*/
|
|
1769
|
+
iconPadding?: number;
|
|
1551
1770
|
/**
|
|
1552
1771
|
* Defines when the icon becomes visible relative to the current zoom level
|
|
1553
1772
|
* anything below 0 will result in icons never showing up
|
|
@@ -1593,11 +1812,27 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1593
1812
|
*/
|
|
1594
1813
|
accessible?: boolean;
|
|
1595
1814
|
/**
|
|
1596
|
-
* Enable or disable
|
|
1815
|
+
* Enable or disable line-of-sight directions smoothing.
|
|
1816
|
+
* With this option enabled, the directions will be simplified to provide a more visually appealing path and shorter instructions.
|
|
1817
|
+
*
|
|
1818
|
+
* Can be a boolean to enable or disable smoothing, or an object with a radius property to specify the line of sight radius in metres.
|
|
1597
1819
|
*
|
|
1598
1820
|
* @default true
|
|
1821
|
+
*
|
|
1822
|
+
* @example
|
|
1823
|
+
* ```ts
|
|
1824
|
+
* // Enable smoothing with a radius of 3 metres
|
|
1825
|
+
* mapView.getDirections(firstSpace, secondSpace, {
|
|
1826
|
+
* smoothing: {
|
|
1827
|
+
* radius: 3,
|
|
1828
|
+
* }
|
|
1829
|
+
* })
|
|
1830
|
+
* ```
|
|
1599
1831
|
*/
|
|
1600
|
-
smoothing?: boolean
|
|
1832
|
+
smoothing?: boolean | {
|
|
1833
|
+
enabled?: boolean;
|
|
1834
|
+
radius: number;
|
|
1835
|
+
};
|
|
1601
1836
|
};
|
|
1602
1837
|
/**
|
|
1603
1838
|
* Options for controlling the behavior of a {@link Marker}.
|
|
@@ -1699,8 +1934,8 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
|
|
|
1699
1934
|
*/
|
|
1700
1935
|
export type TDrawNavigationOptions = {
|
|
1701
1936
|
/**
|
|
1702
|
-
*
|
|
1703
|
-
* Pass false to disable
|
|
1937
|
+
* Color to highlight departure and destination spaces. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1938
|
+
* Pass false to disable.
|
|
1704
1939
|
* @default '#7babc8'
|
|
1705
1940
|
*/
|
|
1706
1941
|
polygonHighlightColor?: string | false;
|
|
@@ -1750,6 +1985,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-objects' {
|
|
|
1750
1985
|
|
|
1751
1986
|
declare module '@mappedin/mappedin-js/maker/src/navigation' {
|
|
1752
1987
|
import type { MapView, Directions } from '@mappedin/mappedin-js/maker/src';
|
|
1988
|
+
import { INavigation } from '@mappedin/mappedin-js/maker/src/map-view-interface';
|
|
1753
1989
|
const defaultOptions: {
|
|
1754
1990
|
createMarkers: {
|
|
1755
1991
|
departure: boolean;
|
|
@@ -1791,7 +2027,7 @@ declare module '@mappedin/mappedin-js/maker/src/navigation' {
|
|
|
1791
2027
|
};
|
|
1792
2028
|
};
|
|
1793
2029
|
constructor(mapView: MapView);
|
|
1794
|
-
draw:
|
|
2030
|
+
draw: INavigation['draw'];
|
|
1795
2031
|
clear: () => void;
|
|
1796
2032
|
}
|
|
1797
2033
|
export {};
|
|
@@ -1806,6 +2042,7 @@ declare module '@mappedin/mappedin-js/maker/src' {
|
|
|
1806
2042
|
import { Floor } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
1807
2043
|
import type { ParsedMVF as TMVF } from '@mappedin/mvf';
|
|
1808
2044
|
import { TShowWatermarkOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/WatermarkController';
|
|
2045
|
+
import { MapViewGeoJson } from '@mappedin/mappedin-js/maker/src/map-view-geojson';
|
|
1809
2046
|
/**
|
|
1810
2047
|
* Represents all the available antialiasing options.
|
|
1811
2048
|
*/
|
|
@@ -2010,6 +2247,8 @@ declare module '@mappedin/mappedin-js/maker/src' {
|
|
|
2010
2247
|
* const mapContainer = document.getQuerySelector('body');
|
|
2011
2248
|
* const map = await show3dMap(mapContainer, mapData, { auto: true });
|
|
2012
2249
|
*/
|
|
2250
|
+
export const show3dMapCms: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
2251
|
+
export const show3dMapGeojson: (el: HTMLElement, mapData: MapData) => Promise<MapViewGeoJson>;
|
|
2013
2252
|
export const show3dMap: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
2014
2253
|
export { parseMVF, unzipMVF };
|
|
2015
2254
|
export type { MapView, MapData, TEvents, TShow3DMapOptions, TGetMapDataOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, };
|
|
@@ -2207,6 +2446,37 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal' {
|
|
|
2207
2446
|
export { setAssetManager };
|
|
2208
2447
|
}
|
|
2209
2448
|
|
|
2449
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Exporter' {
|
|
2450
|
+
import { ExportController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
2451
|
+
/**
|
|
2452
|
+
* @hidden
|
|
2453
|
+
*/
|
|
2454
|
+
export type TGLTFExportOptions = {
|
|
2455
|
+
onlyVisible?: boolean;
|
|
2456
|
+
binary?: boolean;
|
|
2457
|
+
scale?: number;
|
|
2458
|
+
};
|
|
2459
|
+
/**
|
|
2460
|
+
* API to export the scene.
|
|
2461
|
+
*
|
|
2462
|
+
* @hidden
|
|
2463
|
+
*/
|
|
2464
|
+
export class Exporter {
|
|
2465
|
+
#private;
|
|
2466
|
+
/**
|
|
2467
|
+
* @hidden
|
|
2468
|
+
* @internal
|
|
2469
|
+
*/
|
|
2470
|
+
constructor(controller: ExportController);
|
|
2471
|
+
/**
|
|
2472
|
+
* Exports the current scene as a GLTF file.
|
|
2473
|
+
*
|
|
2474
|
+
* @hidden
|
|
2475
|
+
*/
|
|
2476
|
+
getCurrentSceneGLTF(userOptions: TGLTFExportOptions): Promise<Blob>;
|
|
2477
|
+
}
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2210
2480
|
declare module '@mappedin/mappedin-js/maker/src/map-data-interace' {
|
|
2211
2481
|
import type { Annotation, Connection, Coordinate, Door, Floor, MapObject, PointOfInterest, Space } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
2212
2482
|
/**
|
|
@@ -2285,6 +2555,14 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-objects/camera-transfor
|
|
|
2285
2555
|
}
|
|
2286
2556
|
|
|
2287
2557
|
declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.types' {
|
|
2558
|
+
import type { TGetVenueMVFOptions, TGetVenueMakerOptions } from '@mappedin/mappedin-js/packages/get-venue';
|
|
2559
|
+
import type { DefaultThings } from '@mappedin/mappedin-js/packages/get-venue/default-things';
|
|
2560
|
+
export type MergedThings = {
|
|
2561
|
+
[key in keyof DefaultThings]: string[];
|
|
2562
|
+
} & {
|
|
2563
|
+
[k: string]: string[];
|
|
2564
|
+
};
|
|
2565
|
+
export type ThingsOption = Partial<MergedThings>;
|
|
2288
2566
|
export type TGetVenueOptions = {
|
|
2289
2567
|
accessToken?: string;
|
|
2290
2568
|
clientId?: string;
|
|
@@ -2298,22 +2576,45 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.types' {
|
|
|
2298
2576
|
[key in string]: string;
|
|
2299
2577
|
};
|
|
2300
2578
|
venue: string;
|
|
2301
|
-
|
|
2579
|
+
/**
|
|
2580
|
+
* An object specifying additional properties to fetch for each data item.
|
|
2581
|
+
* Each key represents a data item (e.g., 'locations', 'nodes'), and the value is an array of strings indicating extra properties to be included.
|
|
2582
|
+
* @example
|
|
2583
|
+
* For example:
|
|
2584
|
+
* ```
|
|
2585
|
+
* getVenue({
|
|
2586
|
+
* venue: 'some-venue',
|
|
2587
|
+
* things: { vortexes: [ 'material' ]
|
|
2588
|
+
* }})
|
|
2589
|
+
* ```
|
|
2590
|
+
*/
|
|
2591
|
+
things?: ThingsOption;
|
|
2302
2592
|
useDraftData?: boolean;
|
|
2303
2593
|
platformString?: string;
|
|
2304
2594
|
emitAnalyticsEvents?: boolean;
|
|
2305
2595
|
secure?: boolean;
|
|
2306
2596
|
preloadMapGeometry?: boolean;
|
|
2307
2597
|
};
|
|
2308
|
-
export type
|
|
2598
|
+
export type TProcessedMVFOptions = TGetVenueMakerOptions & {
|
|
2599
|
+
emitAnalyticsEvents: boolean;
|
|
2600
|
+
clientId: string;
|
|
2601
|
+
clientSecret: string;
|
|
2602
|
+
venue: string;
|
|
2603
|
+
accessToken: string;
|
|
2604
|
+
};
|
|
2605
|
+
export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & {
|
|
2606
|
+
perspective?: string;
|
|
2607
|
+
});
|
|
2608
|
+
export type TGetVenueOptionsInternal<T extends TAllGetVenueOptions> = Omit<T & {
|
|
2309
2609
|
baseUrl?: string;
|
|
2310
2610
|
supplementaryUrl?: string;
|
|
2311
2611
|
noAuth?: boolean;
|
|
2312
2612
|
includeHidden?: boolean;
|
|
2313
2613
|
apiGateway?: string;
|
|
2314
2614
|
authorization?: string;
|
|
2315
|
-
things?: any;
|
|
2316
2615
|
headers?: any;
|
|
2616
|
+
}, 'things'> & {
|
|
2617
|
+
things?: MergedThings;
|
|
2317
2618
|
};
|
|
2318
2619
|
export type TVenueMetadata = {
|
|
2319
2620
|
languages: {
|
|
@@ -2336,14 +2637,14 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.types' {
|
|
|
2336
2637
|
|
|
2337
2638
|
declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin' {
|
|
2338
2639
|
import { Navigator } from '@mappedin/mappedin-js/packages/navigator';
|
|
2339
|
-
import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
2640
|
+
import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
2340
2641
|
import type { MappedinNode, MappedinPolygon, MappedinLocation, MappedinCategory, MappedinVortex, MappedinVenue, MappedinTheme, MappedinRankings, MappedinLocationRankings, MappedinEvent, MappedinLocationState, MappedinMap, MappedinMapGroup, GET_VENUE_PAYLOAD } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
2341
2642
|
import { TAccessors, GET_VENUE_EVENT } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
2342
2643
|
import { IAnalytics } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.CustomerAnalytics';
|
|
2343
2644
|
import { ParsedMVF } from '@mappedin/mvf';
|
|
2344
2645
|
import { ParsedMVFv1 } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.types';
|
|
2345
2646
|
import { PubSub } from '@mappedin/mappedin-js/packages/get-venue/pub-sub.typed';
|
|
2346
|
-
export const defaultOptions: TGetVenueOptionsInternal
|
|
2647
|
+
export const defaultOptions: TGetVenueOptionsInternal<TGetVenueOptions>;
|
|
2347
2648
|
export class Mappedin extends PubSub<GET_VENUE_PAYLOAD, GET_VENUE_EVENT> {
|
|
2348
2649
|
#private;
|
|
2349
2650
|
perspective: any;
|
|
@@ -2567,15 +2868,15 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin' {
|
|
|
2567
2868
|
* @param mappedinSerializableData Mappedin data that was serialized or exported as JSON
|
|
2568
2869
|
* @param shouldPopulateBundledImagesAsBlobs Takes the scenes and images from a bundle and maps them as blobs to where they exist as URLs in the bundle. False by default
|
|
2569
2870
|
*/
|
|
2570
|
-
hydrate(mappedinSerializableData: string | Record<string, unknown>, shouldPopulateBundledImagesAsBlobs?: boolean): Promise<undefined>;
|
|
2871
|
+
hydrate(mappedinSerializableData: string | Record<string, unknown>, shouldPopulateBundledImagesAsBlobs?: boolean, updateInPlace?: boolean): Promise<undefined>;
|
|
2571
2872
|
images: any;
|
|
2572
2873
|
imageBinaries?: Map<string, Uint8Array>;
|
|
2573
2874
|
scenes: any;
|
|
2574
|
-
fetch(): Promise<void>;
|
|
2875
|
+
fetch(updateInPlace?: boolean): Promise<void>;
|
|
2575
2876
|
/**
|
|
2576
2877
|
* @deprecated Use {@link hydrateVenue} instead
|
|
2577
2878
|
*/
|
|
2578
|
-
constructor(options: TGetVenueOptionsInternal
|
|
2879
|
+
constructor(options: TGetVenueOptionsInternal<TAllGetVenueOptions>);
|
|
2579
2880
|
analytics: IAnalytics;
|
|
2580
2881
|
/**
|
|
2581
2882
|
* @hidden
|
|
@@ -2605,6 +2906,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/default-things' {
|
|
|
2605
2906
|
themes: string[];
|
|
2606
2907
|
rankings: string[];
|
|
2607
2908
|
};
|
|
2909
|
+
export type DefaultThings = typeof defaultThings;
|
|
2608
2910
|
}
|
|
2609
2911
|
|
|
2610
2912
|
declare module '@mappedin/mappedin-js/packages/get-venue/internal' {
|
|
@@ -2946,6 +3248,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinLocation' {
|
|
|
2946
3248
|
siblingGroups?: TSiblingGroup[] | undefined;
|
|
2947
3249
|
gallery?: TGalleryImage[] | undefined;
|
|
2948
3250
|
amenity?: string | undefined;
|
|
3251
|
+
filterFlags?: string[];
|
|
2949
3252
|
constructor(mappedin: Mappedin, data: any);
|
|
2950
3253
|
/**
|
|
2951
3254
|
* Polygons this Location is attached to.
|
|
@@ -2982,6 +3285,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinLocation' {
|
|
|
2982
3285
|
clone(): MappedinLocation;
|
|
2983
3286
|
get nodeOperationHours(): TOperationHoursMap;
|
|
2984
3287
|
static hydrate(locations: any, mappedin: Mappedin): MappedinLocation[];
|
|
3288
|
+
static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise<void>;
|
|
2985
3289
|
static fetch(mappedin: Mappedin): Promise<MappedinLocation[]>;
|
|
2986
3290
|
/**
|
|
2987
3291
|
*
|
|
@@ -2999,8 +3303,8 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinLocation' {
|
|
|
2999
3303
|
}
|
|
3000
3304
|
|
|
3001
3305
|
declare module '@mappedin/mappedin-js/packages/get-venue/MappedinCoordinate' {
|
|
3002
|
-
import { MappedinNode, Mappedin } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
3003
3306
|
import type { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
3307
|
+
import { Mappedin, MappedinNode } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
3004
3308
|
export type TMappedinCoordinateOptions = {
|
|
3005
3309
|
map: MappedinMap;
|
|
3006
3310
|
mappedin: Mappedin;
|
|
@@ -3063,6 +3367,11 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinCoordinate' {
|
|
|
3063
3367
|
* Get Nearest Node to Coordinate, which can then be used for navigation
|
|
3064
3368
|
*/
|
|
3065
3369
|
get nearestNode(): MappedinNode;
|
|
3370
|
+
/**
|
|
3371
|
+
* Get the {@link MappedinNode}s within a radius of the {@link MappedinCoordinate}.
|
|
3372
|
+
* @param radius - The radius in metres.
|
|
3373
|
+
*/
|
|
3374
|
+
nodesInRadius(radius: number): MappedinNode[];
|
|
3066
3375
|
toJSON(): {
|
|
3067
3376
|
x: number;
|
|
3068
3377
|
y: number;
|
|
@@ -3732,7 +4041,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.types' {
|
|
|
3732
4041
|
}
|
|
3733
4042
|
|
|
3734
4043
|
declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.utils' {
|
|
3735
|
-
import { Feature, LineString, Polygon } from '@turf/turf';
|
|
4044
|
+
import type { Feature, LineString, Polygon } from '@turf/turf';
|
|
3736
4045
|
import { EntranceCollection, ObstructionCollection, EntranceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle } from '@mappedin/mvf';
|
|
3737
4046
|
import { MVFStyle, WithIDs } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.types';
|
|
3738
4047
|
export const Z_FIGHTING_ADJUSTMENT_HORIZONTAL_FACTOR = 0.2;
|
|
@@ -3746,7 +4055,8 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.utils' {
|
|
|
3746
4055
|
*/
|
|
3747
4056
|
export const STATIC_MVF_FILES: readonly ["connection.json", "manifest.geojson", "map.geojson", "node.geojson", "styles.json", "mapstack.geojson"];
|
|
3748
4057
|
export type TStaticMVFFiles = (typeof STATIC_MVF_FILES)[number];
|
|
3749
|
-
export function processObstructions(obstructionCollection: ObstructionCollection, entrances: EntranceCollection
|
|
4058
|
+
export function processObstructions(obstructionCollection: ObstructionCollection, entrances: EntranceCollection): ObstructionCollection;
|
|
4059
|
+
export function splitObstructionByAllEntrances(wall: ObstructionWallFeature, entrances: EntranceFeature[]): ObstructionWallFeature[];
|
|
3750
4060
|
export function isPolygonStyle(style: PolygonStyle | LineStringStyle | undefined): style is PolygonStyle & LineStringStyle;
|
|
3751
4061
|
export function getStylesMap(styles: StyleCollection): WithIDs<MVFStyle>;
|
|
3752
4062
|
}
|
|
@@ -3833,7 +4143,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/node' {
|
|
|
3833
4143
|
}
|
|
3834
4144
|
|
|
3835
4145
|
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/door' {
|
|
3836
|
-
import { EntranceCollection,
|
|
4146
|
+
import { EntranceCollection, Image } from '@mappedin/mvf';
|
|
3837
4147
|
import Coordinate from '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate';
|
|
3838
4148
|
import type Floor from '@mappedin/mappedin-js/maker/src/map-data-objects/floor';
|
|
3839
4149
|
import type { MapDataInternal } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
@@ -3874,7 +4184,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/door' {
|
|
|
3874
4184
|
*/
|
|
3875
4185
|
get name(): string;
|
|
3876
4186
|
get description(): string;
|
|
3877
|
-
get links(): Hyperlink[];
|
|
3878
4187
|
get images(): Image[];
|
|
3879
4188
|
/**
|
|
3880
4189
|
* Gets the {@link Floor} object associated with the door.
|
|
@@ -3919,7 +4228,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/door' {
|
|
|
3919
4228
|
}
|
|
3920
4229
|
|
|
3921
4230
|
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/space' {
|
|
3922
|
-
import {
|
|
4231
|
+
import { Image, SpaceCollection } from '@mappedin/mvf';
|
|
3923
4232
|
import Coordinate from '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate';
|
|
3924
4233
|
import type { MapDataInternal } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
3925
4234
|
import type Floor from '@mappedin/mappedin-js/maker/src/map-data-objects/floor';
|
|
@@ -3977,7 +4286,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/space' {
|
|
|
3977
4286
|
*/
|
|
3978
4287
|
get type(): TSpaceType;
|
|
3979
4288
|
get description(): string;
|
|
3980
|
-
get links(): Hyperlink[];
|
|
3981
4289
|
get images(): Image[];
|
|
3982
4290
|
/**
|
|
3983
4291
|
* Gets the {@link Floor} object associated with the space.
|
|
@@ -4130,9 +4438,9 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/floor' {
|
|
|
4130
4438
|
}
|
|
4131
4439
|
|
|
4132
4440
|
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/connection' {
|
|
4133
|
-
import { FeatureCollection,
|
|
4441
|
+
import { FeatureCollection, Image, Point, SpaceProperties } from '@mappedin/mvf';
|
|
4134
4442
|
import Coordinate from '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate';
|
|
4135
|
-
import type { MapDataInternal } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
4443
|
+
import type { Floor, MapDataInternal } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
4136
4444
|
import BaseMapData from '@mappedin/mappedin-js/maker/src/map-data-objects/base-object';
|
|
4137
4445
|
/**
|
|
4138
4446
|
* A class representing connection data within the map.
|
|
@@ -4169,7 +4477,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/connection' {
|
|
|
4169
4477
|
*/
|
|
4170
4478
|
get name(): string;
|
|
4171
4479
|
get description(): string;
|
|
4172
|
-
get links(): Hyperlink[];
|
|
4173
4480
|
get images(): Image[];
|
|
4174
4481
|
/**
|
|
4175
4482
|
* Gets the type of the connection.
|
|
@@ -4188,7 +4495,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/connection' {
|
|
|
4188
4495
|
*
|
|
4189
4496
|
* @returns {Floor[]} An array of floors for the connection.
|
|
4190
4497
|
*/
|
|
4191
|
-
get floors():
|
|
4498
|
+
get floors(): Floor[];
|
|
4192
4499
|
/**
|
|
4193
4500
|
* Serializes the connection data to JSON.
|
|
4194
4501
|
*
|
|
@@ -4216,7 +4523,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/connection' {
|
|
|
4216
4523
|
}
|
|
4217
4524
|
|
|
4218
4525
|
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/object' {
|
|
4219
|
-
import {
|
|
4526
|
+
import { Image, ObstructionCollection } from '@mappedin/mvf';
|
|
4220
4527
|
import Coordinate from '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate';
|
|
4221
4528
|
import type { MapDataInternal } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
4222
4529
|
import type Floor from '@mappedin/mappedin-js/maker/src/map-data-objects/floor';
|
|
@@ -4257,7 +4564,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/object' {
|
|
|
4257
4564
|
*/
|
|
4258
4565
|
get name(): string;
|
|
4259
4566
|
get description(): string;
|
|
4260
|
-
get links(): Hyperlink[];
|
|
4261
4567
|
get images(): Image[];
|
|
4262
4568
|
/**
|
|
4263
4569
|
* Gets the type of the MapObject.
|
|
@@ -4305,8 +4611,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/object' {
|
|
|
4305
4611
|
}
|
|
4306
4612
|
|
|
4307
4613
|
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate' {
|
|
4308
|
-
import type { MapDataInternal } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
4309
|
-
import type Floor from '@mappedin/mappedin-js/maker/src/map-data-objects/floor';
|
|
4310
4614
|
/**
|
|
4311
4615
|
* Class representing a pseudo-mercator coordinate.
|
|
4312
4616
|
*
|
|
@@ -4316,7 +4620,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate' {
|
|
|
4316
4620
|
* which is commonly used in marine navigation.
|
|
4317
4621
|
*/
|
|
4318
4622
|
class Coordinate {
|
|
4319
|
-
#private;
|
|
4320
4623
|
/**
|
|
4321
4624
|
* @internal
|
|
4322
4625
|
*/
|
|
@@ -4336,6 +4639,10 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate' {
|
|
|
4336
4639
|
* @type {number}
|
|
4337
4640
|
*/
|
|
4338
4641
|
readonly longitude: number;
|
|
4642
|
+
/**
|
|
4643
|
+
* The floor ID of the coordinate.
|
|
4644
|
+
*/
|
|
4645
|
+
readonly floorId?: string;
|
|
4339
4646
|
/**
|
|
4340
4647
|
* Checks if the provided instance is of type Coordinate.
|
|
4341
4648
|
*
|
|
@@ -4346,11 +4653,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate' {
|
|
|
4346
4653
|
/**
|
|
4347
4654
|
* @internal
|
|
4348
4655
|
*/
|
|
4349
|
-
constructor(
|
|
4350
|
-
latitude: number;
|
|
4351
|
-
longitude: number;
|
|
4352
|
-
floorId?: string;
|
|
4353
|
-
});
|
|
4656
|
+
constructor(latitude: number, longitude: number, floorId?: string);
|
|
4354
4657
|
/**
|
|
4355
4658
|
* Checks if this coordinate is equal to another coordinate.
|
|
4356
4659
|
*
|
|
@@ -4358,13 +4661,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate' {
|
|
|
4358
4661
|
* @returns {boolean} True if coordinates are equal, false otherwise.
|
|
4359
4662
|
*/
|
|
4360
4663
|
isEqual(coordinate: Coordinate): boolean;
|
|
4361
|
-
/**
|
|
4362
|
-
* Gets the {@link Floor} associated with the coordinate.
|
|
4363
|
-
*
|
|
4364
|
-
* @returns {Floor | undefined} The {@link Floor} object if available.
|
|
4365
|
-
* @throws Will throw an error if the floor is not found.
|
|
4366
|
-
*/
|
|
4367
|
-
get floor(): Floor | undefined;
|
|
4368
4664
|
/**
|
|
4369
4665
|
* Serializes the coordinate data to JSON.
|
|
4370
4666
|
*
|
|
@@ -4390,7 +4686,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/poi' {
|
|
|
4390
4686
|
import type { Floor, MapDataInternal } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
4391
4687
|
import Coordinate from '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate';
|
|
4392
4688
|
import BaseMapData from '@mappedin/mappedin-js/maker/src/map-data-objects/base-object';
|
|
4393
|
-
import Hyperlink from '@mappedin/mappedin-js/maker/src/map-data-objects/hyperlink';
|
|
4394
4689
|
import Image from '@mappedin/mappedin-js/maker/src/map-data-objects/image';
|
|
4395
4690
|
/**
|
|
4396
4691
|
* A class representing point of interest data within the map.
|
|
@@ -4434,12 +4729,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/poi' {
|
|
|
4434
4729
|
* @returns {string} The description of the POI.
|
|
4435
4730
|
*/
|
|
4436
4731
|
get description(): string;
|
|
4437
|
-
/**
|
|
4438
|
-
* Gets the links associated with the POI.
|
|
4439
|
-
*
|
|
4440
|
-
* @returns {Hyperlink[]} The links associated with the POI.
|
|
4441
|
-
*/
|
|
4442
|
-
get links(): Hyperlink[];
|
|
4443
4732
|
/**
|
|
4444
4733
|
* Gets the images associated with the POI.
|
|
4445
4734
|
*
|
|
@@ -4571,11 +4860,11 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/annotation' {
|
|
|
4571
4860
|
|
|
4572
4861
|
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/hyperlink' {
|
|
4573
4862
|
import { Hyperlink as MVFHyperlink } from '@mappedin/mvf';
|
|
4574
|
-
import
|
|
4863
|
+
import BaseMetaData from '@mappedin/mappedin-js/maker/src/map-data-objects/base-metadata-object';
|
|
4575
4864
|
/**
|
|
4576
4865
|
* A class representing hyperlink link data within the map.
|
|
4577
4866
|
*/
|
|
4578
|
-
class Hyperlink extends
|
|
4867
|
+
class Hyperlink extends BaseMetaData {
|
|
4579
4868
|
#private;
|
|
4580
4869
|
/**
|
|
4581
4870
|
* @internal
|
|
@@ -4628,11 +4917,11 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/hyperlink' {
|
|
|
4628
4917
|
|
|
4629
4918
|
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/image' {
|
|
4630
4919
|
import { Image as MVFImage } from '@mappedin/mvf';
|
|
4631
|
-
import
|
|
4920
|
+
import BaseMetaData from '@mappedin/mappedin-js/maker/src/map-data-objects/base-metadata-object';
|
|
4632
4921
|
/**
|
|
4633
4922
|
* A class representing image link data within the map.
|
|
4634
4923
|
*/
|
|
4635
|
-
class Image extends
|
|
4924
|
+
class Image extends BaseMetaData {
|
|
4636
4925
|
#private;
|
|
4637
4926
|
/**
|
|
4638
4927
|
* @internal
|
|
@@ -4683,6 +4972,18 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/image' {
|
|
|
4683
4972
|
export default Image;
|
|
4684
4973
|
}
|
|
4685
4974
|
|
|
4975
|
+
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/types' {
|
|
4976
|
+
import Door from '@mappedin/mappedin-js/maker/src/map-data-objects/door';
|
|
4977
|
+
import Floor from '@mappedin/mappedin-js/maker/src/map-data-objects/floor';
|
|
4978
|
+
import Node from '@mappedin/mappedin-js/maker/src/map-data-objects/node';
|
|
4979
|
+
import Space from '@mappedin/mappedin-js/maker/src/map-data-objects/space';
|
|
4980
|
+
import PointOfInterest from '@mappedin/mappedin-js/maker/src/map-data-objects/poi';
|
|
4981
|
+
import Annotation from '@mappedin/mappedin-js/maker/src/map-data-objects/annotation';
|
|
4982
|
+
import Connection from '@mappedin/mappedin-js/maker/src/map-data-objects/connection';
|
|
4983
|
+
import MapObject from '@mappedin/mappedin-js/maker/src/map-data-objects/object';
|
|
4984
|
+
export type MapDataObjects = Space | Floor | Node | Door | Connection | MapObject | PointOfInterest | Annotation;
|
|
4985
|
+
}
|
|
4986
|
+
|
|
4686
4987
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core.interface' {
|
|
4687
4988
|
import { Color, Vector2, Vector3, Mesh } from 'three';
|
|
4688
4989
|
import type { TPadding, TGetPolygonsAtCoordinateOptions, TMapViewOptions, TileManager, BillboardManager, StackedMapsController, SmartCollisionEngine, OutdoorViewController, LayerController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
@@ -4910,7 +5211,10 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core.inte
|
|
|
4910
5211
|
* An object containing all outlined polygons.
|
|
4911
5212
|
*/
|
|
4912
5213
|
outlinedPolygons: Map<string, MappedinPolygon>;
|
|
4913
|
-
|
|
5214
|
+
/**
|
|
5215
|
+
* A plane that is parallel to the ground and is used for raycasting.
|
|
5216
|
+
*/
|
|
5217
|
+
worldPlane: Mesh;
|
|
4914
5218
|
getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string | null): Vector3;
|
|
4915
5219
|
currentScale: number;
|
|
4916
5220
|
getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
|
|
@@ -4963,15 +5267,45 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core.inte
|
|
|
4963
5267
|
}
|
|
4964
5268
|
}
|
|
4965
5269
|
|
|
4966
|
-
declare module '@mappedin/mappedin-js/maker/src/
|
|
4967
|
-
import {
|
|
4968
|
-
|
|
5270
|
+
declare module '@mappedin/mappedin-js/maker/src/api-geojson/labels' {
|
|
5271
|
+
import { ILabels, TAddLabelOptions } from '@mappedin/mappedin-js/maker/src/map-view-interface';
|
|
5272
|
+
import { Label } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
5273
|
+
import { GeojsonApiMapObject } from '@mappedin/mappedin-js/maker/src/api-geojson/map-object';
|
|
5274
|
+
import { PointOfInterest, MapObject } from '@mappedin/mappedin-js/maker/src';
|
|
5275
|
+
import { Space, Door, Coordinate } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
5276
|
+
export class LabelsApi implements ILabels {
|
|
5277
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
5278
|
+
constructor({ currentMapGetter }: {
|
|
5279
|
+
currentMapGetter: CurrentMapGetter;
|
|
5280
|
+
});
|
|
5281
|
+
getById(id: string): {
|
|
5282
|
+
label: Label;
|
|
5283
|
+
entityId: string;
|
|
5284
|
+
} | undefined;
|
|
5285
|
+
add(target: Space | Door | Coordinate | PointOfInterest | MapObject, text: string, options?: TAddLabelOptions | undefined): Label;
|
|
5286
|
+
all(): Label[];
|
|
5287
|
+
remove(label: Label): void;
|
|
5288
|
+
removeAll(): Label[];
|
|
5289
|
+
}
|
|
5290
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
5291
|
+
export {};
|
|
5292
|
+
}
|
|
5293
|
+
|
|
5294
|
+
declare module '@mappedin/mappedin-js/maker/src/api-geojson' {
|
|
5295
|
+
export { GeoJsonApi } from '@mappedin/mappedin-js/maker/src/api-geojson/api';
|
|
5296
|
+
export { convertPriorityToCollisionTier } from '@mappedin/mappedin-js/maker/src/api-geojson/utils';
|
|
5297
|
+
export { Inspector } from '@mappedin/mappedin-js/maker/src/api-geojson/inspector';
|
|
5298
|
+
}
|
|
5299
|
+
|
|
5300
|
+
declare module '@mappedin/mappedin-js/maker/src/map-view-objects/label' {
|
|
5301
|
+
import { ILabel } from '@mappedin/mappedin-js/maker/src/map-view-interface';
|
|
5302
|
+
/**
|
|
4969
5303
|
* Class representing a label on the {@link MapView}.
|
|
4970
5304
|
*
|
|
4971
5305
|
* Labels are used to provide additional information on the map.
|
|
4972
5306
|
*/
|
|
4973
5307
|
export class Label implements ILabel {
|
|
4974
|
-
id: string;
|
|
5308
|
+
readonly id: string;
|
|
4975
5309
|
readonly text: any;
|
|
4976
5310
|
/**
|
|
4977
5311
|
* @internal
|
|
@@ -5381,15 +5715,15 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums' {
|
|
|
5381
5715
|
}
|
|
5382
5716
|
|
|
5383
5717
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
5384
|
-
import type { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon } from '@mappedin/mappedin-js/packages/get-venue';
|
|
5718
|
+
import type { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon, ThingsOption } from '@mappedin/mappedin-js/packages/get-venue';
|
|
5385
5719
|
import type { TFloatingLabelAppearance } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.FloatingLabel';
|
|
5386
5720
|
import type { TEnableBlueDotOptions, TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
|
|
5387
5721
|
import type { Euler, Object3D, Vector3 } from 'three';
|
|
5388
5722
|
import type { Path } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/PathsController';
|
|
5389
5723
|
import { TOOLTIP_ANCHOR } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.SmartTooltip';
|
|
5390
5724
|
import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE, CAMERA_EASING_MODE, E_MAP_CHANGED_REASON } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums';
|
|
5391
|
-
import {
|
|
5392
|
-
export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
|
|
5725
|
+
import { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/OutdoorViewController';
|
|
5726
|
+
export type { TEnableBlueDotOptions, TFloatingLabelAppearance, ThingsOption };
|
|
5393
5727
|
/** @internal */
|
|
5394
5728
|
export type Without<T, U> = {
|
|
5395
5729
|
[P in Exclude<keyof T, keyof U>]?: never;
|
|
@@ -5881,6 +6215,13 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
5881
6215
|
outdoorGeometryLayers?: string[];
|
|
5882
6216
|
/**
|
|
5883
6217
|
* Use the current polygon objects directly rather than what is stored when rendering the map in CMS.
|
|
6218
|
+
*
|
|
6219
|
+
* Important Considerations:
|
|
6220
|
+
* - When this flag is set to true, the application will use live polygon data, which might not include certain enhancements such as 3D text annotations or automatically generated infill patterns. These features typically depend on the CMS's Render capabilities.
|
|
6221
|
+
* - Opting for live polygons means the system will not utilize the pre-processed optimized polygon data that is available through the CMS's rendering pipeline.
|
|
6222
|
+
* - This option is useful for applications requiring the most up-to-date representation of polygon data but may result in a less detailed visual representation due to the absence of certain rendered features.
|
|
6223
|
+
*
|
|
6224
|
+
* Use this option with caution, understanding the trade-offs between real-time update and visual detail.
|
|
5884
6225
|
*/
|
|
5885
6226
|
useLivePolygons?: boolean;
|
|
5886
6227
|
};
|
|
@@ -5889,7 +6230,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
5889
6230
|
* Requires `multiBufferRendering` to be enabled.
|
|
5890
6231
|
* @experimental
|
|
5891
6232
|
*/
|
|
5892
|
-
outdoorView?:
|
|
6233
|
+
outdoorView?: TOutdoorViewOptions & {
|
|
5893
6234
|
enabled?: boolean;
|
|
5894
6235
|
};
|
|
5895
6236
|
/**
|
|
@@ -6026,6 +6367,10 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
6026
6367
|
onWebGLRendererError?: () => void;
|
|
6027
6368
|
};
|
|
6028
6369
|
export type TShowVenueOptions = {
|
|
6370
|
+
/**
|
|
6371
|
+
* Enable shading of bottoms of geometry along with outlines to make geometry stand out.
|
|
6372
|
+
*/
|
|
6373
|
+
shadingAndOutlines?: boolean;
|
|
6029
6374
|
/**
|
|
6030
6375
|
* @experimental
|
|
6031
6376
|
*
|
|
@@ -6083,7 +6428,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
6083
6428
|
* @experimental
|
|
6084
6429
|
* Enable outdoor view. Requires multi-buffer rendering to be enabled
|
|
6085
6430
|
*/
|
|
6086
|
-
outdoorView?:
|
|
6431
|
+
outdoorView?: TOutdoorViewOptions & {
|
|
6087
6432
|
enabled?: boolean;
|
|
6088
6433
|
};
|
|
6089
6434
|
/**
|
|
@@ -6588,39 +6933,62 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
6588
6933
|
*/
|
|
6589
6934
|
[E_CAMERA_EVENT.TILT_CHANGED]: number;
|
|
6590
6935
|
};
|
|
6936
|
+
export type { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL };
|
|
6591
6937
|
export type { default as BlueDotController } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/BlueDotController';
|
|
6592
6938
|
export type { default as Journey } from '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Journey';
|
|
6939
|
+
export type TStackedMapsOptions = {
|
|
6940
|
+
/**
|
|
6941
|
+
* The vertical distance between maps in overview, in metres.
|
|
6942
|
+
* @default 50
|
|
6943
|
+
*/
|
|
6944
|
+
verticalDistanceBetweenMaps?: number;
|
|
6945
|
+
/**
|
|
6946
|
+
* Whether to show map level labels in overview.
|
|
6947
|
+
* @default true
|
|
6948
|
+
*/
|
|
6949
|
+
mapLabels?: boolean;
|
|
6950
|
+
/**
|
|
6951
|
+
* Whether to show only Journey maps in the stack if a Journey is active and the current map is part of the Journey.
|
|
6952
|
+
* @default true
|
|
6953
|
+
*/
|
|
6954
|
+
prioritizeJourneyMaps?: boolean;
|
|
6955
|
+
};
|
|
6593
6956
|
}
|
|
6594
6957
|
|
|
6595
6958
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/json-scene-loader' {
|
|
6959
|
+
import { Group } from 'three';
|
|
6596
6960
|
import { Element } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
6597
6961
|
import DefaultAssetManager from '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.AssetManager';
|
|
6598
6962
|
import { MappedinMap, MappedinPolygon } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
6599
6963
|
import { MAP_RENDER_MODE } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums';
|
|
6600
6964
|
class JSONSceneLoader {
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6965
|
+
defaultExtrudeSettings: {
|
|
6966
|
+
amount: number;
|
|
6967
|
+
bevelEnabled: boolean;
|
|
6968
|
+
};
|
|
6969
|
+
materials: {};
|
|
6970
|
+
scale: number;
|
|
6971
|
+
assetManager: DefaultAssetManager;
|
|
6972
|
+
setAssetManager<T extends DefaultAssetManager>(am: T): void;
|
|
6973
|
+
overlayHeight: number;
|
|
6974
|
+
/**
|
|
6975
|
+
Takes in either an object containing polygons and generates a 3D scene based
|
|
6976
|
+
on it, or a string URL to fetch those polygons from.
|
|
6977
|
+
**/
|
|
6978
|
+
load(polygons: string | MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE, allLayersVisible?: boolean): Promise<{
|
|
6979
|
+
container: Group<import("three").Object3DEventMap>;
|
|
6980
|
+
elements: (Element | null)[];
|
|
6981
|
+
visibleLayers: Set<unknown>;
|
|
6982
|
+
}>;
|
|
6983
|
+
_build(polygons: MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE,
|
|
6984
|
+
/**
|
|
6985
|
+
* If true, sets all layers to be visible. If false, uses the layer visibility from the mapClass.
|
|
6986
|
+
*/
|
|
6987
|
+
allLayersVisible?: boolean): Promise<{
|
|
6988
|
+
container: Group<import("three").Object3DEventMap>;
|
|
6989
|
+
elements: (Element | null)[];
|
|
6990
|
+
visibleLayers: Set<unknown>;
|
|
6991
|
+
}>;
|
|
6624
6992
|
}
|
|
6625
6993
|
const _default: JSONSceneLoader;
|
|
6626
6994
|
export default _default;
|
|
@@ -7246,7 +7614,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/pub-sub.typed' {
|
|
|
7246
7614
|
* @template EVENT_PAYLOAD - The type of the event payload.
|
|
7247
7615
|
* @template EVENT - The type of the event.
|
|
7248
7616
|
*/
|
|
7249
|
-
export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD> {
|
|
7617
|
+
export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
|
|
7250
7618
|
/**
|
|
7251
7619
|
* @private
|
|
7252
7620
|
* @internal
|
|
@@ -7300,7 +7668,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/pub-sub.typed' {
|
|
|
7300
7668
|
}
|
|
7301
7669
|
|
|
7302
7670
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.MapObject' {
|
|
7303
|
-
import {
|
|
7671
|
+
import { Box3, Mesh, MeshLambertMaterial, Object3D, Vector3, BufferGeometry } from 'three';
|
|
7304
7672
|
import { FrameTaskGroup } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.TaskScheduler';
|
|
7305
7673
|
import { Element, FlippableImage, MappedinMap, TaskScheduler, FlatLabel, SmartTooltip, ICore, InternalFloatingLabel, TCreateThreeDMarkerOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
7306
7674
|
import { PubSub } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/pub-sub';
|
|
@@ -7326,14 +7694,15 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
7326
7694
|
export const SCENE_FROM_LIVE_JSON = false;
|
|
7327
7695
|
type InterpolationFunctionType = (zoomLevel: number) => any;
|
|
7328
7696
|
export class LayerGroup {
|
|
7329
|
-
mergedObjectsGroup:
|
|
7330
|
-
hoverObjectsGroup:
|
|
7697
|
+
mergedObjectsGroup: any;
|
|
7698
|
+
hoverObjectsGroup: any;
|
|
7331
7699
|
objectsByMaterials: Map<MeshLambertMaterial, Element[]>;
|
|
7332
|
-
hoverableMeshChildren: Mesh;
|
|
7700
|
+
hoverableMeshChildren: Mesh<BufferGeometry, MeshLambertMaterial>[];
|
|
7333
7701
|
_isVisible: boolean;
|
|
7334
7702
|
needsUpdate: boolean;
|
|
7335
7703
|
userData: any;
|
|
7336
7704
|
opacity: number;
|
|
7705
|
+
outlineDarkeningFactor: number;
|
|
7337
7706
|
core: ICore;
|
|
7338
7707
|
mapObject: MapObject;
|
|
7339
7708
|
name: string;
|
|
@@ -7351,6 +7720,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
7351
7720
|
constructor(mapObject: MapObject, name: string, layers: string[], visible: boolean);
|
|
7352
7721
|
dispose(): void;
|
|
7353
7722
|
setOpacity(opacity: any): void;
|
|
7723
|
+
setOutlineDarkeningFactor(factor: number): void;
|
|
7354
7724
|
}
|
|
7355
7725
|
export interface LoadOptions {
|
|
7356
7726
|
async?: boolean;
|
|
@@ -7441,8 +7811,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
7441
7811
|
processLayers(allLayers: string[], include?: string[], exclude?: string[]): string[];
|
|
7442
7812
|
processLayerGroup(name?: string, include?: string[], exclude?: string[], visible?: boolean, elements?: Element[], defaultRenderOrder?: number): LayerGroup;
|
|
7443
7813
|
get hoverableMeshChildren(): Mesh[];
|
|
7444
|
-
_objLoadedMerged(object:
|
|
7445
|
-
_objLoaded(object:
|
|
7814
|
+
_objLoadedMerged(object: any): Promise<void>;
|
|
7815
|
+
_objLoaded(object: any): void;
|
|
7446
7816
|
loadPolygonNow(polygonId: string): void;
|
|
7447
7817
|
_addElementToScene(element: Element): void;
|
|
7448
7818
|
/** *
|
|
@@ -7598,13 +7968,13 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
7598
7968
|
}
|
|
7599
7969
|
|
|
7600
7970
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.AssetManager' {
|
|
7601
|
-
import { Texture } from 'three';
|
|
7971
|
+
import { Texture, TextureLoader } from 'three';
|
|
7602
7972
|
import type { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
|
|
7603
7973
|
/**
|
|
7604
7974
|
* @internal
|
|
7605
7975
|
*/
|
|
7606
7976
|
export default class DefaultAssetManager {
|
|
7607
|
-
textureLoader:
|
|
7977
|
+
textureLoader: TextureLoader;
|
|
7608
7978
|
loadMapPolygons(map: MappedinMap): Promise<any>;
|
|
7609
7979
|
loadImage(url: string): Promise<Texture>;
|
|
7610
7980
|
}
|
|
@@ -7830,13 +8200,49 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
7830
8200
|
inactive?: string;
|
|
7831
8201
|
};
|
|
7832
8202
|
/**
|
|
7833
|
-
* Size of bounding box of
|
|
8203
|
+
* Size of bounding box of the icon
|
|
8204
|
+
* @default 10
|
|
7834
8205
|
*/
|
|
7835
8206
|
iconSize?: number;
|
|
7836
8207
|
/**
|
|
7837
|
-
*
|
|
8208
|
+
* Icon to be placed inside the Floating Label marker. Supports SVG or a URL to png or jpeg.
|
|
8209
|
+
* @example
|
|
8210
|
+
* ```ts
|
|
8211
|
+
* // SVG
|
|
8212
|
+
* mapView.FloatingLabels.add(polygon, "Label", {
|
|
8213
|
+
* appearance: {
|
|
8214
|
+
* marker: {
|
|
8215
|
+
* icon: `<svg>...</svg>`,
|
|
8216
|
+
* },
|
|
8217
|
+
* },
|
|
8218
|
+
* });
|
|
8219
|
+
* ```
|
|
8220
|
+
*
|
|
8221
|
+
* @example
|
|
8222
|
+
* ```ts
|
|
8223
|
+
* // Image URL
|
|
8224
|
+
* mapView.FloatingLabels.add(polygon, "Label", {
|
|
8225
|
+
* appearance: {
|
|
8226
|
+
* marker: {
|
|
8227
|
+
* icon: 'https://example.com/icon.png',
|
|
8228
|
+
* },
|
|
8229
|
+
* },
|
|
8230
|
+
* });
|
|
8231
|
+
* ```
|
|
7838
8232
|
*/
|
|
7839
8233
|
icon?: string;
|
|
8234
|
+
/**
|
|
8235
|
+
* How the icon should fit inside the marker. By default, this is not set and the icon will be centered inside the marker.
|
|
8236
|
+
* - `fill` will stretch the icon to fill the marker.
|
|
8237
|
+
* - `cover` will maintain aspect ratio and fill the marker.
|
|
8238
|
+
* - `contain` will maintain aspect ratio and fit the icon inside the marker.
|
|
8239
|
+
*/
|
|
8240
|
+
iconFit?: 'contain' | 'fill' | 'cover';
|
|
8241
|
+
/**
|
|
8242
|
+
* Padding around the icon, in pixels.
|
|
8243
|
+
* @default 4
|
|
8244
|
+
*/
|
|
8245
|
+
iconPadding?: number;
|
|
7840
8246
|
/**
|
|
7841
8247
|
* Defines when the icon becomes visible relative to the current zoom level
|
|
7842
8248
|
* anything below 0 will result in icons never showing up
|
|
@@ -7868,6 +8274,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
7868
8274
|
};
|
|
7869
8275
|
iconSize?: number;
|
|
7870
8276
|
icon?: string;
|
|
8277
|
+
iconFit?: 'fill' | 'cover' | 'contain';
|
|
8278
|
+
iconPadding: number;
|
|
7871
8279
|
iconVisibilityThreshold?: number;
|
|
7872
8280
|
};
|
|
7873
8281
|
};
|
|
@@ -7934,6 +8342,12 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
7934
8342
|
static imagePromiseCache: {
|
|
7935
8343
|
[key in number]?: Promise<HTMLImageElement>;
|
|
7936
8344
|
};
|
|
8345
|
+
static imageDimensionsCache: {
|
|
8346
|
+
[key in number]: {
|
|
8347
|
+
width: number;
|
|
8348
|
+
height: number;
|
|
8349
|
+
};
|
|
8350
|
+
};
|
|
7937
8351
|
get pinCanvasSize(): number;
|
|
7938
8352
|
draw(context: CanvasRenderingContext2D): void;
|
|
7939
8353
|
}
|
|
@@ -8209,6 +8623,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
8209
8623
|
}
|
|
8210
8624
|
|
|
8211
8625
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-manager/MapView.Scene' {
|
|
8626
|
+
import { Object3D } from 'three';
|
|
8212
8627
|
import { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
|
|
8213
8628
|
import type { ICore, SceneManager, TSceneTransitionOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
8214
8629
|
import { MapObject } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
@@ -8217,7 +8632,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-man
|
|
|
8217
8632
|
maps: MappedinMap[];
|
|
8218
8633
|
mapObjectsArray: MapObject[];
|
|
8219
8634
|
transitionOptions: TSceneTransitionOptions | undefined;
|
|
8220
|
-
object:
|
|
8635
|
+
object: Object3D<import("three").Object3DEventMap>;
|
|
8221
8636
|
currentMap: MappedinMap;
|
|
8222
8637
|
mapObjects: Map<MappedinMap['id'], MapObject>;
|
|
8223
8638
|
constructor(maps: MappedinMap[], core: ICore);
|
|
@@ -8228,7 +8643,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-man
|
|
|
8228
8643
|
* Determine each maps position and rotation relative to the refernce map
|
|
8229
8644
|
*/
|
|
8230
8645
|
determineMapPositionAndRotation(map: MappedinMap): {
|
|
8231
|
-
position:
|
|
8646
|
+
position: number[];
|
|
8232
8647
|
scale: number[];
|
|
8233
8648
|
rotation: number[];
|
|
8234
8649
|
};
|
|
@@ -8252,7 +8667,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-man
|
|
|
8252
8667
|
}
|
|
8253
8668
|
|
|
8254
8669
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-manager/MapView.StackScene' {
|
|
8255
|
-
import { Box3,
|
|
8670
|
+
import { Box3, Mesh } from 'three';
|
|
8256
8671
|
import { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
|
|
8257
8672
|
import type { ICore, SceneManager, TSceneTransitionOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
8258
8673
|
import { MapObject, MapViewScene } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
@@ -8260,13 +8675,13 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-man
|
|
|
8260
8675
|
class MapViewStackScene extends MapViewScene {
|
|
8261
8676
|
#private;
|
|
8262
8677
|
containerBoxHelper: Box3;
|
|
8263
|
-
viewportBox:
|
|
8264
|
-
currentMapWrapperMesh:
|
|
8265
|
-
currentMapWrapperBoxHelper:
|
|
8266
|
-
viewportMesh:
|
|
8267
|
-
stackContainerMesh:
|
|
8678
|
+
viewportBox: any;
|
|
8679
|
+
currentMapWrapperMesh: any;
|
|
8680
|
+
currentMapWrapperBoxHelper: any;
|
|
8681
|
+
viewportMesh: any;
|
|
8682
|
+
stackContainerMesh: any;
|
|
8268
8683
|
currentMinTilt: number;
|
|
8269
|
-
constructor(maps: MappedinMap[], core: ICore);
|
|
8684
|
+
constructor(maps: MappedinMap[], core: ICore, mapLabels?: boolean);
|
|
8270
8685
|
lockControls(): void;
|
|
8271
8686
|
unlockControls(): void;
|
|
8272
8687
|
createStackBoundingBox(): void;
|
|
@@ -8293,7 +8708,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-man
|
|
|
8293
8708
|
}
|
|
8294
8709
|
|
|
8295
8710
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.Element' {
|
|
8296
|
-
import { MeshLambertMaterial, Mesh, ExtrudeGeometry, Group } from 'three';
|
|
8711
|
+
import { MeshLambertMaterial, Mesh, ExtrudeGeometry, Vector3, Texture, Group } from 'three';
|
|
8297
8712
|
import { PubSub } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/pub-sub';
|
|
8298
8713
|
import { AssetManager, MappedinMap, MappedinPolygon } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
8299
8714
|
import { MAP_RENDER_MODE } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums';
|
|
@@ -8304,29 +8719,25 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
8304
8719
|
visible: boolean;
|
|
8305
8720
|
mode: MAP_RENDER_MODE;
|
|
8306
8721
|
static defaultMaterial: MeshLambertMaterial;
|
|
8307
|
-
static hoverMeshMaterial:
|
|
8722
|
+
static hoverMeshMaterial: MeshLambertMaterial;
|
|
8308
8723
|
assetManager: AssetManager;
|
|
8309
8724
|
imageVisible: boolean;
|
|
8310
8725
|
labelVisible: boolean;
|
|
8311
|
-
boundingBox: {
|
|
8312
|
-
min: {
|
|
8313
|
-
x: number;
|
|
8314
|
-
y: number;
|
|
8315
|
-
z: number;
|
|
8316
|
-
};
|
|
8317
|
-
max: {
|
|
8318
|
-
x: number;
|
|
8319
|
-
y: number;
|
|
8320
|
-
z: number;
|
|
8321
|
-
};
|
|
8322
|
-
};
|
|
8323
8726
|
polygonHeight: number;
|
|
8324
8727
|
geometry: ExtrudeGeometry;
|
|
8325
8728
|
mesh: Mesh;
|
|
8326
8729
|
material: MeshLambertMaterial | MeshLambertMaterial[];
|
|
8327
8730
|
labelMesh?: Mesh;
|
|
8328
8731
|
imageMesh?: Mesh;
|
|
8732
|
+
/**
|
|
8733
|
+
* For the time being we indicate inflated walls so they don't add to ray casting. Since these are walls it's a good optimization
|
|
8734
|
+
*/
|
|
8735
|
+
isInflated: boolean;
|
|
8329
8736
|
sortScore: number | null;
|
|
8737
|
+
boundingBox?: {
|
|
8738
|
+
min: Vector3;
|
|
8739
|
+
max: Vector3;
|
|
8740
|
+
};
|
|
8330
8741
|
static materials: {
|
|
8331
8742
|
[key in string]: MeshLambertMaterial | MeshLambertMaterial[];
|
|
8332
8743
|
};
|
|
@@ -8342,20 +8753,13 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
8342
8753
|
x: number;
|
|
8343
8754
|
y: number;
|
|
8344
8755
|
};
|
|
8345
|
-
static _makeFromCoords(className: any, coords: any, mapClass: any): any;
|
|
8756
|
+
static _makeFromCoords(className: any, coords: any, mapClass: any, element: any): any;
|
|
8757
|
+
static _inflate(coords: any, width: any): any;
|
|
8346
8758
|
static _setPolygonDefaults(poly: any): any;
|
|
8347
8759
|
constructor(poly: MappedinPolygon, mapClass: MappedinMap, container: Group, assetManager: any, mapLoadingStrategy?: MAP_RENDER_MODE);
|
|
8348
8760
|
getBoundingBox(): {
|
|
8349
|
-
min:
|
|
8350
|
-
|
|
8351
|
-
y: number;
|
|
8352
|
-
z: number;
|
|
8353
|
-
};
|
|
8354
|
-
max: {
|
|
8355
|
-
x: number;
|
|
8356
|
-
y: number;
|
|
8357
|
-
z: number;
|
|
8358
|
-
};
|
|
8761
|
+
min: Vector3;
|
|
8762
|
+
max: Vector3;
|
|
8359
8763
|
};
|
|
8360
8764
|
load(): Promise<this>;
|
|
8361
8765
|
_addLabel(poly: MappedinPolygon, mapClass: MappedinMap): void;
|
|
@@ -8427,7 +8831,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-man
|
|
|
8427
8831
|
}
|
|
8428
8832
|
|
|
8429
8833
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-manager/dynamic-focus-scene-manager/dynamic-focus-scene' {
|
|
8430
|
-
import { Object3D
|
|
8834
|
+
import { Object3D } from 'three';
|
|
8431
8835
|
import { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
|
|
8432
8836
|
import type { ICore, MapObject } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
8433
8837
|
import { Building } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
@@ -8435,10 +8839,10 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-man
|
|
|
8435
8839
|
class DynamicFocusScene {
|
|
8436
8840
|
buildings: Building[];
|
|
8437
8841
|
object: Object3D;
|
|
8438
|
-
panBounds:
|
|
8842
|
+
panBounds: any;
|
|
8439
8843
|
loaded: boolean;
|
|
8440
8844
|
baseMapObject: MapObject;
|
|
8441
|
-
raycasters:
|
|
8845
|
+
raycasters: any;
|
|
8442
8846
|
baseMap: MappedinMap;
|
|
8443
8847
|
options: {
|
|
8444
8848
|
indoorsFullyVisibleZoomLevel: number;
|
|
@@ -8473,6 +8877,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-man
|
|
|
8473
8877
|
}
|
|
8474
8878
|
|
|
8475
8879
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/PathsController' {
|
|
8880
|
+
import { Group } from 'three';
|
|
8476
8881
|
import { MappedinNode, MappedinCoordinate } from '@mappedin/mappedin-js/packages/get-venue';
|
|
8477
8882
|
import type { ICore, TPathOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
8478
8883
|
import { ANIMATION_TWEENS } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
@@ -8553,7 +8958,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
8553
8958
|
path: Path;
|
|
8554
8959
|
internalPath: InternalPath;
|
|
8555
8960
|
}>;
|
|
8556
|
-
connectionsPathMeshes:
|
|
8961
|
+
connectionsPathMeshes: Group<import("three").Object3DEventMap>;
|
|
8557
8962
|
getPathLength(path: any): number;
|
|
8558
8963
|
/**
|
|
8559
8964
|
* Draws path in 3D space
|
|
@@ -8674,8 +9079,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
8674
9079
|
}
|
|
8675
9080
|
|
|
8676
9081
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/FlatLabelsController' {
|
|
8677
|
-
import { TAddFlatLabelOptions, TFlatLabelAllLocationsOptions, TFlatLabelAppearance, ICore } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
8678
|
-
import { FlatLabel } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
9082
|
+
import { TAddFlatLabelOptions, TFlatLabelAllLocationsOptions, TFlatLabelAppearance, ICore, FlatLabel } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
8679
9083
|
import { MappedinPolygon } from '@mappedin/mappedin-js/packages/get-venue';
|
|
8680
9084
|
export const LABEL_ALL_LOCATIONS_WARNING = "Adding or removing individual labels after calling labelAllLocations() may cause unexpected behaviour. We recommend adding all labels individually if more specific control is desired. https://developer.mappedin.com/web-sdk-api/v5/latest/classes/flatlabels#add";
|
|
8681
9085
|
export type FlatLabelRenderObject = TAddFlatLabelOptions & {
|
|
@@ -8940,15 +9344,15 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/blue-dot
|
|
|
8940
9344
|
}): void;
|
|
8941
9345
|
blueDots: {
|
|
8942
9346
|
handle: any;
|
|
8943
|
-
radius:
|
|
8944
|
-
dotObject:
|
|
8945
|
-
bearing: any
|
|
9347
|
+
radius: import("three").Mesh<import("three").CylinderGeometry, import("three").MeshBasicMaterial, import("three").Object3DEventMap> | undefined;
|
|
9348
|
+
dotObject: import("three").Object3D<import("three").Object3DEventMap>;
|
|
9349
|
+
bearing: import("three").Mesh<import("three").ExtrudeGeometry, any, import("three").Object3DEventMap>;
|
|
8946
9350
|
}[] | undefined;
|
|
8947
9351
|
positionTween: any;
|
|
8948
9352
|
currentPositionLatLon: any;
|
|
8949
9353
|
animateBearing(fromBearing: any, toBearing: any): void;
|
|
8950
9354
|
setBearing(bearing: any): void;
|
|
8951
|
-
getBlueDotForMap(mapOrMapId: any):
|
|
9355
|
+
getBlueDotForMap(mapOrMapId: any): import("three").Object3D<import("three").Object3DEventMap> | undefined;
|
|
8952
9356
|
/**
|
|
8953
9357
|
* Remove the 3D blue dot from the maps.
|
|
8954
9358
|
*
|
|
@@ -9124,73 +9528,76 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
9124
9528
|
import type { ICore, MappedinPolygon, Collider } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
9125
9529
|
import { BlueDotManager, Path } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
9126
9530
|
class EventSystem {
|
|
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
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9531
|
+
core: ICore;
|
|
9532
|
+
blueDotManager?: BlueDotManager;
|
|
9533
|
+
rendererDomElement: any;
|
|
9534
|
+
currentHover: string | null;
|
|
9535
|
+
hoverLabel: any;
|
|
9536
|
+
hoverColor: Color;
|
|
9537
|
+
options: {
|
|
9538
|
+
disableHover: boolean;
|
|
9539
|
+
};
|
|
9540
|
+
constructor(core: ICore);
|
|
9541
|
+
setBlueDotManager: (blueDotManager: any) => void;
|
|
9542
|
+
touchCount: number;
|
|
9543
|
+
zoomOut(): void;
|
|
9544
|
+
zoomIn(event: any): void;
|
|
9545
|
+
onPointerMove: (event: any) => void;
|
|
9546
|
+
onPointerUp: (event: any) => void;
|
|
9547
|
+
/**
|
|
9548
|
+
* We've confirmed that a map click has occured, so handle that here
|
|
9549
|
+
*/
|
|
9550
|
+
handleMapClick(event: any): void;
|
|
9551
|
+
onPointerDown: (event: any) => void;
|
|
9552
|
+
incrementTouches: (event: any) => void;
|
|
9553
|
+
decrementTouches: (event: any) => void;
|
|
9554
|
+
clearMouse: () => void;
|
|
9555
|
+
getMousePos: (event: any) => {
|
|
9556
|
+
x: any;
|
|
9557
|
+
y: any;
|
|
9558
|
+
};
|
|
9559
|
+
getScaledMousePos: (event: any) => {
|
|
9560
|
+
x: number;
|
|
9561
|
+
y: number;
|
|
9562
|
+
};
|
|
9563
|
+
cursorPos: {
|
|
9564
|
+
x: number;
|
|
9565
|
+
y: number;
|
|
9566
|
+
};
|
|
9567
|
+
mouse: {
|
|
9568
|
+
x: number;
|
|
9569
|
+
y: number;
|
|
9570
|
+
};
|
|
9571
|
+
mouseDownStart: {
|
|
9572
|
+
time: number;
|
|
9573
|
+
clientX: number;
|
|
9574
|
+
clientY: number;
|
|
9575
|
+
};
|
|
9576
|
+
scaledCursorPos: {
|
|
9577
|
+
x: number;
|
|
9578
|
+
y: number;
|
|
9579
|
+
};
|
|
9580
|
+
hasTouched: boolean;
|
|
9581
|
+
calculateMouseCoordinates: (event: any) => void;
|
|
9582
|
+
getMouseRayIntersects: (objects: Object3D | Object3D[]) => import("three").Intersection<Object3D<import("three").Object3DEventMap>>[];
|
|
9583
|
+
detectCollidersUnderMouse: () => Collider[];
|
|
9584
|
+
detectPolygonsUnderMouse: () => string[];
|
|
9585
|
+
detectPathsUnderMouse: () => Path[];
|
|
9586
|
+
detectWatermarkUnderMouse: () => boolean;
|
|
9587
|
+
detectMapsUnderMouse: () => (import("../../internal").MappedinMap | null)[];
|
|
9588
|
+
/**
|
|
9589
|
+
* Gets mouse click position in x y map coordinates
|
|
9590
|
+
*/
|
|
9591
|
+
getMouseMapPosition: () => {
|
|
9592
|
+
x: number;
|
|
9593
|
+
y: number;
|
|
9594
|
+
};
|
|
9595
|
+
checkMouseIntersectsBlueDot: () => boolean;
|
|
9596
|
+
doHoverEffect: () => void;
|
|
9597
|
+
onPolygonHoverOut: (polygonId: string) => false | undefined;
|
|
9598
|
+
onPolygonHoverOver: (polygon: MappedinPolygon | string) => false | undefined;
|
|
9599
|
+
setHoverColor: (color: string) => void;
|
|
9600
|
+
destroy(): void;
|
|
9194
9601
|
}
|
|
9195
9602
|
export default EventSystem;
|
|
9196
9603
|
}
|
|
@@ -9206,7 +9613,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
9206
9613
|
scene: any;
|
|
9207
9614
|
getPolygonMeshFromId: any;
|
|
9208
9615
|
tryRendering: any;
|
|
9209
|
-
stencilSheet:
|
|
9616
|
+
stencilSheet: Mesh<PlaneGeometry, ShaderMaterial, import("three").Object3DEventMap> | null;
|
|
9210
9617
|
polygonsMarkedAsClosed: {};
|
|
9211
9618
|
onMapChanged(map: any): void;
|
|
9212
9619
|
currentMap: any;
|
|
@@ -9215,17 +9622,20 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
9215
9622
|
markPolygonAsOpen(polygonId: any): void;
|
|
9216
9623
|
markAllPolygonsAsOpen(): void;
|
|
9217
9624
|
}
|
|
9625
|
+
import { PlaneGeometry } from 'three';
|
|
9626
|
+
import { ShaderMaterial } from 'three';
|
|
9627
|
+
import { Mesh } from 'three';
|
|
9218
9628
|
}
|
|
9219
9629
|
|
|
9220
9630
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.BinaryAssetManager' {
|
|
9221
|
-
import { Texture } from 'three';
|
|
9631
|
+
import { Texture, TextureLoader } from 'three';
|
|
9222
9632
|
/**
|
|
9223
9633
|
* This asset manager is used when loading a venue from MVF.
|
|
9224
9634
|
* It requires the MVF's image and model binaries to be passed in upon instantiation.
|
|
9225
9635
|
* This allows delaying the creation of Blobs and Object URLs until loading the map.
|
|
9226
9636
|
*/
|
|
9227
9637
|
export default class BinaryAssetManager {
|
|
9228
|
-
textureLoader:
|
|
9638
|
+
textureLoader: TextureLoader;
|
|
9229
9639
|
data: Map<string, Uint8Array>;
|
|
9230
9640
|
constructor(data: Map<string, Uint8Array>);
|
|
9231
9641
|
/**
|
|
@@ -9327,12 +9737,14 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
9327
9737
|
import { MappedinDirections, MappedinMap, MappedinNode } from '@mappedin/mappedin-js/packages/get-venue';
|
|
9328
9738
|
import { STACKED_MAPS_STATE, MapViewScene, MapViewStackScene, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
9329
9739
|
import type { ICore, TCameraTransform } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
9740
|
+
import { TStackedMapsOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types';
|
|
9330
9741
|
enum ACTION {
|
|
9331
9742
|
enable = "enable",
|
|
9332
9743
|
disable = "disable",
|
|
9333
9744
|
showOverview = "showOverview",
|
|
9334
9745
|
zoomInToMap = "zoomInToMap",
|
|
9335
|
-
scrollToMap = "scrollToMap"
|
|
9746
|
+
scrollToMap = "scrollToMap",
|
|
9747
|
+
restack = "restack"
|
|
9336
9748
|
}
|
|
9337
9749
|
type TTargetTransitionFunction = ((options: TParams) => () => Promise<void>) | ((options: TParams) => void);
|
|
9338
9750
|
type TParams = {
|
|
@@ -9369,16 +9781,13 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
9369
9781
|
};
|
|
9370
9782
|
class StackedMapsController {
|
|
9371
9783
|
#private;
|
|
9372
|
-
options:
|
|
9373
|
-
verticalDistanceBetweenMaps?: number;
|
|
9374
|
-
};
|
|
9784
|
+
options: TStackedMapsOptions;
|
|
9375
9785
|
enabled: boolean;
|
|
9376
9786
|
stackScene: MapViewStackScene;
|
|
9377
|
-
directions: MappedinDirections | MappedinDirections[];
|
|
9378
9787
|
constructor(core: ICore);
|
|
9379
9788
|
needsUpdate: boolean;
|
|
9380
9789
|
currentState: STACKED_MAPS_STATE;
|
|
9381
|
-
|
|
9790
|
+
mapsInStack: MappedinMap[];
|
|
9382
9791
|
getZoomIntoMapOptions: (params: TParams) => (MapViewScene | {
|
|
9383
9792
|
activeMap: MappedinMap;
|
|
9384
9793
|
focusOn: {
|
|
@@ -9419,22 +9828,33 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
9419
9828
|
};
|
|
9420
9829
|
activeMap: MappedinMap;
|
|
9421
9830
|
})[] | undefined;
|
|
9422
|
-
|
|
9831
|
+
getRestackOptions: (params: TParams) => (MapViewStackScene | {
|
|
9832
|
+
activeMap: MappedinMap;
|
|
9833
|
+
focusOn: {
|
|
9834
|
+
options: {
|
|
9835
|
+
tilt: number;
|
|
9836
|
+
duration: number;
|
|
9837
|
+
};
|
|
9838
|
+
};
|
|
9839
|
+
verticalDistanceBetweenMaps: number | undefined;
|
|
9840
|
+
})[] | undefined;
|
|
9841
|
+
getEnableOptions: () => void;
|
|
9423
9842
|
getShowOverviewTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
|
|
9424
9843
|
getZoomInToMapTransition: (options: any) => () => Promise<void>;
|
|
9425
9844
|
getScrollToMapTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
|
|
9845
|
+
getRestackTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
|
|
9426
9846
|
getDisableTransition: (options: any) => () => Promise<void>;
|
|
9427
9847
|
getEnableTransition: () => () => void;
|
|
9428
9848
|
states: TState;
|
|
9849
|
+
get determineMapStack(): MappedinMap[];
|
|
9429
9850
|
transition(currentState: STACKED_MAPS_STATE, actionName: ACTION): TTargetTransitionFunction[] | void;
|
|
9430
9851
|
exec(transitions: TTargetTransitionFunction[] | void, params: TParams): Promise<void>;
|
|
9431
9852
|
disable: () => Promise<void>;
|
|
9432
|
-
enable: (opts?:
|
|
9433
|
-
|
|
9434
|
-
}) => Promise<void>;
|
|
9435
|
-
get nodesInJourney(): MappedinNode[];
|
|
9853
|
+
enable: (opts?: TStackedMapsOptions) => Promise<void>;
|
|
9854
|
+
get nodesInJourneyOrMap(): any[];
|
|
9436
9855
|
showOverview: () => Promise<void>;
|
|
9437
9856
|
scrollToMap: (map: MappedinMap) => Promise<void>;
|
|
9857
|
+
restack: (options?: TStackedMapsOptions) => Promise<void>;
|
|
9438
9858
|
zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
|
|
9439
9859
|
get currentMap(): MappedinMap;
|
|
9440
9860
|
}
|
|
@@ -9479,9 +9899,9 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
9479
9899
|
onWebGLContextCreationError: any;
|
|
9480
9900
|
onWebGLContextLost: any;
|
|
9481
9901
|
onWebGLContextRestored: any;
|
|
9482
|
-
webGLContextCreationErrorListener:
|
|
9483
|
-
webGLContextLostListener:
|
|
9484
|
-
webGLContextRestoredListener:
|
|
9902
|
+
webGLContextCreationErrorListener: void;
|
|
9903
|
+
webGLContextLostListener: void;
|
|
9904
|
+
webGLContextRestoredListener: void;
|
|
9485
9905
|
shouldConsiderAlpha: any;
|
|
9486
9906
|
antialias: any;
|
|
9487
9907
|
/**
|
|
@@ -9540,7 +9960,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
9540
9960
|
* @param height {number}
|
|
9541
9961
|
*/
|
|
9542
9962
|
setBufferSize(width: number, height: number): void;
|
|
9543
|
-
get backgroundColor():
|
|
9963
|
+
get backgroundColor(): Color | undefined;
|
|
9544
9964
|
get backgroundAlpha(): number | undefined;
|
|
9545
9965
|
/**
|
|
9546
9966
|
* Set the color and opacity that will be drawn behind the scene.
|
|
@@ -9558,7 +9978,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
9558
9978
|
* @param {MapboxOutdoorContext} mapboxOutdoorContext context to draw
|
|
9559
9979
|
*/
|
|
9560
9980
|
setMapboxOutdoorContext(mapboxOutdoorContext: MapboxOutdoorContext): void;
|
|
9561
|
-
domElement():
|
|
9981
|
+
domElement(): HTMLCanvasElement;
|
|
9562
9982
|
isAvailable(): boolean;
|
|
9563
9983
|
disposeOfRenderLists(): void;
|
|
9564
9984
|
reportWebGlContextCreationError(e: any): void;
|
|
@@ -9600,9 +10020,9 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
9600
10020
|
constructor(renderOptions: any, targetWebGLVersion?: number);
|
|
9601
10021
|
options: any;
|
|
9602
10022
|
core: any;
|
|
9603
|
-
renderer:
|
|
10023
|
+
renderer: WebGLRenderer | undefined;
|
|
9604
10024
|
effectComposer: EffectComposer | undefined;
|
|
9605
|
-
backgroundColor:
|
|
10025
|
+
backgroundColor: Color;
|
|
9606
10026
|
backgroundAlpha: number;
|
|
9607
10027
|
mapboxOutdoorContext: any;
|
|
9608
10028
|
/**
|
|
@@ -9666,19 +10086,19 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
9666
10086
|
effectComposer: null;
|
|
9667
10087
|
outdoorsVisible: boolean;
|
|
9668
10088
|
options: any;
|
|
9669
|
-
renderer:
|
|
10089
|
+
renderer: WebGLRenderer | undefined;
|
|
9670
10090
|
core: any;
|
|
9671
10091
|
journeyOpacity: number | undefined;
|
|
9672
|
-
backgroundColor:
|
|
10092
|
+
backgroundColor: Color | undefined;
|
|
9673
10093
|
backgroundAlpha: number | undefined;
|
|
9674
10094
|
mapboxOutdoorContext: any;
|
|
9675
|
-
staticSceneRenderTarget:
|
|
9676
|
-
animatedSceneRenderTarget:
|
|
9677
|
-
alwaysOnTopSceneRenderTarget:
|
|
9678
|
-
outdoorViewRenderTarget:
|
|
10095
|
+
staticSceneRenderTarget: WebGLRenderTarget<Texture> | undefined;
|
|
10096
|
+
animatedSceneRenderTarget: WebGLRenderTarget<Texture> | undefined;
|
|
10097
|
+
alwaysOnTopSceneRenderTarget: WebGLRenderTarget<Texture> | undefined;
|
|
10098
|
+
outdoorViewRenderTarget: WebGLRenderTarget<Texture> | undefined;
|
|
9679
10099
|
populateRenderTarget(renderTarget: any): void;
|
|
9680
10100
|
createOutdoorViewTexture(): void;
|
|
9681
|
-
outdoorViewTexture:
|
|
10101
|
+
outdoorViewTexture: Texture | undefined;
|
|
9682
10102
|
outdoorViewTextureProps: any;
|
|
9683
10103
|
setupEffectComposer(): void;
|
|
9684
10104
|
setOutdoorViewTexture(texture: any): void;
|
|
@@ -9755,7 +10175,14 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
9755
10175
|
toggleOutdoorViewVisiblity(visible: any): void;
|
|
9756
10176
|
}
|
|
9757
10177
|
import { RENDER } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
10178
|
+
import { Scene } from 'three';
|
|
10179
|
+
import { Camera } from 'three';
|
|
10180
|
+
import { Vector2 } from 'three';
|
|
10181
|
+
import { Texture } from 'three';
|
|
10182
|
+
import { Color } from 'three';
|
|
10183
|
+
import { WebGLRenderer } from 'three';
|
|
9758
10184
|
import { EffectComposer } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.EffectComposer';
|
|
10185
|
+
import { WebGLRenderTarget } from 'three';
|
|
9759
10186
|
export {};
|
|
9760
10187
|
}
|
|
9761
10188
|
|
|
@@ -9801,45 +10228,97 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
9801
10228
|
import './OutdoorViewController.scss';
|
|
9802
10229
|
import type { ICore } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
9803
10230
|
import { XOR } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types';
|
|
10231
|
+
/**
|
|
10232
|
+
* Represents the possible positions for map attribution.
|
|
10233
|
+
*/
|
|
9804
10234
|
export type TAttributionPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
10235
|
+
/**
|
|
10236
|
+
* Defines the options for an Outdoor View when initialized with headers for authentication.
|
|
10237
|
+
*/
|
|
10238
|
+
export type TOutdoorViewOptionsWithHeaders = {
|
|
10239
|
+
/**
|
|
10240
|
+
* The URL to the map style file.
|
|
10241
|
+
* @see https://github.com/maplibre/maplibre-style-spec/
|
|
10242
|
+
*/
|
|
10243
|
+
url?: string;
|
|
10244
|
+
/**
|
|
10245
|
+
* The position on the map where the attribution should be displayed.
|
|
10246
|
+
* @default 'bottom-right'
|
|
10247
|
+
*/
|
|
10248
|
+
attributionPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
10249
|
+
/**
|
|
10250
|
+
* Custom text or an array of texts to be used for the map attribution.
|
|
10251
|
+
*/
|
|
10252
|
+
customAttribution?: string | string[];
|
|
10253
|
+
/**
|
|
10254
|
+
* An object containing HTTP headers for authentication purposes.
|
|
10255
|
+
* */
|
|
10256
|
+
headers: {
|
|
10257
|
+
[key: string]: string | null;
|
|
10258
|
+
};
|
|
9812
10259
|
};
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
10260
|
+
/**
|
|
10261
|
+
* Defines the options for an Outdoor View when initialized with a URL for authentication.
|
|
10262
|
+
*/
|
|
10263
|
+
export type TOutdoorViewOptionsWithAuthURL = {
|
|
10264
|
+
/**
|
|
10265
|
+
* The URL to the map style file.
|
|
10266
|
+
* @see https://github.com/maplibre/maplibre-style-spec/
|
|
10267
|
+
*/
|
|
10268
|
+
url?: string;
|
|
10269
|
+
/**
|
|
10270
|
+
* The URL to obtain an authentication token.
|
|
10271
|
+
*/
|
|
10272
|
+
authURL?: string;
|
|
10273
|
+
/**
|
|
10274
|
+
* Custom text or an array of texts to be used for the map attribution.
|
|
10275
|
+
*/
|
|
10276
|
+
customAttribution?: string | string[];
|
|
10277
|
+
/**
|
|
10278
|
+
* The position on the map where the attribution should be displayed.
|
|
10279
|
+
* @default 'bottom-right'
|
|
10280
|
+
*/
|
|
10281
|
+
attributionPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
9818
10282
|
};
|
|
9819
|
-
|
|
10283
|
+
/**
|
|
10284
|
+
* Defines the options for initializing an Outdoor View.
|
|
10285
|
+
* This is a union type that requires exclusive or logic,
|
|
10286
|
+
* ensuring that an instance can either have headers or
|
|
10287
|
+
* an authentication URL, but not both.
|
|
10288
|
+
*
|
|
10289
|
+
* Note: It isn't permitted to use `.headers` and `.authURL` options simultaneously.
|
|
10290
|
+
*
|
|
10291
|
+
* @property {string} [url] - The URL to the map style file.
|
|
10292
|
+
* @property {TAttributionPosition} [attributionPosition='bottom-right'] - The position on the map where the attribution should be displayed.
|
|
10293
|
+
* @property {string | string[]} [customAttribution] - Custom text or an array of texts to be used for the map attribution.
|
|
10294
|
+
* @property {Object.<string, string | null>} [headers] - An object containing HTTP headers for authentication purposes. It isn't permitted to use `.headers` and `.authURL` options simultaneously.
|
|
10295
|
+
* @property {string} [authURL] - The URL to obtain an authentication token. It isn't permitted to use `.headers` and `.authURL` options simultaneously.
|
|
10296
|
+
* @interface
|
|
10297
|
+
*/
|
|
10298
|
+
export type TOutdoorViewOptions = XOR<TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL>;
|
|
9820
10299
|
class OutdoorViewController {
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
|
|
10300
|
+
_attribution: any;
|
|
10301
|
+
core: ICore;
|
|
10302
|
+
map: any;
|
|
10303
|
+
enabled: boolean;
|
|
10304
|
+
hidden: boolean;
|
|
10305
|
+
url: string;
|
|
10306
|
+
authURL: string;
|
|
10307
|
+
headers?: TOutdoorViewOptions['headers'];
|
|
10308
|
+
customAttribution?: string | string[];
|
|
10309
|
+
attributionPosition?: TAttributionPosition;
|
|
10310
|
+
loaded: boolean;
|
|
10311
|
+
constructor(core: ICore, options?: TOutdoorViewOptions);
|
|
10312
|
+
module: any;
|
|
10313
|
+
load(): Promise<void>;
|
|
10314
|
+
get attributions(): any;
|
|
10315
|
+
hide(): void;
|
|
10316
|
+
show(): void;
|
|
10317
|
+
resize(): void;
|
|
10318
|
+
getRequestHeaders: () => Promise<TOutdoorViewOptions['headers']>;
|
|
10319
|
+
render(): void;
|
|
10320
|
+
setStyle(style: any): void;
|
|
10321
|
+
setAttributionPosition(position: TAttributionPosition): void;
|
|
9843
10322
|
}
|
|
9844
10323
|
export default OutdoorViewController;
|
|
9845
10324
|
}
|
|
@@ -9867,7 +10346,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
9867
10346
|
/**
|
|
9868
10347
|
* Exports the current scene as a GLTF file.
|
|
9869
10348
|
*/
|
|
9870
|
-
getCurrentSceneGLTF(userOptions: TGLTFExportOptions)
|
|
10349
|
+
getCurrentSceneGLTF: (userOptions: TGLTFExportOptions) => Promise<Blob>;
|
|
9871
10350
|
}
|
|
9872
10351
|
}
|
|
9873
10352
|
|
|
@@ -9891,6 +10370,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
9891
10370
|
*/
|
|
9892
10371
|
getVisibleLayersForLoadedMap(map: MappedinMap): string[] | undefined;
|
|
9893
10372
|
addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void>;
|
|
10373
|
+
removeGeoJSONLayer(layerName: string): Promise<void>;
|
|
9894
10374
|
}
|
|
9895
10375
|
export default LayerController;
|
|
9896
10376
|
}
|
|
@@ -9970,7 +10450,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
9970
10450
|
map: MappedinMap | null;
|
|
9971
10451
|
bearing: any;
|
|
9972
10452
|
nearestNode: any;
|
|
9973
|
-
|
|
10453
|
+
hasEverReceivedFloorLevel: boolean;
|
|
9974
10454
|
};
|
|
9975
10455
|
export interface IBlueDotCore extends IPubSub {
|
|
9976
10456
|
positionUpdater: IPositionUpdater | null;
|
|
@@ -9986,6 +10466,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
9986
10466
|
Whether blue dot should be allowed with missing floor level information.
|
|
9987
10467
|
*/
|
|
9988
10468
|
forceBlueDot: boolean;
|
|
10469
|
+
/** Whether we have received floorLevel data and are on a floorLevel supported device */
|
|
10470
|
+
hasEverReceivedFloorLevel: boolean;
|
|
9989
10471
|
/**
|
|
9990
10472
|
The state machine for the current state of the blue dot.
|
|
9991
10473
|
*/
|
|
@@ -10096,158 +10578,9 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
10096
10578
|
}
|
|
10097
10579
|
|
|
10098
10580
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils' {
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
/**
|
|
10103
|
-
* Utils function listing
|
|
10104
|
-
*
|
|
10105
|
-
* - scrubMaterial
|
|
10106
|
-
* - getObjectID
|
|
10107
|
-
* - getObject
|
|
10108
|
-
* - getBoundingBox
|
|
10109
|
-
* - getBiggestBoundingBox
|
|
10110
|
-
* - upackBoundingBox
|
|
10111
|
-
* - getMapScale
|
|
10112
|
-
* - throttle -> taken from lodash.js
|
|
10113
|
-
* - getProjectionScaleFactor
|
|
10114
|
-
* - getZoom
|
|
10115
|
-
*/
|
|
10116
|
-
export function isGatewayKey(key: string): boolean;
|
|
10117
|
-
export function getCombinedBoundingBox(objects: Object3D[]): Box3;
|
|
10118
|
-
export function getMapsBoundingBox(maps: MapObject[], mapPadding: number): Box3;
|
|
10119
|
-
export function scrubMaterial(material: Material): void;
|
|
10120
|
-
/**
|
|
10121
|
-
* Takes a Mappedin Object or id and returns the ID, so our functions can take bottomRight
|
|
10122
|
-
* @template T extends string | {id: string}
|
|
10123
|
-
* @param {T} object - input can be object containing id or the id itself
|
|
10124
|
-
* @return {string}
|
|
10125
|
-
*/
|
|
10126
|
-
export function getObjectId(object: any): string;
|
|
10127
|
-
/**
|
|
10128
|
-
* Takes a Mappedin object or ID and the array to look in and retuns the Object, so our functions can take both
|
|
10129
|
-
*/
|
|
10130
|
-
export function getObject<K extends {
|
|
10131
|
-
id: string;
|
|
10132
|
-
}, T extends K | string>(obj: T, array: K[] | undefined): K | undefined;
|
|
10133
|
-
export function getBoundingBox(object: Object3D): Box3;
|
|
10134
|
-
/**
|
|
10135
|
-
* Function pushes the items of the second array onto the first array (inplace).
|
|
10136
|
-
* @template T
|
|
10137
|
-
* @param {Array.<T>} arr1 - base array
|
|
10138
|
-
* @param {Array.<T>} arr2 - array which items will be pushed to arr1
|
|
10139
|
-
*/
|
|
10140
|
-
export function appendItems<T>(arr1: T[], arr2: T[]): void;
|
|
10141
|
-
export function getBiggestBoundingBox(objects: Object3D[]): {
|
|
10142
|
-
min: any;
|
|
10143
|
-
max: any;
|
|
10144
|
-
};
|
|
10145
|
-
export function unpackBoundingBox(boundingBox: Box3): Vector3[];
|
|
10146
|
-
export function getMapScale(map: MappedinMap): number;
|
|
10147
|
-
export function getNorth(map: MappedinMap): number;
|
|
10148
|
-
export function throttle<T>(func: () => void, wait: number, options?: any): () => void;
|
|
10149
|
-
export function debounce<T>(func: () => void, wait: number, immediate?: boolean): () => void;
|
|
10150
|
-
export function flatten(list: any[]): any[];
|
|
10151
|
-
export function uniq(arr: any[]): any[];
|
|
10152
|
-
export function toStyleString(styles: Record<string, string>): string;
|
|
10153
|
-
/**
|
|
10154
|
-
/* getProjectionScaleFactor()
|
|
10155
|
-
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
10156
|
-
/*
|
|
10157
|
-
* R
|
|
10158
|
-
* /|
|
|
10159
|
-
* C : Camera / |
|
|
10160
|
-
* PQ : Projection Plane / |
|
|
10161
|
-
* OR : Origin / |
|
|
10162
|
-
* F : FOV / |
|
|
10163
|
-
* Q / |
|
|
10164
|
-
* /| |
|
|
10165
|
-
* / | |
|
|
10166
|
-
* / | |
|
|
10167
|
-
* / | |
|
|
10168
|
-
* / | |
|
|
10169
|
-
* / F/2 | |
|
|
10170
|
-
* C ------------P------------ O
|
|
10171
|
-
*
|
|
10172
|
-
*
|
|
10173
|
-
* ProjectionScaleFactor = ( OR / PQ )
|
|
10174
|
-
* PQ = canvasHeight / 2
|
|
10175
|
-
* CQ = zoom
|
|
10176
|
-
*
|
|
10177
|
-
* OR / C0 = tan(F/2)
|
|
10178
|
-
* so OR = CO * tan(F/2)
|
|
10179
|
-
*/
|
|
10180
|
-
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
10181
|
-
/** getZoom
|
|
10182
|
-
*
|
|
10183
|
-
* C - Camera, OP -- picture plane (canvas), S - origin,
|
|
10184
|
-
* QR - front side of maps Bounding Box, F: FOV
|
|
10185
|
-
*
|
|
10186
|
-
* Z-axis
|
|
10187
|
-
* R_____|______
|
|
10188
|
-
* /| | |
|
|
10189
|
-
* / | | |
|
|
10190
|
-
* P/ | | | maps BB
|
|
10191
|
-
* /| | | |
|
|
10192
|
-
* / | | | |
|
|
10193
|
-
* / | | | |
|
|
10194
|
-
* / F |E |T |S |
|
|
10195
|
-
* C /--------|-----|-----|-----|------ orthogonal to Y axis, midpoint of focus maps
|
|
10196
|
-
* \ | | | |
|
|
10197
|
-
* \ | | | |
|
|
10198
|
-
* \ | | | |
|
|
10199
|
-
* \ | | | |
|
|
10200
|
-
* \| | | |
|
|
10201
|
-
* O\ | | |
|
|
10202
|
-
* \ | | |
|
|
10203
|
-
* \|_____|_____|
|
|
10204
|
-
* Q
|
|
10205
|
-
*
|
|
10206
|
-
*
|
|
10207
|
-
* We want to get CS, which is the camera zoom
|
|
10208
|
-
*
|
|
10209
|
-
*/
|
|
10210
|
-
export function getZoom(focusBox: Box3, focusBoxHeight: number, FOV: number): number;
|
|
10211
|
-
interface CalculateTwoDProjectionsParams {
|
|
10212
|
-
maps: MapObject[];
|
|
10213
|
-
width: number;
|
|
10214
|
-
height: number;
|
|
10215
|
-
camera: Camera;
|
|
10216
|
-
}
|
|
10217
|
-
export function calculateTwoDProjections({ maps, width, height, camera }: CalculateTwoDProjectionsParams): {
|
|
10218
|
-
min: {
|
|
10219
|
-
x: number;
|
|
10220
|
-
y: number;
|
|
10221
|
-
};
|
|
10222
|
-
max: {
|
|
10223
|
-
x: number;
|
|
10224
|
-
y: number;
|
|
10225
|
-
};
|
|
10226
|
-
}[];
|
|
10227
|
-
export function splitLine(startNode: Vector3, endNode: Vector3, segments: number): Vector3[];
|
|
10228
|
-
export function isObject(item: any): boolean;
|
|
10229
|
-
export const determineStartingMap: (venue: Mappedin, options: TMapViewOptions) => MappedinMap;
|
|
10230
|
-
export function cyrb53(str: string, seed?: number): number;
|
|
10231
|
-
export function addMarginMultiplierToBoundingBox(bbox: Box3, multiplier: number): Box3;
|
|
10232
|
-
export function tweenPromise({ from, to, duration, easing, delay, onUpdate, onStart, onComplete, }: {
|
|
10233
|
-
from: any;
|
|
10234
|
-
to: any;
|
|
10235
|
-
duration?: number | undefined;
|
|
10236
|
-
easing?: any;
|
|
10237
|
-
delay?: number | undefined;
|
|
10238
|
-
onUpdate?: ((_: any) => void) | undefined;
|
|
10239
|
-
onStart?: (() => void) | undefined;
|
|
10240
|
-
onComplete?: (() => void) | undefined;
|
|
10241
|
-
}): {
|
|
10242
|
-
start(core: any): Promise<void>;
|
|
10243
|
-
};
|
|
10244
|
-
export const linearEase: (t: number) => number;
|
|
10245
|
-
export const quadEaseIn: (t: number) => number;
|
|
10246
|
-
export const quadEaseOut: (t: number) => number;
|
|
10247
|
-
export function interpolate(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number, easeFunc?: (t: number) => number): number;
|
|
10248
|
-
export function interpolateMulti(value: number, inputRange: number[], outputRange: number[], easeFunc?: (t: number) => number): number;
|
|
10249
|
-
export function checkWritableBeforeWrite(obj: any, key: string, value: any): void;
|
|
10250
|
-
export {};
|
|
10581
|
+
export * from '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/utils';
|
|
10582
|
+
export { shouldDisableOffscreenCanvas } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/browser';
|
|
10583
|
+
export { throttle, debounce } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/async';
|
|
10251
10584
|
}
|
|
10252
10585
|
|
|
10253
10586
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.MapManager' {
|
|
@@ -10256,7 +10589,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
10256
10589
|
constructor(polygonMeshesById: any, renderer: any, core: any, taskScheduler: any, loadOptions?: {});
|
|
10257
10590
|
mapObjects: Map<any, any>;
|
|
10258
10591
|
currentMap: undefined;
|
|
10259
|
-
object:
|
|
10592
|
+
object: Object3D<import("three").Object3DEventMap>;
|
|
10260
10593
|
_showCount: number;
|
|
10261
10594
|
_mapObjectsSortedByElevationDirty: boolean;
|
|
10262
10595
|
expanded: boolean;
|
|
@@ -10364,6 +10697,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
10364
10697
|
resize(): void;
|
|
10365
10698
|
}
|
|
10366
10699
|
import { PubSub } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/pub-sub';
|
|
10700
|
+
import { Object3D } from 'three';
|
|
10701
|
+
import { Vector3 } from 'three';
|
|
10367
10702
|
import MultiFloorView from '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.MultiFloorView';
|
|
10368
10703
|
}
|
|
10369
10704
|
|
|
@@ -11365,10 +11700,8 @@ declare module '@mappedin/mappedin-js/packages/common/Mappedin.Logger' {
|
|
|
11365
11700
|
}
|
|
11366
11701
|
|
|
11367
11702
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/outdoor-context/Mappedin.TileManager' {
|
|
11368
|
-
import { Box3 } from 'three';
|
|
11369
11703
|
import type { ICore } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
11370
11704
|
import { MappedinCoordinate, MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
|
|
11371
|
-
import Object3D from '@mappedin/mappedin-js/packages/legacy-renderer/internal/object3D.destroy';
|
|
11372
11705
|
import { Tile } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/outdoor-context/Mappedin.Tile';
|
|
11373
11706
|
import { IOutdoorContextProvider } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/outdoor-context/Outdoor-Context.provider';
|
|
11374
11707
|
/**
|
|
@@ -11411,9 +11744,9 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/outdoor-
|
|
|
11411
11744
|
fadeIn(): Promise<void>;
|
|
11412
11745
|
fetchTiles(): void;
|
|
11413
11746
|
zoomLevelToAltitudeMap: number[][];
|
|
11414
|
-
plane:
|
|
11747
|
+
plane: any;
|
|
11415
11748
|
tiles: Tile[];
|
|
11416
|
-
maskMeshBoundingBox
|
|
11749
|
+
maskMeshBoundingBox?: any;
|
|
11417
11750
|
fetchTilesForZoomLevel(zoomLevel: number): Promise<void>;
|
|
11418
11751
|
/**
|
|
11419
11752
|
* This function populates a layer of tiles starting from the center clockwise
|
|
@@ -11433,14 +11766,14 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/outdoor-
|
|
|
11433
11766
|
|
|
11434
11767
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core' {
|
|
11435
11768
|
import '../internal/externals/globalThisPolyfill';
|
|
11436
|
-
import { Color, Mesh, PerspectiveCamera, Scene, Vector2 } from 'three';
|
|
11769
|
+
import { Color, Mesh, PerspectiveCamera, Scene, Vector2, Vector3, Raycaster } from 'three';
|
|
11437
11770
|
import '../internal/object3D.destroy';
|
|
11438
11771
|
import type { TGetPolygonsAtCoordinateOptions, TMapViewOptions, TPadding, MappedinPolygon } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
11439
11772
|
import { Renderer, TaskScheduler, MapManager, FlatLabel, SmartCollisionEngine, PubSub, INTERNAL_EVENT, INTERNAL_EVENT_PAYLOAD, MapView, STATE, MapObject, SceneManager, TileManager, PathsController, FloatingLabelsController, FlatLabelsController, PolygonColorsController, MarkersController, PolygonInteractionController, TooltipsController, PolygonStatesController, PolygonImagesController, ThreeDMarkersController, EventSystem, BlueDotController, CameraController, BillboardManager, StackedMapsController, OutdoorViewController, WatermarkController, PolygonHoverColorsController, ExportController, LayerController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
11440
11773
|
import { Mappedin as IMappedin, MappedinCoordinate, MappedinMap, MappedinNode } from '@mappedin/mappedin-js/packages/get-venue';
|
|
11441
11774
|
import { E_MAP_CHANGED_REASON } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums';
|
|
11442
11775
|
import type { PerformanceController } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/PerformanceController';
|
|
11443
|
-
export const raycaster:
|
|
11776
|
+
export const raycaster: Raycaster;
|
|
11444
11777
|
let Mappedin: any;
|
|
11445
11778
|
/**
|
|
11446
11779
|
* Some preset orderings for updates.
|
|
@@ -11518,9 +11851,9 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core' {
|
|
|
11518
11851
|
referenceMap: MappedinMap;
|
|
11519
11852
|
currentInteractionEvent: INTERNAL_EVENT | undefined;
|
|
11520
11853
|
resolution: Vector2;
|
|
11521
|
-
cameraParameters:
|
|
11854
|
+
cameraParameters: any;
|
|
11522
11855
|
controls: typeof Mappedin.CameraControls;
|
|
11523
|
-
|
|
11856
|
+
worldPlane: Mesh;
|
|
11524
11857
|
canvasWidth: number;
|
|
11525
11858
|
canvasHeight: number;
|
|
11526
11859
|
cachedPadding: TPadding;
|
|
@@ -11572,17 +11905,17 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core' {
|
|
|
11572
11905
|
* @param longitude {Number} Longitude of position
|
|
11573
11906
|
* @returns A position you can use with a Marker either initially or to update later when the user (for example) moves
|
|
11574
11907
|
*/
|
|
11575
|
-
getPositionLatLon: (lat: number, lon: number, map?: string | MappedinMap | null) =>
|
|
11908
|
+
getPositionLatLon: (lat: number, lon: number, map?: string | MappedinMap | null) => Vector3 | undefined;
|
|
11576
11909
|
lockNorth: (element: any, offset?: number) => void;
|
|
11577
11910
|
unlockNorth: (element: any) => void;
|
|
11578
|
-
convertTo3DMapPosition: (nodeOrCoordinate: MappedinNode | MappedinCoordinate) =>
|
|
11911
|
+
convertTo3DMapPosition: (nodeOrCoordinate: MappedinNode | MappedinCoordinate) => Vector3 | undefined;
|
|
11579
11912
|
/**
|
|
11580
11913
|
* Converts a 2D x,y screen position into a 3D MappedinCoordinate using projection
|
|
11581
11914
|
*/
|
|
11582
11915
|
convertScreenCoordinateToMapCoordinate: (x: number, y: number, map: MappedinMap) => MappedinCoordinate | undefined;
|
|
11583
11916
|
convert3DMapPositionToCoordinate: (coord: any, mapClass?: MappedinMap | null | undefined) => MappedinCoordinate | undefined;
|
|
11584
|
-
getPositionPolygon: (polygon: any) =>
|
|
11585
|
-
getPositionNode: (node: any) =>
|
|
11917
|
+
getPositionPolygon: (polygon: any) => Vector3 | null;
|
|
11918
|
+
getPositionNode: (node: any) => Vector3 | undefined;
|
|
11586
11919
|
hideAllLabels: () => void;
|
|
11587
11920
|
setBackgroundColor: (color: any, alpha: any) => void;
|
|
11588
11921
|
setSize: (width: any, height: any) => void;
|
|
@@ -11615,8 +11948,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core' {
|
|
|
11615
11948
|
mapSetResolved: any;
|
|
11616
11949
|
setMap: (map: string | MappedinMap) => Promise<null>;
|
|
11617
11950
|
setMapWithReason: (map: string | MappedinMap, reason: E_MAP_CHANGED_REASON) => Promise<null>;
|
|
11618
|
-
getPolygonsAtScreenCoordinate: (x: number, y: number, options?: TGetPolygonsAtCoordinateOptions) =>
|
|
11619
|
-
getPolygonsAtCoordinate: (coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions) =>
|
|
11951
|
+
getPolygonsAtScreenCoordinate: (x: number, y: number, options?: TGetPolygonsAtCoordinateOptions) => MappedinPolygon[];
|
|
11952
|
+
getPolygonsAtCoordinate: (coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions) => MappedinPolygon[];
|
|
11620
11953
|
getNearestNodeByScreenCoordinate(x: number, y: number, mapOrMapId?: MappedinMap | MappedinMap['id']): MappedinNode;
|
|
11621
11954
|
/**
|
|
11622
11955
|
* Destroys instance and frees resources
|
|
@@ -11646,6 +11979,10 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinNavigatable' {
|
|
|
11646
11979
|
* Exclude all the vortexes matching the given IDs
|
|
11647
11980
|
*/
|
|
11648
11981
|
excludedVortexIds?: string[];
|
|
11982
|
+
/**
|
|
11983
|
+
* Exclude all the nodes matching the given IDs
|
|
11984
|
+
*/
|
|
11985
|
+
excludedNodeIds?: string[];
|
|
11649
11986
|
/**
|
|
11650
11987
|
* @experimental
|
|
11651
11988
|
* Apply line-of-sight simplifying to directions. This will attempt to remove unnecessary nodes between turns.
|
|
@@ -11952,6 +12289,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinCategory' {
|
|
|
11952
12289
|
*/
|
|
11953
12290
|
get children(): MappedinCategory[];
|
|
11954
12291
|
static hydrate(categories: any, mappedin: Mappedin): MappedinCategory[];
|
|
12292
|
+
static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise<void>;
|
|
11955
12293
|
static fetch(mappedin: Mappedin): Promise<MappedinCategory[]>;
|
|
11956
12294
|
toJSON(): any;
|
|
11957
12295
|
}
|
|
@@ -11988,6 +12326,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinVortex' {
|
|
|
11988
12326
|
weight?: number;
|
|
11989
12327
|
multiplier?: number;
|
|
11990
12328
|
nodes?: string[];
|
|
12329
|
+
filterFlags?: string[];
|
|
11991
12330
|
constructor(data: any);
|
|
11992
12331
|
static hydrate(vortexes: any): MappedinVortex[];
|
|
11993
12332
|
static fetch(mappedin: Mappedin): Promise<MappedinVortex[]>;
|
|
@@ -11999,60 +12338,73 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinVenue' {
|
|
|
11999
12338
|
import type { Mappedin } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
12000
12339
|
import type { TLogo, TOpeningHours } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.API.types';
|
|
12001
12340
|
/**
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12341
|
+
* A {@link MappedinVenue} is a specific place (like a mall) with one or more Maps (typically representing different floors) and Locations (stores, washrooms, elevators, etc).
|
|
12342
|
+
*
|
|
12343
|
+
* A Venue can have more properties such as 'name' and 'slug'. The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Venues. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
|
|
12344
|
+
*
|
|
12345
|
+
* See below for an example a 'things' object with available Venue properties specified:
|
|
12346
|
+
*
|
|
12347
|
+
* things: {
|
|
12348
|
+
* venue: ['slug', 'name', 'language', 'address', 'city', 'state', 'postal', 'telephone', 'latitude', 'longitude', 'website', 'operationHours'],
|
|
12349
|
+
* locations: [],
|
|
12350
|
+
* categories: [],
|
|
12351
|
+
* maps: []
|
|
12352
|
+
* }
|
|
12353
|
+
*
|
|
12354
|
+
*
|
|
12355
|
+
* @class MappedinVenue
|
|
12356
|
+
*/
|
|
12018
12357
|
export class MappedinVenue {
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
name: string;
|
|
12030
|
-
operationHours?: TOpeningHours[];
|
|
12031
|
-
postal: string;
|
|
12032
|
-
slug: string;
|
|
12033
|
-
state: string;
|
|
12034
|
-
telephone: string;
|
|
12035
|
-
tzid: string;
|
|
12036
|
-
tzidOverride: string;
|
|
12037
|
-
utcOffset: string;
|
|
12038
|
-
website: string;
|
|
12039
|
-
secureContentStorage: boolean;
|
|
12040
|
-
defaultLanguage: {
|
|
12041
|
-
code: string;
|
|
12042
|
-
name: string;
|
|
12043
|
-
};
|
|
12044
|
-
languages: {
|
|
12358
|
+
#private;
|
|
12359
|
+
defaultMap: string;
|
|
12360
|
+
address: string;
|
|
12361
|
+
city: string;
|
|
12362
|
+
countrycode: string;
|
|
12363
|
+
externalId: string;
|
|
12364
|
+
id: string;
|
|
12365
|
+
latitude?: number;
|
|
12366
|
+
logo?: TLogo;
|
|
12367
|
+
longitude?: number;
|
|
12045
12368
|
name: string;
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12369
|
+
operationHours?: TOpeningHours[];
|
|
12370
|
+
postal: string;
|
|
12371
|
+
slug: string;
|
|
12372
|
+
state: string;
|
|
12373
|
+
telephone: string;
|
|
12374
|
+
tzid: string;
|
|
12375
|
+
tzidOverride: string;
|
|
12376
|
+
utcOffset: string;
|
|
12377
|
+
website: string;
|
|
12378
|
+
secureContentStorage: boolean;
|
|
12379
|
+
defaultLanguage: {
|
|
12380
|
+
code: string;
|
|
12381
|
+
name: string;
|
|
12382
|
+
};
|
|
12383
|
+
languages: {
|
|
12384
|
+
name: string;
|
|
12385
|
+
code: string;
|
|
12386
|
+
}[];
|
|
12387
|
+
topLocations?: string[];
|
|
12388
|
+
/**
|
|
12389
|
+
* Venue render options provided by the server.
|
|
12390
|
+
*/
|
|
12391
|
+
renderOptions: {
|
|
12392
|
+
/**
|
|
12393
|
+
* Whether the venue should use perspectives to render the map or {@link Mappedin.polygons}.
|
|
12394
|
+
*/
|
|
12395
|
+
useLivePolygons: boolean;
|
|
12396
|
+
/**
|
|
12397
|
+
* Whether the venue should automatically apply {@link TDirectionToOptions} `simplify: { enabled: true }` to all directions.
|
|
12398
|
+
*/
|
|
12399
|
+
simplifyDirections: boolean;
|
|
12400
|
+
};
|
|
12401
|
+
constructor(mappedin: Mappedin, data: any);
|
|
12402
|
+
get metadata(): any;
|
|
12403
|
+
set metadata(value: any);
|
|
12404
|
+
static hydrate(data: any, mappedin: Mappedin): MappedinVenue;
|
|
12405
|
+
static fetch(mappedin: Mappedin): Promise<MappedinVenue>;
|
|
12406
|
+
get isMultiBuilding(): any;
|
|
12407
|
+
toJSON(): any;
|
|
12056
12408
|
}
|
|
12057
12409
|
}
|
|
12058
12410
|
|
|
@@ -12172,6 +12524,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinEvent' {
|
|
|
12172
12524
|
* @internal
|
|
12173
12525
|
*/
|
|
12174
12526
|
static hydrate(events: any, mappedin: Mappedin): MappedinEvent[];
|
|
12527
|
+
static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise<void>;
|
|
12175
12528
|
/**
|
|
12176
12529
|
* @internal
|
|
12177
12530
|
*/
|
|
@@ -12196,6 +12549,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinLocationState'
|
|
|
12196
12549
|
* @internal
|
|
12197
12550
|
*/
|
|
12198
12551
|
static hydrate(locationStates: any): MappedinLocationState[];
|
|
12552
|
+
static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise<void>;
|
|
12199
12553
|
id: string;
|
|
12200
12554
|
name: string;
|
|
12201
12555
|
value: string;
|
|
@@ -12289,6 +12643,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinMap' {
|
|
|
12289
12643
|
*/
|
|
12290
12644
|
getNorth(): any;
|
|
12291
12645
|
static hydrate(maps: any, mappedin: Mappedin): MappedinMap[];
|
|
12646
|
+
static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise<void>;
|
|
12292
12647
|
static fetch(mappedin: Mappedin): Promise<MappedinMap[]>;
|
|
12293
12648
|
get center(): any;
|
|
12294
12649
|
toJSON(): any;
|
|
@@ -12314,18 +12669,19 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinMapGroup' {
|
|
|
12314
12669
|
*/
|
|
12315
12670
|
get maps(): MappedinMap[];
|
|
12316
12671
|
static hydrate(mapGroups: any, mappedin: Mappedin): MappedinMapGroup[];
|
|
12672
|
+
static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise<void>;
|
|
12317
12673
|
static fetch(mappedin: Mappedin): Promise<MappedinMapGroup[]>;
|
|
12318
12674
|
toJSON(): any;
|
|
12319
12675
|
}
|
|
12320
12676
|
}
|
|
12321
12677
|
|
|
12322
12678
|
declare module '@mappedin/mappedin-js/packages/get-venue/utils' {
|
|
12323
|
-
import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
12679
|
+
import type { MergedThings, TGetVenueOptions, TGetVenueOptionsInternal, ThingsOption } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
12324
12680
|
import type { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
12325
12681
|
import { Mappedin, MappedinNavigatable, MappedinNode, MappedinPolygon, MappedinLocation, MappedinCoordinate } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
12326
12682
|
export function isGatewayKey(key: string): boolean;
|
|
12327
12683
|
export function stringifyQuery(query: any, gateway?: boolean): string;
|
|
12328
|
-
export function buildUrl(options: TGetVenueOptionsInternal
|
|
12684
|
+
export function buildUrl(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean): string;
|
|
12329
12685
|
/**
|
|
12330
12686
|
* Make a network request to the Mappedin API to fetch an array of objects.
|
|
12331
12687
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
@@ -12334,7 +12690,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/utils' {
|
|
|
12334
12690
|
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
12335
12691
|
* @returns the result json
|
|
12336
12692
|
*/
|
|
12337
|
-
export function getArray(options: TGetVenueOptionsInternal
|
|
12693
|
+
export function getArray(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean): Promise<any>;
|
|
12338
12694
|
/**
|
|
12339
12695
|
* Make a network request to the Mappedin API to fetch an object.
|
|
12340
12696
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
@@ -12344,21 +12700,21 @@ declare module '@mappedin/mappedin-js/packages/get-venue/utils' {
|
|
|
12344
12700
|
* @param isExpectingArray whether the endpoint returns an array
|
|
12345
12701
|
* @returns the result json
|
|
12346
12702
|
*/
|
|
12347
|
-
export function getObject(options: TGetVenueOptionsInternal
|
|
12703
|
+
export function getObject(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean, isExpectingArray?: boolean): Promise<any>;
|
|
12348
12704
|
/**
|
|
12349
12705
|
* Prepares the request and URL fields to pass into generateAPIRequest
|
|
12350
12706
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
12351
12707
|
* @param url string describing the url corresponding to the client's request
|
|
12352
12708
|
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
12353
12709
|
*/
|
|
12354
|
-
export function constructParamsForRequest(options: TGetVenueOptionsInternal
|
|
12710
|
+
export function constructParamsForRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): {
|
|
12355
12711
|
req: {
|
|
12356
12712
|
method: string;
|
|
12357
12713
|
headers: any;
|
|
12358
12714
|
};
|
|
12359
12715
|
url: string;
|
|
12360
12716
|
};
|
|
12361
|
-
export function generateAPIRequest(options: TGetVenueOptionsInternal
|
|
12717
|
+
export function generateAPIRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): Promise<any>;
|
|
12362
12718
|
export function addToSet(array: any, value: any): void;
|
|
12363
12719
|
export function getDistanceBetweenLatLon([lat1, lon1]: [number, number], [lat2, lon2]: [number, number]): any;
|
|
12364
12720
|
export function getMapScale(map: MappedinMap): any;
|
|
@@ -12392,6 +12748,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/utils' {
|
|
|
12392
12748
|
* @return {MappedinLocation}
|
|
12393
12749
|
*/
|
|
12394
12750
|
export const getPrimaryLocationForPolygon: (polygon: MappedinPolygon | string | undefined, venue: Mappedin) => MappedinLocation | null;
|
|
12751
|
+
export function mergeThings(thingsOption: ThingsOption | undefined): MergedThings;
|
|
12395
12752
|
}
|
|
12396
12753
|
|
|
12397
12754
|
declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.cache' {
|
|
@@ -12440,6 +12797,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.cache' {
|
|
|
12440
12797
|
get polygonsByMapId(): Map<string, MappedinPolygon[]>;
|
|
12441
12798
|
get nodesByMapId(): Map<string, MappedinNode[]>;
|
|
12442
12799
|
findNearestNodeOnMap(mapId: string, coordinate: MappedinCoordinate): MappedinNode;
|
|
12800
|
+
findNodeWithinRadiusOnMap(mapId: string, coordinate: MappedinCoordinate, radius: number): MappedinNode[];
|
|
12443
12801
|
get locationsByMapId(): Map<string, MappedinLocation[]>;
|
|
12444
12802
|
static instances: Map<Mappedin, MappedinCache>;
|
|
12445
12803
|
static create(mappedin: Mappedin): MappedinCache;
|
|
@@ -12546,13 +12904,15 @@ declare module '@mappedin/mappedin-js/packages/navigator/NavigationGraph' {
|
|
|
12546
12904
|
* @param accessible boolean - optional, if true directions will only take accessible route, defaults to false
|
|
12547
12905
|
* @param includedVortexIds set - optional, exclude all the vertexes matching the given IDs
|
|
12548
12906
|
* @param excludedVortexIds set - optional, exclude all the vertexes matching the given IDs
|
|
12907
|
+
* @param excludedNodeIds set - optional, exclude all the nodes matching the given IDs
|
|
12549
12908
|
*/
|
|
12550
|
-
aStar({ originIds, destinationNodeIds, accessible, includedVortexIds, excludedVortexIds, }: {
|
|
12909
|
+
aStar({ originIds, destinationNodeIds, accessible, includedVortexIds, excludedVortexIds, excludedNodeIds, }: {
|
|
12551
12910
|
originIds: string[];
|
|
12552
12911
|
destinationNodeIds: string[];
|
|
12553
12912
|
accessible: boolean;
|
|
12554
12913
|
includedVortexIds?: Set<string>;
|
|
12555
12914
|
excludedVortexIds?: Set<string>;
|
|
12915
|
+
excludedNodeIds?: Set<string>;
|
|
12556
12916
|
}): Edge[];
|
|
12557
12917
|
getDistance(origin: INode, destination: INode): number;
|
|
12558
12918
|
getShortestEuclideanDistance(origin: INode, destinations: INode[]): number;
|
|
@@ -12619,10 +12979,11 @@ declare module '@mappedin/mappedin-js/packages/navigator/Navigator' {
|
|
|
12619
12979
|
* @param includedVortexIds set - optional, exclude all the vertexes matching the given IDs
|
|
12620
12980
|
* @param excludedVortexIds set - optional, exclude all the vertexes matching the given IDs
|
|
12621
12981
|
*/
|
|
12622
|
-
getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt, includedVortexIds, excludedVortexIds, simplify, }: {
|
|
12982
|
+
getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt, includedVortexIds, excludedVortexIds, excludedNodeIds, simplify, }: {
|
|
12623
12983
|
originIds: string[];
|
|
12624
12984
|
includedVortexIds?: Set<string>;
|
|
12625
12985
|
excludedVortexIds?: Set<string>;
|
|
12986
|
+
excludedNodeIds?: Set<string>;
|
|
12626
12987
|
destinationNodeIds: string[];
|
|
12627
12988
|
accessible: boolean;
|
|
12628
12989
|
departFrom?: ILocation;
|
|
@@ -12639,7 +13000,25 @@ declare module '@mappedin/mappedin-js/packages/navigator/Navigator' {
|
|
|
12639
13000
|
}
|
|
12640
13001
|
|
|
12641
13002
|
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/base-object' {
|
|
13003
|
+
import Hyperlink from '@mappedin/mappedin-js/maker/src/map-data-objects/hyperlink';
|
|
13004
|
+
import { Details } from '@mappedin/mvf';
|
|
12642
13005
|
export default abstract class BaseMapData {
|
|
13006
|
+
/**
|
|
13007
|
+
* identity of the map object
|
|
13008
|
+
*/
|
|
13009
|
+
readonly id: string;
|
|
13010
|
+
constructor(id: string, details?: Details);
|
|
13011
|
+
/**
|
|
13012
|
+
* Gets the links associated with this data type.
|
|
13013
|
+
*
|
|
13014
|
+
* @returns {Hyperlink[]} The links associated with this data type
|
|
13015
|
+
*/
|
|
13016
|
+
links: Hyperlink[];
|
|
13017
|
+
}
|
|
13018
|
+
}
|
|
13019
|
+
|
|
13020
|
+
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/base-metadata-object' {
|
|
13021
|
+
export default abstract class BaseMetaData {
|
|
12643
13022
|
/**
|
|
12644
13023
|
* identity of the map object
|
|
12645
13024
|
*/
|
|
@@ -12648,20 +13027,151 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/base-object' {
|
|
|
12648
13027
|
}
|
|
12649
13028
|
}
|
|
12650
13029
|
|
|
13030
|
+
declare module '@mappedin/mappedin-js/maker/src/api-geojson/map-object' {
|
|
13031
|
+
import { ParsedMVF } from '@mappedin/mvf';
|
|
13032
|
+
import { FloorObject } from '@mappedin/mappedin-js/maker/src/api-geojson/floor-object';
|
|
13033
|
+
import { AddLabelOptions } from '@mappedin/core-sdk';
|
|
13034
|
+
import { Position } from '@mappedin/core-sdk';
|
|
13035
|
+
import { TAddMarkerOptions } from '@mappedin/mappedin-js/maker/src';
|
|
13036
|
+
import { Geometry2D, RendererCore } from '@mappedin/core-sdk';
|
|
13037
|
+
export class GeojsonApiMapObject {
|
|
13038
|
+
floors: FloorObject[];
|
|
13039
|
+
currentFloorId: string;
|
|
13040
|
+
renderer: RendererCore;
|
|
13041
|
+
mvf: ParsedMVF;
|
|
13042
|
+
get currentFloor(): FloorObject;
|
|
13043
|
+
setFloor(floorId: string): void;
|
|
13044
|
+
Markers: {
|
|
13045
|
+
add: (coordinate: Position, html: string, opts?: TAddMarkerOptions & {
|
|
13046
|
+
floorId?: string;
|
|
13047
|
+
}) => import("@mappedin/core-sdk").Marker;
|
|
13048
|
+
remove: (_id: string) => void;
|
|
13049
|
+
getContentEl: (id: string) => HTMLDivElement | null;
|
|
13050
|
+
removeAll: () => void;
|
|
13051
|
+
all({ onCreate }: {
|
|
13052
|
+
onCreate: (entity: Geometry2D) => void;
|
|
13053
|
+
}): void;
|
|
13054
|
+
};
|
|
13055
|
+
Labels: {
|
|
13056
|
+
all: ({ onCreate }: {
|
|
13057
|
+
onCreate: (labelId: string | number, text: string) => void;
|
|
13058
|
+
}) => void;
|
|
13059
|
+
add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
|
|
13060
|
+
floorId?: string;
|
|
13061
|
+
}) => {
|
|
13062
|
+
id: string | number;
|
|
13063
|
+
type: 'label';
|
|
13064
|
+
};
|
|
13065
|
+
remove: (targetId: string) => void;
|
|
13066
|
+
removeAll: () => void;
|
|
13067
|
+
};
|
|
13068
|
+
Paths: {
|
|
13069
|
+
add: (coordinates: {
|
|
13070
|
+
floor: string;
|
|
13071
|
+
longitude: number;
|
|
13072
|
+
latitude: number;
|
|
13073
|
+
}[]) => void;
|
|
13074
|
+
};
|
|
13075
|
+
constructor(id: string, mvf: any, renderer: RendererCore);
|
|
13076
|
+
}
|
|
13077
|
+
}
|
|
13078
|
+
|
|
13079
|
+
declare module '@mappedin/mappedin-js/maker/src/api-geojson/api' {
|
|
13080
|
+
/**
|
|
13081
|
+
* integrating V6 api
|
|
13082
|
+
* Note:
|
|
13083
|
+
* - We are not handling multi-building yet
|
|
13084
|
+
*/
|
|
13085
|
+
import MapData from '@mappedin/mappedin-js/maker/src/map-data';
|
|
13086
|
+
import { Coordinate, Floor, MapDataInternal, Space, MapObject } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
13087
|
+
import { ICamera, IMapView, INavigation, TGetState, TUpdateState } from '@mappedin/mappedin-js/maker/src/map-view-interface';
|
|
13088
|
+
import { CameraTransform, Label, Path } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
13089
|
+
import { RendererCore, InteractionPayload } from '@mappedin/core-sdk';
|
|
13090
|
+
import { GeojsonApiMapObject } from '@mappedin/mappedin-js/maker/src/api-geojson/map-object';
|
|
13091
|
+
import GUI from 'lil-gui';
|
|
13092
|
+
import { PubSub } from '@packages/internal/common';
|
|
13093
|
+
import { LabelsApi } from '@mappedin/mappedin-js/maker/src/api-geojson/labels';
|
|
13094
|
+
import { MarkersApi } from '@mappedin/mappedin-js/maker/src/api-geojson/markers';
|
|
13095
|
+
export class GeoJsonApi extends PubSub<{
|
|
13096
|
+
'camera-change': CameraTransform;
|
|
13097
|
+
hover: InteractionPayload;
|
|
13098
|
+
click: InteractionPayload;
|
|
13099
|
+
}> implements IMapView {
|
|
13100
|
+
#private;
|
|
13101
|
+
outdoors: GeojsonApiMapObject;
|
|
13102
|
+
id: string;
|
|
13103
|
+
mapDataExternal: {
|
|
13104
|
+
[key in string]: MapData;
|
|
13105
|
+
};
|
|
13106
|
+
currentMap?: GeojsonApiMapObject;
|
|
13107
|
+
Camera: ICamera;
|
|
13108
|
+
Labels: LabelsApi;
|
|
13109
|
+
Markers: MarkersApi;
|
|
13110
|
+
constructor(rendererCore: RendererCore, _options?: any);
|
|
13111
|
+
updateStackState: RendererCore['updateStackState'];
|
|
13112
|
+
updateState<T extends Space | MapObject | Label | string>(target: T, state: TUpdateState<T>): void;
|
|
13113
|
+
update: () => void;
|
|
13114
|
+
getMapData(): MapDataInternal | undefined;
|
|
13115
|
+
addMap(mapData: MapData): Promise<MapData>;
|
|
13116
|
+
setFloor(floor: Floor | string): void;
|
|
13117
|
+
get currentFloor(): Floor;
|
|
13118
|
+
Paths: {
|
|
13119
|
+
add: (_coordinates: Coordinate[]) => Path;
|
|
13120
|
+
remove: (_label: any) => void;
|
|
13121
|
+
removeAll: () => void;
|
|
13122
|
+
};
|
|
13123
|
+
getState<T extends Space | MapObject | Label | string>(target: T): TGetState<T> | undefined;
|
|
13124
|
+
setHoverColor(c: string): void;
|
|
13125
|
+
getHoverColor(): string | undefined;
|
|
13126
|
+
getDirections: IMapView['getDirections'];
|
|
13127
|
+
Navigation: INavigation;
|
|
13128
|
+
createCoordinate(latitude: number, longitude: number, floor?: Floor): Coordinate;
|
|
13129
|
+
createCoordinateFromScreenCoordinate(): Coordinate;
|
|
13130
|
+
auto(): void;
|
|
13131
|
+
Outdoor: {
|
|
13132
|
+
setStyle: (style: any) => void;
|
|
13133
|
+
};
|
|
13134
|
+
debug(gui: GUI): void;
|
|
13135
|
+
/**
|
|
13136
|
+
* @internal
|
|
13137
|
+
*/
|
|
13138
|
+
get __core(): RendererCore;
|
|
13139
|
+
}
|
|
13140
|
+
}
|
|
13141
|
+
|
|
13142
|
+
declare module '@mappedin/mappedin-js/maker/src/api-geojson/utils' {
|
|
13143
|
+
import { Coordinate } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
13144
|
+
import type { Position, EntranceCollection, LineString, ObstructionProperties } from '@mappedin/mvf';
|
|
13145
|
+
import { FeatureCollection } from '@turf/turf';
|
|
13146
|
+
import { Feature, MultiLineString } from 'geojson';
|
|
13147
|
+
import { CollisionRankingTier, LabelState } from '@mappedin/core-sdk';
|
|
13148
|
+
import { TGeometryState, TLabelState } from '@mappedin/mappedin-js/maker/src';
|
|
13149
|
+
import { GeometryState } from '@mappedin/core-sdk';
|
|
13150
|
+
export function convertCoordinateToPosition(coord: Coordinate): Position;
|
|
13151
|
+
export function convertPositionToCoordinate(coord: Position): Coordinate;
|
|
13152
|
+
export const cutEntracesFromLineStrings: (lineStrings: FeatureCollection<LineString, ObstructionProperties>['features'], entranceCollection: EntranceCollection['features']) => Feature<MultiLineString, any>;
|
|
13153
|
+
export function convertPriorityToCollisionTier(priority: TLabelState['priority']): CollisionRankingTier;
|
|
13154
|
+
export function translateLabelStateToGeojsonCore(state: Partial<TLabelState>): Partial<LabelState>;
|
|
13155
|
+
export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>): Partial<GeometryState>;
|
|
13156
|
+
}
|
|
13157
|
+
|
|
13158
|
+
declare module '@mappedin/mappedin-js/maker/src/api-geojson/inspector' {
|
|
13159
|
+
export { Inspector } from '@mappedin/mappedin-js/maker/src/api-geojson/inspector/debug';
|
|
13160
|
+
}
|
|
13161
|
+
|
|
12651
13162
|
declare module '@mappedin/mappedin-js/maker/src/api-cms/api-cms' {
|
|
12652
13163
|
import { MapData, TShow3DMapOptions } from '@mappedin/mappedin-js/maker/src';
|
|
12653
13164
|
import { IDirectionsResult, MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
|
|
12654
13165
|
import { FloatingLabel, Marker as LegacyMarker } from '@mappedin/mappedin-js/cms/src';
|
|
12655
|
-
import { JourneyController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
13166
|
+
import { ExportController, JourneyController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
12656
13167
|
import Core from '@mappedin/mappedin-js/packages/legacy-renderer/private/Core';
|
|
12657
|
-
import { Coordinate,
|
|
13168
|
+
import { Coordinate, Floor, MapDataInternal, MapObject, Space } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
12658
13169
|
import { MapView } from '@mappedin/mappedin-js/maker/src/map-view';
|
|
12659
13170
|
import { IMapView, ILabels, TUpdateState, IMarkers, ICamera, TNavigationTarget, IPaths, TGetDirectionsOptions } from '@mappedin/mappedin-js/maker/src/map-view-interface';
|
|
12660
13171
|
import { Marker, Directions, Label } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
12661
13172
|
import { DefaultTheme } from '@mappedin/mappedin-js/maker/src/themes/default';
|
|
12662
13173
|
import { Navigation } from '@mappedin/mappedin-js/maker/src/navigation';
|
|
12663
|
-
export function
|
|
12664
|
-
export function getMappedinCoordinate(coordinate: Coordinate, mvCore: Core): import("../../../packages/get-venue").MappedinCoordinate;
|
|
13174
|
+
export function getMappedinCoordinate(coordinate: Coordinate, mvCore: Core): import("@packages/internal/get-venue/MappedinCoordinate").MappedinCoordinate;
|
|
12665
13175
|
export class CMSAPI implements IMapView {
|
|
12666
13176
|
mvCore: Core;
|
|
12667
13177
|
el: HTMLElement;
|
|
@@ -12677,6 +13187,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-cms/api-cms' {
|
|
|
12677
13187
|
journey?: JourneyController;
|
|
12678
13188
|
Navigation: Navigation;
|
|
12679
13189
|
auto: DefaultTheme['auto'];
|
|
13190
|
+
exportController?: ExportController;
|
|
12680
13191
|
constructor(el: HTMLElement, mapView: MapView, optionsWithDefaults: TShow3DMapOptions);
|
|
12681
13192
|
get currentFloor(): Floor;
|
|
12682
13193
|
setFloor(floor: Floor | string): void;
|
|
@@ -12689,7 +13200,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-cms/api-cms' {
|
|
|
12689
13200
|
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor | undefined): Coordinate;
|
|
12690
13201
|
convertMappedinXYToCoordinate(x: number, y: number, map: MappedinMap | string): Coordinate;
|
|
12691
13202
|
updateState<T extends Space | MapObject | Label>(object: T, state: TUpdateState<T>): void;
|
|
12692
|
-
getNearestNodeToCoordinate(coordinate: Coordinate): import("
|
|
13203
|
+
getNearestNodeToCoordinate(coordinate: Coordinate): import("@packages/internal/get-venue/MappedinNode").MappedinNode;
|
|
12693
13204
|
getDestinationNodesFromTarget: (target: TNavigationTarget) => string[];
|
|
12694
13205
|
getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], options?: TGetDirectionsOptions) => Directions | undefined;
|
|
12695
13206
|
}
|
|
@@ -12859,7 +13370,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/quad-tre
|
|
|
12859
13370
|
}
|
|
12860
13371
|
|
|
12861
13372
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/shave-text' {
|
|
12862
|
-
export type TDrawFn = (ctx: CanvasRenderingContext2D, x: number, y: number) => void;
|
|
13373
|
+
export type TDrawFn = (ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, x: number, y: number) => void;
|
|
12863
13374
|
type TShave = (str: string, size: number, maxWidth: number, maxLines?: number, lineHeight?: number, options?: {
|
|
12864
13375
|
strokeText: boolean;
|
|
12865
13376
|
}) => {
|
|
@@ -12880,7 +13391,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/scene-man
|
|
|
12880
13391
|
import { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
|
|
12881
13392
|
import type { ICore } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
12882
13393
|
export function determineMapPositionAndRotation(map: MappedinMap, core: ICore): {
|
|
12883
|
-
position:
|
|
13394
|
+
position: number[];
|
|
12884
13395
|
scale: number[];
|
|
12885
13396
|
rotation: number[];
|
|
12886
13397
|
};
|
|
@@ -12956,8 +13467,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
12956
13467
|
options: TPostProcessingOptions & Required<Pick<TPostProcessingOptions, 'antialias' | 'antialiasQuality' | 'aoEnabled' | 'aoQuality' | 'aoResolution'>>;
|
|
12957
13468
|
isWebGL2: boolean;
|
|
12958
13469
|
effectComposer: PPEffectComposer;
|
|
12959
|
-
scene: Scene;
|
|
12960
|
-
camera: PerspectiveCamera;
|
|
13470
|
+
scene: Scene | null;
|
|
13471
|
+
camera: PerspectiveCamera | null;
|
|
12961
13472
|
depthTexture?: Texture;
|
|
12962
13473
|
renderer: any;
|
|
12963
13474
|
constructor(renderer: any, options: TPostProcessingOptions);
|
|
@@ -13078,242 +13589,201 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
13078
13589
|
}
|
|
13079
13590
|
}
|
|
13080
13591
|
|
|
13081
|
-
declare module '@mappedin/mappedin-js/packages/legacy-renderer/
|
|
13082
|
-
import {
|
|
13083
|
-
import
|
|
13592
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/utils' {
|
|
13593
|
+
import { Box3, Vector3, Object3D } from 'three';
|
|
13594
|
+
import { Mappedin, MapObject, MappedinMap, TMapViewOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
13595
|
+
import { Camera } from '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Camera';
|
|
13084
13596
|
/**
|
|
13085
|
-
*
|
|
13597
|
+
* Utils function listing
|
|
13598
|
+
*
|
|
13599
|
+
* - scrubMaterial
|
|
13600
|
+
* - getObjectID
|
|
13601
|
+
* - getObject
|
|
13602
|
+
* - getBoundingBox
|
|
13603
|
+
* - getBiggestBoundingBox
|
|
13604
|
+
* - upackBoundingBox
|
|
13605
|
+
* - getMapScale
|
|
13606
|
+
* - throttle -> taken from lodash.js
|
|
13607
|
+
* - getProjectionScaleFactor
|
|
13608
|
+
* - getZoom
|
|
13086
13609
|
*/
|
|
13087
|
-
export
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13610
|
+
export function isGatewayKey(key: string): boolean;
|
|
13611
|
+
export function getCombinedBoundingBox(objects: Object3D[]): Box3;
|
|
13612
|
+
export function getMapsBoundingBox(maps: MapObject[], mapPadding: number): Box3;
|
|
13613
|
+
export function scrubMaterial(material: any): void;
|
|
13614
|
+
/**
|
|
13615
|
+
* Takes a Mappedin Object or id and returns the ID, so our functions can take bottomRight
|
|
13616
|
+
* @template T extends string | {id: string}
|
|
13617
|
+
* @param {T} object - input can be object containing id or the id itself
|
|
13618
|
+
* @return {string}
|
|
13619
|
+
*/
|
|
13620
|
+
export function getObjectId(object: any): string;
|
|
13621
|
+
/**
|
|
13622
|
+
* Takes a Mappedin object or ID and the array to look in and retuns the Object, so our functions can take both
|
|
13623
|
+
*/
|
|
13624
|
+
export function getObject<K extends {
|
|
13625
|
+
id: string;
|
|
13626
|
+
}, T extends K | string>(obj: T, array: K[] | undefined): K | undefined;
|
|
13627
|
+
export function getBoundingBox(object: Object3D): Box3;
|
|
13628
|
+
/**
|
|
13629
|
+
* Function pushes the items of the second array onto the first array (inplace).
|
|
13630
|
+
* @template T
|
|
13631
|
+
* @param {Array.<T>} arr1 - base array
|
|
13632
|
+
* @param {Array.<T>} arr2 - array which items will be pushed to arr1
|
|
13633
|
+
*/
|
|
13634
|
+
export function appendItems<T>(arr1: T[], arr2: T[]): void;
|
|
13635
|
+
export function getBiggestBoundingBox(objects: Object3D[]): {
|
|
13636
|
+
min: Vector3;
|
|
13637
|
+
max: Vector3;
|
|
13638
|
+
};
|
|
13639
|
+
export function unpackBoundingBox(boundingBox: Box3): Vector3[];
|
|
13640
|
+
export function getMapScale(map: MappedinMap): number;
|
|
13641
|
+
export function getNorth(map: MappedinMap): number;
|
|
13642
|
+
export function flatten(list: any[]): any[];
|
|
13643
|
+
export function uniq(arr: any[]): any[];
|
|
13644
|
+
export function toStyleString(styles: Record<string, string>): string;
|
|
13645
|
+
/**
|
|
13646
|
+
/* getProjectionScaleFactor()
|
|
13647
|
+
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
13648
|
+
/*
|
|
13649
|
+
* R
|
|
13650
|
+
* /|
|
|
13651
|
+
* C : Camera / |
|
|
13652
|
+
* PQ : Projection Plane / |
|
|
13653
|
+
* OR : Origin / |
|
|
13654
|
+
* F : FOV / |
|
|
13655
|
+
* Q / |
|
|
13656
|
+
* /| |
|
|
13657
|
+
* / | |
|
|
13658
|
+
* / | |
|
|
13659
|
+
* / | |
|
|
13660
|
+
* / | |
|
|
13661
|
+
* / F/2 | |
|
|
13662
|
+
* C ------------P------------ O
|
|
13095
13663
|
*
|
|
13096
|
-
* ```ts
|
|
13097
|
-
* const cameraChangedHandler = ({ tilt, position, zoom, rotation }) => {
|
|
13098
|
-
* // Do something with the new values
|
|
13099
|
-
* };
|
|
13100
|
-
* mapView.Camera.on(E_CAMERA_EVENT.CHANGED, cameraChangedHandler);
|
|
13101
|
-
* ```
|
|
13102
|
-
*
|
|
13103
|
-
* @param eventName An {@link E_CAMERA_EVENT} that is fired when the camera changes.
|
|
13104
|
-
* @param fn A callback that gets called when the corresponding event is fired. The
|
|
13105
|
-
* callback will get passed an argument with a type that's one of {@link CAMERA_EVENT_PAYLOAD}.
|
|
13106
|
-
*/
|
|
13107
|
-
on: CameraController['on'];
|
|
13108
|
-
/**
|
|
13109
|
-
* Unsubscribe a function that was previously subscribed with {@link on}.
|
|
13110
|
-
*
|
|
13111
|
-
* ```ts
|
|
13112
|
-
* mapView.Camera.on(E_CAMERA_EVENT.CHANGED, cameraChangedHandler);
|
|
13113
|
-
*
|
|
13114
|
-
* ...
|
|
13115
|
-
*
|
|
13116
|
-
* // Something changed and I no longer want this event to fire
|
|
13117
|
-
* mapView.Camera.off(E_CAMERA_EVENT.CHANGED, cameraChangedHandler);
|
|
13118
|
-
* ```
|
|
13119
|
-
*
|
|
13120
|
-
* @param eventName An {@link E_CAMERA_EVENT} that is fired when the camera changes.
|
|
13121
|
-
* @param fn A function that was previously passed to {@link on}. The function must
|
|
13122
|
-
* have the same reference as the function that was subscribed.
|
|
13123
|
-
*/
|
|
13124
|
-
off: CameraController['off'];
|
|
13125
|
-
/**
|
|
13126
|
-
* The current camera animation, if any. Resolves when the animation finishes.
|
|
13127
|
-
*/
|
|
13128
|
-
get currentAnimation(): Promise<undefined> | undefined;
|
|
13129
|
-
/**
|
|
13130
|
-
* Current Camera zoom (in meters)
|
|
13131
|
-
*/
|
|
13132
|
-
get zoom(): number;
|
|
13133
|
-
/**
|
|
13134
|
-
* Current Camera rotation (in radians) from north
|
|
13135
|
-
*/
|
|
13136
|
-
get rotation(): number;
|
|
13137
|
-
/**
|
|
13138
|
-
* Current camera tilt angle (in radians), relative to a top-down view.
|
|
13139
|
-
*
|
|
13140
|
-
* ex: 0 means the camera is facing top-down, π/2 means the camera is
|
|
13141
|
-
* facing directly from the side.
|
|
13142
|
-
*/
|
|
13143
|
-
get tilt(): number;
|
|
13144
|
-
/**
|
|
13145
|
-
* Get the minimum distance (in meters) the camera is allowed to get to the ground.
|
|
13146
|
-
*/
|
|
13147
|
-
get minZoom(): number;
|
|
13148
|
-
/**
|
|
13149
|
-
* Set the minimum distance (in meters) the camera is allowed to get to the ground.
|
|
13150
|
-
*/
|
|
13151
|
-
set minZoom(meters: number);
|
|
13152
|
-
/**
|
|
13153
|
-
* Get the maximum distance (in meters) the camera is allowed to get from the ground.
|
|
13154
|
-
*/
|
|
13155
|
-
get maxZoom(): number;
|
|
13156
|
-
/**
|
|
13157
|
-
* Set the maximum distance (in meters) the camera is allowed to get from the ground.
|
|
13158
|
-
*/
|
|
13159
|
-
set maxZoom(meters: number);
|
|
13160
|
-
/**
|
|
13161
|
-
* Get the current maximum tilt angle (in radians) the camera is allowed to use.
|
|
13162
|
-
*/
|
|
13163
|
-
get maxTilt(): number;
|
|
13164
|
-
/**
|
|
13165
|
-
* Sets the maximum tilt angle (in radians) the camera is allowed to use.
|
|
13166
|
-
*
|
|
13167
|
-
* Tilt angle must be between 0 and π/2 radians. It will be clamped within
|
|
13168
|
-
* this range if it exceeds it on either end.
|
|
13169
|
-
*
|
|
13170
|
-
* As tilt angle approaches π/2 radians, this will impact overall touch controls
|
|
13171
|
-
* and should be used sparingly.
|
|
13172
|
-
*/
|
|
13173
|
-
set maxTilt(radians: number);
|
|
13174
|
-
/**
|
|
13175
|
-
* Get the current camera position, which is at the center of the map.
|
|
13176
|
-
* @returns the position as a coordinate
|
|
13177
|
-
*/
|
|
13178
|
-
get position(): import("../../index.rn").MappedinCoordinate;
|
|
13179
|
-
/**
|
|
13180
|
-
* Enable or disable the ability for the user to interact with the camera (e.g. pan, zoom, tilt, etc).
|
|
13181
|
-
* This does not affect programmatic camera controls, such as {@link set} and {@link focusOn}.
|
|
13182
|
-
*
|
|
13183
|
-
* ```ts
|
|
13184
|
-
* // The user can no longer interact to move the camera
|
|
13185
|
-
* mapView.Camera.interactions.disable();
|
|
13186
|
-
*
|
|
13187
|
-
* // The user can now interact to move the camera again
|
|
13188
|
-
* mapView.Camera.interactions.enable();
|
|
13189
|
-
* ```
|
|
13190
|
-
*/
|
|
13191
|
-
interactions: {
|
|
13192
|
-
/**
|
|
13193
|
-
* Enable or disable specific user interactions.
|
|
13194
|
-
*
|
|
13195
|
-
* ```ts
|
|
13196
|
-
* mapView.Camera.interactions.set({ zoom: false });
|
|
13197
|
-
* ```
|
|
13198
|
-
*
|
|
13199
|
-
* @param options An object defining the interactions to switch on or off.
|
|
13200
|
-
*
|
|
13201
|
-
*/
|
|
13202
|
-
set: (options: TCameraInteractionsSetOptions) => void;
|
|
13203
|
-
/**
|
|
13204
|
-
* Enable all user interactions.
|
|
13205
|
-
*/
|
|
13206
|
-
enable: () => void;
|
|
13207
|
-
/**
|
|
13208
|
-
* Disable all user interactions.
|
|
13209
|
-
*/
|
|
13210
|
-
disable: () => void;
|
|
13211
|
-
};
|
|
13212
|
-
/**
|
|
13213
|
-
* Define an area of the screen that is safe for the camera. Anything outside the safe area is
|
|
13214
|
-
* assumed to be covered in some way (e.g. by UI) meaning the camera will not place
|
|
13215
|
-
* any map elements there when calling {@link focusOn}.
|
|
13216
|
-
*
|
|
13217
|
-
* ```ts
|
|
13218
|
-
* // The top 100px of the canvas are covered by a UI element
|
|
13219
|
-
* mapView.Camera.setSafeAreaInsets({ top: 100, left: 0, bottom: 0, right: 0});
|
|
13220
|
-
* mapView.Camera.focusOn({ nodes });
|
|
13221
|
-
* ```
|
|
13222
|
-
*
|
|
13223
|
-
* @param insets An object defining a number of pixels from the top, left, bottom, and right of
|
|
13224
|
-
* the screen. Only the area within the padding defined by these pixels is considered safe.
|
|
13225
|
-
*/
|
|
13226
|
-
setSafeAreaInsets(insets: {
|
|
13227
|
-
top: number;
|
|
13228
|
-
left: number;
|
|
13229
|
-
bottom: number;
|
|
13230
|
-
right: number;
|
|
13231
|
-
}): void;
|
|
13232
|
-
/**
|
|
13233
|
-
* Retrieve the values previously set by {@link setSafeAreaInsets}.
|
|
13234
|
-
*
|
|
13235
|
-
* @returns An object defining a number of pixels from the top, left, bottom, and right of
|
|
13236
|
-
* the screen.
|
|
13237
|
-
*/
|
|
13238
|
-
getSafeAreaInsets(): import("../../MapView.types").TPadding;
|
|
13239
|
-
/**
|
|
13240
|
-
* Animate the camera to focus on a collection of targets. To control where the targets should
|
|
13241
|
-
* be placed on screen, either specify `safeAreaInsets` on the {@link TFocusOnCameraOptions}
|
|
13242
|
-
* or call {@link setSafeAreaInsets}.
|
|
13243
|
-
*
|
|
13244
|
-
* ```ts
|
|
13245
|
-
* const location = mapView.venue.locations.find((l) => l.name === "My Location")!;
|
|
13246
|
-
*
|
|
13247
|
-
* mapView.Camera.focusOn({
|
|
13248
|
-
* polygons: location.polygons,
|
|
13249
|
-
* nodes: location.nodes,
|
|
13250
|
-
* });
|
|
13251
|
-
* ```
|
|
13252
|
-
*
|
|
13253
|
-
* @param targets A collection of things that the camera will place into view at the end of the
|
|
13254
|
-
* animation.
|
|
13255
|
-
* @param options
|
|
13256
|
-
* @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
|
|
13257
|
-
*/
|
|
13258
|
-
focusOn(targets: TCameraTargets, options?: TFocusOnCameraOptions & TCameraAnimationOptions): Promise<any>;
|
|
13259
|
-
/**
|
|
13260
|
-
* Instantaneously set the camera's transform to be in a new configuration. See also {@link animate}.
|
|
13261
|
-
*
|
|
13262
|
-
* ```ts
|
|
13263
|
-
* const coord = mapView.venue.maps[0].createCoordinate(33.66107, 31.83911);
|
|
13264
13664
|
*
|
|
13265
|
-
*
|
|
13266
|
-
*
|
|
13267
|
-
*
|
|
13268
|
-
* position: coord,
|
|
13269
|
-
* });
|
|
13270
|
-
* ```
|
|
13271
|
-
*
|
|
13272
|
-
* @param transform The new transform of the camera.
|
|
13273
|
-
*/
|
|
13274
|
-
set(transform: TCameraTransform): void;
|
|
13275
|
-
/**
|
|
13276
|
-
* Convert a Mercator Zoom Level to altitude, which can be used in the Camera APIs
|
|
13277
|
-
*/
|
|
13278
|
-
convertZoomLevelToAltitude(zoomLevel: number): any;
|
|
13279
|
-
/**
|
|
13280
|
-
* Convert the altitude returned by getZoom into Mercator Zoom level
|
|
13281
|
-
*/
|
|
13282
|
-
convertAltitudeToZoomLevel(altitude: number): any;
|
|
13283
|
-
/**
|
|
13284
|
-
* Smoothly transition the camera's transform to be in a new configuration. See also {@link set}.
|
|
13285
|
-
*
|
|
13286
|
-
* ```ts
|
|
13287
|
-
* const coord = mapView.venue.maps[0].createCoordinate(33.66107, 31.83911);
|
|
13288
|
-
*
|
|
13289
|
-
* // Animate the camera to be top-down at a specified coordinate
|
|
13290
|
-
* mapView.Camera.animate({
|
|
13291
|
-
* tilt: 0,
|
|
13292
|
-
* position: coord,
|
|
13293
|
-
* });
|
|
13294
|
-
* ```
|
|
13295
|
-
*
|
|
13296
|
-
* @param transform The new transform of the camera.
|
|
13297
|
-
* @param options
|
|
13298
|
-
* @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
|
|
13299
|
-
*/
|
|
13300
|
-
animate(transform: TCameraTransform, options?: TCameraAnimationOptions): Promise<undefined>;
|
|
13301
|
-
/**
|
|
13302
|
-
* Moves the Camera view in a relative direction by a given distance in meters.
|
|
13303
|
-
*
|
|
13304
|
-
* ```ts
|
|
13305
|
-
* // Move the camera 50 meters up relative to the camera frame
|
|
13306
|
-
* mapView.Camera.translate(E_CAMERA_DIRECTION.UP, 50);
|
|
13307
|
-
* ```
|
|
13665
|
+
* ProjectionScaleFactor = ( OR / PQ )
|
|
13666
|
+
* PQ = canvasHeight / 2
|
|
13667
|
+
* CQ = zoom
|
|
13308
13668
|
*
|
|
13309
|
-
*
|
|
13310
|
-
|
|
13311
|
-
translate(direction: E_CAMERA_DIRECTION, distance: number, options?: TCameraAnimationOptions): Promise<unknown>;
|
|
13312
|
-
/**
|
|
13313
|
-
* Cancel the currently active Camera animation.
|
|
13669
|
+
* OR / C0 = tan(F/2)
|
|
13670
|
+
* so OR = CO * tan(F/2)
|
|
13314
13671
|
*/
|
|
13315
|
-
|
|
13672
|
+
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
13673
|
+
/** getZoom
|
|
13674
|
+
*
|
|
13675
|
+
* C - Camera, OP -- picture plane (canvas), S - origin,
|
|
13676
|
+
* QR - front side of maps Bounding Box, F: FOV
|
|
13677
|
+
*
|
|
13678
|
+
* Z-axis
|
|
13679
|
+
* R_____|______
|
|
13680
|
+
* /| | |
|
|
13681
|
+
* / | | |
|
|
13682
|
+
* P/ | | | maps BB
|
|
13683
|
+
* /| | | |
|
|
13684
|
+
* / | | | |
|
|
13685
|
+
* / | | | |
|
|
13686
|
+
* / F |E |T |S |
|
|
13687
|
+
* C /--------|-----|-----|-----|------ orthogonal to Y axis, midpoint of focus maps
|
|
13688
|
+
* \ | | | |
|
|
13689
|
+
* \ | | | |
|
|
13690
|
+
* \ | | | |
|
|
13691
|
+
* \ | | | |
|
|
13692
|
+
* \| | | |
|
|
13693
|
+
* O\ | | |
|
|
13694
|
+
* \ | | |
|
|
13695
|
+
* \|_____|_____|
|
|
13696
|
+
* Q
|
|
13697
|
+
*
|
|
13698
|
+
*
|
|
13699
|
+
* We want to get CS, which is the camera zoom
|
|
13700
|
+
*
|
|
13701
|
+
*/
|
|
13702
|
+
export function getZoom(focusBox: Box3, focusBoxHeight: number, FOV: number): number;
|
|
13703
|
+
interface CalculateTwoDProjectionsParams {
|
|
13704
|
+
maps: MapObject[];
|
|
13705
|
+
width: number;
|
|
13706
|
+
height: number;
|
|
13707
|
+
camera: Camera;
|
|
13316
13708
|
}
|
|
13709
|
+
export function calculateTwoDProjections({ maps, width, height, camera }: CalculateTwoDProjectionsParams): {
|
|
13710
|
+
min: {
|
|
13711
|
+
x: number;
|
|
13712
|
+
y: number;
|
|
13713
|
+
};
|
|
13714
|
+
max: {
|
|
13715
|
+
x: number;
|
|
13716
|
+
y: number;
|
|
13717
|
+
};
|
|
13718
|
+
}[];
|
|
13719
|
+
export function splitLine(startNode: Vector3, endNode: Vector3, segments: number): Vector3[];
|
|
13720
|
+
export function isObject(item: any): boolean;
|
|
13721
|
+
export const determineStartingMap: (venue: Mappedin, options: TMapViewOptions) => MappedinMap;
|
|
13722
|
+
export function cyrb53(str: string, seed?: number): number;
|
|
13723
|
+
export function addMarginMultiplierToBoundingBox(bbox: Box3, multiplier: number): Box3;
|
|
13724
|
+
export function tweenPromise({ from, to, duration, easing, delay, onUpdate, onStart, onComplete, }: {
|
|
13725
|
+
from: any;
|
|
13726
|
+
to: any;
|
|
13727
|
+
duration?: number | undefined;
|
|
13728
|
+
easing?: any;
|
|
13729
|
+
delay?: number | undefined;
|
|
13730
|
+
onUpdate?: ((_: any) => void) | undefined;
|
|
13731
|
+
onStart?: (() => void) | undefined;
|
|
13732
|
+
onComplete?: (() => void) | undefined;
|
|
13733
|
+
}): {
|
|
13734
|
+
start(core: any): Promise<void>;
|
|
13735
|
+
};
|
|
13736
|
+
export const linearEase: (t: number) => number;
|
|
13737
|
+
export const quadEaseIn: (t: number) => number;
|
|
13738
|
+
export const quadEaseOut: (t: number) => number;
|
|
13739
|
+
export function interpolate(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number, easeFunc?: (t: number) => number): number;
|
|
13740
|
+
export function interpolateMulti(value: number, inputRange: number[], outputRange: number[], easeFunc?: (t: number) => number): number;
|
|
13741
|
+
export function checkWritableBeforeWrite(obj: any, key: string, value: any): void;
|
|
13742
|
+
export {};
|
|
13743
|
+
}
|
|
13744
|
+
|
|
13745
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/browser' {
|
|
13746
|
+
type DeviceType = {
|
|
13747
|
+
isIpad: boolean;
|
|
13748
|
+
isMobile: boolean;
|
|
13749
|
+
isSafari12: boolean;
|
|
13750
|
+
isFirefox: boolean;
|
|
13751
|
+
isWindows: boolean;
|
|
13752
|
+
};
|
|
13753
|
+
/**
|
|
13754
|
+
* Get device OS info
|
|
13755
|
+
* export for testing purpose
|
|
13756
|
+
* @returns DeviceType
|
|
13757
|
+
*/
|
|
13758
|
+
export const _deviceTypeControl: {
|
|
13759
|
+
getDeviceType(): DeviceType;
|
|
13760
|
+
_reset(): void;
|
|
13761
|
+
};
|
|
13762
|
+
export const getDeviceType: () => DeviceType;
|
|
13763
|
+
/**
|
|
13764
|
+
* Creates a closure encapsulating the logic of getting device GPU info.
|
|
13765
|
+
* inspired by https://github.com/pmndrs/detect-gpu
|
|
13766
|
+
* export for testing
|
|
13767
|
+
*/
|
|
13768
|
+
export const _gpuInfoControl: {
|
|
13769
|
+
getInfo: () => string | undefined;
|
|
13770
|
+
shouldDisableOffscreenCanvas: () => boolean;
|
|
13771
|
+
_setCanvas(c: HTMLCanvasElement): void;
|
|
13772
|
+
};
|
|
13773
|
+
export const getGPUInfo: () => string | undefined;
|
|
13774
|
+
/**
|
|
13775
|
+
* Check if device is certain intel integrated GPU.
|
|
13776
|
+
* This is for implementing workaround - https://issues.chromium.org/issues/40251953
|
|
13777
|
+
* The reason we want to disable OffscreenCanvas at all is due to `willReadFrequently` flag only works in FF.
|
|
13778
|
+
* In order to ensure the integrated intel GPU render text correctly
|
|
13779
|
+
*/
|
|
13780
|
+
export const shouldDisableOffscreenCanvas: () => boolean;
|
|
13781
|
+
export {};
|
|
13782
|
+
}
|
|
13783
|
+
|
|
13784
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/async' {
|
|
13785
|
+
export function throttle<T>(func: () => void, wait: number, options?: any): () => void;
|
|
13786
|
+
export function debounce<T>(func: () => void, wait: number, immediate?: boolean): () => void;
|
|
13317
13787
|
}
|
|
13318
13788
|
|
|
13319
13789
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.MultiFloorView' {
|
|
@@ -13337,7 +13807,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
13337
13807
|
_focusMapsLen: number;
|
|
13338
13808
|
_focusAnimCurve: any;
|
|
13339
13809
|
_focusAnimDuration: number;
|
|
13340
|
-
rotationAxis:
|
|
13810
|
+
rotationAxis: Vector3;
|
|
13341
13811
|
mapBoundingBoxes: any[];
|
|
13342
13812
|
_helperBoundingBoxes: any[];
|
|
13343
13813
|
mapAxesHelpers: any[];
|
|
@@ -13394,11 +13864,11 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
13394
13864
|
*/
|
|
13395
13865
|
get projections(): any[];
|
|
13396
13866
|
tiltMaps(tiltRad: any): void;
|
|
13397
|
-
_focusBox:
|
|
13867
|
+
_focusBox: Box3 | undefined;
|
|
13398
13868
|
_scrollWindow: number | undefined;
|
|
13399
13869
|
tween: any;
|
|
13400
13870
|
getFocusMaps(start: any, dir: any, len: any): any;
|
|
13401
|
-
getFocusBox():
|
|
13871
|
+
getFocusBox(): Box3;
|
|
13402
13872
|
getVisibleMaps(): any;
|
|
13403
13873
|
getVisibleMapIds(): any;
|
|
13404
13874
|
getVisibleMapIndices(): number[];
|
|
@@ -13409,6 +13879,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
13409
13879
|
scrollMapsDown(): Promise<any>;
|
|
13410
13880
|
destroy(): void;
|
|
13411
13881
|
}
|
|
13882
|
+
import { Vector3 } from 'three';
|
|
13883
|
+
import { Box3 } from 'three';
|
|
13412
13884
|
}
|
|
13413
13885
|
|
|
13414
13886
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/FlatLabels' {
|
|
@@ -13775,173 +14247,381 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Marker
|
|
|
13775
14247
|
* mapView.Markers.removeAll();
|
|
13776
14248
|
* ```
|
|
13777
14249
|
*/
|
|
13778
|
-
removeAll(): void;
|
|
13779
|
-
}
|
|
13780
|
-
}
|
|
13781
|
-
|
|
13782
|
-
declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Paths' {
|
|
13783
|
-
import { MappedinCoordinate, MappedinNode } from '@mappedin/mappedin-js/packages/get-venue';
|
|
13784
|
-
import { TPathOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
13785
|
-
import PathsController, { Path } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/PathsController';
|
|
13786
|
-
/**
|
|
13787
|
-
* API to add and remove paths from maps. See also {@link Journey}.
|
|
13788
|
-
*/
|
|
13789
|
-
export class Paths {
|
|
13790
|
-
#private;
|
|
14250
|
+
removeAll(): void;
|
|
14251
|
+
}
|
|
14252
|
+
}
|
|
14253
|
+
|
|
14254
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Paths' {
|
|
14255
|
+
import { MappedinCoordinate, MappedinNode } from '@mappedin/mappedin-js/packages/get-venue';
|
|
14256
|
+
import { TPathOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
14257
|
+
import PathsController, { Path } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/PathsController';
|
|
14258
|
+
/**
|
|
14259
|
+
* API to add and remove paths from maps. See also {@link Journey}.
|
|
14260
|
+
*/
|
|
14261
|
+
export class Paths {
|
|
14262
|
+
#private;
|
|
14263
|
+
/**
|
|
14264
|
+
* @hidden
|
|
14265
|
+
*/
|
|
14266
|
+
constructor(pathsController: PathsController);
|
|
14267
|
+
/**
|
|
14268
|
+
* An array of all {@link Path} instances that are currently drawn.
|
|
14269
|
+
*/
|
|
14270
|
+
get paths(): Path[];
|
|
14271
|
+
/**
|
|
14272
|
+
* Takes an array of {@link MappedinNode} instances and draws an {@link Path} with
|
|
14273
|
+
* path segments on each map corresponding to the nodes on that map.
|
|
14274
|
+
*
|
|
14275
|
+
* ```ts
|
|
14276
|
+
* const departure = mapView.venue.locations.find((l) => l.name === "Apple")!;
|
|
14277
|
+
* const destination = mapView.venue.locations.find((l) => l.name === "Cleo")!;
|
|
14278
|
+
* const directions = departure.directionsTo(destination);
|
|
14279
|
+
*
|
|
14280
|
+
* // Draw the above directions as a path on the map
|
|
14281
|
+
* mapView.Paths.add(directions.path);
|
|
14282
|
+
* ```
|
|
14283
|
+
*
|
|
14284
|
+
* @param nodes A {@link MappedinNode} array, probably from a {@link MappedinDirections} instance.
|
|
14285
|
+
* @param options
|
|
14286
|
+
*/
|
|
14287
|
+
add(nodes: (MappedinNode | MappedinCoordinate)[], options?: TPathOptions): Path;
|
|
14288
|
+
/**
|
|
14289
|
+
* Remove a {@link Path} from all maps it exists on.
|
|
14290
|
+
*
|
|
14291
|
+
* ```ts
|
|
14292
|
+
* const path = mapView.Paths.add(nodes);
|
|
14293
|
+
*
|
|
14294
|
+
* ...
|
|
14295
|
+
*
|
|
14296
|
+
* // The path is no longer needed
|
|
14297
|
+
* mapView.Paths.remove(path);
|
|
14298
|
+
* ```
|
|
14299
|
+
*
|
|
14300
|
+
* @param path The {@link Path} instance to be removed.
|
|
14301
|
+
*/
|
|
14302
|
+
remove(path: Path): void;
|
|
14303
|
+
/**
|
|
14304
|
+
* Remove all {@link Path} instances from all maps.
|
|
14305
|
+
*/
|
|
14306
|
+
removeAll(): void;
|
|
14307
|
+
}
|
|
14308
|
+
}
|
|
14309
|
+
|
|
14310
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/BlueDot' {
|
|
14311
|
+
import { BlueDotController, TEnableBlueDotOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types';
|
|
14312
|
+
/**
|
|
14313
|
+
* API to enable and respond to user position updates.
|
|
14314
|
+
*/
|
|
14315
|
+
export class BlueDot {
|
|
14316
|
+
#private;
|
|
14317
|
+
/**
|
|
14318
|
+
* @hidden
|
|
14319
|
+
*/
|
|
14320
|
+
constructor(controller: BlueDotController);
|
|
14321
|
+
/**
|
|
14322
|
+
* Subscribe a function to be called when an {@link E_BLUEDOT_EVENT} is fired.
|
|
14323
|
+
*
|
|
14324
|
+
* ```ts
|
|
14325
|
+
* const blueDotChangeHandler = ({ map, nearestNode, position, bearing }) => {
|
|
14326
|
+
* // Do something with the new values
|
|
14327
|
+
* };
|
|
14328
|
+
* mapView.BlueDot.on(E_BLUEDOT_EVENT.POSITION_UPDATE, blueDotChangeHandler);
|
|
14329
|
+
* ```
|
|
14330
|
+
*
|
|
14331
|
+
* @param eventName An {@link E_BLUEDOT_EVENT} that is fired when the blue dot changes.
|
|
14332
|
+
* @param fn A callback that gets called when the corresponding event is fired. The
|
|
14333
|
+
* callback will get passed an argument with a type that's one of {@link E_BLUEDOT_EVENT_PAYLOAD}.
|
|
14334
|
+
*/
|
|
14335
|
+
on: BlueDotController['on'];
|
|
14336
|
+
/**
|
|
14337
|
+
* Unsubscribe a function that was previously subscribed with {@link on}.
|
|
14338
|
+
*
|
|
14339
|
+
* ```ts
|
|
14340
|
+
* mapView.BlueDot.on(E_BLUEDOT_EVENT.POSITION_UPDATE, blueDotChangeHandler);
|
|
14341
|
+
*
|
|
14342
|
+
* ...
|
|
14343
|
+
*
|
|
14344
|
+
* // Something changed and I no longer want this event to fire
|
|
14345
|
+
* mapView.BlueDot.off(E_BLUEDOT_EVENT.POSITION_UPDATE, blueDotChangeHandler);
|
|
14346
|
+
* ```
|
|
14347
|
+
*
|
|
14348
|
+
* @param eventName An {@link E_BLUEDOT_EVENT} that is fired when the blue dot changes.
|
|
14349
|
+
* @param fn A function that was previously passed to {@link on}. The function must
|
|
14350
|
+
* have the same reference as the function that was subscribed.
|
|
14351
|
+
*/
|
|
14352
|
+
off: BlueDotController['off'];
|
|
14353
|
+
/**
|
|
14354
|
+
* Enables Blue Dot. A blue dot will appear on the map that responds to the device's geolocation
|
|
14355
|
+
* updates. It then emits {@link TBlueDotStateChange} and {@link TBlueDotPositionUpdate} events
|
|
14356
|
+
* via {@link E_BLUEDOT_EVENT}.
|
|
14357
|
+
*
|
|
14358
|
+
* ```ts
|
|
14359
|
+
* // Enable blue dot
|
|
14360
|
+
* mapView.BlueDot.enable();
|
|
14361
|
+
*
|
|
14362
|
+
* // Disable blue dot
|
|
14363
|
+
* mapView.BlueDot.disable();
|
|
14364
|
+
* ```
|
|
14365
|
+
*
|
|
14366
|
+
* @param options
|
|
14367
|
+
*/
|
|
14368
|
+
enable(options?: TEnableBlueDotOptions): void;
|
|
14369
|
+
/**
|
|
14370
|
+
* Disables Blue Dot that was enabled with {@link enable} and stops emitting events.
|
|
14371
|
+
*
|
|
14372
|
+
* ```ts
|
|
14373
|
+
* // Enable blue dot
|
|
14374
|
+
* mapView.BlueDot.enable();
|
|
14375
|
+
*
|
|
14376
|
+
* // Disable blue dot
|
|
14377
|
+
* mapView.BlueDot.disable();
|
|
14378
|
+
* ```
|
|
14379
|
+
*/
|
|
14380
|
+
disable(): void;
|
|
14381
|
+
}
|
|
14382
|
+
}
|
|
14383
|
+
|
|
14384
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Camera' {
|
|
14385
|
+
import { E_CAMERA_DIRECTION } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums';
|
|
14386
|
+
import CameraController, { TCameraAnimationOptions, TCameraInteractionsSetOptions, TCameraTargets, TCameraTransform, TFocusOnCameraOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/CameraController';
|
|
14387
|
+
/**
|
|
14388
|
+
* API to control and respond to the state of the camera within the scene.
|
|
14389
|
+
*/
|
|
14390
|
+
export class Camera {
|
|
14391
|
+
#private;
|
|
14392
|
+
/**
|
|
14393
|
+
* @hidden
|
|
14394
|
+
*/
|
|
14395
|
+
constructor(controller: CameraController);
|
|
14396
|
+
/**
|
|
14397
|
+
* Subscribe a function to be called when an {@link E_CAMERA_EVENT} is fired.
|
|
14398
|
+
*
|
|
14399
|
+
* ```ts
|
|
14400
|
+
* const cameraChangedHandler = ({ tilt, position, zoom, rotation }) => {
|
|
14401
|
+
* // Do something with the new values
|
|
14402
|
+
* };
|
|
14403
|
+
* mapView.Camera.on(E_CAMERA_EVENT.CHANGED, cameraChangedHandler);
|
|
14404
|
+
* ```
|
|
14405
|
+
*
|
|
14406
|
+
* @param eventName An {@link E_CAMERA_EVENT} that is fired when the camera changes.
|
|
14407
|
+
* @param fn A callback that gets called when the corresponding event is fired. The
|
|
14408
|
+
* callback will get passed an argument with a type that's one of {@link CAMERA_EVENT_PAYLOAD}.
|
|
14409
|
+
*/
|
|
14410
|
+
on: CameraController['on'];
|
|
14411
|
+
/**
|
|
14412
|
+
* Unsubscribe a function that was previously subscribed with {@link on}.
|
|
14413
|
+
*
|
|
14414
|
+
* ```ts
|
|
14415
|
+
* mapView.Camera.on(E_CAMERA_EVENT.CHANGED, cameraChangedHandler);
|
|
14416
|
+
*
|
|
14417
|
+
* ...
|
|
14418
|
+
*
|
|
14419
|
+
* // Something changed and I no longer want this event to fire
|
|
14420
|
+
* mapView.Camera.off(E_CAMERA_EVENT.CHANGED, cameraChangedHandler);
|
|
14421
|
+
* ```
|
|
14422
|
+
*
|
|
14423
|
+
* @param eventName An {@link E_CAMERA_EVENT} that is fired when the camera changes.
|
|
14424
|
+
* @param fn A function that was previously passed to {@link on}. The function must
|
|
14425
|
+
* have the same reference as the function that was subscribed.
|
|
14426
|
+
*/
|
|
14427
|
+
off: CameraController['off'];
|
|
14428
|
+
/**
|
|
14429
|
+
* The current camera animation, if any. Resolves when the animation finishes.
|
|
14430
|
+
*/
|
|
14431
|
+
get currentAnimation(): Promise<undefined> | undefined;
|
|
14432
|
+
/**
|
|
14433
|
+
* Current Camera zoom (in meters)
|
|
14434
|
+
*/
|
|
14435
|
+
get zoom(): number;
|
|
14436
|
+
/**
|
|
14437
|
+
* Current Camera rotation (in radians) from north
|
|
14438
|
+
*/
|
|
14439
|
+
get rotation(): number;
|
|
14440
|
+
/**
|
|
14441
|
+
* Current camera tilt angle (in radians), relative to a top-down view.
|
|
14442
|
+
*
|
|
14443
|
+
* ex: 0 means the camera is facing top-down, π/2 means the camera is
|
|
14444
|
+
* facing directly from the side.
|
|
14445
|
+
*/
|
|
14446
|
+
get tilt(): number;
|
|
14447
|
+
/**
|
|
14448
|
+
* Get the minimum distance (in meters) the camera is allowed to get to the ground.
|
|
14449
|
+
*/
|
|
14450
|
+
get minZoom(): number;
|
|
14451
|
+
/**
|
|
14452
|
+
* Set the minimum distance (in meters) the camera is allowed to get to the ground.
|
|
14453
|
+
*/
|
|
14454
|
+
set minZoom(meters: number);
|
|
14455
|
+
/**
|
|
14456
|
+
* Get the maximum distance (in meters) the camera is allowed to get from the ground.
|
|
14457
|
+
*/
|
|
14458
|
+
get maxZoom(): number;
|
|
14459
|
+
/**
|
|
14460
|
+
* Set the maximum distance (in meters) the camera is allowed to get from the ground.
|
|
14461
|
+
*/
|
|
14462
|
+
set maxZoom(meters: number);
|
|
14463
|
+
/**
|
|
14464
|
+
* Get the current maximum tilt angle (in radians) the camera is allowed to use.
|
|
14465
|
+
*/
|
|
14466
|
+
get maxTilt(): number;
|
|
13791
14467
|
/**
|
|
13792
|
-
*
|
|
14468
|
+
* Sets the maximum tilt angle (in radians) the camera is allowed to use.
|
|
14469
|
+
*
|
|
14470
|
+
* Tilt angle must be between 0 and π/2 radians. It will be clamped within
|
|
14471
|
+
* this range if it exceeds it on either end.
|
|
14472
|
+
*
|
|
14473
|
+
* As tilt angle approaches π/2 radians, this will impact overall touch controls
|
|
14474
|
+
* and should be used sparingly.
|
|
13793
14475
|
*/
|
|
13794
|
-
|
|
14476
|
+
set maxTilt(radians: number);
|
|
13795
14477
|
/**
|
|
13796
|
-
*
|
|
14478
|
+
* Get the current camera position, which is at the center of the map.
|
|
14479
|
+
* @returns the position as a coordinate
|
|
13797
14480
|
*/
|
|
13798
|
-
get
|
|
14481
|
+
get position(): import("../../index.rn").MappedinCoordinate;
|
|
13799
14482
|
/**
|
|
13800
|
-
*
|
|
13801
|
-
*
|
|
14483
|
+
* Enable or disable the ability for the user to interact with the camera (e.g. pan, zoom, tilt, etc).
|
|
14484
|
+
* This does not affect programmatic camera controls, such as {@link set} and {@link focusOn}.
|
|
13802
14485
|
*
|
|
13803
14486
|
* ```ts
|
|
13804
|
-
*
|
|
13805
|
-
*
|
|
13806
|
-
* const directions = departure.directionsTo(destination);
|
|
14487
|
+
* // The user can no longer interact to move the camera
|
|
14488
|
+
* mapView.Camera.interactions.disable();
|
|
13807
14489
|
*
|
|
13808
|
-
* //
|
|
13809
|
-
* mapView.
|
|
14490
|
+
* // The user can now interact to move the camera again
|
|
14491
|
+
* mapView.Camera.interactions.enable();
|
|
13810
14492
|
* ```
|
|
13811
|
-
*
|
|
13812
|
-
* @param nodes A {@link MappedinNode} array, probably from a {@link MappedinDirections} instance.
|
|
13813
|
-
* @param options
|
|
13814
14493
|
*/
|
|
13815
|
-
|
|
14494
|
+
interactions: {
|
|
14495
|
+
/**
|
|
14496
|
+
* Enable or disable specific user interactions.
|
|
14497
|
+
*
|
|
14498
|
+
* ```ts
|
|
14499
|
+
* mapView.Camera.interactions.set({ zoom: false });
|
|
14500
|
+
* ```
|
|
14501
|
+
*
|
|
14502
|
+
* @param options An object defining the interactions to switch on or off.
|
|
14503
|
+
*
|
|
14504
|
+
*/
|
|
14505
|
+
set: (options: TCameraInteractionsSetOptions) => void;
|
|
14506
|
+
/**
|
|
14507
|
+
* Enable all user interactions.
|
|
14508
|
+
*/
|
|
14509
|
+
enable: () => void;
|
|
14510
|
+
/**
|
|
14511
|
+
* Disable all user interactions.
|
|
14512
|
+
*/
|
|
14513
|
+
disable: () => void;
|
|
14514
|
+
};
|
|
13816
14515
|
/**
|
|
13817
|
-
*
|
|
14516
|
+
* Define an area of the screen that is safe for the camera. Anything outside the safe area is
|
|
14517
|
+
* assumed to be covered in some way (e.g. by UI) meaning the camera will not place
|
|
14518
|
+
* any map elements there when calling {@link focusOn}.
|
|
13818
14519
|
*
|
|
13819
14520
|
* ```ts
|
|
13820
|
-
*
|
|
13821
|
-
*
|
|
13822
|
-
*
|
|
13823
|
-
*
|
|
13824
|
-
* // The path is no longer needed
|
|
13825
|
-
* mapView.Paths.remove(path);
|
|
14521
|
+
* // The top 100px of the canvas are covered by a UI element
|
|
14522
|
+
* mapView.Camera.setSafeAreaInsets({ top: 100, left: 0, bottom: 0, right: 0});
|
|
14523
|
+
* mapView.Camera.focusOn({ nodes });
|
|
13826
14524
|
* ```
|
|
13827
14525
|
*
|
|
13828
|
-
* @param
|
|
13829
|
-
|
|
13830
|
-
remove(path: Path): void;
|
|
13831
|
-
/**
|
|
13832
|
-
* Remove all {@link Path} instances from all maps.
|
|
14526
|
+
* @param insets An object defining a number of pixels from the top, left, bottom, and right of
|
|
14527
|
+
* the screen. Only the area within the padding defined by these pixels is considered safe.
|
|
13833
14528
|
*/
|
|
13834
|
-
|
|
13835
|
-
|
|
13836
|
-
|
|
13837
|
-
|
|
13838
|
-
|
|
13839
|
-
|
|
13840
|
-
/**
|
|
13841
|
-
* API to enable and respond to user position updates.
|
|
13842
|
-
*/
|
|
13843
|
-
export class BlueDot {
|
|
13844
|
-
#private;
|
|
14529
|
+
setSafeAreaInsets(insets: {
|
|
14530
|
+
top: number;
|
|
14531
|
+
left: number;
|
|
14532
|
+
bottom: number;
|
|
14533
|
+
right: number;
|
|
14534
|
+
}): void;
|
|
13845
14535
|
/**
|
|
13846
|
-
* @
|
|
14536
|
+
* Retrieve the values previously set by {@link setSafeAreaInsets}.
|
|
14537
|
+
*
|
|
14538
|
+
* @returns An object defining a number of pixels from the top, left, bottom, and right of
|
|
14539
|
+
* the screen.
|
|
13847
14540
|
*/
|
|
13848
|
-
|
|
14541
|
+
getSafeAreaInsets(): import("../../MapView.types").TPadding;
|
|
13849
14542
|
/**
|
|
13850
|
-
*
|
|
14543
|
+
* Animate the camera to focus on a collection of targets. To control where the targets should
|
|
14544
|
+
* be placed on screen, either specify `safeAreaInsets` on the {@link TFocusOnCameraOptions}
|
|
14545
|
+
* or call {@link setSafeAreaInsets}.
|
|
13851
14546
|
*
|
|
13852
14547
|
* ```ts
|
|
13853
|
-
* const
|
|
13854
|
-
*
|
|
13855
|
-
*
|
|
13856
|
-
*
|
|
14548
|
+
* const location = mapView.venue.locations.find((l) => l.name === "My Location")!;
|
|
14549
|
+
*
|
|
14550
|
+
* mapView.Camera.focusOn({
|
|
14551
|
+
* polygons: location.polygons,
|
|
14552
|
+
* nodes: location.nodes,
|
|
14553
|
+
* });
|
|
13857
14554
|
* ```
|
|
13858
14555
|
*
|
|
13859
|
-
* @param
|
|
13860
|
-
*
|
|
13861
|
-
*
|
|
14556
|
+
* @param targets A collection of things that the camera will place into view at the end of the
|
|
14557
|
+
* animation.
|
|
14558
|
+
* @param options
|
|
14559
|
+
* @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
|
|
13862
14560
|
*/
|
|
13863
|
-
|
|
14561
|
+
focusOn(targets: TCameraTargets, options?: TFocusOnCameraOptions & TCameraAnimationOptions): Promise<any>;
|
|
13864
14562
|
/**
|
|
13865
|
-
*
|
|
14563
|
+
* Instantaneously set the camera's transform to be in a new configuration. See also {@link animate}.
|
|
13866
14564
|
*
|
|
13867
14565
|
* ```ts
|
|
13868
|
-
* mapView.
|
|
13869
|
-
*
|
|
13870
|
-
* ...
|
|
14566
|
+
* const coord = mapView.venue.maps[0].createCoordinate(33.66107, 31.83911);
|
|
13871
14567
|
*
|
|
13872
|
-
* //
|
|
13873
|
-
* mapView.
|
|
14568
|
+
* // Place the camera top-down at a specified coordinate
|
|
14569
|
+
* mapView.Camera.set({
|
|
14570
|
+
* tilt: 0,
|
|
14571
|
+
* position: coord,
|
|
14572
|
+
* });
|
|
13874
14573
|
* ```
|
|
13875
14574
|
*
|
|
13876
|
-
* @param
|
|
13877
|
-
* @param fn A function that was previously passed to {@link on}. The function must
|
|
13878
|
-
* have the same reference as the function that was subscribed.
|
|
14575
|
+
* @param transform The new transform of the camera.
|
|
13879
14576
|
*/
|
|
13880
|
-
|
|
14577
|
+
set(transform: TCameraTransform): void;
|
|
13881
14578
|
/**
|
|
13882
|
-
*
|
|
13883
|
-
|
|
13884
|
-
|
|
14579
|
+
* Convert a Mercator Zoom Level to altitude, which can be used in the Camera APIs
|
|
14580
|
+
*/
|
|
14581
|
+
convertZoomLevelToAltitude(zoomLevel: number): any;
|
|
14582
|
+
/**
|
|
14583
|
+
* Convert the altitude returned by getZoom into Mercator Zoom level
|
|
14584
|
+
*/
|
|
14585
|
+
convertAltitudeToZoomLevel(altitude: number): any;
|
|
14586
|
+
/**
|
|
14587
|
+
* Smoothly transition the camera's transform to be in a new configuration. See also {@link set}.
|
|
13885
14588
|
*
|
|
13886
14589
|
* ```ts
|
|
13887
|
-
*
|
|
13888
|
-
* mapView.BlueDot.enable();
|
|
14590
|
+
* const coord = mapView.venue.maps[0].createCoordinate(33.66107, 31.83911);
|
|
13889
14591
|
*
|
|
13890
|
-
* //
|
|
13891
|
-
* mapView.
|
|
14592
|
+
* // Animate the camera to be top-down at a specified coordinate
|
|
14593
|
+
* mapView.Camera.animate({
|
|
14594
|
+
* tilt: 0,
|
|
14595
|
+
* position: coord,
|
|
14596
|
+
* });
|
|
13892
14597
|
* ```
|
|
13893
14598
|
*
|
|
14599
|
+
* @param transform The new transform of the camera.
|
|
13894
14600
|
* @param options
|
|
14601
|
+
* @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
|
|
13895
14602
|
*/
|
|
13896
|
-
|
|
14603
|
+
animate(transform: TCameraTransform, options?: TCameraAnimationOptions): Promise<undefined>;
|
|
13897
14604
|
/**
|
|
13898
|
-
*
|
|
14605
|
+
* Moves the Camera view in a relative direction by a given distance in meters.
|
|
13899
14606
|
*
|
|
13900
14607
|
* ```ts
|
|
13901
|
-
* //
|
|
13902
|
-
* mapView.
|
|
13903
|
-
*
|
|
13904
|
-
* // Disable blue dot
|
|
13905
|
-
* mapView.BlueDot.disable();
|
|
14608
|
+
* // Move the camera 50 meters up relative to the camera frame
|
|
14609
|
+
* mapView.Camera.translate(E_CAMERA_DIRECTION.UP, 50);
|
|
13906
14610
|
* ```
|
|
14611
|
+
*
|
|
14612
|
+
* @returns a Promise that resolves when the translation animation finishes, or rejects when it is cancelled.
|
|
13907
14613
|
*/
|
|
13908
|
-
|
|
13909
|
-
}
|
|
13910
|
-
}
|
|
13911
|
-
|
|
13912
|
-
declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Exporter' {
|
|
13913
|
-
import { ExportController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
13914
|
-
/**
|
|
13915
|
-
* @hidden
|
|
13916
|
-
*/
|
|
13917
|
-
export type TGLTFExportOptions = {
|
|
13918
|
-
onlyVisible?: boolean;
|
|
13919
|
-
binary?: boolean;
|
|
13920
|
-
scale?: number;
|
|
13921
|
-
};
|
|
13922
|
-
/**
|
|
13923
|
-
* API to export the scene.
|
|
13924
|
-
*
|
|
13925
|
-
* @hidden
|
|
13926
|
-
*/
|
|
13927
|
-
export class Exporter {
|
|
13928
|
-
#private;
|
|
13929
|
-
/**
|
|
13930
|
-
* @hidden
|
|
13931
|
-
* @internal
|
|
13932
|
-
*/
|
|
13933
|
-
constructor(controller: ExportController);
|
|
14614
|
+
translate(direction: E_CAMERA_DIRECTION, distance: number, options?: TCameraAnimationOptions): Promise<unknown>;
|
|
13934
14615
|
/**
|
|
13935
|
-
*
|
|
13936
|
-
*
|
|
13937
|
-
* @hidden
|
|
14616
|
+
* Cancel the currently active Camera animation.
|
|
13938
14617
|
*/
|
|
13939
|
-
|
|
14618
|
+
cancelAnimation(): void;
|
|
13940
14619
|
}
|
|
13941
14620
|
}
|
|
13942
14621
|
|
|
13943
14622
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/StackedMaps' {
|
|
13944
14623
|
import { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
|
|
14624
|
+
import { TStackedMapsOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types';
|
|
13945
14625
|
import { STACKED_MAPS_STATE, StackedMapsController, TCameraTransform } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
13946
14626
|
/**
|
|
13947
14627
|
* @experimental
|
|
@@ -13955,7 +14635,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
|
|
|
13955
14635
|
constructor(markersController: StackedMapsController);
|
|
13956
14636
|
/**
|
|
13957
14637
|
* @experimental
|
|
13958
|
-
* Enable Stacked Maps.
|
|
14638
|
+
* Enable Stacked Maps. If a {@link Journey} is drawn beforehand the default behaviour is to only display the floors that are part of the journey.
|
|
14639
|
+
* {@link TStackedMapsOptions} can be used to enabling display of all maps including those that are not part of the journey.
|
|
13959
14640
|
* Use {@link showOverview} to expand the maps vertically after enabling.
|
|
13960
14641
|
*
|
|
13961
14642
|
* Upon enabling, map state will become {@link STATE.STACKED | STACKED} and Stacked Maps state will become {@link STACKED_MAPS_STATE.ACTIVE | ACTIVE}.
|
|
@@ -13976,9 +14657,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
|
|
|
13976
14657
|
*
|
|
13977
14658
|
* @returns Promise when all animations are complete.
|
|
13978
14659
|
*/
|
|
13979
|
-
enable: (opts?:
|
|
13980
|
-
verticalDistanceBetweenMaps?: number;
|
|
13981
|
-
}) => Promise<void>;
|
|
14660
|
+
enable: (opts?: TStackedMapsOptions) => Promise<void>;
|
|
13982
14661
|
/**
|
|
13983
14662
|
* @experimental
|
|
13984
14663
|
*
|
|
@@ -13995,7 +14674,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
|
|
|
13995
14674
|
/**
|
|
13996
14675
|
* @experimental
|
|
13997
14676
|
*
|
|
13998
|
-
* Expand
|
|
14677
|
+
* Expand and display all maps in the current {@link MapGroup}. If a {@link Journey} has been drawn, vertical paths between connections are displayed.
|
|
13999
14678
|
* Stacked Maps must be enabled beforehand and state will become {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW}.
|
|
14000
14679
|
*
|
|
14001
14680
|
* @example
|
|
@@ -14046,6 +14725,27 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
|
|
|
14046
14725
|
* @returns Promise when all animations are complete.
|
|
14047
14726
|
*/
|
|
14048
14727
|
zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
|
|
14728
|
+
/**
|
|
14729
|
+
* @experimental
|
|
14730
|
+
*
|
|
14731
|
+
* Used when in {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW} state to replace the maps in the
|
|
14732
|
+
* current stack after clearing or creating a {@link Journey}.
|
|
14733
|
+
* Use this to hide maps that are not part of the journey or to display all maps in the {@link MapGroup}.
|
|
14734
|
+
*
|
|
14735
|
+
* @param options - Options to adjust the overview. Each option defaults to the setting passed in {@link enable}, unless provided.
|
|
14736
|
+
*
|
|
14737
|
+
* @example
|
|
14738
|
+
* ```ts
|
|
14739
|
+
* mapView.Journey.draw(...);
|
|
14740
|
+
* mapView.StackedMaps.enable();
|
|
14741
|
+
* mapView.StackedMaps.showOverview();
|
|
14742
|
+
* mapView.Journey.clear();
|
|
14743
|
+
* mapView.StackedMaps.restack();
|
|
14744
|
+
* ```
|
|
14745
|
+
*
|
|
14746
|
+
* @returns Promise when all animations are complete.
|
|
14747
|
+
*/
|
|
14748
|
+
restack: (options?: TStackedMapsOptions) => Promise<void>;
|
|
14049
14749
|
/**
|
|
14050
14750
|
* @experimental
|
|
14051
14751
|
*
|
|
@@ -14137,6 +14837,12 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Layers
|
|
|
14137
14837
|
* Adds a GeoJSON Feature or FeatureCollection to the map as a layer. The layer name must be unique
|
|
14138
14838
|
*/
|
|
14139
14839
|
addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void> | undefined;
|
|
14840
|
+
/**
|
|
14841
|
+
* @experimental
|
|
14842
|
+
* Hides a GeoJSON layer from the map and removes it from the list of layers.
|
|
14843
|
+
* It will not appear in {@link getAllLayersForMap} afterwards and can be overwritten by a new layer with the same name.
|
|
14844
|
+
*/
|
|
14845
|
+
removeGeoJSONLayer(layerName: string): Promise<void> | undefined;
|
|
14140
14846
|
}
|
|
14141
14847
|
export default LayerController;
|
|
14142
14848
|
}
|
|
@@ -14214,10 +14920,6 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Dynami
|
|
|
14214
14920
|
export { DynamicFocus };
|
|
14215
14921
|
}
|
|
14216
14922
|
|
|
14217
|
-
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/object3D.destroy' {
|
|
14218
|
-
export default Object3D;
|
|
14219
|
-
}
|
|
14220
|
-
|
|
14221
14923
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/outdoor-context/Mappedin.Tile' {
|
|
14222
14924
|
import { Texture, Mesh, MeshBasicMaterial } from 'three';
|
|
14223
14925
|
import type { ICore } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
@@ -14228,8 +14930,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/outdoor-
|
|
|
14228
14930
|
center: MappedinCoordinate;
|
|
14229
14931
|
zoomLevel: number;
|
|
14230
14932
|
mesh: Mesh;
|
|
14231
|
-
material
|
|
14232
|
-
texture
|
|
14933
|
+
material?: MeshBasicMaterial;
|
|
14934
|
+
texture?: Texture;
|
|
14233
14935
|
cache: {
|
|
14234
14936
|
tileXY?: {
|
|
14235
14937
|
tileX: number;
|
|
@@ -14246,7 +14948,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/outdoor-
|
|
|
14246
14948
|
rendered: boolean;
|
|
14247
14949
|
discardTexture(): void;
|
|
14248
14950
|
applyTexture(): void;
|
|
14249
|
-
render(metersPerTile: number, referenceMap: MappedinMap): Mesh
|
|
14951
|
+
render(metersPerTile: number, referenceMap: MappedinMap): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap>;
|
|
14250
14952
|
}
|
|
14251
14953
|
}
|
|
14252
14954
|
|
|
@@ -14526,6 +15228,61 @@ declare module '@mappedin/mappedin-js/packages/navigator/interfaces/IPolygon' {
|
|
|
14526
15228
|
export default IPolygon;
|
|
14527
15229
|
}
|
|
14528
15230
|
|
|
15231
|
+
declare module '@mappedin/mappedin-js/maker/src/api-geojson/floor-object' {
|
|
15232
|
+
import type { ParsedMVF, StyleCollection } from '@mappedin/mvf';
|
|
15233
|
+
import { RendererCore } from '@mappedin/core-sdk';
|
|
15234
|
+
export class FloorObject {
|
|
15235
|
+
id: string;
|
|
15236
|
+
name: string;
|
|
15237
|
+
elevation: number;
|
|
15238
|
+
containerId: string;
|
|
15239
|
+
layers: Map<string, string>;
|
|
15240
|
+
constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, mvf?: ParsedMVF, styles?: StyleCollection);
|
|
15241
|
+
load: () => this;
|
|
15242
|
+
}
|
|
15243
|
+
}
|
|
15244
|
+
|
|
15245
|
+
declare module '@mappedin/mappedin-js/maker/src/api-geojson/markers' {
|
|
15246
|
+
import { TAddMarkerOptions } from '@mappedin/mappedin-js/maker/src/map-view-interface';
|
|
15247
|
+
import { Marker } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
15248
|
+
import { GeojsonApiMapObject } from '@mappedin/mappedin-js/maker/src/api-geojson/map-object';
|
|
15249
|
+
import { IMarkers } from '@mappedin/mappedin-js/maker/src';
|
|
15250
|
+
import { Space, Door, Coordinate } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
15251
|
+
export class MarkersApi implements IMarkers {
|
|
15252
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
15253
|
+
constructor({ currentMapGetter }: {
|
|
15254
|
+
currentMapGetter: CurremtMapGetter;
|
|
15255
|
+
});
|
|
15256
|
+
/**
|
|
15257
|
+
* internal
|
|
15258
|
+
*/
|
|
15259
|
+
getById(id: string): {
|
|
15260
|
+
marker: Marker;
|
|
15261
|
+
entityId: string;
|
|
15262
|
+
} | undefined;
|
|
15263
|
+
add(target: Space | Door | Coordinate, html: string, options?: TAddMarkerOptions): Marker;
|
|
15264
|
+
all(): Marker[];
|
|
15265
|
+
remove(target: Marker): void;
|
|
15266
|
+
removeAll(): Marker[];
|
|
15267
|
+
}
|
|
15268
|
+
type CurremtMapGetter = () => GeojsonApiMapObject | undefined;
|
|
15269
|
+
export {};
|
|
15270
|
+
}
|
|
15271
|
+
|
|
15272
|
+
declare module '@mappedin/mappedin-js/maker/src/api-geojson/inspector/debug' {
|
|
15273
|
+
import MapData from '@mappedin/mappedin-js/maker/src/map-data';
|
|
15274
|
+
import { MapViewGeoJson } from '@mappedin/mappedin-js/maker/src/map-view-geojson';
|
|
15275
|
+
import { GeoJsonApi } from '@mappedin/mappedin-js/maker/src/api-geojson/api';
|
|
15276
|
+
export class Inspector {
|
|
15277
|
+
storeStateToLocalStorageEnabled: boolean;
|
|
15278
|
+
constructor(mv: MapViewGeoJson, api: GeoJsonApi);
|
|
15279
|
+
setMapData(data: MapData): void;
|
|
15280
|
+
enable(): Promise<void>;
|
|
15281
|
+
get enabled(): boolean;
|
|
15282
|
+
storeState(id: string, state: any): void;
|
|
15283
|
+
}
|
|
15284
|
+
}
|
|
15285
|
+
|
|
14529
15286
|
declare module '@mappedin/mappedin-js/cms/src' {
|
|
14530
15287
|
import { MapView } from '@mappedin/mappedin-js/packages/legacy-renderer/public/MapView';
|
|
14531
15288
|
import { getVenue, getVenueMVF, getVenueBundle, getVenueMaker, Mappedin, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions, hydrateVenue, GET_VENUE_EVENT } from '@mappedin/mappedin-js/packages/get-venue';
|