@mappedin/mappedin-js 6.0.1-beta.43 → 6.0.1-beta.45
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 +74 -0
- package/THIRD_PARTY_LICENSES.txt +4194 -989
- package/lib/esm/{GLTFExporter-6UJSTWST.js → GLTFExporter-33O74ZRA.js} +1 -1
- package/lib/esm/{GLTFLoader-VHKTUT76.js → GLTFLoader-TFEUICFY.js} +1 -1
- package/lib/esm/{browser-JUQDIV75.js → browser-IE62BVYL.js} +1 -1
- package/lib/esm/{chunk-NCE64JTI.js → chunk-7QYC6UYU.js} +1 -1
- package/lib/esm/chunk-AGPZKMLJ.js +1 -0
- package/lib/esm/chunk-HTXG2WUL.js +1 -0
- package/lib/esm/{chunk-MEAXYDH5.js → chunk-L5IJY45Y.js} +1 -1
- package/lib/esm/{chunk-4O5ABVXW.js → chunk-N5U7Y27D.js} +1 -1
- package/lib/esm/{chunk-6XEFZ77W.js → chunk-O57EU3PO.js} +1 -1
- package/lib/esm/index.css +1 -1
- package/lib/esm/index.d.ts +1967 -732
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-WHX467BE.js → inspector-CC3UZQDZ.js} +1 -1
- package/lib/esm/inspector-GOK26VAV.css +1 -0
- package/lib/esm/internal-7A3UJNAV.css +1 -0
- package/lib/esm/{internal-CKIQLSVC.js → internal-MEGLEQC5.js} +1 -1
- package/lib/esm/{outdoor-context-v4-7JNIM35B.js → outdoor-context-v4-5DHMHSDP.js} +1 -1
- package/lib/esm/text3d-3PC3DCSJ.js +1 -0
- package/lib/esm/workers/collision-worker.csp.js +1 -0
- package/lib/esm/workers/maplibre-worker.csp.js +1 -0
- package/lib/index.css +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-7MMSKILE.js +0 -1
- package/lib/esm/chunk-G2WDUYHG.js +0 -1
- package/lib/esm/inspector-D2RCHDOY.css +0 -1
- package/lib/esm/internal-55777EMI.css +0 -1
- package/lib/esm/text3d-Q7FFP3YS.css +0 -1
- package/lib/esm/text3d-TIW6FORE.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
// ../mappedin-js/@packages/internal/mvf-utils
|
|
4
4
|
// ../mappedin-js/@mappedin/mvf
|
|
5
5
|
// ../mappedin-js/@packages/internal/common/pubsub
|
|
6
|
-
// ../mappedin-js/@packages/internal/mvf-utils/mvf-utils
|
|
7
6
|
// ../mappedin-js/@packages/internal/common/Mappedin.Logger
|
|
8
7
|
// ../mappedin-js/geojson
|
|
9
8
|
// ../mappedin-js/@packages/internal/common
|
|
10
9
|
// ../mappedin-js/@mappedin/core-sdk
|
|
10
|
+
// ../mappedin-js/@packages/internal/mvf-utils/mvf-utils
|
|
11
11
|
// ../mappedin-js/@packages/internal/mvf-utils/tokens/token-manager
|
|
12
|
+
// ../mappedin-js/@tweenjs/tween.js
|
|
12
13
|
// ../mappedin-js/@packages/internal/outdoor-context-v4
|
|
13
14
|
// ../mappedin-js/@packages/internal/geojson-navigator
|
|
14
15
|
// ../mappedin-js/@mappedin/mvf-core
|
|
15
16
|
// ../mappedin-js/three
|
|
16
17
|
// ../mappedin-js/zod
|
|
17
18
|
// ../mappedin-js/@packages/internal/shave-text/shave-text
|
|
18
|
-
// ../mappedin-js/@tweenjs/tween.js
|
|
19
19
|
// ../mappedin-js/@turf/turf
|
|
20
20
|
// ../mappedin-js/troika-three-text
|
|
21
21
|
// ../mappedin-js/@packages/internal/quad-tree
|
|
@@ -35,12 +35,13 @@
|
|
|
35
35
|
declare module '@mappedin/mappedin-js' {
|
|
36
36
|
import MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
37
37
|
import type { TEvents, TEventPayload, TClickPayload, THoverPayload, TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
38
|
-
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/
|
|
38
|
+
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, Environment } from '@mappedin/mappedin-js/packages/mvf-utils';
|
|
39
39
|
import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
|
|
40
40
|
import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
41
41
|
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, ParsedMVFLocalePack, OperationHours, SiblingGroup, LocationState } from '@mappedin/mvf';
|
|
42
42
|
import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
43
43
|
export type { Text3D as Text3DApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
44
|
+
export { disableText3DWorker } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
44
45
|
import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, EnvMapOptions, MapViewState, UpdateModelState, InitializeModelState, WatermarkUpdateOptions } from '@mappedin/mappedin-js/geojson/src';
|
|
45
46
|
import { enableTestMode, preloadFont } from '@mappedin/mappedin-js/geojson/src';
|
|
46
47
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
@@ -48,7 +49,6 @@ declare module '@mappedin/mappedin-js' {
|
|
|
48
49
|
import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
|
|
49
50
|
import type { LanguagePackHydrationItem, TImagePlacementOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
50
51
|
import { MAPPEDIN_COLORS } from '@mappedin/mappedin-js/mappedin-js/src/constants';
|
|
51
|
-
import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
|
|
52
52
|
import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
53
53
|
import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
54
54
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
@@ -241,12 +241,6 @@ declare module '@mappedin/mappedin-js' {
|
|
|
241
241
|
floorHeight?: number;
|
|
242
242
|
updateCameraElevationOnFloorChange?: boolean;
|
|
243
243
|
};
|
|
244
|
-
/**
|
|
245
|
-
* @experimental
|
|
246
|
-
* @internal
|
|
247
|
-
* @default false
|
|
248
|
-
*/
|
|
249
|
-
keepOutdoorGeometryVisible?: boolean;
|
|
250
244
|
/**
|
|
251
245
|
* @experimental
|
|
252
246
|
*
|
|
@@ -382,14 +376,15 @@ declare module '@mappedin/mappedin-js' {
|
|
|
382
376
|
export { parseMVF, unzipMVF, enableTestMode, preloadFont, MAPPEDIN_COLORS };
|
|
383
377
|
export type { MapView, MapData, MapViewState, MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, EnvMapOptions, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, UpdateModelState, InitializeModelState, };
|
|
384
378
|
export type * from 'geojson';
|
|
385
|
-
export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, TFocusTarget, IFocusable, IAnchorable, TMapDataObjectTypes, TFloorState, TFacadeState, } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
379
|
+
export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, TFocusTarget, IFocusable, IAnchorable, TMapDataObjectTypes, TFloorState, TFacadeState, TSetFloorOptions, } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
386
380
|
export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
387
381
|
export type { Label, Marker, Path, PathSegment, Shape, CameraTransform, Model, Image, Text3D, } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
388
382
|
export type { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
|
|
389
383
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
390
384
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
391
385
|
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, ImageMetaData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, LocationProfile, LocationCategory, Facade, Node, Area, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
392
|
-
export
|
|
386
|
+
export { setWorkersUrl } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
387
|
+
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, StackedMaps, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
393
388
|
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
394
389
|
export type { TFindNearestOptions, TFindNearestResult, TQueriables, Query } from '@mappedin/mappedin-js/mappedin-js/src/query';
|
|
395
390
|
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
@@ -708,7 +703,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
|
|
|
708
703
|
import type { TBlueDotEvents } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot';
|
|
709
704
|
import type { TDirectionInstruction } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
710
705
|
import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
711
|
-
export type TFloorChangeReason = '
|
|
706
|
+
export type TFloorChangeReason = 'blue-dot-floor-change' | 'stacked-maps-elevation-change' | 'navigation-connection-click' | string;
|
|
712
707
|
export type TClickPayload = {
|
|
713
708
|
/**
|
|
714
709
|
* The coordinate of the interaction.
|
|
@@ -796,14 +791,15 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
|
|
|
796
791
|
*/
|
|
797
792
|
'floor-change': TFloorChangePayload;
|
|
798
793
|
/**
|
|
799
|
-
*
|
|
800
|
-
* focus due to the camera moving.
|
|
801
|
-
*
|
|
802
|
-
* floor changing.
|
|
794
|
+
*
|
|
795
|
+
* Emitted when a different facade recieves focus due to the camera moving.
|
|
796
|
+
* This always occurs when the active floor changes to a different floor stack,
|
|
797
|
+
* but may also occur when the camera moves without the active floor changing.
|
|
803
798
|
*
|
|
804
799
|
* @property {Facade[]} facades - The facades that are in focus.
|
|
800
|
+
*
|
|
805
801
|
*/
|
|
806
|
-
'
|
|
802
|
+
'facades-in-view-change': {
|
|
807
803
|
facades: Facade[];
|
|
808
804
|
};
|
|
809
805
|
/**
|
|
@@ -882,6 +878,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
|
|
|
882
878
|
};
|
|
883
879
|
}
|
|
884
880
|
|
|
881
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils' {
|
|
882
|
+
export * from '@mappedin/mappedin-js/packages/mvf-utils/api-types';
|
|
883
|
+
export * from '@mappedin/mappedin-js/packages/mvf-utils/mvf-types';
|
|
884
|
+
export type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TGetVenueOptions, TSearchOptions, TGetVenueBundleOptions, LocalePackUrls, Environment, } from '@mappedin/mappedin-js/packages/mvf-utils/mvf-utils';
|
|
885
|
+
export { downloadVenueBundleMVF, downloadVenueBundleMVFAPIGateway, downloadMVF, parseOptions, getAccessToken, parseMVF, unzipMVF, parseMVFv1, unzipMVFv1, createEnvControl, getSasToken, parseLanguagePack, } from '@mappedin/mappedin-js/packages/mvf-utils/mvf-utils';
|
|
886
|
+
export { findAndSplitObstructionByAllEntrances as splitObstructionByAllEntrances } from '@mappedin/mappedin-js/packages/mvf-utils/geometry';
|
|
887
|
+
}
|
|
888
|
+
|
|
885
889
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
886
890
|
import Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
887
891
|
import Area from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/area';
|
|
@@ -1178,17 +1182,17 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
1178
1182
|
}
|
|
1179
1183
|
|
|
1180
1184
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
1181
|
-
import type
|
|
1185
|
+
import { type EasingCurve, type RendererCore, type WatermarkUpdateOptions } from '@mappedin/mappedin-js/geojson/src';
|
|
1182
1186
|
import { PubSub } from '@packages/internal/common';
|
|
1183
1187
|
import { type TEvents, type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
1184
1188
|
import type { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
1185
|
-
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images
|
|
1189
|
+
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
1186
1190
|
import type { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
1187
1191
|
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
1188
1192
|
import { Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
1189
1193
|
import type { Annotation, Door, Floor, MapObject, PointOfInterest, Space, Node, EnterpriseLocation, FloorStack, Facade } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
1190
1194
|
import type { TCoordinateParams } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
1191
|
-
import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates, GlobalState, UpdateGlobalState } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
1195
|
+
import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates, GlobalState, UpdateGlobalState, TSetFloorOptions, DeepPartial } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
1192
1196
|
import type { Label, Marker, Image, Shape, Text3D as Text3DView, Model, Path } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
1193
1197
|
import type { TEventPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
1194
1198
|
import type { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
|
|
@@ -1197,6 +1201,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1197
1201
|
import { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
|
|
1198
1202
|
import type { Text3D } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
1199
1203
|
import type { PathSegment } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
|
|
1204
|
+
import type { ExtractDeep } from '@mappedin/mappedin-js/mappedin-js/src/utils/types';
|
|
1205
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
1200
1206
|
/**
|
|
1201
1207
|
* The MapView class is the main class for rendering and interacting with the map.
|
|
1202
1208
|
*
|
|
@@ -1265,11 +1271,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1265
1271
|
* Controls for Stacked Maps.
|
|
1266
1272
|
*/
|
|
1267
1273
|
get StackedMaps(): StackedMaps;
|
|
1268
|
-
/**
|
|
1269
|
-
* @internal
|
|
1270
|
-
* @experimental
|
|
1271
|
-
*/
|
|
1272
|
-
get DynamicFocus(): DynamicFocus;
|
|
1273
1274
|
/**
|
|
1274
1275
|
* @internal
|
|
1275
1276
|
*/
|
|
@@ -1303,6 +1304,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1303
1304
|
*/
|
|
1304
1305
|
updateState<T extends Space | Text3DView | MapObject | Label | Marker | Shape | Door | Facade | Floor | WALLS | DOORS | Model | Path | PathSegment>(target: T, state: TUpdateState<T>): any;
|
|
1305
1306
|
updateState<T extends string & NonNullable<unknown>>(target: T, state: TUpdateStates): any;
|
|
1307
|
+
/**
|
|
1308
|
+
* Animate the state of a given target on the map from the current state to a new state. Only numeric properties and
|
|
1309
|
+
* colors can be animated.
|
|
1310
|
+
*/
|
|
1311
|
+
animateState<T extends Space | Model | Text3DView | MapObject | Label | Marker | Shape | Path | PathSegment | Floor>(target: T, state: DeepPartial<ExtractDeep<TGetState<T>, number | string | undefined>>, options?: {
|
|
1312
|
+
duration?: number;
|
|
1313
|
+
easing?: EasingCurve;
|
|
1314
|
+
}): Promise<void> & {
|
|
1315
|
+
cancel: () => void;
|
|
1316
|
+
};
|
|
1306
1317
|
/**
|
|
1307
1318
|
* Update global state of the MapView
|
|
1308
1319
|
*/
|
|
@@ -1348,12 +1359,27 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1348
1359
|
* Sets the current floor ({@link Floor}) of the map.
|
|
1349
1360
|
* @param floor The floor or floor ID to set.
|
|
1350
1361
|
*/
|
|
1351
|
-
setFloor(floor: Floor | string): void;
|
|
1362
|
+
setFloor(floor: Floor | string, options?: TSetFloorOptions): void;
|
|
1352
1363
|
/**
|
|
1353
1364
|
* Sets the current floor stack ({@link FloorStack}) of the map. The default floor of the stack will be set as the current floor.
|
|
1354
1365
|
* @param floorStack The floor stack or floor stack ID to set.
|
|
1355
1366
|
*/
|
|
1356
|
-
setFloorStack(floorStack: FloorStack | string): void;
|
|
1367
|
+
setFloorStack(floorStack: FloorStack | string, options?: TSetFloorOptions): void;
|
|
1368
|
+
/**
|
|
1369
|
+
* Create a tween object that will be updated on every render frame.
|
|
1370
|
+
* See https://tweenjs.github.io/tween.js/docs/user_guide.html for more information.
|
|
1371
|
+
*
|
|
1372
|
+
* When creating a large number of tween objects, it may be important to call {@link removeTween} to prevent memory leaks.
|
|
1373
|
+
*
|
|
1374
|
+
* @param object The data to be tweened.
|
|
1375
|
+
* @returns The tween object.
|
|
1376
|
+
*/
|
|
1377
|
+
tween<T extends Record<string, unknown>>(object: T): Tween<T>;
|
|
1378
|
+
/**
|
|
1379
|
+
* Remove a tween created with {@link tween}.
|
|
1380
|
+
* @param tween The tween to remove.
|
|
1381
|
+
*/
|
|
1382
|
+
removeTween(tween: Tween<any>): void;
|
|
1357
1383
|
/**
|
|
1358
1384
|
* The current floor stack ({@link FloorStack}) of the map.
|
|
1359
1385
|
*/
|
|
@@ -1369,7 +1395,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1369
1395
|
* @hidden
|
|
1370
1396
|
*/
|
|
1371
1397
|
updateWatermark(options: WatermarkUpdateOptions): void;
|
|
1372
|
-
getState<T extends Space | Model | Text3DView | MapObject | Label | Marker | Image | Shape | Path | PathSegment | Floor | string>(target: T): TGetState<T>;
|
|
1398
|
+
getState<T extends Space | Model | Text3DView | MapObject | Label | Marker | Image | Shape | Path | PathSegment | Floor | Facade | string>(target: T): TGetState<T>;
|
|
1373
1399
|
setHoverColor(c: string): void;
|
|
1374
1400
|
getHoverColor(): string | undefined;
|
|
1375
1401
|
/**
|
|
@@ -1550,6 +1576,18 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1550
1576
|
* @experimental
|
|
1551
1577
|
*/
|
|
1552
1578
|
takeScreenshot(): Promise<string>;
|
|
1579
|
+
/**
|
|
1580
|
+
* @internal
|
|
1581
|
+
* @hidden
|
|
1582
|
+
* Whether the floor visibility is being self managed or automatically handled by the SDK.
|
|
1583
|
+
*/
|
|
1584
|
+
get manualFloorVisibility(): boolean;
|
|
1585
|
+
/**
|
|
1586
|
+
* @internal
|
|
1587
|
+
* @hidden
|
|
1588
|
+
* Disables the default behavior of the SDK to automatically hide floors on setFloor.
|
|
1589
|
+
*/
|
|
1590
|
+
set manualFloorVisibility(value: boolean);
|
|
1553
1591
|
}
|
|
1554
1592
|
}
|
|
1555
1593
|
|
|
@@ -1558,6 +1596,29 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d' {
|
|
|
1558
1596
|
import type { TAddText3DOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
1559
1597
|
import type { CurrentMapGetter } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/types';
|
|
1560
1598
|
import { Text3D as Text3DView } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
1599
|
+
/**
|
|
1600
|
+
* Disables the Text3D web worker and falls back to processing on the main thread.
|
|
1601
|
+
*
|
|
1602
|
+
* This function should be called when using Text3D features in environments
|
|
1603
|
+
* with strict Content Security Policy (CSP) that blocks web workers from
|
|
1604
|
+
* being created using blob: URLs or unsafe-eval directives.
|
|
1605
|
+
*
|
|
1606
|
+
* While disabling the worker may slightly impact performance for complex text
|
|
1607
|
+
* rendering, it enables Text3D functionality in CSP-restricted environments.
|
|
1608
|
+
*
|
|
1609
|
+
* Ensure calling this before calling preloadFont
|
|
1610
|
+
*
|
|
1611
|
+
* @example
|
|
1612
|
+
* ```typescript
|
|
1613
|
+
* import {disableText3DWorker} from '@mappedin/mappedin-js';
|
|
1614
|
+
* // Disable Text3D worker for CSP compatibility
|
|
1615
|
+
* disableText3DWorker();
|
|
1616
|
+
*
|
|
1617
|
+
* // Then use Text3D features as normal
|
|
1618
|
+
* mapView.Text3D.labelAll();
|
|
1619
|
+
* ```
|
|
1620
|
+
*/
|
|
1621
|
+
export function disableText3DWorker(): void;
|
|
1561
1622
|
export class Text3D {
|
|
1562
1623
|
#private;
|
|
1563
1624
|
/**
|
|
@@ -1661,7 +1722,8 @@ declare module '@mappedin/mappedin-js/geojson/src' {
|
|
|
1661
1722
|
export type { EntityId, EntityState, LineStyle, PaintStyle, ModelProperties, Shading, ImagePlacementOptions, } from '@mappedin/mappedin-js/geojson/src/types';
|
|
1662
1723
|
export type * from 'geojson';
|
|
1663
1724
|
export type { WatermarkUpdateOptions, WatermarkOptions, WatermarkPosition } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
|
|
1664
|
-
export { preloadFont } from '@mappedin/mappedin-js/geojson/src/systems/text3d/system';
|
|
1725
|
+
export { preloadFont, configureWorker } from '@mappedin/mappedin-js/geojson/src/systems/text3d/system';
|
|
1726
|
+
export { setWorkerUrl as setCollisionWorkerUrl } from '@mappedin/mappedin-js/geojson/src/systems/collisions/system';
|
|
1665
1727
|
export type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
|
|
1666
1728
|
export type { AttributionControlOptions, AttributionPosition } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
|
|
1667
1729
|
export type { Text3DStyle, ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles';
|
|
@@ -1751,6 +1813,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1751
1813
|
import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
1752
1814
|
import type { InsetPaddingOption, UpdatableText3DState, Text3DState, AddText3DOptions, EnvMapOptions, InitializeModelState, ModelState, UpdateModelState as GeoJsonUpdateModelState, ImagePlacementOptions, LabelAppearance } from '@mappedin/mappedin-js/geojson/src';
|
|
1753
1815
|
import type { PathSegment } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
|
|
1816
|
+
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
1754
1817
|
export type UpdateModelState = Omit<GeoJsonUpdateModelState, 'position' | 'scale'> & {
|
|
1755
1818
|
position?: Coordinate;
|
|
1756
1819
|
scale?: number | [number, number, number];
|
|
@@ -1940,6 +2003,22 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1940
2003
|
* The color of the path.
|
|
1941
2004
|
*/
|
|
1942
2005
|
color: string;
|
|
2006
|
+
/**
|
|
2007
|
+
* The complete fraction of the path.
|
|
2008
|
+
*/
|
|
2009
|
+
completeFraction: number;
|
|
2010
|
+
/**
|
|
2011
|
+
* The near radius of the path.
|
|
2012
|
+
*/
|
|
2013
|
+
nearRadius: number;
|
|
2014
|
+
/**
|
|
2015
|
+
* The far radius of the path.
|
|
2016
|
+
*/
|
|
2017
|
+
farRadius: number;
|
|
2018
|
+
/**
|
|
2019
|
+
* Whether the path is visible.
|
|
2020
|
+
*/
|
|
2021
|
+
visible: boolean;
|
|
1943
2022
|
};
|
|
1944
2023
|
/**
|
|
1945
2024
|
* Represents the state of a shape.
|
|
@@ -1977,6 +2056,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1977
2056
|
* The opacity of the facade.
|
|
1978
2057
|
*/
|
|
1979
2058
|
opacity: number;
|
|
2059
|
+
/**
|
|
2060
|
+
* Whether the facade is visible.
|
|
2061
|
+
*/
|
|
2062
|
+
visible: boolean;
|
|
1980
2063
|
};
|
|
1981
2064
|
/**
|
|
1982
2065
|
* Defines the state for geometry elements like {@link Space} when updated.
|
|
@@ -2035,7 +2118,68 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2035
2118
|
* Opacity of the floor geometry.
|
|
2036
2119
|
*/
|
|
2037
2120
|
opacity: number;
|
|
2121
|
+
/**
|
|
2122
|
+
* Visibility of floor geometry.
|
|
2123
|
+
*/
|
|
2124
|
+
visible: boolean;
|
|
2125
|
+
};
|
|
2126
|
+
labels: {
|
|
2127
|
+
/**
|
|
2128
|
+
* Whether the labels are enabled to be shown when the floor is visible.
|
|
2129
|
+
*/
|
|
2130
|
+
enabled: boolean;
|
|
2131
|
+
};
|
|
2132
|
+
markers: {
|
|
2133
|
+
/**
|
|
2134
|
+
* Whether the markers are enabled to be shown when the floor is visible.
|
|
2135
|
+
*/
|
|
2136
|
+
enabled: boolean;
|
|
2137
|
+
};
|
|
2138
|
+
footprint: {
|
|
2139
|
+
/**
|
|
2140
|
+
* Altitude of the footprint relative to the floor.
|
|
2141
|
+
*/
|
|
2142
|
+
altitude: number;
|
|
2143
|
+
/**
|
|
2144
|
+
* Whether the footprint is visible.
|
|
2145
|
+
*/
|
|
2146
|
+
visible: boolean;
|
|
2147
|
+
/**
|
|
2148
|
+
* Height of the footprint relative to altitude.
|
|
2149
|
+
*/
|
|
2150
|
+
height: number;
|
|
2151
|
+
/**
|
|
2152
|
+
* Opacity of the footprint.
|
|
2153
|
+
*/
|
|
2154
|
+
opacity: number;
|
|
2155
|
+
/**
|
|
2156
|
+
* Material side of the footprint.
|
|
2157
|
+
* @internal
|
|
2158
|
+
*/
|
|
2159
|
+
side: 'double' | 'front' | 'back';
|
|
2160
|
+
/**
|
|
2161
|
+
* Color of the footprint.
|
|
2162
|
+
*/
|
|
2163
|
+
color: string;
|
|
2164
|
+
};
|
|
2165
|
+
/**
|
|
2166
|
+
* @internal
|
|
2167
|
+
*/
|
|
2168
|
+
occlusion: {
|
|
2169
|
+
/**
|
|
2170
|
+
* @internal
|
|
2171
|
+
* Whether this floor should occlude labels and markers on other floors
|
|
2172
|
+
*/
|
|
2173
|
+
enabled: boolean;
|
|
2038
2174
|
};
|
|
2175
|
+
/**
|
|
2176
|
+
* The visibility of the floor, including the geometry, labels, and markers.
|
|
2177
|
+
*/
|
|
2178
|
+
visible: boolean;
|
|
2179
|
+
/**
|
|
2180
|
+
* The altitude of the floor.
|
|
2181
|
+
*/
|
|
2182
|
+
altitude: number;
|
|
2039
2183
|
};
|
|
2040
2184
|
export enum WALLS {
|
|
2041
2185
|
Exterior = "exterior-walls",
|
|
@@ -2048,7 +2192,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2048
2192
|
/**
|
|
2049
2193
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
2050
2194
|
*/
|
|
2051
|
-
export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS | Door ? Partial<TDoorsState> : T extends Model ? Partial<UpdateModelState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Floor ?
|
|
2195
|
+
export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS | Door ? Partial<TDoorsState> : T extends Model ? Partial<UpdateModelState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Floor ? DeepPartial<TFloorState> : T extends Facade ? Partial<TFacadeState> : T extends Shape ? Partial<Omit<TShapeState, 'height' | 'type'>> : T extends Text3D ? UpdatableText3DState : T extends Path ? Partial<TPathState> : T extends PathSegment ? Partial<TPathState> : T extends string ? Record<string, any> : never;
|
|
2052
2196
|
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState> | Partial<TPathState>;
|
|
2053
2197
|
export type TGetState<T> = T extends WALLS ? TWallsState | undefined : T extends DOORS ? TDoorsState | undefined : T extends Marker ? TMarkerState | undefined : T extends Shape ? TShapeState | undefined : T extends Model ? TModelState | undefined : T extends Label ? TLabelState | undefined : T extends Image ? TImageState | undefined : T extends Text3D ? Text3DState | undefined : T extends Space | MapObject ? TGeometryState | undefined : T extends Floor ? TFloorState | undefined : T extends Facade ? TFacadeState | undefined : T extends Path ? TPathState | undefined : T extends PathSegment ? TPathState | undefined : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | TPathState | undefined : never;
|
|
2054
2198
|
/**
|
|
@@ -2516,6 +2660,28 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2516
2660
|
* sorting of markers and show certain markers always in front
|
|
2517
2661
|
*/
|
|
2518
2662
|
zIndex?: number;
|
|
2663
|
+
/**
|
|
2664
|
+
* Configuration for the low priority pin fallback strategy.
|
|
2665
|
+
* When enabled, shows a smaller pin version of the marker when all anchor positions have collisions.
|
|
2666
|
+
* @default { enabled: true, size: 2, color: '#666' }
|
|
2667
|
+
*/
|
|
2668
|
+
lowPriorityPin?: {
|
|
2669
|
+
/**
|
|
2670
|
+
* Whether to enable low priority pin strategy when all anchor positions have collisions.
|
|
2671
|
+
* @default true
|
|
2672
|
+
*/
|
|
2673
|
+
enabled?: boolean;
|
|
2674
|
+
/**
|
|
2675
|
+
* Size of the low priority pin in pixels.
|
|
2676
|
+
* @default 2
|
|
2677
|
+
*/
|
|
2678
|
+
size?: number;
|
|
2679
|
+
/**
|
|
2680
|
+
* Color of the low priority pin.
|
|
2681
|
+
* @default '#666'
|
|
2682
|
+
*/
|
|
2683
|
+
color?: string;
|
|
2684
|
+
};
|
|
2519
2685
|
};
|
|
2520
2686
|
/**
|
|
2521
2687
|
* Options for creating a new {@link Label} with {@link Labels.add}.
|
|
@@ -2732,6 +2898,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2732
2898
|
*/
|
|
2733
2899
|
bearingAndPitch?: boolean;
|
|
2734
2900
|
};
|
|
2901
|
+
export type TSetFloorOptions = {
|
|
2902
|
+
/**
|
|
2903
|
+
* Optionally provide the context for the floor change which will be published as the `reason` for the `floor-change` event.
|
|
2904
|
+
*/
|
|
2905
|
+
context?: TFloorChangeReason;
|
|
2906
|
+
};
|
|
2735
2907
|
}
|
|
2736
2908
|
|
|
2737
2909
|
declare module '@mappedin/mappedin-js/mappedin-js/src/constants' {
|
|
@@ -3122,7 +3294,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects' {
|
|
|
3122
3294
|
}
|
|
3123
3295
|
|
|
3124
3296
|
declare module '@mappedin/mappedin-js/mappedin-js/src/debug' {
|
|
3125
|
-
import type { RendererCore } from '@mappedin/
|
|
3297
|
+
import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
3126
3298
|
export class Debug {
|
|
3127
3299
|
state: RendererCore['Debug']['state'];
|
|
3128
3300
|
constructor(core: RendererCore);
|
|
@@ -3225,6 +3397,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
|
3225
3397
|
*/
|
|
3226
3398
|
animateArrowsOnPath?: boolean;
|
|
3227
3399
|
};
|
|
3400
|
+
/**
|
|
3401
|
+
* Controls whether the path drawing is animated across floors.
|
|
3402
|
+
* @default true
|
|
3403
|
+
*/
|
|
3404
|
+
animatePathDrawing?: boolean;
|
|
3228
3405
|
/**
|
|
3229
3406
|
* Options for the path.
|
|
3230
3407
|
*/
|
|
@@ -3385,6 +3562,141 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
|
3385
3562
|
export {};
|
|
3386
3563
|
}
|
|
3387
3564
|
|
|
3565
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
3566
|
+
import type { RendererCore, WatermarkUpdateOptions } from '@mappedin/core-sdk';
|
|
3567
|
+
import { type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
3568
|
+
import { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3569
|
+
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
3570
|
+
import type { FloorStack, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3571
|
+
import { Facade, Coordinate, MapObject, Space, Floor, Door } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3572
|
+
import type { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
3573
|
+
import { Label, Marker, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3574
|
+
import { Text3D as Text3DView, Model, Path, type Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3575
|
+
import { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
3576
|
+
import type { TGetState, TUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3577
|
+
import { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera';
|
|
3578
|
+
import { Exporter } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter';
|
|
3579
|
+
import { Labels } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels';
|
|
3580
|
+
import { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
3581
|
+
import { Markers } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers';
|
|
3582
|
+
import { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
|
|
3583
|
+
import { Models } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models';
|
|
3584
|
+
import { Paths } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths';
|
|
3585
|
+
import { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3586
|
+
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
3587
|
+
import { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
|
|
3588
|
+
import { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
|
|
3589
|
+
import Outdoor from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
|
|
3590
|
+
import { type BBox } from 'geojson';
|
|
3591
|
+
import { Text3D } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
3592
|
+
import { PathSegment } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
|
|
3593
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
3594
|
+
export class GeoJsonApi {
|
|
3595
|
+
core: RendererCore;
|
|
3596
|
+
mapObjects: GeojsonApiMapObject[];
|
|
3597
|
+
id: string;
|
|
3598
|
+
mapDataExternal: {
|
|
3599
|
+
[key in string]: MapData;
|
|
3600
|
+
};
|
|
3601
|
+
mapData?: MapData;
|
|
3602
|
+
currentMap: GeojsonApiMapObject;
|
|
3603
|
+
hiddenOutdoorGeometries: [
|
|
3604
|
+
BBox,
|
|
3605
|
+
polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[],
|
|
3606
|
+
layers: string[]
|
|
3607
|
+
][];
|
|
3608
|
+
manualFloorVisibility: boolean;
|
|
3609
|
+
mapView: MapView;
|
|
3610
|
+
Camera: Camera;
|
|
3611
|
+
Labels: Labels;
|
|
3612
|
+
Text3D: Text3D;
|
|
3613
|
+
Markers: Markers;
|
|
3614
|
+
Models: Models;
|
|
3615
|
+
Paths: Paths;
|
|
3616
|
+
Exporter: Exporter;
|
|
3617
|
+
Navigation: Navigation;
|
|
3618
|
+
Outdoor: Outdoor;
|
|
3619
|
+
BlueDot: BlueDot;
|
|
3620
|
+
Shapes: Shapes;
|
|
3621
|
+
Style: Style;
|
|
3622
|
+
Images: Images;
|
|
3623
|
+
get StackedMaps(): import("..").StackedMaps;
|
|
3624
|
+
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
3625
|
+
updateState<T extends Space | Text3DView | MapObject | Label | Shape | Marker | Model | Door | Facade | Floor | WALLS | DOORS | Path | PathSegment | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
3626
|
+
update: () => void;
|
|
3627
|
+
getMapDataInternal(): MapDataInternal | undefined;
|
|
3628
|
+
getMapData(): MapData | undefined;
|
|
3629
|
+
addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
|
|
3630
|
+
setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
|
|
3631
|
+
setFloorStack(floorStack: FloorStack | string, reason?: TFloorChangeReason): void;
|
|
3632
|
+
updateWatermark(options: WatermarkUpdateOptions): void;
|
|
3633
|
+
get currentFloorStack(): FloorStack;
|
|
3634
|
+
get currentFloor(): Floor;
|
|
3635
|
+
getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | Model | Path | PathSegment | Floor | Facade | string>(target: T): TGetState<T>;
|
|
3636
|
+
setHoverColor(c: string): void;
|
|
3637
|
+
getHoverColor(): string | undefined;
|
|
3638
|
+
/**
|
|
3639
|
+
* Create a coordinate from a screen coordinate
|
|
3640
|
+
* @param x - The x coordinate of the screen
|
|
3641
|
+
* @param y - The y coordinate of the screen
|
|
3642
|
+
* @param floor - The floor to use for the coordinate
|
|
3643
|
+
* @returns The coordinate
|
|
3644
|
+
*/
|
|
3645
|
+
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor): Coordinate | undefined;
|
|
3646
|
+
getScreenCoordinateFromCoordinate(coordinate: Coordinate): {
|
|
3647
|
+
x: number;
|
|
3648
|
+
y: number;
|
|
3649
|
+
};
|
|
3650
|
+
isInView(target: Space | MapObject | Label | Marker | string): boolean;
|
|
3651
|
+
auto(): {
|
|
3652
|
+
labels: Label[];
|
|
3653
|
+
};
|
|
3654
|
+
tween<T extends Record<string, unknown>>(object: T): Tween<T>;
|
|
3655
|
+
removeTween(tween: Tween<any>): void;
|
|
3656
|
+
/**
|
|
3657
|
+
* @internal
|
|
3658
|
+
*/
|
|
3659
|
+
get __core(): RendererCore;
|
|
3660
|
+
clear(): void;
|
|
3661
|
+
destroy(): void;
|
|
3662
|
+
}
|
|
3663
|
+
/**
|
|
3664
|
+
* Sets the base URL directory where worker scripts are hosted for CSP compatibility.
|
|
3665
|
+
*
|
|
3666
|
+
* This function configures both the MapLibre and collision system workers to load from
|
|
3667
|
+
* external URLs instead of using inline blob URLs. The SDK expects two specific worker
|
|
3668
|
+
* files to be available in the provided directory:
|
|
3669
|
+
* - `maplibre-worker.csp.js` - For MapLibre map rendering
|
|
3670
|
+
* - `collision-worker.csp.js` - For the collision detection system
|
|
3671
|
+
*
|
|
3672
|
+
* Using this approach enables compatibility with strict Content Security Policies
|
|
3673
|
+
* that block unsafe-eval and blob: URLs.
|
|
3674
|
+
*
|
|
3675
|
+
* @param baseUrl - Base URL directory where worker scripts are hosted (without trailing slash)
|
|
3676
|
+
* Example: "https://cdn.example.com/workers"
|
|
3677
|
+
*
|
|
3678
|
+
* @example
|
|
3679
|
+
* ```typescript
|
|
3680
|
+
* import { setWorkersUrl } from '@mappedin/mappedin-js';
|
|
3681
|
+
*
|
|
3682
|
+
* // Call before initializing any maps
|
|
3683
|
+
* setWorkersUrl('https://cdn.example.com/workers');
|
|
3684
|
+
* // This will load:
|
|
3685
|
+
* // - https://cdn.example.com/workers/maplibre-worker.csp.js
|
|
3686
|
+
* // - https://cdn.example.com/workers/collision-worker.csp.js
|
|
3687
|
+
* ```
|
|
3688
|
+
*
|
|
3689
|
+
* @remarks
|
|
3690
|
+
* - The worker files can be found in the published package at:
|
|
3691
|
+
* `node_modules/@mappedin/mappedin-js/lib/esm/workers/`
|
|
3692
|
+
* - For deployment, copy these files to your web server or CDN
|
|
3693
|
+
* - A better approach is to add these files to your build process to ensure
|
|
3694
|
+
* they're always in sync with your application
|
|
3695
|
+
* - Call this function before creating any map instances
|
|
3696
|
+
*/
|
|
3697
|
+
export function setWorkersUrl(baseUrl: string): void;
|
|
3698
|
+
}
|
|
3699
|
+
|
|
3388
3700
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
|
|
3389
3701
|
export { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
3390
3702
|
export { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot';
|
|
@@ -3401,7 +3713,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
|
|
|
3401
3713
|
export { default as Outdoor } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
|
|
3402
3714
|
export { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
|
|
3403
3715
|
export { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
3404
|
-
export { DynamicFocus } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus';
|
|
3405
3716
|
}
|
|
3406
3717
|
|
|
3407
3718
|
declare module '@mappedin/mappedin-js/mappedin-js/src/search' {
|
|
@@ -3624,12 +3935,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot' {
|
|
|
3624
3935
|
declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
3625
3936
|
import MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
3626
3937
|
import type { TEvents, TEventPayload, TClickPayload, THoverPayload, TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
3627
|
-
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/
|
|
3938
|
+
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, Environment } from '@mappedin/mappedin-js/packages/mvf-utils';
|
|
3628
3939
|
import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
|
|
3629
3940
|
import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3630
3941
|
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, ParsedMVFLocalePack, OperationHours, SiblingGroup, LocationState } from '@mappedin/mvf';
|
|
3631
3942
|
import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
3632
3943
|
export type { Text3D as Text3DApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
3944
|
+
export { disableText3DWorker } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
3633
3945
|
import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, EnvMapOptions, MapViewState, UpdateModelState, InitializeModelState, WatermarkUpdateOptions } from '@mappedin/mappedin-js/geojson/src';
|
|
3634
3946
|
import { enableTestMode, preloadFont } from '@mappedin/mappedin-js/geojson/src';
|
|
3635
3947
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
@@ -3637,7 +3949,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3637
3949
|
import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
|
|
3638
3950
|
import type { LanguagePackHydrationItem, TImagePlacementOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3639
3951
|
import { MAPPEDIN_COLORS } from '@mappedin/mappedin-js/mappedin-js/src/constants';
|
|
3640
|
-
import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
|
|
3641
3952
|
import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3642
3953
|
import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
3643
3954
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
@@ -3830,12 +4141,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3830
4141
|
floorHeight?: number;
|
|
3831
4142
|
updateCameraElevationOnFloorChange?: boolean;
|
|
3832
4143
|
};
|
|
3833
|
-
/**
|
|
3834
|
-
* @experimental
|
|
3835
|
-
* @internal
|
|
3836
|
-
* @default false
|
|
3837
|
-
*/
|
|
3838
|
-
keepOutdoorGeometryVisible?: boolean;
|
|
3839
4144
|
/**
|
|
3840
4145
|
* @experimental
|
|
3841
4146
|
*
|
|
@@ -3971,41 +4276,828 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3971
4276
|
export { parseMVF, unzipMVF, enableTestMode, preloadFont, MAPPEDIN_COLORS };
|
|
3972
4277
|
export type { MapView, MapData, MapViewState, MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, EnvMapOptions, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, UpdateModelState, InitializeModelState, };
|
|
3973
4278
|
export type * from 'geojson';
|
|
3974
|
-
export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, TFocusTarget, IFocusable, IAnchorable, TMapDataObjectTypes, TFloorState, TFacadeState, } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
4279
|
+
export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, TFocusTarget, IFocusable, IAnchorable, TMapDataObjectTypes, TFloorState, TFacadeState, TSetFloorOptions, } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3975
4280
|
export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3976
4281
|
export type { Label, Marker, Path, PathSegment, Shape, CameraTransform, Model, Image, Text3D, } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3977
4282
|
export type { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
|
|
3978
4283
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
3979
4284
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3980
4285
|
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, ImageMetaData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, LocationProfile, LocationCategory, Facade, Node, Area, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3981
|
-
export
|
|
4286
|
+
export { setWorkersUrl } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
4287
|
+
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, StackedMaps, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
3982
4288
|
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
3983
4289
|
export type { TFindNearestOptions, TFindNearestResult, TQueriables, Query } from '@mappedin/mappedin-js/mappedin-js/src/query';
|
|
3984
4290
|
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
3985
4291
|
}
|
|
3986
4292
|
|
|
3987
|
-
declare module '@mappedin/mappedin-js/
|
|
3988
|
-
import type { NodeCollection } from '@mappedin/mvf';
|
|
3989
|
-
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
3990
|
-
import type { EnterpriseLocation, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3991
|
-
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
3992
|
-
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3993
|
-
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
3994
|
-
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
4293
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/api-types' {
|
|
3995
4294
|
/**
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4295
|
+
* This file contains the API types for MappedinSDK - before they get turned into Classes
|
|
4296
|
+
*/
|
|
4297
|
+
export type TLocationType = 'amenities' | 'tenant';
|
|
4298
|
+
export type TNode = {
|
|
4299
|
+
id: string;
|
|
4300
|
+
x: number;
|
|
4301
|
+
y: number;
|
|
4302
|
+
map: string;
|
|
4303
|
+
externalId?: string;
|
|
4304
|
+
paths: {
|
|
4305
|
+
node: string;
|
|
4306
|
+
map: string;
|
|
4307
|
+
weight?: number;
|
|
4308
|
+
}[];
|
|
4309
|
+
[propName: string]: any;
|
|
4310
|
+
};
|
|
4311
|
+
export type TImage = {
|
|
4312
|
+
original?: string;
|
|
4313
|
+
large?: string;
|
|
4314
|
+
'140x140'?: string;
|
|
4315
|
+
xxlarge?: string;
|
|
4316
|
+
xsmall?: string;
|
|
4317
|
+
'66x66'?: string;
|
|
4318
|
+
xlarge?: string;
|
|
4319
|
+
medium?: string;
|
|
4320
|
+
xxsmall?: string;
|
|
4321
|
+
small?: string;
|
|
4322
|
+
};
|
|
4323
|
+
export type TLogo = TImage;
|
|
4324
|
+
export type TGalleryImage = {
|
|
4325
|
+
image: TImage;
|
|
4326
|
+
caption?: string;
|
|
4327
|
+
};
|
|
4328
|
+
export type TPhone = {
|
|
4329
|
+
number?: string;
|
|
4330
|
+
};
|
|
4331
|
+
export type TSocial = {
|
|
4332
|
+
website?: string;
|
|
4333
|
+
twitter?: string;
|
|
4334
|
+
facebook?: string;
|
|
4335
|
+
instagram?: string;
|
|
4336
|
+
};
|
|
4337
|
+
export type TColor = {
|
|
4338
|
+
hex: string;
|
|
4339
|
+
opacity: number;
|
|
4340
|
+
rgba: string;
|
|
4341
|
+
};
|
|
4342
|
+
export type TVortex = {
|
|
4343
|
+
id: string;
|
|
4344
|
+
name: string;
|
|
4345
|
+
type: string;
|
|
4346
|
+
weight: number;
|
|
4347
|
+
multiplier: number;
|
|
4348
|
+
[propName: string]: any;
|
|
4349
|
+
};
|
|
4350
|
+
export type TPicture = {
|
|
4351
|
+
original?: string;
|
|
4352
|
+
};
|
|
4353
|
+
export type TOpeningHours = {
|
|
4354
|
+
'@type': string;
|
|
4355
|
+
opens: string;
|
|
4356
|
+
closes: string;
|
|
4357
|
+
dayOfWeek: string[];
|
|
4358
|
+
validFrom?: string;
|
|
4359
|
+
validThrough?: string;
|
|
4360
|
+
};
|
|
4361
|
+
export type TSiblingGroup = {
|
|
4362
|
+
label: string;
|
|
4363
|
+
siblings: string[];
|
|
4364
|
+
};
|
|
4365
|
+
export type TState = {
|
|
4366
|
+
type: string;
|
|
4367
|
+
start?: string;
|
|
4368
|
+
end?: string;
|
|
4369
|
+
};
|
|
4370
|
+
export type TCategory = {
|
|
4371
|
+
name?: string;
|
|
4372
|
+
externalId?: string;
|
|
4373
|
+
parents?: string[];
|
|
4374
|
+
id?: string;
|
|
4375
|
+
icon?: TPicture;
|
|
4376
|
+
};
|
|
4377
|
+
export type TEvent = {
|
|
4378
|
+
id: string;
|
|
4379
|
+
type: string;
|
|
4380
|
+
name: string;
|
|
4381
|
+
location?: string;
|
|
4382
|
+
description?: string;
|
|
4383
|
+
image?: TImage;
|
|
4384
|
+
startDate?: number;
|
|
4385
|
+
endDate?: number;
|
|
4386
|
+
showDate?: number;
|
|
4387
|
+
};
|
|
4388
|
+
export interface TGeoReference {
|
|
4389
|
+
target: {
|
|
4390
|
+
x: number;
|
|
4391
|
+
y: number;
|
|
4392
|
+
};
|
|
4393
|
+
control: {
|
|
4394
|
+
x: number;
|
|
4395
|
+
y: number;
|
|
4396
|
+
};
|
|
4397
|
+
}
|
|
4398
|
+
export interface TMap {
|
|
4399
|
+
id: string;
|
|
4400
|
+
name: string;
|
|
4401
|
+
shortName: string;
|
|
4402
|
+
elevation?: number;
|
|
4403
|
+
scale?: number;
|
|
4404
|
+
x_scale?: number;
|
|
4405
|
+
georeference?: TGeoReference[];
|
|
4406
|
+
[propName: string]: any;
|
|
4407
|
+
}
|
|
4408
|
+
export type TMapGroup = {
|
|
4409
|
+
name: string;
|
|
4410
|
+
id: string;
|
|
4411
|
+
};
|
|
4412
|
+
export type TBuilding = TLocation & {
|
|
4413
|
+
groupId: string;
|
|
4414
|
+
};
|
|
4415
|
+
export type TLocation = {
|
|
4416
|
+
id: string;
|
|
4417
|
+
name: string;
|
|
4418
|
+
type: string;
|
|
4419
|
+
nodes: {
|
|
4420
|
+
map: TMap['id'];
|
|
4421
|
+
node: TNode['id'];
|
|
4422
|
+
}[];
|
|
4423
|
+
polygons: {
|
|
4424
|
+
map: TMap['id'];
|
|
4425
|
+
id: TPolygon['id'];
|
|
4426
|
+
}[];
|
|
4427
|
+
categories: string[];
|
|
4428
|
+
description?: string;
|
|
4429
|
+
sortOrder?: number;
|
|
4430
|
+
logo?: TLogo;
|
|
4431
|
+
phone?: TPhone;
|
|
4432
|
+
social?: TSocial;
|
|
4433
|
+
color?: TColor;
|
|
4434
|
+
shortName?: string;
|
|
4435
|
+
detailsUrl?: string;
|
|
4436
|
+
parent?: string | null;
|
|
4437
|
+
tags?: string[];
|
|
4438
|
+
externalId?: string;
|
|
4439
|
+
picture?: TPicture;
|
|
4440
|
+
states?: TState[];
|
|
4441
|
+
operationHours?: TOpeningHours[] | undefined;
|
|
4442
|
+
siblingGroups?: TSiblingGroup[] | undefined;
|
|
4443
|
+
gallery?: TGalleryImage[] | undefined;
|
|
4444
|
+
[propName: string]: any;
|
|
4445
|
+
};
|
|
4446
|
+
export type TPolygon = {
|
|
4447
|
+
id: string;
|
|
4448
|
+
map: string;
|
|
4449
|
+
layer?: string;
|
|
4450
|
+
layerId?: string;
|
|
4451
|
+
externalId?: string;
|
|
4452
|
+
name?: string;
|
|
4453
|
+
entrances: {
|
|
4454
|
+
map: TMap['id'];
|
|
4455
|
+
id: TNode['id'];
|
|
4456
|
+
}[];
|
|
4457
|
+
};
|
|
4458
|
+
export type TPolygonRanking = {
|
|
4459
|
+
polygonId: string;
|
|
4460
|
+
entranceNodeId: string;
|
|
4461
|
+
score: number;
|
|
4462
|
+
};
|
|
4463
|
+
export type TLocationState = {
|
|
4464
|
+
id: string;
|
|
4465
|
+
name: string;
|
|
4466
|
+
value: string;
|
|
4467
|
+
};
|
|
4468
|
+
export type TVenue = {
|
|
4469
|
+
address?: string;
|
|
4470
|
+
city?: string;
|
|
4471
|
+
countrycode?: string;
|
|
4472
|
+
defaultMap?: string;
|
|
4473
|
+
externalId?: string;
|
|
4474
|
+
id?: string;
|
|
4475
|
+
latitude?: number;
|
|
4476
|
+
logo?: TLogo;
|
|
4477
|
+
longitude?: number;
|
|
4478
|
+
metadata?: any;
|
|
4479
|
+
name?: string;
|
|
4480
|
+
operationHours?: TOpeningHours[];
|
|
4481
|
+
postal?: string;
|
|
4482
|
+
slug?: string;
|
|
4483
|
+
state?: string;
|
|
4484
|
+
telephone?: string;
|
|
4485
|
+
tzid?: string;
|
|
4486
|
+
tzidOverride?: string;
|
|
4487
|
+
utcOffset?: string;
|
|
4488
|
+
website?: string;
|
|
4489
|
+
};
|
|
4490
|
+
export type TMappedinAPI = {
|
|
4491
|
+
nodes: TNode[];
|
|
4492
|
+
locations: TLocation[];
|
|
4493
|
+
categories: TCategory[];
|
|
4494
|
+
mapGroups: TMapGroup[];
|
|
4495
|
+
polygons: TPolygon[];
|
|
4496
|
+
maps: TMap[];
|
|
4497
|
+
themes: any;
|
|
4498
|
+
venue: TVenue;
|
|
4499
|
+
vortexes: TVortex[];
|
|
4500
|
+
locationStates?: TLocationState[];
|
|
4501
|
+
imageBinaries?: Map<string, Uint8Array>;
|
|
4502
|
+
};
|
|
4503
|
+
}
|
|
4504
|
+
|
|
4505
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/mvf-types' {
|
|
4506
|
+
import type { MapId, Style, Feature, LineString, ObstructionProperties, EntranceProperties, SpaceProperties, ObstructionCollection, EntranceCollection, SpaceCollection, FloorImageProperties, BaseTextAreaProperties, EnterpriseTexture } from '@mappedin/mvf';
|
|
4507
|
+
import type { FeatureCollection, MultiPolygon, Point, Polygon } from 'geojson';
|
|
4508
|
+
import type { TImage, TMap, TNode, TOpeningHours, TPhone, TSiblingGroup, TSocial } from '@mappedin/mappedin-js/packages/mvf-utils/api-types';
|
|
4509
|
+
export type WithIDs<T> = Map<string, T>;
|
|
4510
|
+
type ManifestFile = {
|
|
4511
|
+
type: 'file';
|
|
4512
|
+
name: string;
|
|
4513
|
+
};
|
|
4514
|
+
type ManifestFolder = {
|
|
4515
|
+
type: 'folder';
|
|
4516
|
+
name: string;
|
|
4517
|
+
children: ManifestFile[];
|
|
4518
|
+
};
|
|
4519
|
+
export type MVFStyle = Style & {
|
|
4520
|
+
type: string;
|
|
4521
|
+
width?: number;
|
|
4522
|
+
};
|
|
4523
|
+
export type MVFObstructionFeature = ObstructionCollection['features'][number];
|
|
4524
|
+
export type MVFEntranceFeature = EntranceCollection['features'][number];
|
|
4525
|
+
export type MVFSpaceFeature = SpaceCollection['features'][number];
|
|
4526
|
+
export type WithPolygonImage<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4527
|
+
image?: FloorImageProperties;
|
|
4528
|
+
};
|
|
4529
|
+
export type WithTextArea<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4530
|
+
textArea?: BaseTextAreaProperties;
|
|
4531
|
+
};
|
|
4532
|
+
export type WithEntepriseStyle<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4533
|
+
style?: {
|
|
4534
|
+
styleId: string;
|
|
4535
|
+
edgeOffset?: number;
|
|
4536
|
+
};
|
|
4537
|
+
};
|
|
4538
|
+
export type WithTextures<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4539
|
+
textures?: EnterpriseTexture[];
|
|
4540
|
+
};
|
|
4541
|
+
export type PolygonFeatureProperties<T extends SpaceProperties | ObstructionProperties> = WithEntepriseStyle<T> | WithPolygonImage<T> | WithTextures<T>;
|
|
4542
|
+
export type MVFv1PolygonLikeProperties = {
|
|
4543
|
+
id: string;
|
|
4544
|
+
altitude?: number;
|
|
4545
|
+
color?: string;
|
|
4546
|
+
externalId?: string | null;
|
|
4547
|
+
height?: number;
|
|
4548
|
+
opacity?: number;
|
|
4549
|
+
layer?: string;
|
|
4550
|
+
level: string;
|
|
4551
|
+
parent?: string | null;
|
|
4552
|
+
};
|
|
4553
|
+
export type MVFv1SpaceProperties = MVFv1PolygonLikeProperties & {
|
|
4554
|
+
entrances: {
|
|
4555
|
+
level: TMap['id'];
|
|
4556
|
+
id: TNode['id'];
|
|
4557
|
+
}[];
|
|
4558
|
+
};
|
|
4559
|
+
export type MVFv1ObstructionProperties = MVFv1PolygonLikeProperties;
|
|
4560
|
+
export type MVFv1ConnectionProperties = {
|
|
4561
|
+
id: string;
|
|
4562
|
+
/**
|
|
4563
|
+
* Indicates that a connection is accessible
|
|
4564
|
+
*/
|
|
4565
|
+
accessible: boolean;
|
|
4566
|
+
/**
|
|
4567
|
+
* Array of node ids that this Connection connects with.
|
|
4568
|
+
*/
|
|
4569
|
+
destinations: string[];
|
|
4570
|
+
level: string;
|
|
4571
|
+
multiplier: number;
|
|
4572
|
+
name: string;
|
|
4573
|
+
/**
|
|
4574
|
+
* Type of the connection such as `escalator` or `elevator`
|
|
4575
|
+
*/
|
|
4576
|
+
type: string;
|
|
4577
|
+
weight: number;
|
|
4578
|
+
};
|
|
4579
|
+
export type MVFv1NodeProperties = {
|
|
4580
|
+
id: string;
|
|
4581
|
+
/**
|
|
4582
|
+
* Indicates that a node is accessible
|
|
4583
|
+
*/
|
|
4584
|
+
accessible: boolean;
|
|
4585
|
+
/**
|
|
4586
|
+
* External id of a node is used to sync and connect to external systems to Mappedin data
|
|
4587
|
+
*/
|
|
4588
|
+
externalId: string | null;
|
|
4589
|
+
level: string;
|
|
4590
|
+
multiplier: number;
|
|
4591
|
+
neighbors: string[];
|
|
4592
|
+
weight: number;
|
|
4593
|
+
};
|
|
4594
|
+
export type MVFv1LevelProperties = {
|
|
4595
|
+
id: string;
|
|
4596
|
+
abbreviation?: string;
|
|
4597
|
+
building?: string;
|
|
4598
|
+
elevation?: number;
|
|
4599
|
+
name: string;
|
|
4600
|
+
};
|
|
4601
|
+
export type MVFv1ManifestProperties = {
|
|
4602
|
+
/**
|
|
4603
|
+
* Name of the venue
|
|
4604
|
+
*/
|
|
4605
|
+
name: string;
|
|
4606
|
+
folder_struct: (ManifestFolder | ManifestFile)[];
|
|
4607
|
+
/**
|
|
4608
|
+
* Mappedin Venue Format version number of the MVF bundle
|
|
4609
|
+
*/
|
|
4610
|
+
version: string;
|
|
4611
|
+
/**
|
|
4612
|
+
* Timestamp when the MVF bundle was generated. E.g. `2022-02-25T16:26:09.908Z`
|
|
4613
|
+
*/
|
|
4614
|
+
time: string;
|
|
4615
|
+
};
|
|
4616
|
+
export type MVFv1BuildingProperties = {
|
|
4617
|
+
id: string;
|
|
4618
|
+
name: string;
|
|
4619
|
+
venue: string;
|
|
4620
|
+
};
|
|
4621
|
+
export type MVFv1CategoryProperties = {
|
|
4622
|
+
id: string;
|
|
4623
|
+
name: string;
|
|
4624
|
+
picture?: TImage;
|
|
4625
|
+
};
|
|
4626
|
+
export type MVFv1LocationProperties = {
|
|
4627
|
+
id: string;
|
|
4628
|
+
address?: string | null;
|
|
4629
|
+
/**
|
|
4630
|
+
* Array of {@link MICategoryProperties | category} ids
|
|
4631
|
+
*/
|
|
4632
|
+
categories: string[];
|
|
4633
|
+
/**
|
|
4634
|
+
* A text description of the location usually indicating what the location is used for
|
|
4635
|
+
*/
|
|
4636
|
+
description?: string | null;
|
|
4637
|
+
/**
|
|
4638
|
+
* Email address to for contacting this location
|
|
4639
|
+
*/
|
|
4640
|
+
email?: string | null;
|
|
4641
|
+
/**
|
|
4642
|
+
* External id used to connect Mappedin Location to an external system
|
|
4643
|
+
*/
|
|
4644
|
+
externalId?: string | null;
|
|
4645
|
+
/**
|
|
4646
|
+
* Opening hours of the location
|
|
4647
|
+
*/
|
|
4648
|
+
hours?: TOpeningHours[] | null;
|
|
4649
|
+
/**
|
|
4650
|
+
* Collection of links related to this location
|
|
4651
|
+
*/
|
|
4652
|
+
links?: {
|
|
4653
|
+
label: string;
|
|
4654
|
+
url: string;
|
|
4655
|
+
}[] | null;
|
|
4656
|
+
logo?: TImage | null;
|
|
4657
|
+
/**
|
|
4658
|
+
* Name of the location. By default this is the string displayed in the location label
|
|
4659
|
+
*/
|
|
4660
|
+
name: string;
|
|
4661
|
+
/**
|
|
4662
|
+
* Phone number for contacting this location
|
|
4663
|
+
*/
|
|
4664
|
+
phone?: TPhone | null;
|
|
4665
|
+
picture?: TImage | null;
|
|
4666
|
+
services?: string | null;
|
|
4667
|
+
siblingGroups?: TSiblingGroup[] | null;
|
|
4668
|
+
/**
|
|
4669
|
+
* Social media links of the location
|
|
4670
|
+
*/
|
|
4671
|
+
social?: TSocial | null;
|
|
4672
|
+
/**
|
|
4673
|
+
* Array of {@link MISpaceProperties | MVF Space} ids for this location
|
|
4674
|
+
*/
|
|
4675
|
+
spaces?: {
|
|
4676
|
+
id: string;
|
|
4677
|
+
map: string;
|
|
4678
|
+
}[] | null;
|
|
4679
|
+
states?: {
|
|
4680
|
+
type: string;
|
|
4681
|
+
start?: string;
|
|
4682
|
+
end?: string;
|
|
4683
|
+
}[] | null;
|
|
4684
|
+
type: string;
|
|
4685
|
+
};
|
|
4686
|
+
export type MVFv1ObstructionCollection = FeatureCollection<Polygon, MVFv1ObstructionProperties>;
|
|
4687
|
+
export type MVFv1SpaceCollection = FeatureCollection<Polygon, MVFv1SpaceProperties>;
|
|
4688
|
+
export type MVFv1ConnectionCollection = FeatureCollection<Point, MVFv1ConnectionProperties>;
|
|
4689
|
+
export type MVFv1NodeCollection = FeatureCollection<Point, MVFv1NodeProperties>;
|
|
4690
|
+
export type MVFv1LevelCollection = FeatureCollection<Polygon | MultiPolygon, MVFv1LevelProperties>;
|
|
4691
|
+
export type MVFv1ManifestCollection = FeatureCollection<Point, MVFv1ManifestProperties>;
|
|
4692
|
+
export type MVFv1BuildingCollection = FeatureCollection<Polygon, MVFv1BuildingProperties>;
|
|
4693
|
+
export type MVFv1CategoryCollection = FeatureCollection<null, MVFv1CategoryProperties>;
|
|
4694
|
+
export type MVFv1LocationCollection = FeatureCollection<null, MVFv1LocationProperties>;
|
|
4695
|
+
export type ParsedMVFv1 = {
|
|
4696
|
+
/**
|
|
4697
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4698
|
+
*/
|
|
4699
|
+
space: {
|
|
4700
|
+
[mapId: MapId]: MVFv1SpaceCollection | undefined;
|
|
4701
|
+
};
|
|
4702
|
+
/**
|
|
4703
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4704
|
+
*/
|
|
4705
|
+
obstruction: {
|
|
4706
|
+
[mapId: MapId]: MVFv1ObstructionCollection | undefined;
|
|
4707
|
+
};
|
|
4708
|
+
/**
|
|
4709
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4710
|
+
*/
|
|
4711
|
+
level: {
|
|
4712
|
+
[mapId: MapId]: MVFv1LevelCollection | undefined;
|
|
4713
|
+
};
|
|
4714
|
+
/**
|
|
4715
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4716
|
+
*/
|
|
4717
|
+
node: {
|
|
4718
|
+
[mapId: MapId]: MVFv1NodeCollection | undefined;
|
|
4719
|
+
};
|
|
4720
|
+
/**
|
|
4721
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4722
|
+
*/
|
|
4723
|
+
connection: {
|
|
4724
|
+
[mapId: MapId]: MVFv1ConnectionCollection | undefined;
|
|
4725
|
+
};
|
|
4726
|
+
'manifest.geojson': MVFv1ManifestCollection;
|
|
4727
|
+
'building.geojson': MVFv1BuildingCollection;
|
|
4728
|
+
'category.geojson': MVFv1CategoryCollection;
|
|
4729
|
+
'location.geojson': MVFv1LocationCollection;
|
|
4730
|
+
};
|
|
4731
|
+
export type RawMVFv1 = {
|
|
4732
|
+
'manifest.geojson': Uint8Array;
|
|
4733
|
+
'building.geojson': Uint8Array;
|
|
4734
|
+
'category.geojson': Uint8Array;
|
|
4735
|
+
'location.geojson': Uint8Array;
|
|
4736
|
+
level: Partial<Record<MapId, Uint8Array>>;
|
|
4737
|
+
node: Partial<Record<MapId, Uint8Array>>;
|
|
4738
|
+
space: Partial<Record<MapId, Uint8Array>>;
|
|
4739
|
+
obstruction: Partial<Record<MapId, Uint8Array>>;
|
|
4740
|
+
connection: Partial<Record<MapId, Uint8Array>>;
|
|
4741
|
+
};
|
|
4742
|
+
export type ObstructionFeature = Feature<LineString | Polygon, ObstructionProperties>;
|
|
4743
|
+
export type ObstructionWallFeature = Feature<LineString, ObstructionProperties>;
|
|
4744
|
+
export type EntranceFeature = Feature<LineString, EntranceProperties>;
|
|
4745
|
+
export {};
|
|
4746
|
+
}
|
|
4747
|
+
|
|
4748
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/mvf-utils' {
|
|
4749
|
+
import { type ParsedMVF, type ParsedMVFLocalePack, type RawMVF } from '@mappedin/mvf';
|
|
4750
|
+
import type { ParsedMVFv1, RawMVFv1 } from '@mappedin/mappedin-js/packages/mvf-utils/mvf-types';
|
|
4751
|
+
export * from '@mappedin/mappedin-js/packages/mvf-utils/tokens/access-token';
|
|
4752
|
+
export * from '@mappedin/mappedin-js/packages/mvf-utils/tokens/sas-token';
|
|
4753
|
+
/**
|
|
4754
|
+
* This is how we can avoid bundling in node-fetch (via isomorphic fetch),
|
|
4755
|
+
* which keeps popping up in security advisories
|
|
4756
|
+
* This is a pattern that most isomorphic libraries appear to use,
|
|
4757
|
+
* where when running in node, you can pass your own fetch function
|
|
4758
|
+
* as one is not provided by Node.js.
|
|
4759
|
+
*
|
|
4760
|
+
*/
|
|
4761
|
+
export function isomorphicFetch(): Window['fetch'];
|
|
4762
|
+
/**
|
|
4763
|
+
* @internal
|
|
4764
|
+
* export for test mocking
|
|
4765
|
+
*/
|
|
4766
|
+
export function __setFetchFn(fn: any): void;
|
|
4767
|
+
export type TGetVenueOptions = {
|
|
4768
|
+
accessToken?: string;
|
|
4769
|
+
clientId?: string;
|
|
4770
|
+
clientSecret?: string;
|
|
4771
|
+
baseUrl?: string;
|
|
4772
|
+
includeHidden?: boolean;
|
|
4773
|
+
noAuth?: boolean;
|
|
4774
|
+
perspective?: string;
|
|
4775
|
+
language?: string;
|
|
4776
|
+
headers?: {
|
|
4777
|
+
[key in string]: string;
|
|
4778
|
+
};
|
|
4779
|
+
venue: string;
|
|
4780
|
+
/**
|
|
4781
|
+
* An object specifying additional properties to fetch for each data item.
|
|
4782
|
+
* Each key represents a data item (e.g., 'locations', 'nodes'), and the value is an array of strings indicating extra properties to be included.
|
|
4783
|
+
* @example
|
|
4784
|
+
* For example:
|
|
4785
|
+
* ```
|
|
4786
|
+
* getVenue({
|
|
4787
|
+
* venue: 'some-venue',
|
|
4788
|
+
* things: { vortexes: [ 'material' ]
|
|
4789
|
+
* }})
|
|
4790
|
+
* ```
|
|
4791
|
+
*/
|
|
4792
|
+
things?: any;
|
|
4793
|
+
useDraftData?: boolean;
|
|
4794
|
+
platformString?: string;
|
|
4795
|
+
secure?: boolean;
|
|
4796
|
+
preloadMapGeometry?: boolean;
|
|
4797
|
+
};
|
|
4798
|
+
export type TGetVenueBundleOptions = TGetVenueOptions & {
|
|
4799
|
+
baseUri?: string;
|
|
4800
|
+
version?: string;
|
|
4801
|
+
/**
|
|
4802
|
+
* Parse bundle and convert images to blobs. Disabled in React Native
|
|
4803
|
+
* @private
|
|
4804
|
+
*/
|
|
4805
|
+
shouldPopulateBundledImagesAsBlobs?: boolean;
|
|
4806
|
+
};
|
|
4807
|
+
/** @internal */
|
|
4808
|
+
export type TGetVenueMVFOptions = TGetVenueBundleOptions & {
|
|
4809
|
+
onMVFParsed?: (mvf: ParsedMVF) => void;
|
|
4810
|
+
/**
|
|
4811
|
+
* Override initial MVF data
|
|
4812
|
+
*/
|
|
4813
|
+
override?: Partial<Pick<ParsedMVF, 'styles.json'>>;
|
|
4814
|
+
};
|
|
4815
|
+
/**
|
|
4816
|
+
* Options for configuring search functionality.
|
|
4817
|
+
*/
|
|
4818
|
+
export type TSearchOptions = {
|
|
4819
|
+
/**
|
|
4820
|
+
* Indicates whether search functionality is enabled.
|
|
4821
|
+
*/
|
|
4822
|
+
enabled: boolean;
|
|
4823
|
+
};
|
|
4824
|
+
export type TGetMapDataSharedOptions = {
|
|
4825
|
+
/**
|
|
4826
|
+
* Mappedin map ID.
|
|
4827
|
+
*/
|
|
4828
|
+
mapId: string;
|
|
4829
|
+
/**
|
|
4830
|
+
* Optionally provide a custom base URL for the Mappedin API request.
|
|
4831
|
+
* Use the {@link Environment | `environment`} setting to switch environments
|
|
4832
|
+
*/
|
|
4833
|
+
baseUri?: string;
|
|
4834
|
+
/**
|
|
4835
|
+
* Optionally provide a custom URI for authentication when obtaining an access token.
|
|
4836
|
+
* Use the {@link Environment | `environment`} setting to switch environments.
|
|
4837
|
+
*/
|
|
4838
|
+
baseAuthUri?: string;
|
|
4839
|
+
/**
|
|
4840
|
+
* Callback for when the Mappedin map data has been fetched and parsed as Mappedin Venue Format (MVF) data.
|
|
4841
|
+
* @param mvf Parsed MVF data.
|
|
4842
|
+
*/
|
|
4843
|
+
onMVFParsed?: (mvf: ParsedMVF) => void;
|
|
4844
|
+
/**
|
|
4845
|
+
* Load different view of mvf data based on configId
|
|
4846
|
+
*/
|
|
4847
|
+
viewId?: string;
|
|
4848
|
+
/**
|
|
4849
|
+
* set the target SDK environment
|
|
4850
|
+
* @default 'us'
|
|
4851
|
+
* @example
|
|
4852
|
+
* const mapData = getMapData({
|
|
4853
|
+
* key: '',
|
|
4854
|
+
* secret: '',
|
|
4855
|
+
* environment: 'eu'
|
|
4856
|
+
* })
|
|
4857
|
+
*/
|
|
4858
|
+
environment?: ServiceEnvironment;
|
|
4859
|
+
/**
|
|
4860
|
+
* The language of the map data.
|
|
4861
|
+
* The ISO 639-1 language code to change to (e.g., 'en' for English, 'fr' for French). Check ({@link EnterpriseVenue.languages}) for available languages
|
|
4862
|
+
*/
|
|
4863
|
+
language?: string;
|
|
4864
|
+
/**
|
|
4865
|
+
* Analytics configuration.
|
|
4866
|
+
*/
|
|
4867
|
+
analytics?: {
|
|
4868
|
+
/**
|
|
4869
|
+
* Whether to log analytics events.
|
|
4870
|
+
* @default false
|
|
4871
|
+
*/
|
|
4872
|
+
logEvents?: boolean;
|
|
4873
|
+
/**
|
|
4874
|
+
* Whether to send analytics events to the server.
|
|
4875
|
+
* @default false
|
|
4876
|
+
*/
|
|
4877
|
+
sendEvents?: boolean;
|
|
4878
|
+
/**
|
|
4879
|
+
* Custom base URI for analytics requests. If not provided, the default analytics endpoint will be used.
|
|
4880
|
+
* Use the {@link Environment | `environment`} setting to switch environments.
|
|
4881
|
+
*/
|
|
4882
|
+
baseUri?: string;
|
|
4883
|
+
/**
|
|
4884
|
+
* Context for analytics events.
|
|
4885
|
+
* @default 'websdk'
|
|
4886
|
+
* @internal
|
|
4887
|
+
*/
|
|
4888
|
+
context?: string;
|
|
4889
|
+
};
|
|
4890
|
+
search?: TSearchOptions;
|
|
4891
|
+
/**
|
|
4892
|
+
* @hidden
|
|
4893
|
+
* @internal
|
|
4894
|
+
*/
|
|
4895
|
+
layoutId?: 'draft';
|
|
4896
|
+
};
|
|
4897
|
+
/**
|
|
4898
|
+
* @interface
|
|
4899
|
+
*/
|
|
4900
|
+
export type TGetMapDataWithCredentialsOptions = {
|
|
4901
|
+
/**
|
|
4902
|
+
* Mappedin auth key.
|
|
4903
|
+
*/
|
|
4904
|
+
key: string;
|
|
4905
|
+
/**
|
|
4906
|
+
* Mappedin auth secret.
|
|
4907
|
+
*/
|
|
4908
|
+
secret: string;
|
|
4909
|
+
} & TGetMapDataSharedOptions;
|
|
4910
|
+
/**
|
|
4911
|
+
* @interface
|
|
4912
|
+
*/
|
|
4913
|
+
export type TGetMapDataWithAccessTokenOptions = {
|
|
4914
|
+
/**
|
|
4915
|
+
* Mappedin access token.
|
|
4916
|
+
*/
|
|
4917
|
+
accessToken: string;
|
|
4918
|
+
} & TGetMapDataSharedOptions;
|
|
4919
|
+
export type TGetMapDataOptions = TGetMapDataWithCredentialsOptions | TGetMapDataWithAccessTokenOptions;
|
|
4920
|
+
export type TProcessedMVFOptions = TGetMapDataOptions & {
|
|
4921
|
+
clientId: string;
|
|
4922
|
+
clientSecret: string;
|
|
4923
|
+
venue: string;
|
|
4924
|
+
accessToken: string;
|
|
4925
|
+
};
|
|
4926
|
+
export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & {
|
|
4927
|
+
perspective?: string;
|
|
4928
|
+
});
|
|
4929
|
+
export type TGetVenueOptionsInternal<T extends TAllGetVenueOptions> = Omit<T & {
|
|
4930
|
+
baseUrl?: string;
|
|
4931
|
+
supplementaryUrl?: string;
|
|
4932
|
+
noAuth?: boolean;
|
|
4933
|
+
includeHidden?: boolean;
|
|
4934
|
+
apiGateway?: string;
|
|
4935
|
+
authorization?: string;
|
|
4936
|
+
headers?: any;
|
|
4937
|
+
}, 'things'> & {
|
|
4938
|
+
things?: any;
|
|
4939
|
+
};
|
|
4940
|
+
export const defaultOptions: TGetVenueOptionsInternal<TGetVenueOptions>;
|
|
4941
|
+
/**
|
|
4942
|
+
* @internal
|
|
4943
|
+
*/
|
|
4944
|
+
export function parseOptions<T extends TAllGetVenueOptions>(options: T): TGetVenueOptionsInternal<T>;
|
|
4945
|
+
/**
|
|
4946
|
+
* Prepares the request and URL fields to pass into generateAPIRequest
|
|
4947
|
+
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
4948
|
+
* @param url string describing the url corresponding to the client's request
|
|
4949
|
+
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
4950
|
+
*/
|
|
4951
|
+
export function constructParamsForRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): {
|
|
4952
|
+
req: {
|
|
4953
|
+
method: string;
|
|
4954
|
+
headers: any;
|
|
4955
|
+
};
|
|
4956
|
+
url: string;
|
|
4957
|
+
};
|
|
4958
|
+
export function generateAPIRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): Promise<any>;
|
|
4959
|
+
export const getPerspectivesFromResponse: (res: unknown) => Record<string, {
|
|
4960
|
+
url: string;
|
|
4961
|
+
locale_packs: LocalePackUrls;
|
|
4962
|
+
}> | null;
|
|
4963
|
+
/**
|
|
4964
|
+
* Get the bundle URL and updated_at time.
|
|
4965
|
+
* @internal
|
|
4966
|
+
*/
|
|
4967
|
+
export function getVenueMVFURL(userOptions: TGetVenueBundleOptions, path?: string): Promise<{
|
|
4968
|
+
url: any;
|
|
4969
|
+
localePacks: any;
|
|
4970
|
+
updated_at: any;
|
|
4971
|
+
}>;
|
|
4972
|
+
export function getLanguagePackUnitArray(url: string, { signal }: {
|
|
4973
|
+
signal: AbortSignal;
|
|
4974
|
+
}): Promise<Uint8Array>;
|
|
4975
|
+
export function parseLanguagePack(data: Uint8Array): Promise<ParsedMVFLocalePack>;
|
|
4976
|
+
export function downloadLanguagePack(url: string, { signal }: {
|
|
4977
|
+
signal: AbortSignal;
|
|
4978
|
+
}): Promise<ParsedMVFLocalePack | undefined>;
|
|
4979
|
+
export function downloadVenueBundleMVFAPIGateway(options: TGetVenueBundleOptions): Promise<{
|
|
4980
|
+
compressed: Uint8Array;
|
|
4981
|
+
localePacks: LocalePackUrls;
|
|
4982
|
+
}>;
|
|
4983
|
+
export function downloadVenueBundleMVF(options: TGetVenueBundleOptions): Promise<Uint8Array>;
|
|
4984
|
+
export function parseMVFv1(raw: RawMVFv1): ParsedMVFv1;
|
|
4985
|
+
export function validateStaticMVFv1Files(data: unknown): boolean;
|
|
4986
|
+
export function unzipMVFv1(data: any): Promise<RawMVFv1>;
|
|
4987
|
+
export function downloadMVF(userOptions: TGetMapDataOptions, accessToken: string): Promise<Uint8Array>;
|
|
4988
|
+
export function getMakerBundleURL(userOptions: TGetMapDataOptions, token: string): Promise<{
|
|
4989
|
+
url: string;
|
|
4990
|
+
updated_at: string;
|
|
4991
|
+
}>;
|
|
4992
|
+
/**
|
|
4993
|
+
* @internal
|
|
4994
|
+
*/
|
|
4995
|
+
export function parseMVF(raw: RawMVF & {
|
|
4996
|
+
options?: {
|
|
4997
|
+
outdoorViewToken?: string;
|
|
4998
|
+
};
|
|
4999
|
+
}): ParsedMVF;
|
|
5000
|
+
/**
|
|
5001
|
+
* Figure out if the MVF data at least has the static files we expect.
|
|
5002
|
+
*/
|
|
5003
|
+
export function validateStaticMVFFiles(data: unknown): boolean;
|
|
5004
|
+
/**
|
|
5005
|
+
* @internal
|
|
5006
|
+
*/
|
|
5007
|
+
export function unzipMVF(data: Uint8Array): Promise<RawMVF>;
|
|
5008
|
+
export type LocalePackUrls = {
|
|
5009
|
+
[key: string]: string;
|
|
5010
|
+
};
|
|
5011
|
+
/**
|
|
5012
|
+
* Represents the environment state configuration.
|
|
5013
|
+
* @example
|
|
5014
|
+
* const mapData = getMapData({
|
|
5015
|
+
* key: '',
|
|
5016
|
+
* secret: '',
|
|
5017
|
+
* environment: 'eu'
|
|
5018
|
+
* })
|
|
5019
|
+
*/
|
|
5020
|
+
export type Environment = {
|
|
5021
|
+
/**
|
|
5022
|
+
* The base URI for the API.
|
|
5023
|
+
*/
|
|
5024
|
+
baseUri: string;
|
|
5025
|
+
/**
|
|
5026
|
+
* The base URI for authentication.
|
|
5027
|
+
*/
|
|
5028
|
+
baseAuthUri: string;
|
|
5029
|
+
/**
|
|
5030
|
+
* The base URI for analytics.
|
|
5031
|
+
*/
|
|
5032
|
+
analyticsBaseUri: string;
|
|
5033
|
+
/**
|
|
5034
|
+
* The URI for the tile server.
|
|
5035
|
+
*/
|
|
5036
|
+
tileServerUri: string;
|
|
5037
|
+
};
|
|
5038
|
+
type InternalServiceEnvironment = 'us' | 'eu' | 'us-staging-enterprise' | 'us-staging-self-serve';
|
|
5039
|
+
export type ServiceEnvironment = 'us' | 'eu';
|
|
5040
|
+
export function createEnvControl(): {
|
|
5041
|
+
/**
|
|
5042
|
+
* @internal
|
|
5043
|
+
*/
|
|
5044
|
+
updateByUserOption(userOption: TGetMapDataOptions): void;
|
|
5045
|
+
/**
|
|
5046
|
+
* @internal
|
|
5047
|
+
*/
|
|
5048
|
+
updateTileServerBaseUrl(url: string): void;
|
|
5049
|
+
/**
|
|
5050
|
+
* @internal
|
|
5051
|
+
*/
|
|
5052
|
+
updateEnvironment(env: InternalServiceEnvironment): void;
|
|
5053
|
+
getBaseUri(enterprise: boolean): string;
|
|
5054
|
+
getBaseAuthUri(enterprise?: boolean): string;
|
|
5055
|
+
getAnalyticsBaseUri(): string;
|
|
5056
|
+
getTileServerUri(): string;
|
|
5057
|
+
reset(): void;
|
|
5058
|
+
/**
|
|
5059
|
+
* @internal
|
|
5060
|
+
*/
|
|
5061
|
+
__getState: () => Environment;
|
|
5062
|
+
};
|
|
5063
|
+
export type EnvControl = ReturnType<typeof createEnvControl>;
|
|
5064
|
+
/**
|
|
5065
|
+
* Return IDs for all individual maps that are part of a multi-building MVF, not including the
|
|
5066
|
+
* outdoor map. If a map is not a multi-building map, an empty array is returned.
|
|
5067
|
+
*/
|
|
5068
|
+
export const getBuildingIds: (mvf: ParsedMVF) => string[];
|
|
5069
|
+
}
|
|
5070
|
+
|
|
5071
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/geometry' {
|
|
5072
|
+
import type { EntranceFeature, ObstructionWallFeature } from '@mappedin/mappedin-js/packages/mvf-utils/mvf-types';
|
|
5073
|
+
export function findAndSplitObstructionByAllEntrances(wall: ObstructionWallFeature, entrances: EntranceFeature[]): {
|
|
5074
|
+
entrances: EntranceFeature[];
|
|
5075
|
+
obstructions: ObstructionWallFeature[];
|
|
5076
|
+
};
|
|
5077
|
+
}
|
|
5078
|
+
|
|
5079
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
|
|
5080
|
+
import type { NodeCollection } from '@mappedin/mvf';
|
|
5081
|
+
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
5082
|
+
import type { EnterpriseLocation, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5083
|
+
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
5084
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
5085
|
+
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
5086
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
5087
|
+
/**
|
|
5088
|
+
* A class representing {@link Path} node data within the map.
|
|
5089
|
+
*
|
|
5090
|
+
* Nodes are used to define points in the map's pathfinding graph.
|
|
5091
|
+
*
|
|
5092
|
+
*/
|
|
5093
|
+
class Node extends BaseMetaData implements IGeoJSONData, IFocusable, IAnchorable {
|
|
5094
|
+
#private;
|
|
5095
|
+
/**
|
|
5096
|
+
* @internal
|
|
5097
|
+
*/
|
|
5098
|
+
static readonly __type = "node";
|
|
5099
|
+
/**
|
|
5100
|
+
* @internal
|
|
4009
5101
|
*/
|
|
4010
5102
|
readonly __type = "node";
|
|
4011
5103
|
/**
|
|
@@ -6175,6 +7267,27 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
|
|
|
6175
7267
|
}
|
|
6176
7268
|
}
|
|
6177
7269
|
|
|
7270
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/utils/types' {
|
|
7271
|
+
/**
|
|
7272
|
+
* Utility type that extracts nested values matching a specific type
|
|
7273
|
+
* @example
|
|
7274
|
+
* type A = ExtractDeep<{ a: { b: string; c: number; }; d: string; e: number; }, number>;
|
|
7275
|
+
* // { a: { c: number; } e: number; }
|
|
7276
|
+
*/
|
|
7277
|
+
export type ExtractDeep<T, U> = {
|
|
7278
|
+
[K in keyof T as T[K] extends U ? K : T[K] extends object | undefined ? ExtractDeep<NonNullable<T[K]>, U> extends never ? never : K : never]: T[K] extends object | undefined ? undefined extends T[K] ? ExtractDeep<NonNullable<T[K]>, U> | undefined : ExtractDeep<NonNullable<T[K]>, U> : T[K] extends U ? T[K] : never;
|
|
7279
|
+
};
|
|
7280
|
+
/**
|
|
7281
|
+
* Makes all properties in an object (including nested ones) optional
|
|
7282
|
+
* @example
|
|
7283
|
+
* type A = DeepPartial<{ a: { b: string; c: number; }; d: string; }>;
|
|
7284
|
+
* // { a?: { b?: string; c?: number; }; d?: string; }
|
|
7285
|
+
*/
|
|
7286
|
+
export type DeepPartial<T> = T extends object ? {
|
|
7287
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
7288
|
+
} : T;
|
|
7289
|
+
}
|
|
7290
|
+
|
|
6178
7291
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/types' {
|
|
6179
7292
|
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
6180
7293
|
export type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
@@ -6188,6 +7301,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6188
7301
|
import type { CollisionRankingTier } from '@mappedin/mappedin-js/geojson/src/utils/collision-ranking-tier';
|
|
6189
7302
|
import { z } from 'zod';
|
|
6190
7303
|
import { type PackedBBoxes } from '@mappedin/mappedin-js/geojson/src/systems/collisions/system';
|
|
7304
|
+
import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
6191
7305
|
/**
|
|
6192
7306
|
* State reprsenting a Marker
|
|
6193
7307
|
*/
|
|
@@ -6220,32 +7334,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6220
7334
|
* Pointer to the HTML element of the marker in the DOM tree
|
|
6221
7335
|
*/
|
|
6222
7336
|
element: HTMLElement;
|
|
6223
|
-
/**
|
|
6224
|
-
* The initial rank of the marker, which can be used to reset the rank of the marker to its initial value.
|
|
6225
|
-
*/
|
|
6226
|
-
initialRank: CollisionRankingTier | number;
|
|
6227
|
-
options
|
|
6228
|
-
|
|
6229
|
-
* The rank of the marker, which determines its visibility in relation to other colliders.
|
|
6230
|
-
*/
|
|
6231
|
-
rank?: CollisionRankingTier | number;
|
|
6232
|
-
/**
|
|
6233
|
-
* Whether the Marker should be clickable via the SDK's internal click event system.
|
|
6234
|
-
*
|
|
6235
|
-
* @example
|
|
6236
|
-
* ```javascript
|
|
6237
|
-
* renderer.on('click', ({ markers }) => {});
|
|
6238
|
-
* ```
|
|
6239
|
-
*/
|
|
6240
|
-
interactive?: boolean | 'pointer-events-auto';
|
|
6241
|
-
/**
|
|
6242
|
-
* The z-index of the marker. Can be used used in conjunction with rank: 'always-visible' to make certain markers appear over others
|
|
6243
|
-
*/
|
|
6244
|
-
zIndex?: number;
|
|
6245
|
-
/**
|
|
6246
|
-
* The vertical position of the marker relative to the floor.
|
|
6247
|
-
*/
|
|
6248
|
-
verticalOffset?: number;
|
|
7337
|
+
/**
|
|
7338
|
+
* The initial rank of the marker, which can be used to reset the rank of the marker to its initial value.
|
|
7339
|
+
*/
|
|
7340
|
+
initialRank: CollisionRankingTier | number;
|
|
7341
|
+
options: Omit<AddMarkerOptions, 'id'> & {
|
|
7342
|
+
lowPriorityPin: LowPriorityPinConfig;
|
|
6249
7343
|
};
|
|
6250
7344
|
/**
|
|
6251
7345
|
* Anchor point for the marker. This will determine the position of the marker relative to the position. A list will place the marker in the first empty placement.
|
|
@@ -6256,6 +7350,29 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6256
7350
|
*/
|
|
6257
7351
|
dynamicResize: boolean;
|
|
6258
7352
|
};
|
|
7353
|
+
export type MarkerStateUpdate = Omit<MarkerState, 'type' | 'parent' | 'id' | 'options'> & {
|
|
7354
|
+
options?: Partial<Omit<AddMarkerOptions, 'id' | 'lowPriorityPin'>>;
|
|
7355
|
+
};
|
|
7356
|
+
/**
|
|
7357
|
+
* Configuration for the low priority pin fallback strategy
|
|
7358
|
+
*/
|
|
7359
|
+
export type LowPriorityPinConfig = {
|
|
7360
|
+
/**
|
|
7361
|
+
* Whether to enable low priority pin strategy when all anchor positions have collisions.
|
|
7362
|
+
* @default true
|
|
7363
|
+
*/
|
|
7364
|
+
enabled: boolean;
|
|
7365
|
+
/**
|
|
7366
|
+
* Size of the low priority pin in pixels.
|
|
7367
|
+
* @default 2
|
|
7368
|
+
*/
|
|
7369
|
+
size: number;
|
|
7370
|
+
/**
|
|
7371
|
+
* Color of the low priority pin.
|
|
7372
|
+
* @default '#666'
|
|
7373
|
+
*/
|
|
7374
|
+
color: string;
|
|
7375
|
+
};
|
|
6259
7376
|
export const addMarkerOptionsSchema: z.ZodObject<{
|
|
6260
7377
|
rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
|
|
6261
7378
|
interactive: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"pointer-events-auto">]>>;
|
|
@@ -6263,6 +7380,19 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6263
7380
|
anchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center", "top-left", "top-right", "bottom-left", "bottom-right"]>, z.ZodArray<z.ZodEnum<["top", "bottom", "left", "right", "center", "top-left", "top-right", "bottom-left", "bottom-right"]>, "many">]>>;
|
|
6264
7381
|
dynamicResize: z.ZodOptional<z.ZodBoolean>;
|
|
6265
7382
|
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
7383
|
+
lowPriorityPin: z.ZodOptional<z.ZodObject<{
|
|
7384
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
7385
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
7386
|
+
color: z.ZodOptional<z.ZodString>;
|
|
7387
|
+
}, "strip", z.ZodTypeAny, {
|
|
7388
|
+
size?: number | undefined;
|
|
7389
|
+
color?: string | undefined;
|
|
7390
|
+
enabled?: boolean | undefined;
|
|
7391
|
+
}, {
|
|
7392
|
+
size?: number | undefined;
|
|
7393
|
+
color?: string | undefined;
|
|
7394
|
+
enabled?: boolean | undefined;
|
|
7395
|
+
}>>;
|
|
6266
7396
|
}, "strip", z.ZodTypeAny, {
|
|
6267
7397
|
anchor?: "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
|
|
6268
7398
|
id?: string | undefined;
|
|
@@ -6270,6 +7400,11 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6270
7400
|
dynamicResize?: boolean | undefined;
|
|
6271
7401
|
zIndex?: number | undefined;
|
|
6272
7402
|
rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
|
|
7403
|
+
lowPriorityPin?: {
|
|
7404
|
+
size?: number | undefined;
|
|
7405
|
+
color?: string | undefined;
|
|
7406
|
+
enabled?: boolean | undefined;
|
|
7407
|
+
} | undefined;
|
|
6273
7408
|
}, {
|
|
6274
7409
|
anchor?: "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
|
|
6275
7410
|
id?: string | undefined;
|
|
@@ -6277,9 +7412,15 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6277
7412
|
dynamicResize?: boolean | undefined;
|
|
6278
7413
|
zIndex?: number | undefined;
|
|
6279
7414
|
rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
|
|
7415
|
+
lowPriorityPin?: {
|
|
7416
|
+
size?: number | undefined;
|
|
7417
|
+
color?: string | undefined;
|
|
7418
|
+
enabled?: boolean | undefined;
|
|
7419
|
+
} | undefined;
|
|
6280
7420
|
}>;
|
|
6281
7421
|
export function validateMarker(coordinate: Position, contentHTML: string, options: AddMarkerOptions): void;
|
|
6282
7422
|
export type MarkerAnchor = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
7423
|
+
type InternalMarkerAnchor = MarkerAnchor | 'low-priority-pin';
|
|
6283
7424
|
/**
|
|
6284
7425
|
* Options for creating a new Marker
|
|
6285
7426
|
*/
|
|
@@ -6322,6 +7463,16 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6322
7463
|
* The vertical position of the marker relative to the floor.
|
|
6323
7464
|
*/
|
|
6324
7465
|
verticalOffset?: number;
|
|
7466
|
+
/**
|
|
7467
|
+
* The entity to attach the marker to.
|
|
7468
|
+
*/
|
|
7469
|
+
attachTo?: EntityId<GeometryState> | string | number | null;
|
|
7470
|
+
/**
|
|
7471
|
+
* Configuration for the low priority pin fallback strategy.
|
|
7472
|
+
* When enabled, shows a smaller pin version of the marker when all anchor positions have collisions.
|
|
7473
|
+
* @default { enabled: true, size: 2, color: '#666' }
|
|
7474
|
+
*/
|
|
7475
|
+
lowPriorityPin?: Partial<LowPriorityPinConfig>;
|
|
6325
7476
|
};
|
|
6326
7477
|
export class MarkerComponent {
|
|
6327
7478
|
id: string | number;
|
|
@@ -6329,9 +7480,11 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6329
7480
|
static testId: number;
|
|
6330
7481
|
rank: number;
|
|
6331
7482
|
initialRank: number;
|
|
6332
|
-
activeAnchor:
|
|
7483
|
+
activeAnchor: InternalMarkerAnchor;
|
|
6333
7484
|
pointerEvents: 'auto' | 'none';
|
|
6334
|
-
options: Required<Omit<AddMarkerOptions, 'zIndex'
|
|
7485
|
+
options: Required<Omit<AddMarkerOptions, 'zIndex' | 'attachTo'> & {
|
|
7486
|
+
lowPriorityPin: Required<LowPriorityPinConfig>;
|
|
7487
|
+
}> & {
|
|
6335
7488
|
zIndex?: number;
|
|
6336
7489
|
};
|
|
6337
7490
|
projection: Vector2;
|
|
@@ -6350,8 +7503,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6350
7503
|
w: number;
|
|
6351
7504
|
h: number;
|
|
6352
7505
|
};
|
|
6353
|
-
|
|
6354
|
-
|
|
7506
|
+
markerContainer: Entity2DHTMLDivElement;
|
|
7507
|
+
containerEl: HTMLElement;
|
|
7508
|
+
contentEl: HTMLElement | null;
|
|
6355
7509
|
contentHtml: string;
|
|
6356
7510
|
style: {
|
|
6357
7511
|
top: string;
|
|
@@ -6359,7 +7513,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6359
7513
|
};
|
|
6360
7514
|
dirty: boolean;
|
|
6361
7515
|
/** Flag used in 2d-projection system to determine if the parent has changed */
|
|
6362
|
-
|
|
7516
|
+
attachedDirty: boolean;
|
|
6363
7517
|
collisionDirty: boolean;
|
|
6364
7518
|
visibilityNeedsUpdate: 'show' | 'hide' | false;
|
|
6365
7519
|
constructor(contentHtml: string, options?: AddMarkerOptions);
|
|
@@ -6368,7 +7522,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6368
7522
|
currentStrategyIndex: number;
|
|
6369
7523
|
onStrategySelected: (strategyIndex: number, force?: boolean) => void;
|
|
6370
7524
|
get strategies(): {
|
|
6371
|
-
name:
|
|
7525
|
+
name: InternalMarkerAnchor;
|
|
6372
7526
|
getBoundingBox: () => number[];
|
|
6373
7527
|
}[];
|
|
6374
7528
|
toPackedMessage(isPanning?: boolean): {
|
|
@@ -6380,8 +7534,13 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6380
7534
|
lockedToStrategyIndex: number;
|
|
6381
7535
|
shouldCollideWithScreenEdges: boolean;
|
|
6382
7536
|
};
|
|
7537
|
+
/**
|
|
7538
|
+
* Get the index of the low priority pin strategy
|
|
7539
|
+
*/
|
|
7540
|
+
get lowPriorityPinStrategyIndex(): number;
|
|
6383
7541
|
destroy(): void;
|
|
6384
7542
|
}
|
|
7543
|
+
export {};
|
|
6385
7544
|
}
|
|
6386
7545
|
|
|
6387
7546
|
declare module '@mappedin/mappedin-js/geojson/src/components/path' {
|
|
@@ -6989,6 +8148,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
|
|
|
6989
8148
|
* The vertical position of the label relative to the floor.
|
|
6990
8149
|
*/
|
|
6991
8150
|
verticalOffset?: number;
|
|
8151
|
+
/**
|
|
8152
|
+
* The entity to attach the label to.
|
|
8153
|
+
*/
|
|
8154
|
+
attachTo?: EntityId<GeometryState> | string | null;
|
|
6992
8155
|
};
|
|
6993
8156
|
type TStyle = {
|
|
6994
8157
|
top?: number;
|
|
@@ -7131,7 +8294,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
|
|
|
7131
8294
|
totalMarkerSize: number;
|
|
7132
8295
|
dirty: boolean;
|
|
7133
8296
|
/** Flag used in 2d-projection system to determine if the parent has changed */
|
|
7134
|
-
|
|
8297
|
+
attachedDirty: boolean;
|
|
7135
8298
|
collisionDirty: boolean;
|
|
7136
8299
|
lastTextAlign: any;
|
|
7137
8300
|
imageHash?: number;
|
|
@@ -7176,9 +8339,11 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/group-container' {
|
|
|
7176
8339
|
import type { BatchedText } from '@mappedin/mappedin-js/geojson/src/services/text3d/text3d';
|
|
7177
8340
|
import type { EntityTypes } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
7178
8341
|
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
8342
|
+
import type { FocusableComponent } from '@mappedin/mappedin-js/geojson/src/components/focusable';
|
|
7179
8343
|
export enum GroupContainerComponents {
|
|
7180
8344
|
Stack = 0,
|
|
7181
|
-
Interaction = 1
|
|
8345
|
+
Interaction = 1,
|
|
8346
|
+
Focusable = 2
|
|
7182
8347
|
}
|
|
7183
8348
|
/**
|
|
7184
8349
|
* State representing a Group Container, which is a container for other Group Containers, Geometry Groups, Labels, Markers and Paths.
|
|
@@ -7219,7 +8384,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/group-container' {
|
|
|
7219
8384
|
/** The effective opacity of the entity after all parent containers have been considered. */
|
|
7220
8385
|
computedOpacity: number;
|
|
7221
8386
|
};
|
|
7222
|
-
components: [StackComponent?, InteractionComponent?];
|
|
8387
|
+
components: [StackComponent?, InteractionComponent?, FocusableComponent?];
|
|
7223
8388
|
constructor(id: string);
|
|
7224
8389
|
addOccluderFeature(feature: Feature<Polygon | MultiPolygon, any>, occluderId: number): void;
|
|
7225
8390
|
addEntity(entityGroupOrContainer: GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | Geometry3DTypes): void;
|
|
@@ -7238,6 +8403,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry-group' {
|
|
|
7238
8403
|
import { type GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
7239
8404
|
import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
|
|
7240
8405
|
import { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
|
|
8406
|
+
import type { MaterialSide } from '@mappedin/mappedin-js/geojson/src/components/styles';
|
|
7241
8407
|
export enum GeometryGroupComponents {
|
|
7242
8408
|
GeometryGroupStyle = 0
|
|
7243
8409
|
}
|
|
@@ -7309,6 +8475,10 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry-group' {
|
|
|
7309
8475
|
* height of the geometry group
|
|
7310
8476
|
*/
|
|
7311
8477
|
height?: number;
|
|
8478
|
+
/**
|
|
8479
|
+
* Material side of the geometry group
|
|
8480
|
+
*/
|
|
8481
|
+
side?: MaterialSide;
|
|
7312
8482
|
};
|
|
7313
8483
|
export type ChildUpdatable<T> = T extends LineStyle ? Partial<Pick<LineStyle, 'color' | 'opacity' | 'visible'>> : Partial<Pick<PaintStyle, 'color' | 'opacity' | 'visible'>>;
|
|
7314
8484
|
export class GeometryGroupObject3D extends Object3D {
|
|
@@ -7321,7 +8491,6 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry-group' {
|
|
|
7321
8491
|
modelURL?: string;
|
|
7322
8492
|
opacity: number;
|
|
7323
8493
|
dirty: boolean;
|
|
7324
|
-
outlineDirty: boolean;
|
|
7325
8494
|
shadingDirty: boolean;
|
|
7326
8495
|
};
|
|
7327
8496
|
setVisible(visible: boolean): void;
|
|
@@ -7416,6 +8585,7 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
7416
8585
|
showImage?: boolean;
|
|
7417
8586
|
flipImageToFaceCamera?: boolean;
|
|
7418
8587
|
side?: MaterialSide;
|
|
8588
|
+
renderOrder?: number;
|
|
7419
8589
|
};
|
|
7420
8590
|
export type Shading = {
|
|
7421
8591
|
start?: number;
|
|
@@ -7435,6 +8605,7 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
7435
8605
|
shading?: Shading;
|
|
7436
8606
|
outline?: boolean;
|
|
7437
8607
|
side?: MaterialSide;
|
|
8608
|
+
renderOrder?: number;
|
|
7438
8609
|
};
|
|
7439
8610
|
export type Layer = {
|
|
7440
8611
|
id: string;
|
|
@@ -7728,7 +8899,7 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
7728
8899
|
}
|
|
7729
8900
|
|
|
7730
8901
|
declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
7731
|
-
import type { Texture, BufferGeometry,
|
|
8902
|
+
import type { Texture, BufferGeometry, Mesh } from 'three';
|
|
7732
8903
|
import { BatchedMesh, Color, Vector3 } from 'three';
|
|
7733
8904
|
import type { BatchedStandardMaterial } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material';
|
|
7734
8905
|
import type { EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
|
|
@@ -7850,7 +9021,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
|
7850
9021
|
#private;
|
|
7851
9022
|
mesh?: EntityBatchedMesh;
|
|
7852
9023
|
focusMesh?: Mesh;
|
|
7853
|
-
outline?: LineSegments;
|
|
7854
9024
|
imageMesh?: Mesh;
|
|
7855
9025
|
/**
|
|
7856
9026
|
* holds a pointer to space label text if the polygon has label active.
|
|
@@ -8272,7 +9442,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
8272
9442
|
import { Renderer } from '@mappedin/mappedin-js/geojson/src/services/renderer';
|
|
8273
9443
|
import { CollisionSystem } from '@mappedin/mappedin-js/geojson/src/systems/collisions/system';
|
|
8274
9444
|
import { InteractionSystem } from '@mappedin/mappedin-js/geojson/src/systems/interactions';
|
|
8275
|
-
import type { AddMarkerOptions, MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
9445
|
+
import type { AddMarkerOptions, MarkerState, MarkerStateUpdate } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
8276
9446
|
import type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
|
|
8277
9447
|
import { ExporterSystem } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
|
|
8278
9448
|
import type { AddLabelOptions, LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
@@ -8396,6 +9566,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
8396
9566
|
visible?: boolean;
|
|
8397
9567
|
altitude?: number;
|
|
8398
9568
|
interactive?: boolean;
|
|
9569
|
+
focusable?: boolean;
|
|
8399
9570
|
}, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GroupContainerState>;
|
|
8400
9571
|
addStackContainer(id: string, style?: {
|
|
8401
9572
|
visible?: true;
|
|
@@ -8508,7 +9679,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
8508
9679
|
*/
|
|
8509
9680
|
setState(object: Partial<Omit<MapViewState, 'type'>>): void;
|
|
8510
9681
|
setState<T extends EntityId<LabelState>>(object: T | T['id'], state: Partial<LabelState>): void;
|
|
8511
|
-
setState<T extends EntityId<MarkerState>>(object: T | T['id'], state: Partial<
|
|
9682
|
+
setState<T extends EntityId<MarkerState>>(object: T | T['id'], state: Partial<MarkerStateUpdate>): void;
|
|
8512
9683
|
setState<T extends EntityId<GeometryGroupState>>(object: T | T['id'], state: Partial<GeometryGroupState>): void;
|
|
8513
9684
|
setState<T extends EntityId<GroupContainerState>>(object: T | T['id'], state: Partial<GroupContainerState>): void;
|
|
8514
9685
|
setState<T extends EntityId<GeometryState>>(object: T | T['id'], state: Partial<GeometryState>): void;
|
|
@@ -9323,8 +10494,8 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
|
|
|
9323
10494
|
export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
|
|
9324
10495
|
export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
|
|
9325
10496
|
export function updateAltitude(entity: EntityTypes, update?: number): boolean;
|
|
9326
|
-
export function updateOutline(entity: All3DTypes, update?: boolean): boolean;
|
|
9327
|
-
export function updateFocusable(entity: Geometry3D, update?: boolean): boolean;
|
|
10497
|
+
export function updateOutline(entity: All3DTypes, state: RendererState, update?: boolean): boolean;
|
|
10498
|
+
export function updateFocusable(entity: Geometry3D | GroupContainerObject3D, update?: boolean): boolean;
|
|
9328
10499
|
export function updateIndividualGeometryRenderOrder(entity: Geometry3D, update?: number): boolean;
|
|
9329
10500
|
export function handlePathUpdate(geometry: Geometry3DTypes, state: RendererState, update: PathUpdateState): void;
|
|
9330
10501
|
export function pickPathOptions(update: PathUpdateState): Partial<PathUpdateState>;
|
|
@@ -9453,19 +10624,85 @@ declare module '@mappedin/mappedin-js/geojson/src/utils/constants' {
|
|
|
9453
10624
|
|
|
9454
10625
|
declare module '@mappedin/mappedin-js/geojson/src/utils/debug' {
|
|
9455
10626
|
import type Core from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
10627
|
+
/**
|
|
10628
|
+
* Default debug state configuration with all debug features disabled by default.
|
|
10629
|
+
*/
|
|
9456
10630
|
const DEFAULT_DEBUG_STATE: {
|
|
9457
|
-
|
|
9458
|
-
|
|
10631
|
+
/** Shows the text area mesh used for polygon label rendering */
|
|
10632
|
+
showPolygonLabelTextAreaMesh: boolean;
|
|
10633
|
+
/** Enables the basic environment map for lighting and reflections */
|
|
10634
|
+
showEnvMap: boolean;
|
|
10635
|
+
/** Shows collision detection boxes for debugging spatial interactions */
|
|
10636
|
+
showCollisionBoxes: boolean;
|
|
9459
10637
|
};
|
|
10638
|
+
/**
|
|
10639
|
+
* Type definition for the debug state configuration.
|
|
10640
|
+
* Represents all available debug options that can be toggled.
|
|
10641
|
+
*/
|
|
9460
10642
|
export type DebugState = typeof DEFAULT_DEBUG_STATE;
|
|
10643
|
+
/**
|
|
10644
|
+
* Debug utility class for toggling various debug visualization features.
|
|
10645
|
+
*
|
|
10646
|
+
* This class provides a centralized way to control debug features like:
|
|
10647
|
+
* - Text area mesh visualization for polygon labels
|
|
10648
|
+
* - Environment map rendering
|
|
10649
|
+
* - Collision box visualization
|
|
10650
|
+
*
|
|
10651
|
+
* @example
|
|
10652
|
+
* ```typescript
|
|
10653
|
+
* const debug = new Debug(core);
|
|
10654
|
+
*
|
|
10655
|
+
* // Enable collision boxes and environment map
|
|
10656
|
+
* debug.update({
|
|
10657
|
+
* showCollisionBoxes: true,
|
|
10658
|
+
* showEnvMap: true
|
|
10659
|
+
* });
|
|
10660
|
+
*
|
|
10661
|
+
* // Disable all debug features
|
|
10662
|
+
* debug.update({
|
|
10663
|
+
* showCollisionBoxes: false,
|
|
10664
|
+
* showEnvMap: false,
|
|
10665
|
+
* showPolygonLabelTextAreaMesh: false
|
|
10666
|
+
* });
|
|
10667
|
+
* ```
|
|
10668
|
+
*/
|
|
9461
10669
|
export class Debug {
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
10670
|
+
/** Current debug state configuration */
|
|
10671
|
+
state: {
|
|
10672
|
+
/** Shows the text area mesh used for polygon label rendering */
|
|
10673
|
+
showPolygonLabelTextAreaMesh: boolean;
|
|
10674
|
+
/** Enables the basic environment map for lighting and reflections */
|
|
10675
|
+
showEnvMap: boolean;
|
|
10676
|
+
/** Shows collision detection boxes for debugging spatial interactions */
|
|
10677
|
+
showCollisionBoxes: boolean;
|
|
10678
|
+
};
|
|
10679
|
+
/** Reference to the core renderer instance */
|
|
10680
|
+
core: Core;
|
|
10681
|
+
/**
|
|
10682
|
+
* Creates a new Debug instance.
|
|
10683
|
+
*
|
|
10684
|
+
* @param core - The core renderer instance to control debug features for
|
|
10685
|
+
*/
|
|
10686
|
+
constructor(core: Core);
|
|
10687
|
+
/**
|
|
10688
|
+
* Updates the debug state with new configuration options.
|
|
10689
|
+
* Only changed values will trigger updates to the corresponding systems.
|
|
10690
|
+
*
|
|
10691
|
+
* @param updateState - Partial debug state with the options to update
|
|
10692
|
+
*
|
|
10693
|
+
* @example
|
|
10694
|
+
* ```typescript
|
|
10695
|
+
* // Enable only collision boxes
|
|
10696
|
+
* debug.update({ showCollisionBoxes: true });
|
|
10697
|
+
*
|
|
10698
|
+
* // Enable multiple features at once
|
|
10699
|
+
* debug.update({
|
|
10700
|
+
* showEnvMap: true,
|
|
10701
|
+
* showPolygonLabelTextAreaMesh: true
|
|
10702
|
+
* });
|
|
10703
|
+
* ```
|
|
10704
|
+
*/
|
|
10705
|
+
update(updateState: Partial<DebugState>): void;
|
|
9469
10706
|
}
|
|
9470
10707
|
export {};
|
|
9471
10708
|
}
|
|
@@ -9585,9 +10822,13 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/text3d/system' {
|
|
|
9585
10822
|
showTextAreaMesh(): void;
|
|
9586
10823
|
hideTextAreaMesh(): void;
|
|
9587
10824
|
}
|
|
10825
|
+
export function configureWorker(useWorker: boolean): void;
|
|
9588
10826
|
/**
|
|
9589
10827
|
* Preload fonts and optionally pre-generate the SDF textures for particular glyphs up front.
|
|
9590
10828
|
* This is to avoid ondemand font generation can take long.
|
|
10829
|
+
*
|
|
10830
|
+
* If working in CSP-restricted environment, call `disableText3DWorker` before to avoid errors
|
|
10831
|
+
*
|
|
9591
10832
|
* @param fontUrl - url of the font file served.
|
|
9592
10833
|
* @returns A promise that resolves when the font is loaded
|
|
9593
10834
|
*
|
|
@@ -9597,150 +10838,166 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/text3d/system' {
|
|
|
9597
10838
|
export const DEFAULT_VERTICAL_OFFSET = 0.5;
|
|
9598
10839
|
}
|
|
9599
10840
|
|
|
9600
|
-
declare module '@mappedin/mappedin-js/geojson/src/systems/
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
import
|
|
9606
|
-
import '
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
custom?: string[];
|
|
9614
|
-
position?: AttributionPosition;
|
|
9615
|
-
feedback?: boolean;
|
|
9616
|
-
};
|
|
9617
|
-
export class HTMLControlsSystem {
|
|
9618
|
-
controlContainerEl: HTMLDivElement;
|
|
9619
|
-
controlPositions: Record<AttributionPosition, HTMLDivElement>;
|
|
9620
|
-
compact: boolean | undefined;
|
|
9621
|
-
attribContainerEl?: HTMLDetailsElement;
|
|
9622
|
-
attribInnerEl?: HTMLDivElement;
|
|
9623
|
-
attribButtonEl?: HTMLElement;
|
|
9624
|
-
feedbackLinkEl?: HTMLAnchorElement;
|
|
9625
|
-
attribHTML: string;
|
|
9626
|
-
customAttributions: string[];
|
|
9627
|
-
constructor(container: HTMLElement);
|
|
9628
|
-
addAttributionControl(options?: AttributionControlOptions): void;
|
|
9629
|
-
toggleAttribution: (e: MouseEvent) => void;
|
|
9630
|
-
destroyAttributionControl(): void;
|
|
9631
|
-
resize(canvasWidth: number): void;
|
|
9632
|
-
/**
|
|
9633
|
-
* This should fire when Maplibre data changes.
|
|
9634
|
-
*/
|
|
9635
|
-
updateData(map: Map): void;
|
|
9636
|
-
destroy(): void;
|
|
9637
|
-
}
|
|
9638
|
-
}
|
|
9639
|
-
|
|
9640
|
-
declare module '@mappedin/mappedin-js/geojson/src/components/styles' {
|
|
9641
|
-
export { StyleComponent, DEFAULT_COLOR, type MaterialSide } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
|
|
9642
|
-
export { Text3DStyleComponent, type Text3DStyle, DEFAULT_TEXT_STYLE } from '@mappedin/mappedin-js/geojson/src/components/styles/text-style';
|
|
9643
|
-
export { ModelStyleComponnet, type ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles/model-style';
|
|
9644
|
-
export { DEFAULT_ROTATION, DEFAULT_SCALE } from '@mappedin/mappedin-js/geojson/src/components/styles/constants';
|
|
9645
|
-
}
|
|
9646
|
-
|
|
9647
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
9648
|
-
import type { RendererCore, WatermarkUpdateOptions } from '@mappedin/core-sdk';
|
|
9649
|
-
import { type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
9650
|
-
import { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
9651
|
-
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
9652
|
-
import type { FloorStack, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9653
|
-
import { Facade, Coordinate, MapObject, Space, Floor, Door } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9654
|
-
import type { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
9655
|
-
import { Label, Marker, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
9656
|
-
import { Text3D as Text3DView, Model, Path, type Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
9657
|
-
import { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
9658
|
-
import type { TGetState, TUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
9659
|
-
import { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera';
|
|
9660
|
-
import { Exporter } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter';
|
|
9661
|
-
import { Labels } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels';
|
|
9662
|
-
import { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
9663
|
-
import { Markers } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers';
|
|
9664
|
-
import { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
|
|
9665
|
-
import { Models } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models';
|
|
9666
|
-
import { Paths } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths';
|
|
9667
|
-
import { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
9668
|
-
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
9669
|
-
import { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
|
|
9670
|
-
import { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
|
|
9671
|
-
import Outdoor from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
|
|
9672
|
-
import { type BBox } from 'geojson';
|
|
9673
|
-
import { Text3D } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
9674
|
-
import { PathSegment } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
|
|
9675
|
-
export class GeoJsonApi {
|
|
9676
|
-
core: RendererCore;
|
|
9677
|
-
mapObjects: GeojsonApiMapObject[];
|
|
9678
|
-
id: string;
|
|
9679
|
-
mapDataExternal: {
|
|
9680
|
-
[key in string]: MapData;
|
|
9681
|
-
};
|
|
9682
|
-
mapData?: MapData;
|
|
9683
|
-
currentMap: GeojsonApiMapObject;
|
|
9684
|
-
hiddenOutdoorGeometries: [
|
|
9685
|
-
BBox,
|
|
9686
|
-
polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[],
|
|
9687
|
-
layers: string[]
|
|
9688
|
-
][];
|
|
9689
|
-
mapView: MapView;
|
|
9690
|
-
Camera: Camera;
|
|
9691
|
-
Labels: Labels;
|
|
9692
|
-
Text3D: Text3D;
|
|
9693
|
-
Markers: Markers;
|
|
9694
|
-
Models: Models;
|
|
9695
|
-
Paths: Paths;
|
|
9696
|
-
Exporter: Exporter;
|
|
9697
|
-
Navigation: Navigation;
|
|
9698
|
-
Outdoor: Outdoor;
|
|
9699
|
-
BlueDot: BlueDot;
|
|
9700
|
-
Shapes: Shapes;
|
|
9701
|
-
Style: Style;
|
|
9702
|
-
Images: Images;
|
|
9703
|
-
get DynamicFocus(): import("..").DynamicFocus;
|
|
9704
|
-
get StackedMaps(): import("..").StackedMaps;
|
|
9705
|
-
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
9706
|
-
updateState<T extends Space | Text3DView | MapObject | Label | Shape | Marker | Model | Door | Facade | Floor | WALLS | DOORS | Path | PathSegment | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
9707
|
-
update: () => void;
|
|
9708
|
-
getMapDataInternal(): MapDataInternal | undefined;
|
|
9709
|
-
getMapData(): MapData | undefined;
|
|
9710
|
-
addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
|
|
9711
|
-
setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
|
|
9712
|
-
setFloorStack(floorStack: FloorStack | string): void;
|
|
9713
|
-
updateWatermark(options: WatermarkUpdateOptions): void;
|
|
9714
|
-
get currentFloorStack(): FloorStack;
|
|
9715
|
-
get currentFloor(): Floor;
|
|
9716
|
-
getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | Model | Path | PathSegment | Floor | Facade | string>(target: T): TGetState<T>;
|
|
9717
|
-
setHoverColor(c: string): void;
|
|
9718
|
-
getHoverColor(): string | undefined;
|
|
9719
|
-
/**
|
|
9720
|
-
* Create a coordinate from a screen coordinate
|
|
9721
|
-
* @param x - The x coordinate of the screen
|
|
9722
|
-
* @param y - The y coordinate of the screen
|
|
9723
|
-
* @param floor - The floor to use for the coordinate
|
|
9724
|
-
* @returns The coordinate
|
|
9725
|
-
*/
|
|
9726
|
-
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor): Coordinate | undefined;
|
|
9727
|
-
getScreenCoordinateFromCoordinate(coordinate: Coordinate): {
|
|
10841
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
|
|
10842
|
+
import { QuadTree } from '@packages/internal/quad-tree';
|
|
10843
|
+
import '../../styles/collisions.scss';
|
|
10844
|
+
import type { MarkerComponent } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
10845
|
+
import type LabelComponent from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
10846
|
+
import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
|
|
10847
|
+
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
10848
|
+
import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-processor';
|
|
10849
|
+
import type { WatermarkPosition } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
|
|
10850
|
+
export type TMessageEvent = MessageEvent<{
|
|
10851
|
+
msgId: string;
|
|
10852
|
+
colliders: TSerializedColliderResponse[];
|
|
10853
|
+
debug: {
|
|
9728
10854
|
x: number;
|
|
9729
10855
|
y: number;
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
10856
|
+
w: number;
|
|
10857
|
+
h: number;
|
|
10858
|
+
}[];
|
|
10859
|
+
}>;
|
|
10860
|
+
export type TMessage = {
|
|
10861
|
+
msgId: string;
|
|
10862
|
+
totalWidth: number;
|
|
10863
|
+
totalHeight: number;
|
|
10864
|
+
watermarkWidth: number;
|
|
10865
|
+
watermarkHeight: number;
|
|
10866
|
+
watermarkPosition: WatermarkPosition;
|
|
10867
|
+
colliders: TSerializedCollider[];
|
|
10868
|
+
devicePixelRatio: number;
|
|
10869
|
+
};
|
|
10870
|
+
type TCollisionSystemEvent = {
|
|
10871
|
+
'visibility-changed': undefined;
|
|
10872
|
+
};
|
|
10873
|
+
export type PackedBBox = [x: number, y: number, w: number, h: number, index: number];
|
|
10874
|
+
export type PackedBBoxes = PackedBBox[];
|
|
10875
|
+
export type PackedCollider = [
|
|
10876
|
+
bboxes: PackedBBoxes,
|
|
10877
|
+
enabled: 0 | 1,
|
|
10878
|
+
alwaysVisible: 0 | 1,
|
|
10879
|
+
x: number,
|
|
10880
|
+
y: number,
|
|
10881
|
+
shouldCollideWithScreenEdges?: 0 | 1,
|
|
10882
|
+
onlyExposeStrategyIndex?: number
|
|
10883
|
+
];
|
|
10884
|
+
export type PackedMessage = [
|
|
10885
|
+
colliders: PackedCollider[],
|
|
10886
|
+
devicePixelRatio: number,
|
|
10887
|
+
totalHeight: number,
|
|
10888
|
+
totalWidth: number,
|
|
10889
|
+
watermarkWidth: number,
|
|
10890
|
+
watermarkHeight: number,
|
|
10891
|
+
watermarkPosition: WatermarkPosition
|
|
10892
|
+
];
|
|
10893
|
+
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
10894
|
+
collidersDirty: boolean;
|
|
10895
|
+
packedMessage: PackedMessage;
|
|
10896
|
+
visibleCollidersQTree: QuadTree<{
|
|
10897
|
+
entityId: string | number;
|
|
10898
|
+
}>;
|
|
10899
|
+
interactiveCollidersQTree: QuadTree<{
|
|
10900
|
+
entityId: string | number;
|
|
10901
|
+
}>;
|
|
10902
|
+
coreState: RendererState;
|
|
10903
|
+
constructor(debugCanvas: HTMLCanvasElement, coreState: RendererState, worker?: Worker);
|
|
10904
|
+
postMessage: () => void;
|
|
10905
|
+
showCollisionBoxes: () => void;
|
|
10906
|
+
hideCollisionBoxes: () => void;
|
|
10907
|
+
currentMsgId: string;
|
|
10908
|
+
working: boolean;
|
|
10909
|
+
componentArray: (MarkerComponent | LabelComponent)[];
|
|
10910
|
+
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, isPanning?: boolean) => void;
|
|
10911
|
+
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
10912
|
+
/**
|
|
10913
|
+
* Resolve collisions
|
|
10914
|
+
*/
|
|
10915
|
+
resolve: (e: MessageEvent<{
|
|
10916
|
+
msgId: string;
|
|
10917
|
+
colliders: TSerializedColliderResponse[];
|
|
10918
|
+
}>) => void;
|
|
10919
|
+
drawDebug: () => void;
|
|
10920
|
+
destroy: () => void;
|
|
10921
|
+
}
|
|
10922
|
+
/**
|
|
10923
|
+
* Sets the URL for the collision system worker script.
|
|
10924
|
+
*
|
|
10925
|
+
* This function allows specifying a custom URL for the collision system's web worker,
|
|
10926
|
+
* which is particularly useful in environments with strict Content Security Policy (CSP)
|
|
10927
|
+
* that don't allow blob: URLs or inline scripts.
|
|
10928
|
+
*
|
|
10929
|
+
* When provided, the collision system will load its worker from the specified URL
|
|
10930
|
+
* instead of creating an inline worker from a blob. This enables compatibility with
|
|
10931
|
+
* environments that have restrictive CSP settings.
|
|
10932
|
+
*
|
|
10933
|
+
* @param url - The absolute URL pointing to the collision worker script.
|
|
10934
|
+
* This should be a URL where the compiled version of the worker.ts file is hosted.
|
|
10935
|
+
*
|
|
10936
|
+
* @example
|
|
10937
|
+
* ```typescript
|
|
10938
|
+
* // Set a custom URL for the collision worker
|
|
10939
|
+
* import { setWorkerUrl } from '@mappedin/core-sdk';
|
|
10940
|
+
*
|
|
10941
|
+
* // Must be called before initializing any maps
|
|
10942
|
+
* setWorkerUrl('https://cdn.example.com/workers/collision-worker.js');
|
|
10943
|
+
* ```
|
|
10944
|
+
*
|
|
10945
|
+
* @remarks
|
|
10946
|
+
* - This function must be called before any map instances are created
|
|
10947
|
+
* - The worker file must be built and hosted separately as part of your deployment process
|
|
10948
|
+
* - Ideal for applications that need to comply with strict CSP requirements
|
|
10949
|
+
*/
|
|
10950
|
+
export function setWorkerUrl(url: string): void;
|
|
10951
|
+
export {};
|
|
10952
|
+
}
|
|
10953
|
+
|
|
10954
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/exporter' {
|
|
10955
|
+
export { ExporterSystem, type GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter';
|
|
10956
|
+
}
|
|
10957
|
+
|
|
10958
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/html-controls/system' {
|
|
10959
|
+
import type { Map } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
|
|
10960
|
+
import '../../styles/html-controls.scss';
|
|
10961
|
+
/**
|
|
10962
|
+
* All possible control anchor positions.
|
|
10963
|
+
*/
|
|
10964
|
+
export const ATTRIBUTION_POSITIONS: readonly ["top-left", "top-right", "bottom-left", "bottom-right"];
|
|
10965
|
+
export type AttributionPosition = (typeof ATTRIBUTION_POSITIONS)[number];
|
|
10966
|
+
export type AttributionControlOptions = {
|
|
10967
|
+
custom?: string[];
|
|
10968
|
+
position?: AttributionPosition;
|
|
10969
|
+
feedback?: boolean;
|
|
10970
|
+
};
|
|
10971
|
+
export class HTMLControlsSystem {
|
|
10972
|
+
controlContainerEl: HTMLDivElement;
|
|
10973
|
+
controlPositions: Record<AttributionPosition, HTMLDivElement>;
|
|
10974
|
+
compact: boolean | undefined;
|
|
10975
|
+
attribContainerEl?: HTMLDetailsElement;
|
|
10976
|
+
attribInnerEl?: HTMLDivElement;
|
|
10977
|
+
attribButtonEl?: HTMLElement;
|
|
10978
|
+
feedbackLinkEl?: HTMLAnchorElement;
|
|
10979
|
+
attribHTML: string;
|
|
10980
|
+
customAttributions: string[];
|
|
10981
|
+
constructor(container: HTMLElement);
|
|
10982
|
+
addAttributionControl(options?: AttributionControlOptions): void;
|
|
10983
|
+
toggleAttribution: (e: MouseEvent) => void;
|
|
10984
|
+
destroyAttributionControl(): void;
|
|
10985
|
+
resize(canvasWidth: number): void;
|
|
9735
10986
|
/**
|
|
9736
|
-
*
|
|
10987
|
+
* This should fire when Maplibre data changes.
|
|
9737
10988
|
*/
|
|
9738
|
-
|
|
9739
|
-
clear(): void;
|
|
10989
|
+
updateData(map: Map): void;
|
|
9740
10990
|
destroy(): void;
|
|
9741
10991
|
}
|
|
9742
10992
|
}
|
|
9743
10993
|
|
|
10994
|
+
declare module '@mappedin/mappedin-js/geojson/src/components/styles' {
|
|
10995
|
+
export { StyleComponent, DEFAULT_COLOR, type MaterialSide } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
|
|
10996
|
+
export { Text3DStyleComponent, type Text3DStyle, DEFAULT_TEXT_STYLE } from '@mappedin/mappedin-js/geojson/src/components/styles/text-style';
|
|
10997
|
+
export { ModelStyleComponnet, type ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles/model-style';
|
|
10998
|
+
export { DEFAULT_ROTATION, DEFAULT_SCALE } from '@mappedin/mappedin-js/geojson/src/components/styles/constants';
|
|
10999
|
+
}
|
|
11000
|
+
|
|
9744
11001
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
9745
11002
|
import type { ParsedMVF } from '@mappedin/mvf';
|
|
9746
11003
|
import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
|
|
@@ -9752,12 +11009,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
9752
11009
|
import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
|
|
9753
11010
|
import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
9754
11011
|
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
9755
|
-
import type { Path, Shape
|
|
11012
|
+
import type { Path, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
9756
11013
|
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9757
11014
|
import { Space, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9758
11015
|
import { type GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
9759
11016
|
import { FloorStackObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-stack-object';
|
|
9760
|
-
import { DynamicFocus } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus';
|
|
9761
11017
|
import type { Text3DState } from '@mappedin/core-sdk/src/components/text3d';
|
|
9762
11018
|
export class GeojsonApiMapObject extends PubSub<{
|
|
9763
11019
|
'floor-change': {
|
|
@@ -9793,7 +11049,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
9793
11049
|
options: TShow3DMapOptions;
|
|
9794
11050
|
styleMap: AggregatedStyleMap;
|
|
9795
11051
|
StackedMaps: StackedMaps;
|
|
9796
|
-
DynamicFocus: DynamicFocus;
|
|
9797
11052
|
get currentFloorStack(): FloorStackObject;
|
|
9798
11053
|
setFloorStack(floorStackId: string, reason?: TFloorChangeReason): void;
|
|
9799
11054
|
get currentFloor(): FloorObject;
|
|
@@ -9816,7 +11071,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
9816
11071
|
removeAll: () => void;
|
|
9817
11072
|
};
|
|
9818
11073
|
Markers: {
|
|
9819
|
-
add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions
|
|
11074
|
+
add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions & {
|
|
11075
|
+
attachTo?: string;
|
|
11076
|
+
}) => EntityId<MarkerState>;
|
|
9820
11077
|
remove: (id: string) => void;
|
|
9821
11078
|
getContentEl: (id: string) => HTMLElement | undefined;
|
|
9822
11079
|
removeAll: () => void;
|
|
@@ -9843,14 +11100,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
9843
11100
|
labelOptions?: TAddLabelOptions;
|
|
9844
11101
|
}) => void;
|
|
9845
11102
|
add: (coordinate: Coordinate, text: string, opts?: AddLabelOptions & {
|
|
9846
|
-
|
|
9847
|
-
parentId?: string;
|
|
11103
|
+
attachTo?: string;
|
|
9848
11104
|
verticalOffset?: number;
|
|
9849
11105
|
}) => {
|
|
9850
11106
|
id: string | number;
|
|
9851
11107
|
};
|
|
9852
|
-
remove: ({
|
|
9853
|
-
label: Label;
|
|
11108
|
+
remove: ({ entityId }: {
|
|
9854
11109
|
entityId: string;
|
|
9855
11110
|
}) => void;
|
|
9856
11111
|
removeAll: () => void;
|
|
@@ -10307,7 +11562,44 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
|
|
|
10307
11562
|
* @param options Optional settings for the camera animation.
|
|
10308
11563
|
*/
|
|
10309
11564
|
animateElevation(elevation: number, options?: TCameraAnimationOptions): Promise<void>;
|
|
11565
|
+
/**
|
|
11566
|
+
* @internal
|
|
11567
|
+
* @experimental
|
|
11568
|
+
* Force an update of the facades in view.
|
|
11569
|
+
*/
|
|
11570
|
+
updateFacadesInView(): void;
|
|
11571
|
+
}
|
|
11572
|
+
}
|
|
11573
|
+
|
|
11574
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter' {
|
|
11575
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
11576
|
+
import type { GLTFExportOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
11577
|
+
/**
|
|
11578
|
+
* API to export the scene.
|
|
11579
|
+
*
|
|
11580
|
+
* @hidden
|
|
11581
|
+
*/
|
|
11582
|
+
export class Exporter {
|
|
11583
|
+
#private;
|
|
11584
|
+
/**
|
|
11585
|
+
* @internal
|
|
11586
|
+
*/
|
|
11587
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
11588
|
+
/**
|
|
11589
|
+
* @internal
|
|
11590
|
+
*/
|
|
11591
|
+
constructor({ currentMapGetter }: {
|
|
11592
|
+
currentMapGetter: CurrentMapGetter;
|
|
11593
|
+
});
|
|
11594
|
+
/**
|
|
11595
|
+
* Exports the current scene as a GLTF file.
|
|
11596
|
+
*
|
|
11597
|
+
* @hidden
|
|
11598
|
+
*/
|
|
11599
|
+
getCurrentSceneGLTF(userOptions: GLTFExportOptions): Promise<Blob>;
|
|
10310
11600
|
}
|
|
11601
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11602
|
+
export {};
|
|
10311
11603
|
}
|
|
10312
11604
|
|
|
10313
11605
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels' {
|
|
@@ -10472,6 +11764,80 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
|
|
|
10472
11764
|
export {};
|
|
10473
11765
|
}
|
|
10474
11766
|
|
|
11767
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images' {
|
|
11768
|
+
import type { IAnchorable, TAddImageOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
11769
|
+
import { Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
11770
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
11771
|
+
/**
|
|
11772
|
+
* Images can enhance the fidelity of an indoor map. They can be used to add custom branding, highlight important features, or provide additional information to users.
|
|
11773
|
+
* Images can be placed on any {@link Door}, {@link Space}, or {@link Coordinate} on the map and given a verticalOffset to control the height at which the image is displayed.
|
|
11774
|
+
*
|
|
11775
|
+
* This class is accessed using {@link MapView.Images}.
|
|
11776
|
+
*
|
|
11777
|
+
* JPEG and PNG images are supported. It's important to consider the size of all unique image files displayed on a map at one time.
|
|
11778
|
+
* Using many unique images may cause instability on mobile devices with limited GPU memory. The Mappedin SDK will cache and reuse images that have the same URL, resulting in reduced memory usage.
|
|
11779
|
+
*
|
|
11780
|
+
* The following calculations illustrates how much memory is used for a given image:
|
|
11781
|
+
*
|
|
11782
|
+
* Formula: `width * height * 4 bytes/pixel = memory used`
|
|
11783
|
+
*
|
|
11784
|
+
* 512 x 512 Pixel Image: `512px * 512px * 4 bytes/pixel = 1MB`
|
|
11785
|
+
*
|
|
11786
|
+
* 4096 x 4096 Pixel Image: `4096px * 4096px * 4 bytes/pixel = 64MB`
|
|
11787
|
+
*
|
|
11788
|
+
* Refer to the [Images Guide](https://developer.mappedin.com/web-sdk/images-textures) for more information and interactive examples.
|
|
11789
|
+
*/
|
|
11790
|
+
export class Images {
|
|
11791
|
+
#private;
|
|
11792
|
+
/**
|
|
11793
|
+
* @internal
|
|
11794
|
+
*/
|
|
11795
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
11796
|
+
/**
|
|
11797
|
+
* @internal
|
|
11798
|
+
*/
|
|
11799
|
+
constructor({ currentMapGetter }: {
|
|
11800
|
+
currentMapGetter: CurrentMapGetter;
|
|
11801
|
+
});
|
|
11802
|
+
/**
|
|
11803
|
+
* @internal
|
|
11804
|
+
*/
|
|
11805
|
+
getById(id: string): {
|
|
11806
|
+
image: Image;
|
|
11807
|
+
entityId: string;
|
|
11808
|
+
} | undefined;
|
|
11809
|
+
/**
|
|
11810
|
+
* Adds an image to the map.
|
|
11811
|
+
*
|
|
11812
|
+
* @param target The target object ({@link IAnchorable}) for the image.
|
|
11813
|
+
* @param url The URL of the image.
|
|
11814
|
+
* @param options Optional additional options for the {@link Image}.
|
|
11815
|
+
* @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
|
|
11816
|
+
* @example
|
|
11817
|
+
* // Add an interactive {@link Image} to the map with custom HTML content.
|
|
11818
|
+
* mapView.Images.add(coordinate, '<div>Image Content</div>', { interactive: true });
|
|
11819
|
+
*/
|
|
11820
|
+
add(target: IAnchorable, url: string, options: TAddImageOptions): Image;
|
|
11821
|
+
/**
|
|
11822
|
+
* Removes a image from the map.
|
|
11823
|
+
*
|
|
11824
|
+
* @param image {Image} The {@link Image} which should be removed.
|
|
11825
|
+
* @example
|
|
11826
|
+
* mapView.Images.remove(image);
|
|
11827
|
+
*/
|
|
11828
|
+
remove(image: Image): void;
|
|
11829
|
+
/**
|
|
11830
|
+
* Remove all the images from the map.
|
|
11831
|
+
*
|
|
11832
|
+
* @example
|
|
11833
|
+
* mapView.Images.removeAll();
|
|
11834
|
+
*/
|
|
11835
|
+
removeAll(): Image[];
|
|
11836
|
+
}
|
|
11837
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11838
|
+
export {};
|
|
11839
|
+
}
|
|
11840
|
+
|
|
10475
11841
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models' {
|
|
10476
11842
|
import type { TAddModelOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
10477
11843
|
import { Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
@@ -10558,59 +11924,148 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths' {
|
|
|
10558
11924
|
*
|
|
10559
11925
|
* Paths is accessed using {@link MapView.Paths}.
|
|
10560
11926
|
*
|
|
10561
|
-
* Paths can be drawn from one coordinate to another using {@link Paths.add}. If using just two coordinates, the path will be drawn straight between the two points.
|
|
10562
|
-
* This may work for some scenarios, but in most cases an app will need to show the user their walking path, going through doors and avoiding walls and other objects.
|
|
10563
|
-
* Such a path of coordinates can be created by calling the {@link MapData.getDirections} method, passing in a start and end {@link TNavigationTarget}. Note that a Space requires an entrance to be used as a target.
|
|
11927
|
+
* Paths can be drawn from one coordinate to another using {@link Paths.add}. If using just two coordinates, the path will be drawn straight between the two points.
|
|
11928
|
+
* This may work for some scenarios, but in most cases an app will need to show the user their walking path, going through doors and avoiding walls and other objects.
|
|
11929
|
+
* Such a path of coordinates can be created by calling the {@link MapData.getDirections} method, passing in a start and end {@link TNavigationTarget}. Note that a Space requires an entrance to be used as a target.
|
|
11930
|
+
*
|
|
11931
|
+
* The width of the path is set using the {@link TAddPathOptions.nearRadius} and {@link TAddPathOptions.farRadius} parameters. These values are in meters. `nearRadius` is the path width used at the lowest zoom level closest to the ground and `farRadius` is used at the highest zoom level. Additional path styles are outlined later in this guide in the Path Styles section.
|
|
11932
|
+
*
|
|
11933
|
+
* Refer to the [Drawing a Path](https://developer.mappedin.com/web-sdk/wayfinding#drawing-a-path) in the Wayfinding Guide for more information and interactive examples.
|
|
11934
|
+
*/
|
|
11935
|
+
export class Paths {
|
|
11936
|
+
#private;
|
|
11937
|
+
/**
|
|
11938
|
+
* @internal
|
|
11939
|
+
*/
|
|
11940
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
11941
|
+
/**
|
|
11942
|
+
* @internal
|
|
11943
|
+
*/
|
|
11944
|
+
constructor({ currentMapGetter }: {
|
|
11945
|
+
currentMapGetter: CurrentMapGetter;
|
|
11946
|
+
});
|
|
11947
|
+
/**
|
|
11948
|
+
* @internal
|
|
11949
|
+
*/
|
|
11950
|
+
getById(id: string): {
|
|
11951
|
+
path: Path;
|
|
11952
|
+
entityIds: string[];
|
|
11953
|
+
} | undefined;
|
|
11954
|
+
/**
|
|
11955
|
+
* Adds a path ({@link Path}) to the map.
|
|
11956
|
+
* @param coordinate Array of coordinates ({@link Coordinate}) to form the path.
|
|
11957
|
+
* @param options Optional additional option
|
|
11958
|
+
* @example
|
|
11959
|
+
* // Add a red path to the map
|
|
11960
|
+
* mapView.Paths.add(coordinate, { color: '#ff0000' });
|
|
11961
|
+
*/
|
|
11962
|
+
add(coordinate: Coordinate[], options?: TAddPathOptions): Path;
|
|
11963
|
+
/**
|
|
11964
|
+
* Removes a specific path ({@link Path}) from the map.
|
|
11965
|
+
* @param path The path to be removed.
|
|
11966
|
+
* @example
|
|
11967
|
+
* mapView.Paths.remove(path);
|
|
11968
|
+
*/
|
|
11969
|
+
remove(path: Path): void;
|
|
11970
|
+
/**
|
|
11971
|
+
* Removes all paths ({@link Path}) from the map.
|
|
11972
|
+
*
|
|
11973
|
+
* @example
|
|
11974
|
+
* mapView.Paths.removeAll();
|
|
11975
|
+
*/
|
|
11976
|
+
removeAll(): Path[];
|
|
11977
|
+
}
|
|
11978
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11979
|
+
export {};
|
|
11980
|
+
}
|
|
11981
|
+
|
|
11982
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style' {
|
|
11983
|
+
import type { StyleCollection } from '@mappedin/mvf';
|
|
11984
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
11985
|
+
export class Style {
|
|
11986
|
+
#private;
|
|
11987
|
+
/**
|
|
11988
|
+
* @internal
|
|
11989
|
+
*/
|
|
11990
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
11991
|
+
/**
|
|
11992
|
+
* @internal
|
|
11993
|
+
*/
|
|
11994
|
+
constructor({ currentMapGetter }: {
|
|
11995
|
+
currentMapGetter: CurrentMapGetter;
|
|
11996
|
+
});
|
|
11997
|
+
setFromStyleCollection(styleCollection: StyleCollection): void;
|
|
11998
|
+
}
|
|
11999
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
12000
|
+
export {};
|
|
12001
|
+
}
|
|
12002
|
+
|
|
12003
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor' {
|
|
12004
|
+
import { type RendererCore } from '@mappedin/core-sdk';
|
|
12005
|
+
import type { BBox } from 'geojson';
|
|
12006
|
+
export type HiddenOutdoorGeometry = [
|
|
12007
|
+
BBox,
|
|
12008
|
+
polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[],
|
|
12009
|
+
layers: string[]
|
|
12010
|
+
];
|
|
12011
|
+
/**
|
|
12012
|
+
* The outdoor map shown around the Mappedin indoor map can be manipulated to show or hide additional information. It can be used to add GeoJSON based geometry, images, deck.gl layers and more.
|
|
12013
|
+
*
|
|
12014
|
+
* The outdoor map is accessed using {@link MapView.Outdoor.map}, which returns a maplibregl.Map object.
|
|
12015
|
+
* [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The Mappedin SDK makes use of it to display the outdoor map.
|
|
12016
|
+
*
|
|
12017
|
+
* By providing access to the MapLibre map used to draw the outdoor map, the Mappedin SDK enables developers to draw on and manipulate the outdoor map.
|
|
12018
|
+
* Developers can use most capabilities of MapLibre GL JS with key exceptions being Interactivity and Camera, which are not available.
|
|
10564
12019
|
*
|
|
10565
|
-
*
|
|
12020
|
+
* User touch and click events are handled by Mappedin JS and are not propagated to the outdoor map layer. Camera movement is also handled by Mappedin JS and cannot be manipulated using MapLibre controls.
|
|
10566
12021
|
*
|
|
10567
|
-
* Refer to the [
|
|
12022
|
+
* Refer to the [Outdoor Map Guide](https://developer.mappedin.com/web-sdk/outdoor-map) for more information and interactive examples.
|
|
10568
12023
|
*/
|
|
10569
|
-
export class
|
|
12024
|
+
export default class Outdoor {
|
|
10570
12025
|
#private;
|
|
10571
12026
|
/**
|
|
10572
12027
|
* @internal
|
|
10573
12028
|
*/
|
|
10574
|
-
|
|
12029
|
+
constructor(core: RendererCore, hiddenOutdoorGeometry?: HiddenOutdoorGeometry[]);
|
|
10575
12030
|
/**
|
|
10576
|
-
*
|
|
12031
|
+
* Set the style of the outdoor map. Use one of [Mappedin's predefined styles](https://developer.mappedin.com/web-sdk/outdoor-map#styles) or link to a custom style.
|
|
12032
|
+
* @param style {any}
|
|
10577
12033
|
*/
|
|
10578
|
-
|
|
10579
|
-
currentMapGetter: CurrentMapGetter;
|
|
10580
|
-
});
|
|
12034
|
+
setStyle(style: any): void;
|
|
10581
12035
|
/**
|
|
10582
|
-
*
|
|
12036
|
+
* Returns a Maplibre map for advanced usage.
|
|
12037
|
+
*
|
|
12038
|
+
* @returns {object} Maplibre map instance
|
|
12039
|
+
*
|
|
12040
|
+
* Limitations:
|
|
12041
|
+
* - Maplibre interaction events are not supported, use Mappedin JS interaction events.
|
|
12042
|
+
* - Maplibre markers and labels may overlap as they are not integrated with the Mappedin JS collision engine.
|
|
10583
12043
|
*/
|
|
10584
|
-
|
|
10585
|
-
path: Path;
|
|
10586
|
-
entityIds: string[];
|
|
10587
|
-
} | undefined;
|
|
12044
|
+
get map(): import("@packages/internal/outdoor-context-v4").Map | undefined;
|
|
10588
12045
|
/**
|
|
10589
|
-
*
|
|
10590
|
-
* @param coordinate Array of coordinates ({@link Coordinate}) to form the path.
|
|
10591
|
-
* @param options Optional additional option
|
|
10592
|
-
* @example
|
|
10593
|
-
* // Add a red path to the map
|
|
10594
|
-
* mapView.Paths.add(coordinate, { color: '#ff0000' });
|
|
12046
|
+
* Whether the outdoorView is enabled.
|
|
10595
12047
|
*/
|
|
10596
|
-
|
|
12048
|
+
get enabled(): boolean;
|
|
10597
12049
|
/**
|
|
10598
|
-
*
|
|
10599
|
-
* @param path The path to be removed.
|
|
10600
|
-
* @example
|
|
10601
|
-
* mapView.Paths.remove(path);
|
|
12050
|
+
* Whether the outdoorView is visible.
|
|
10602
12051
|
*/
|
|
10603
|
-
|
|
12052
|
+
get visible(): boolean;
|
|
10604
12053
|
/**
|
|
10605
|
-
*
|
|
10606
|
-
*
|
|
10607
|
-
* @example
|
|
10608
|
-
* mapView.Paths.removeAll();
|
|
12054
|
+
* Show the outdoor map.
|
|
10609
12055
|
*/
|
|
10610
|
-
|
|
12056
|
+
show(): void;
|
|
12057
|
+
/**
|
|
12058
|
+
* Hide the outdoor map.
|
|
12059
|
+
* @param excludedStyleLayerIds {string[]}
|
|
12060
|
+
*/
|
|
12061
|
+
hide(excludedStyleLayerIds?: string[]): void;
|
|
12062
|
+
/**
|
|
12063
|
+
* Set outdoor view opacity.
|
|
12064
|
+
* @param targetOpacity {number | 'initial'}
|
|
12065
|
+
* @param excludedStyleLayerIds {string[]}
|
|
12066
|
+
*/
|
|
12067
|
+
setOpacity(targetOpacity: number | 'initial', excludedStyleLayerIds?: string[]): void;
|
|
10611
12068
|
}
|
|
10612
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
10613
|
-
export {};
|
|
10614
12069
|
}
|
|
10615
12070
|
|
|
10616
12071
|
declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
|
|
@@ -10708,6 +12163,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
|
|
|
10708
12163
|
*/
|
|
10709
12164
|
animateArrowsOnPath?: boolean;
|
|
10710
12165
|
};
|
|
12166
|
+
/**
|
|
12167
|
+
* Controls whether the path drawing is animated across floors.
|
|
12168
|
+
* @default true
|
|
12169
|
+
*/
|
|
12170
|
+
animatePathDrawing?: boolean;
|
|
10711
12171
|
/**
|
|
10712
12172
|
* Options for the path.
|
|
10713
12173
|
*/
|
|
@@ -10830,242 +12290,44 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
|
|
|
10830
12290
|
*/
|
|
10831
12291
|
get activePath(): Path | undefined;
|
|
10832
12292
|
/**
|
|
10833
|
-
* The current list of floor stacks along the navigation paths.
|
|
10834
|
-
*/
|
|
10835
|
-
get floorStacks(): FloorStack[];
|
|
10836
|
-
/**
|
|
10837
|
-
* The current list of floors along the navigation paths.
|
|
10838
|
-
*/
|
|
10839
|
-
get floors(): Floor[];
|
|
10840
|
-
/**
|
|
10841
|
-
* Sets the active path by index.
|
|
10842
|
-
*/
|
|
10843
|
-
setActivePathByIndex(target: number): void;
|
|
10844
|
-
/**
|
|
10845
|
-
* Sets the active path.
|
|
10846
|
-
*/
|
|
10847
|
-
setActivePath(target: Path): void;
|
|
10848
|
-
/**
|
|
10849
|
-
* Sets the active path by directions.
|
|
10850
|
-
*/
|
|
10851
|
-
setActivePathByDirections(target: Directions): void;
|
|
10852
|
-
/**
|
|
10853
|
-
* @internal
|
|
10854
|
-
*/
|
|
10855
|
-
drawSync(directions: Directions | Directions[], options?: TNavigationOptions): void;
|
|
10856
|
-
/**
|
|
10857
|
-
* Draws the specified directions on the map.
|
|
10858
|
-
* @param directions The directions to be drawn.
|
|
10859
|
-
* @param options Optional additional options for the navigation.
|
|
10860
|
-
*/
|
|
10861
|
-
draw(directions: Directions | Directions[], options?: TNavigationOptions): Promise<unknown>;
|
|
10862
|
-
/**
|
|
10863
|
-
* Clears any drawn navigation paths or directions from the map.
|
|
10864
|
-
*/
|
|
10865
|
-
clear(): void;
|
|
10866
|
-
}
|
|
10867
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
10868
|
-
export {};
|
|
10869
|
-
}
|
|
10870
|
-
|
|
10871
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter' {
|
|
10872
|
-
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
10873
|
-
import type { GLTFExportOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
10874
|
-
/**
|
|
10875
|
-
* API to export the scene.
|
|
10876
|
-
*
|
|
10877
|
-
* @hidden
|
|
10878
|
-
*/
|
|
10879
|
-
export class Exporter {
|
|
10880
|
-
#private;
|
|
10881
|
-
/**
|
|
10882
|
-
* @internal
|
|
10883
|
-
*/
|
|
10884
|
-
get currentMap(): GeojsonApiMapObject | undefined;
|
|
10885
|
-
/**
|
|
10886
|
-
* @internal
|
|
10887
|
-
*/
|
|
10888
|
-
constructor({ currentMapGetter }: {
|
|
10889
|
-
currentMapGetter: CurrentMapGetter;
|
|
10890
|
-
});
|
|
10891
|
-
/**
|
|
10892
|
-
* Exports the current scene as a GLTF file.
|
|
10893
|
-
*
|
|
10894
|
-
* @hidden
|
|
10895
|
-
*/
|
|
10896
|
-
getCurrentSceneGLTF(userOptions: GLTFExportOptions): Promise<Blob>;
|
|
10897
|
-
}
|
|
10898
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
10899
|
-
export {};
|
|
10900
|
-
}
|
|
10901
|
-
|
|
10902
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style' {
|
|
10903
|
-
import type { StyleCollection } from '@mappedin/mvf';
|
|
10904
|
-
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
10905
|
-
export class Style {
|
|
10906
|
-
#private;
|
|
10907
|
-
/**
|
|
10908
|
-
* @internal
|
|
10909
|
-
*/
|
|
10910
|
-
get currentMap(): GeojsonApiMapObject | undefined;
|
|
10911
|
-
/**
|
|
10912
|
-
* @internal
|
|
10913
|
-
*/
|
|
10914
|
-
constructor({ currentMapGetter }: {
|
|
10915
|
-
currentMapGetter: CurrentMapGetter;
|
|
10916
|
-
});
|
|
10917
|
-
setFromStyleCollection(styleCollection: StyleCollection): void;
|
|
10918
|
-
}
|
|
10919
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
10920
|
-
export {};
|
|
10921
|
-
}
|
|
10922
|
-
|
|
10923
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor' {
|
|
10924
|
-
import { type RendererCore } from '@mappedin/core-sdk';
|
|
10925
|
-
import type { BBox } from 'geojson';
|
|
10926
|
-
export type HiddenOutdoorGeometry = [
|
|
10927
|
-
BBox,
|
|
10928
|
-
polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[],
|
|
10929
|
-
layers: string[]
|
|
10930
|
-
];
|
|
10931
|
-
/**
|
|
10932
|
-
* The outdoor map shown around the Mappedin indoor map can be manipulated to show or hide additional information. It can be used to add GeoJSON based geometry, images, deck.gl layers and more.
|
|
10933
|
-
*
|
|
10934
|
-
* The outdoor map is accessed using {@link MapView.Outdoor.map}, which returns a maplibregl.Map object.
|
|
10935
|
-
* [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The Mappedin SDK makes use of it to display the outdoor map.
|
|
10936
|
-
*
|
|
10937
|
-
* By providing access to the MapLibre map used to draw the outdoor map, the Mappedin SDK enables developers to draw on and manipulate the outdoor map.
|
|
10938
|
-
* Developers can use most capabilities of MapLibre GL JS with key exceptions being Interactivity and Camera, which are not available.
|
|
10939
|
-
*
|
|
10940
|
-
* User touch and click events are handled by Mappedin JS and are not propagated to the outdoor map layer. Camera movement is also handled by Mappedin JS and cannot be manipulated using MapLibre controls.
|
|
10941
|
-
*
|
|
10942
|
-
* Refer to the [Outdoor Map Guide](https://developer.mappedin.com/web-sdk/outdoor-map) for more information and interactive examples.
|
|
10943
|
-
*/
|
|
10944
|
-
export default class Outdoor {
|
|
10945
|
-
#private;
|
|
10946
|
-
/**
|
|
10947
|
-
* @internal
|
|
10948
|
-
*/
|
|
10949
|
-
constructor(core: RendererCore, hiddenOutdoorGeometry?: HiddenOutdoorGeometry[]);
|
|
10950
|
-
/**
|
|
10951
|
-
* Set the style of the outdoor map. Use one of [Mappedin's predefined styles](https://developer.mappedin.com/web-sdk/outdoor-map#styles) or link to a custom style.
|
|
10952
|
-
* @param style {any}
|
|
10953
|
-
*/
|
|
10954
|
-
setStyle(style: any): void;
|
|
10955
|
-
/**
|
|
10956
|
-
* Returns a Maplibre map for advanced usage.
|
|
10957
|
-
*
|
|
10958
|
-
* @returns {object} Maplibre map instance
|
|
10959
|
-
*
|
|
10960
|
-
* Limitations:
|
|
10961
|
-
* - Maplibre interaction events are not supported, use Mappedin JS interaction events.
|
|
10962
|
-
* - Maplibre markers and labels may overlap as they are not integrated with the Mappedin JS collision engine.
|
|
10963
|
-
*/
|
|
10964
|
-
get map(): import("@packages/internal/outdoor-context-v4").Map | undefined;
|
|
10965
|
-
/**
|
|
10966
|
-
* Whether the outdoorView is enabled.
|
|
10967
|
-
*/
|
|
10968
|
-
get enabled(): boolean;
|
|
10969
|
-
/**
|
|
10970
|
-
* Whether the outdoorView is visible.
|
|
10971
|
-
*/
|
|
10972
|
-
get visible(): boolean;
|
|
10973
|
-
/**
|
|
10974
|
-
* Show the outdoor map.
|
|
10975
|
-
*/
|
|
10976
|
-
show(): void;
|
|
10977
|
-
/**
|
|
10978
|
-
* Hide the outdoor map.
|
|
10979
|
-
* @param excludedStyleLayerIds {string[]}
|
|
10980
|
-
*/
|
|
10981
|
-
hide(excludedStyleLayerIds?: string[]): void;
|
|
10982
|
-
/**
|
|
10983
|
-
* Set outdoor view opacity.
|
|
10984
|
-
* @param targetOpacity {number | 'initial'}
|
|
10985
|
-
* @param excludedStyleLayerIds {string[]}
|
|
10986
|
-
*/
|
|
10987
|
-
setOpacity(targetOpacity: number | 'initial', excludedStyleLayerIds?: string[]): void;
|
|
10988
|
-
}
|
|
10989
|
-
}
|
|
10990
|
-
|
|
10991
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images' {
|
|
10992
|
-
import type { IAnchorable, TAddImageOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
10993
|
-
import { Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
10994
|
-
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
10995
|
-
/**
|
|
10996
|
-
* Images can enhance the fidelity of an indoor map. They can be used to add custom branding, highlight important features, or provide additional information to users.
|
|
10997
|
-
* Images can be placed on any {@link Door}, {@link Space}, or {@link Coordinate} on the map and given a verticalOffset to control the height at which the image is displayed.
|
|
10998
|
-
*
|
|
10999
|
-
* This class is accessed using {@link MapView.Images}.
|
|
11000
|
-
*
|
|
11001
|
-
* JPEG and PNG images are supported. It's important to consider the size of all unique image files displayed on a map at one time.
|
|
11002
|
-
* Using many unique images may cause instability on mobile devices with limited GPU memory. The Mappedin SDK will cache and reuse images that have the same URL, resulting in reduced memory usage.
|
|
11003
|
-
*
|
|
11004
|
-
* The following calculations illustrates how much memory is used for a given image:
|
|
11005
|
-
*
|
|
11006
|
-
* Formula: `width * height * 4 bytes/pixel = memory used`
|
|
11007
|
-
*
|
|
11008
|
-
* 512 x 512 Pixel Image: `512px * 512px * 4 bytes/pixel = 1MB`
|
|
11009
|
-
*
|
|
11010
|
-
* 4096 x 4096 Pixel Image: `4096px * 4096px * 4 bytes/pixel = 64MB`
|
|
11011
|
-
*
|
|
11012
|
-
* Refer to the [Images Guide](https://developer.mappedin.com/web-sdk/images-textures) for more information and interactive examples.
|
|
11013
|
-
*/
|
|
11014
|
-
export class Images {
|
|
11015
|
-
#private;
|
|
11016
|
-
/**
|
|
11017
|
-
* @internal
|
|
12293
|
+
* The current list of floor stacks along the navigation paths.
|
|
11018
12294
|
*/
|
|
11019
|
-
get
|
|
12295
|
+
get floorStacks(): FloorStack[];
|
|
11020
12296
|
/**
|
|
11021
|
-
*
|
|
12297
|
+
* The current list of floors along the navigation paths.
|
|
11022
12298
|
*/
|
|
11023
|
-
|
|
11024
|
-
currentMapGetter: CurrentMapGetter;
|
|
11025
|
-
});
|
|
12299
|
+
get floors(): Floor[];
|
|
11026
12300
|
/**
|
|
11027
|
-
*
|
|
12301
|
+
* Sets the active path by index.
|
|
11028
12302
|
*/
|
|
11029
|
-
|
|
11030
|
-
image: Image;
|
|
11031
|
-
entityId: string;
|
|
11032
|
-
} | undefined;
|
|
12303
|
+
setActivePathByIndex(target: number): void;
|
|
11033
12304
|
/**
|
|
11034
|
-
*
|
|
11035
|
-
*
|
|
11036
|
-
* @param target The target object ({@link IAnchorable}) for the image.
|
|
11037
|
-
* @param url The URL of the image.
|
|
11038
|
-
* @param options Optional additional options for the {@link Image}.
|
|
11039
|
-
* @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
|
|
11040
|
-
* @example
|
|
11041
|
-
* // Add an interactive {@link Image} to the map with custom HTML content.
|
|
11042
|
-
* mapView.Images.add(coordinate, '<div>Image Content</div>', { interactive: true });
|
|
12305
|
+
* Sets the active path.
|
|
11043
12306
|
*/
|
|
11044
|
-
|
|
12307
|
+
setActivePath(target: Path): void;
|
|
11045
12308
|
/**
|
|
11046
|
-
*
|
|
11047
|
-
*
|
|
11048
|
-
* @param image {Image} The {@link Image} which should be removed.
|
|
11049
|
-
* @example
|
|
11050
|
-
* mapView.Images.remove(image);
|
|
12309
|
+
* Sets the active path by directions.
|
|
11051
12310
|
*/
|
|
11052
|
-
|
|
12311
|
+
setActivePathByDirections(target: Directions): void;
|
|
11053
12312
|
/**
|
|
11054
|
-
*
|
|
11055
|
-
*
|
|
11056
|
-
* @example
|
|
11057
|
-
* mapView.Images.removeAll();
|
|
12313
|
+
* @internal
|
|
11058
12314
|
*/
|
|
11059
|
-
|
|
12315
|
+
drawSync(directions: Directions | Directions[], options?: TNavigationOptions): void;
|
|
12316
|
+
/**
|
|
12317
|
+
* Draws the specified directions on the map.
|
|
12318
|
+
* @param directions The directions to be drawn.
|
|
12319
|
+
* @param options Optional additional options for the navigation.
|
|
12320
|
+
*/
|
|
12321
|
+
draw(directions: Directions | Directions[], options?: TNavigationOptions): Promise<unknown>;
|
|
12322
|
+
/**
|
|
12323
|
+
* Clears any drawn navigation paths or directions from the map.
|
|
12324
|
+
*/
|
|
12325
|
+
clear(): void;
|
|
11060
12326
|
}
|
|
11061
12327
|
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11062
12328
|
export {};
|
|
11063
12329
|
}
|
|
11064
12330
|
|
|
11065
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus' {
|
|
11066
|
-
export { DynamicFocus } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus/dynamic-focus';
|
|
11067
|
-
}
|
|
11068
|
-
|
|
11069
12331
|
declare module '@mappedin/mappedin-js/mappedin-js/src/search/internal' {
|
|
11070
12332
|
import type { SearchResult as MiniSearchResult, Suggestion, MatchInfo } from 'minisearch';
|
|
11071
12333
|
import type { Places } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
@@ -11645,6 +12907,60 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
|
|
|
11645
12907
|
export {};
|
|
11646
12908
|
}
|
|
11647
12909
|
|
|
12910
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/tokens/access-token' {
|
|
12911
|
+
import { type TGetMapDataWithCredentialsOptions } from '@mappedin/mappedin-js/packages/mvf-utils/mvf-utils';
|
|
12912
|
+
export const ACCESS_TOKEN_REFRESH_BUFFER_MINUTES = 60;
|
|
12913
|
+
export const ACCESS_TOKEN_REFRESH_BUFFER_MS: number;
|
|
12914
|
+
export const ACCESS_TOKEN_STORAGE_KEY = "accessTokens";
|
|
12915
|
+
type AccessToken = {
|
|
12916
|
+
accessToken: string;
|
|
12917
|
+
expiresTimestamp: number;
|
|
12918
|
+
};
|
|
12919
|
+
type TGetAccessTokenOptions = Pick<TGetMapDataWithCredentialsOptions, 'baseUri' | 'baseAuthUri' | 'key' | 'secret'>;
|
|
12920
|
+
/**
|
|
12921
|
+
* Get an access token from storage or fetch it from the API using API keys.
|
|
12922
|
+
*/
|
|
12923
|
+
export function getAccessToken(userOptions: TGetAccessTokenOptions, enterprise?: boolean): Promise<AccessToken>;
|
|
12924
|
+
/**
|
|
12925
|
+
* Fetch an access token for enterprise.
|
|
12926
|
+
*/
|
|
12927
|
+
export function fetchAccessTokenEnterprise(userOptions: TGetAccessTokenOptions, currentTimestamp: number): Promise<AccessToken>;
|
|
12928
|
+
export {};
|
|
12929
|
+
}
|
|
12930
|
+
|
|
12931
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/tokens/sas-token' {
|
|
12932
|
+
export const SAS_TOKEN_REFRESH_BUFFER_MINUTES = 60;
|
|
12933
|
+
export const SAS_TOKEN_REFRESH_BUFFER_MS: number;
|
|
12934
|
+
export const SAS_TOKEN_STORAGE_KEY = "miSasTokens";
|
|
12935
|
+
type SasToken = {
|
|
12936
|
+
token: string;
|
|
12937
|
+
expires: number;
|
|
12938
|
+
};
|
|
12939
|
+
/**
|
|
12940
|
+
* Fetch the SAS Token either from sesion storage or from the API using the access token.
|
|
12941
|
+
* @param userOptions - The user options.
|
|
12942
|
+
* @returns The SAS Token.
|
|
12943
|
+
*/
|
|
12944
|
+
export function getSasToken(userOptions: {
|
|
12945
|
+
mapId: string;
|
|
12946
|
+
baseUri?: string;
|
|
12947
|
+
}, accessToken: string): Promise<SasToken>;
|
|
12948
|
+
/**
|
|
12949
|
+
* Fetch the SAS Token for private images using the access token.
|
|
12950
|
+
* @param userOptions - The user options.
|
|
12951
|
+
* @param accessToken - The access token.
|
|
12952
|
+
* @returns The SAS Token.
|
|
12953
|
+
*/
|
|
12954
|
+
export function fetchSasToken(userOptions: {
|
|
12955
|
+
mapId: string;
|
|
12956
|
+
baseUri?: string;
|
|
12957
|
+
}, accessToken: string): Promise<{
|
|
12958
|
+
token: string;
|
|
12959
|
+
expires: number;
|
|
12960
|
+
}>;
|
|
12961
|
+
export {};
|
|
12962
|
+
}
|
|
12963
|
+
|
|
11648
12964
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object' {
|
|
11649
12965
|
export default abstract class BaseMetaData {
|
|
11650
12966
|
/**
|
|
@@ -11745,90 +13061,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/opening-h
|
|
|
11745
13061
|
}
|
|
11746
13062
|
}
|
|
11747
13063
|
|
|
11748
|
-
declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
|
|
11749
|
-
import { QuadTree } from '@packages/internal/quad-tree';
|
|
11750
|
-
import '../../styles/collisions.scss';
|
|
11751
|
-
import type { MarkerComponent } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
11752
|
-
import type LabelComponent from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
11753
|
-
import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
|
|
11754
|
-
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
11755
|
-
import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-processor';
|
|
11756
|
-
import type { WatermarkPosition } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
|
|
11757
|
-
export type TMessageEvent = MessageEvent<{
|
|
11758
|
-
msgId: string;
|
|
11759
|
-
colliders: TSerializedColliderResponse[];
|
|
11760
|
-
debug: {
|
|
11761
|
-
x: number;
|
|
11762
|
-
y: number;
|
|
11763
|
-
w: number;
|
|
11764
|
-
h: number;
|
|
11765
|
-
}[];
|
|
11766
|
-
}>;
|
|
11767
|
-
export type TMessage = {
|
|
11768
|
-
msgId: string;
|
|
11769
|
-
totalWidth: number;
|
|
11770
|
-
totalHeight: number;
|
|
11771
|
-
watermarkWidth: number;
|
|
11772
|
-
watermarkHeight: number;
|
|
11773
|
-
watermarkPosition: WatermarkPosition;
|
|
11774
|
-
colliders: TSerializedCollider[];
|
|
11775
|
-
devicePixelRatio: number;
|
|
11776
|
-
};
|
|
11777
|
-
type TCollisionSystemEvent = {
|
|
11778
|
-
'visibility-changed': undefined;
|
|
11779
|
-
};
|
|
11780
|
-
export type PackedBBox = [x: number, y: number, w: number, h: number, index: number];
|
|
11781
|
-
export type PackedBBoxes = PackedBBox[];
|
|
11782
|
-
export type PackedCollider = [
|
|
11783
|
-
bboxes: PackedBBoxes,
|
|
11784
|
-
enabled: 0 | 1,
|
|
11785
|
-
alwaysVisible: 0 | 1,
|
|
11786
|
-
x: number,
|
|
11787
|
-
y: number,
|
|
11788
|
-
shouldCollideWithScreenEdges?: 0 | 1,
|
|
11789
|
-
onlyExposeStrategyIndex?: number
|
|
11790
|
-
];
|
|
11791
|
-
export type PackedMessage = [
|
|
11792
|
-
colliders: PackedCollider[],
|
|
11793
|
-
devicePixelRatio: number,
|
|
11794
|
-
totalHeight: number,
|
|
11795
|
-
totalWidth: number,
|
|
11796
|
-
watermarkWidth: number,
|
|
11797
|
-
watermarkHeight: number,
|
|
11798
|
-
watermarkPosition: WatermarkPosition
|
|
11799
|
-
];
|
|
11800
|
-
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
11801
|
-
collidersDirty: boolean;
|
|
11802
|
-
packedMessage: PackedMessage;
|
|
11803
|
-
visibleCollidersQTree: QuadTree<{
|
|
11804
|
-
entityId: string | number;
|
|
11805
|
-
}>;
|
|
11806
|
-
interactiveCollidersQTree: QuadTree<{
|
|
11807
|
-
entityId: string | number;
|
|
11808
|
-
}>;
|
|
11809
|
-
coreState: RendererState;
|
|
11810
|
-
constructor(debugCanvas: HTMLCanvasElement, coreState: RendererState, worker?: Worker);
|
|
11811
|
-
postMessage: () => void;
|
|
11812
|
-
showCollisionBoxes: () => void;
|
|
11813
|
-
hideCollisionBoxes: () => void;
|
|
11814
|
-
currentMsgId: string;
|
|
11815
|
-
working: boolean;
|
|
11816
|
-
componentArray: (MarkerComponent | LabelComponent)[];
|
|
11817
|
-
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, isPanning?: boolean) => void;
|
|
11818
|
-
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
11819
|
-
/**
|
|
11820
|
-
* Resolve collisions
|
|
11821
|
-
*/
|
|
11822
|
-
resolve: (e: MessageEvent<{
|
|
11823
|
-
msgId: string;
|
|
11824
|
-
colliders: TSerializedColliderResponse[];
|
|
11825
|
-
}>) => void;
|
|
11826
|
-
drawDebug: () => void;
|
|
11827
|
-
destroy: () => void;
|
|
11828
|
-
}
|
|
11829
|
-
export {};
|
|
11830
|
-
}
|
|
11831
|
-
|
|
11832
13064
|
declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
|
|
11833
13065
|
import { Object3D } from 'three';
|
|
11834
13066
|
import type { Mesh, Object3DEventMap, ShaderMaterial, Texture, TubeGeometry, Color, Vector2, Raycaster } from 'three';
|
|
@@ -11844,10 +13076,12 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
|
|
|
11844
13076
|
import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
11845
13077
|
import type { Text3DComponent } from '@mappedin/mappedin-js/geojson/src/components/text3d';
|
|
11846
13078
|
import type { ModelStyleComponnet, Text3DStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles';
|
|
13079
|
+
import type { OutlineComponent } from '@mappedin/mappedin-js/geojson/src/components/outline';
|
|
11847
13080
|
export enum Geometry3DComponents {
|
|
11848
13081
|
Mesh = 0,
|
|
11849
13082
|
Style = 1,
|
|
11850
|
-
Interaction = 2
|
|
13083
|
+
Interaction = 2,
|
|
13084
|
+
Outline = 3
|
|
11851
13085
|
}
|
|
11852
13086
|
type Geometry3DObjectTypes = 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image' | 'text3d';
|
|
11853
13087
|
export class Geometry3DObject3D extends Object3D {
|
|
@@ -11876,16 +13110,17 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
|
|
|
11876
13110
|
}
|
|
11877
13111
|
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | Text3DComponent | ImageComponent;
|
|
11878
13112
|
type MappedComponentType<M> = M extends MeshComponent ? 'geometry' : M extends PathComponent ? 'path' : M extends ModelComponent ? 'model' : M extends CustomGeometryComponent ? 'custom-geometry' : M extends ImageComponent ? 'image' : M extends Text3DComponent ? 'text3d' : never;
|
|
11879
|
-
export class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent | ModelStyleComponnet = StyleComponent, I extends InteractionComponent = InteractionComponent, T extends MappedComponentType<M> = MappedComponentType<M
|
|
13113
|
+
export class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent | ModelStyleComponnet = StyleComponent, I extends InteractionComponent = InteractionComponent, T extends MappedComponentType<M> = MappedComponentType<M>, O extends OutlineComponent | undefined = OutlineComponent | undefined> {
|
|
11880
13114
|
id: string | number;
|
|
11881
|
-
components: [M, S, I?];
|
|
13115
|
+
components: [M, S, I?, O?];
|
|
11882
13116
|
get object3d(): M["mesh"];
|
|
11883
13117
|
get parentObject3D(): GroupContainerObject3D | GeometryGroupObject3D | null;
|
|
11884
13118
|
get type(): T;
|
|
11885
13119
|
entities2D: Map<string | number, Geometry2D>;
|
|
11886
13120
|
constructor(meshComponent: M, styleComponent: S);
|
|
11887
|
-
|
|
11888
|
-
|
|
13121
|
+
/** Attaching a 2D entity to the 3D entity so it will follow the style changes */
|
|
13122
|
+
attach(entity: Geometry2D): void;
|
|
13123
|
+
detach(entity: Geometry2D): void;
|
|
11889
13124
|
removeAllEntities(): void;
|
|
11890
13125
|
}
|
|
11891
13126
|
export type TextGeometry3D = Geometry3D<Text3DComponent, Text3DStyleComponent, InteractionComponent, 'text3d'>;
|
|
@@ -11988,27 +13223,29 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry2d' {
|
|
|
11988
13223
|
import type { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
|
|
11989
13224
|
import { type GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
11990
13225
|
export enum Geometry2DComponents {
|
|
11991
|
-
|
|
11992
|
-
|
|
13226
|
+
UI = 0,
|
|
13227
|
+
Interaction = 1
|
|
11993
13228
|
}
|
|
11994
13229
|
export class Geometry2DObject3D extends Object3D {
|
|
11995
13230
|
}
|
|
11996
13231
|
export class Geometry2D {
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
13232
|
+
id: string | number;
|
|
13233
|
+
get type(): 'label' | 'marker';
|
|
13234
|
+
get parentObject3D(): GroupContainerObject3D | GeometryGroupObject3D | null;
|
|
13235
|
+
/** The geometry3D that this 2D entity is attached to */
|
|
13236
|
+
get attachedTo(): string | number | undefined;
|
|
13237
|
+
verticalOffset: number;
|
|
13238
|
+
/**
|
|
13239
|
+
* When the position of the entity changes, this should be set to true, so that systems like pan bounds can update
|
|
13240
|
+
*/
|
|
13241
|
+
positionDirty: boolean;
|
|
13242
|
+
occluderId?: number;
|
|
13243
|
+
object3d: Geometry2DObject3D;
|
|
13244
|
+
components: [MarkerComponent | LabelComponent, InteractionComponent?];
|
|
13245
|
+
disposed: boolean;
|
|
13246
|
+
constructor(ui: MarkerComponent | LabelComponent, position: Vector3, verticalOffset?: number);
|
|
13247
|
+
get position(): Vector3;
|
|
13248
|
+
setAltitude(z: number): void;
|
|
12012
13249
|
}
|
|
12013
13250
|
}
|
|
12014
13251
|
|
|
@@ -12033,13 +13270,17 @@ declare module '@mappedin/mappedin-js/geojson/src/services/text3d/text3d' {
|
|
|
12033
13270
|
import { BatchedText, Text } from 'troika-three-text';
|
|
12034
13271
|
import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
12035
13272
|
import type { Text3DComponent } from '@mappedin/mappedin-js/geojson/src/components/text3d';
|
|
13273
|
+
import { syncText } from '@mappedin/mappedin-js/geojson/src/services/text3d/utils';
|
|
13274
|
+
export function configureTroikaTextBuilder({ useWorker }: {
|
|
13275
|
+
useWorker: boolean;
|
|
13276
|
+
}): void;
|
|
12036
13277
|
export function createTroikaTextPoint(entityId: string | number, text3DComponent: Text3DComponent, styleComponent: Text3DStyleComponent, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): Promise<{
|
|
12037
13278
|
text: Text;
|
|
12038
13279
|
}>;
|
|
12039
13280
|
export function createTroikaTextArea(entityId: string | number, text3DComponent: Text3DComponent, styleComponent: Text3DStyleComponent, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): Promise<{
|
|
12040
13281
|
text: Text;
|
|
12041
13282
|
} | undefined>;
|
|
12042
|
-
export { BatchedText, Text };
|
|
13283
|
+
export { BatchedText, Text, syncText };
|
|
12043
13284
|
/**
|
|
12044
13285
|
* Promise caches the base64 font string. Then shared across all needed
|
|
12045
13286
|
*/
|
|
@@ -12057,11 +13298,21 @@ declare module '@mappedin/mappedin-js/geojson/src/services/text3d/text3d' {
|
|
|
12057
13298
|
export type ModuleType = {
|
|
12058
13299
|
createTroikaTextPoint: typeof createTroikaTextPoint;
|
|
12059
13300
|
createTroikaTextArea: typeof createTroikaTextArea;
|
|
13301
|
+
configureTroikaTextBuilder: typeof configureTroikaTextBuilder;
|
|
12060
13302
|
preloadFont: typeof preloadFont;
|
|
13303
|
+
syncText: typeof syncText;
|
|
12061
13304
|
BatchedText: typeof BatchedText;
|
|
12062
13305
|
};
|
|
12063
13306
|
}
|
|
12064
13307
|
|
|
13308
|
+
declare module '@mappedin/mappedin-js/geojson/src/components/focusable' {
|
|
13309
|
+
import type { Mesh } from 'three';
|
|
13310
|
+
export class FocusableComponent {
|
|
13311
|
+
focusMesh?: Mesh;
|
|
13312
|
+
dirty: boolean;
|
|
13313
|
+
}
|
|
13314
|
+
}
|
|
13315
|
+
|
|
12065
13316
|
declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-style' {
|
|
12066
13317
|
import { type Shading } from '@mappedin/mappedin-js/geojson/src/types';
|
|
12067
13318
|
type GeometryGroupStyle = {
|
|
@@ -12445,6 +13696,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
|
|
|
12445
13696
|
import { PubSub } from '@packages/internal/common';
|
|
12446
13697
|
import type { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
12447
13698
|
import type { ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles';
|
|
13699
|
+
import { OutlineComponent } from '@mappedin/mappedin-js/geojson/src/components/outline';
|
|
12448
13700
|
export class MeshCreationAndOptimizationSystem extends PubSub<{
|
|
12449
13701
|
'model-loaded': void;
|
|
12450
13702
|
'geometry-2d-added': void;
|
|
@@ -12454,7 +13706,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
|
|
|
12454
13706
|
loader?: GLTFLoader;
|
|
12455
13707
|
constructor(state: RendererState, convertTo3DMapPosition: any);
|
|
12456
13708
|
getGLTFLoader(): Promise<GLTFLoader>;
|
|
12457
|
-
createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon, MeshComponentProperties>, style?: LineStyle | PaintStyle): Geometry3D<MeshComponent, StyleComponent, import("../../components/interaction").InteractionComponent, "geometry">;
|
|
13709
|
+
createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon, MeshComponentProperties>, style?: LineStyle | PaintStyle): Geometry3D<MeshComponent, StyleComponent, import("../../components/interaction").InteractionComponent, "geometry", OutlineComponent | undefined>;
|
|
12458
13710
|
createModelFromFeature(id: string | number, feature: Feature<Point, ModelProperties>, style?: Partial<ModelStyle>): ModelGeometry3D;
|
|
12459
13711
|
populateEntityMesh(entity: Geometry3D, geometry: BufferGeometry): void;
|
|
12460
13712
|
populateModelGroup(entities: Set<string | number>, url: string, tree: GeometryGroupObject3D): Promise<Geometry3DObject3D>;
|
|
@@ -12812,7 +14064,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/dom-resize/system' {
|
|
|
12812
14064
|
observers: Map<string | number, ResizeObserver>;
|
|
12813
14065
|
constructor(state: RendererState, domTree: Entity2DHTMLDivElementContainer);
|
|
12814
14066
|
setupObserver(): void;
|
|
12815
|
-
updateDimensions: (mutations:
|
|
14067
|
+
updateDimensions: (mutations: ResizeObserverEntry[]) => void;
|
|
12816
14068
|
update(): void;
|
|
12817
14069
|
destroy(): void;
|
|
12818
14070
|
}
|
|
@@ -12854,9 +14106,9 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/
|
|
|
12854
14106
|
export class OutlineInterpolationSystem {
|
|
12855
14107
|
#private;
|
|
12856
14108
|
/**
|
|
12857
|
-
* Set to true when we need to update the outline
|
|
14109
|
+
* Set to true when we need to update the outline opacity of all entities, regardless of zoom level.
|
|
12858
14110
|
*/
|
|
12859
|
-
|
|
14111
|
+
outlineOpacitiesDirty: boolean;
|
|
12860
14112
|
get geometries3DDirty(): boolean;
|
|
12861
14113
|
set geometries3DDirty(value: boolean);
|
|
12862
14114
|
constructor(rendererState: RendererState);
|
|
@@ -12865,7 +14117,8 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/
|
|
|
12865
14117
|
* @param zoomLevel - The current zoom level.
|
|
12866
14118
|
* @param isCameraZoomDirty - Whether the zoom level has changed since the last update. If this is true, the system will update if zoomLevel falls between range.
|
|
12867
14119
|
*/
|
|
12868
|
-
update(zoomLevel: number, isCameraZoomDirty?: boolean):
|
|
14120
|
+
update(zoomLevel: number, isCameraZoomDirty?: boolean): null | undefined;
|
|
14121
|
+
destroy(): void;
|
|
12869
14122
|
}
|
|
12870
14123
|
}
|
|
12871
14124
|
|
|
@@ -12909,6 +14162,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/syst
|
|
|
12909
14162
|
resize(): void;
|
|
12910
14163
|
update: (cameraIsMoving?: boolean, cameraStoppedMovingTime?: number) => void;
|
|
12911
14164
|
updateRaf(): void;
|
|
14165
|
+
raycast(): void;
|
|
12912
14166
|
showRaycasters(): void;
|
|
12913
14167
|
hideRaycasters(): void;
|
|
12914
14168
|
destroy(): void;
|
|
@@ -12916,14 +14170,16 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/syst
|
|
|
12916
14170
|
}
|
|
12917
14171
|
|
|
12918
14172
|
declare module '@mappedin/mappedin-js/geojson/src/systems/outdoor-layers/system' {
|
|
12919
|
-
import type { Map } from '@packages/internal/outdoor-context-v4';
|
|
14173
|
+
import type { LegacyFilterSpecification, Map } from '@packages/internal/outdoor-context-v4';
|
|
12920
14174
|
import type { Position } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
12921
14175
|
import { type BBox } from 'geojson';
|
|
12922
14176
|
export class OutdoorLayers {
|
|
14177
|
+
#private;
|
|
12923
14178
|
dirty: boolean;
|
|
12924
14179
|
hideLayersUnderPoint(point: Position, layers: string[]): void;
|
|
12925
14180
|
hideLayersIntersectingPolygons(bbox: BBox, polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[], layers: string[]): void;
|
|
12926
14181
|
constructor(map?: Map);
|
|
14182
|
+
expr: LegacyFilterSpecification[];
|
|
12927
14183
|
destroy(): void;
|
|
12928
14184
|
}
|
|
12929
14185
|
}
|
|
@@ -13007,7 +14263,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/styles/style' {
|
|
|
13007
14263
|
topColor?: string;
|
|
13008
14264
|
texture?: string;
|
|
13009
14265
|
topTexture?: string;
|
|
13010
|
-
outline: boolean;
|
|
13011
14266
|
showImage: boolean;
|
|
13012
14267
|
flipImageToFaceCamera: boolean;
|
|
13013
14268
|
url?: string;
|
|
@@ -13031,7 +14286,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/styles/style' {
|
|
|
13031
14286
|
altitude: number;
|
|
13032
14287
|
join: LineStyle['join'];
|
|
13033
14288
|
cap: LineStyle['cap'];
|
|
13034
|
-
outline: boolean;
|
|
13035
14289
|
showImage: boolean;
|
|
13036
14290
|
flipImageToFaceCamera: boolean;
|
|
13037
14291
|
url?: string;
|
|
@@ -13156,6 +14410,35 @@ declare module '@mappedin/mappedin-js/geojson/src/entities' {
|
|
|
13156
14410
|
export type { PathMesh, PatMeshContainer, PathMaterial, Geometry3DTypes, ImageGeometry3D, TextGeometry3D, ModelGeometry3D, CustomGeometry3D, MeshGeometry3D, } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
13157
14411
|
}
|
|
13158
14412
|
|
|
14413
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-processor' {
|
|
14414
|
+
import { Rectangle } from '@packages/internal/quad-tree';
|
|
14415
|
+
export type TSerializedCollider = {
|
|
14416
|
+
rank: number;
|
|
14417
|
+
enabledAndVisible: boolean;
|
|
14418
|
+
x: number;
|
|
14419
|
+
y: number;
|
|
14420
|
+
bboxes: {
|
|
14421
|
+
index: number;
|
|
14422
|
+
boundingBox: [number, number, number, number];
|
|
14423
|
+
boundingRect?: Rectangle;
|
|
14424
|
+
}[];
|
|
14425
|
+
shouldCollideWithScreenEdges?: boolean;
|
|
14426
|
+
lockedToStrategyIndex?: number;
|
|
14427
|
+
visible?: boolean;
|
|
14428
|
+
};
|
|
14429
|
+
export type TSerializedColliderResponse = [number, 1 | 0, Rectangle?];
|
|
14430
|
+
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
|
|
14431
|
+
msgId: string;
|
|
14432
|
+
colliders: TSerializedColliderResponse[];
|
|
14433
|
+
debug: {
|
|
14434
|
+
x: number;
|
|
14435
|
+
y: number;
|
|
14436
|
+
w: number;
|
|
14437
|
+
h: number;
|
|
14438
|
+
}[];
|
|
14439
|
+
};
|
|
14440
|
+
}
|
|
14441
|
+
|
|
13159
14442
|
declare module '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter' {
|
|
13160
14443
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
13161
14444
|
export type GLTFExportOptions = {
|
|
@@ -13428,12 +14711,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object'
|
|
|
13428
14711
|
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
13429
14712
|
class Layer {
|
|
13430
14713
|
containerId: string;
|
|
13431
|
-
labelIds: Set<string>;
|
|
13432
14714
|
layers: Map<string, string>;
|
|
13433
14715
|
renderer: RendererCore;
|
|
13434
14716
|
constructor(renderer: RendererCore, containerId: string, layers?: Map<any, any>);
|
|
13435
|
-
|
|
13436
|
-
|
|
14717
|
+
get visible(): boolean;
|
|
14718
|
+
setVisible(visible: boolean): void;
|
|
13437
14719
|
}
|
|
13438
14720
|
export class FloorObject implements MVFFloor {
|
|
13439
14721
|
#private;
|
|
@@ -13461,18 +14743,18 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object'
|
|
|
13461
14743
|
}
|
|
13462
14744
|
|
|
13463
14745
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
|
|
13464
|
-
import { Coordinate,
|
|
14746
|
+
import { Coordinate, MapObject, Space, type Floor, type Facade } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
13465
14747
|
import type { EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
|
|
13466
14748
|
import type { PolygonFeatureProperties } from '@packages/internal/mvf-utils';
|
|
13467
14749
|
import type { BBox, FeatureCollection, MultiLineString } from 'geojson';
|
|
13468
|
-
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle, Position,
|
|
13469
|
-
import { type TGeometryState, type TLabelState, type TDirectionInstructionAction, type TShow3DMapOptions, type Label, type Marker, type Model } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
13470
|
-
import type {
|
|
14750
|
+
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle, Position, EntityId, PathState } from '@mappedin/core-sdk';
|
|
14751
|
+
import { type TGeometryState, type TLabelState, type TDirectionInstructionAction, type TShow3DMapOptions, type Label, type Marker, type Model, MapData } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
14752
|
+
import type { IAnchorable, TDoorsState, TMarkerState, TWallsState } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
13471
14753
|
import type { Image, Path, Shape, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
13472
14754
|
import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
13473
14755
|
import type { Tween } from '@tweenjs/tween.js';
|
|
13474
14756
|
import type { PathSegment } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
|
|
13475
|
-
import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
|
|
14757
|
+
import type { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
|
|
13476
14758
|
export function convertCoordinateToPosition(coord: Coordinate): Position;
|
|
13477
14759
|
export function convertPositionToCoordinate(coord: Position): Coordinate;
|
|
13478
14760
|
export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => {
|
|
@@ -13484,7 +14766,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
|
|
|
13484
14766
|
export function translateDoorsStateToGeojsonCore(state: Partial<TDoorsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
13485
14767
|
export function translateWallsStateToGeojsonCore(state: Partial<TWallsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
13486
14768
|
export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
13487
|
-
export function translateFloorGeometryStateToGeojsonCore(state: TFloorState['geometry']): Partial<GroupContainerState>;
|
|
13488
14769
|
export function differenceBetweenAngles(a: number, b: number): number;
|
|
13489
14770
|
export function getRelativeBearing(relativeBearingAngle: number, threshold: number): TDirectionInstructionAction['bearing'];
|
|
13490
14771
|
export function convertCollisionRankingTeirToNumber(tier: CollisionRankingTier): number;
|
|
@@ -13506,6 +14787,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
|
|
|
13506
14787
|
export function expandBbox(bbox: BBox, bboxToExpand: BBox): number[];
|
|
13507
14788
|
export function unique<T>(array: T[]): T[];
|
|
13508
14789
|
export function getTargetFloorObject(coordinate: Coordinate, floorsById: Map<string, FloorObject>, defaultFloor: FloorObject): FloorObject;
|
|
14790
|
+
/** Gets the ID of a geometry that 2D entities can attach to */
|
|
14791
|
+
export function getAttachableGeometryId(target: IAnchorable): string | undefined;
|
|
14792
|
+
export function determineFloorVisibleBasedOnPath(path: EntityId<PathState> & {
|
|
14793
|
+
coordinates: Coordinate[];
|
|
14794
|
+
}, mapData: MapData, api: GeoJsonApi): boolean;
|
|
13509
14795
|
}
|
|
13510
14796
|
|
|
13511
14797
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-stack-object' {
|
|
@@ -13533,105 +14819,54 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-stack-ob
|
|
|
13533
14819
|
}
|
|
13534
14820
|
}
|
|
13535
14821
|
|
|
13536
|
-
declare module '@mappedin/mappedin-js/
|
|
13537
|
-
import {
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
|
|
13547
|
-
|
|
13548
|
-
|
|
13549
|
-
|
|
13550
|
-
|
|
13551
|
-
};
|
|
13552
|
-
/**
|
|
13553
|
-
* @experimental
|
|
13554
|
-
* @internal
|
|
13555
|
-
*/
|
|
13556
|
-
export type TDynamicFocusOptions = {
|
|
13557
|
-
/**
|
|
13558
|
-
* The minimum zoom level at which Dynamic Focus will detect a Facade and reveal the interior spaces.
|
|
13559
|
-
* @default 17
|
|
13560
|
-
*/
|
|
13561
|
-
minZoomLevel?: number;
|
|
14822
|
+
declare module '@mappedin/mappedin-js/geojson/src/components/outline' {
|
|
14823
|
+
import type { BufferAttribute, BufferGeometry } from 'three';
|
|
14824
|
+
type Outline = {
|
|
14825
|
+
color: string;
|
|
14826
|
+
dirty: boolean;
|
|
14827
|
+
visible: boolean;
|
|
14828
|
+
edgeColors?: BufferAttribute;
|
|
14829
|
+
ranges?: {
|
|
14830
|
+
start: number;
|
|
14831
|
+
count: number;
|
|
14832
|
+
};
|
|
14833
|
+
geometry?: BufferGeometry;
|
|
14834
|
+
currentOpacity: number;
|
|
14835
|
+
currentColor: [number, number, number];
|
|
14836
|
+
topFaceVerticesIndices?: number[];
|
|
13562
14837
|
};
|
|
13563
|
-
|
|
13564
|
-
|
|
13565
|
-
|
|
13566
|
-
|
|
13567
|
-
|
|
13568
|
-
|
|
13569
|
-
|
|
13570
|
-
|
|
13571
|
-
|
|
13572
|
-
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
*/
|
|
13578
|
-
enable(options?: TDynamicFocusOptions): void;
|
|
13579
|
-
/**
|
|
13580
|
-
* @experimental
|
|
13581
|
-
* Disables Dynamic Focus and prevents the camera from automatically setting the floor stack when a facade is hovered.
|
|
13582
|
-
*/
|
|
13583
|
-
disable(): void;
|
|
13584
|
-
/**
|
|
13585
|
-
* @experimental
|
|
13586
|
-
* Returns the enabled state of Dynamic Focus.
|
|
13587
|
-
*/
|
|
13588
|
-
get enabled(): boolean;
|
|
13589
|
-
/**
|
|
13590
|
-
* @experimental
|
|
13591
|
-
* Sets the default floor for a floor stack. This is the floor that will be shown when the floor stack is in focus.
|
|
13592
|
-
* See {@link resetDefaultFloorForStack} to reset the default floor.
|
|
13593
|
-
* @param floorStack - The floor stack to set the default floor for.
|
|
13594
|
-
* @param floor - The floor to set as the default floor.
|
|
13595
|
-
*/
|
|
13596
|
-
setDefaultFloorForStack(floorStack: FloorStack, floor: Floor): void;
|
|
13597
|
-
/**
|
|
13598
|
-
* @experimental
|
|
13599
|
-
* Resets the default floor for a floor stack to it's initial value.
|
|
13600
|
-
* @param floorStack - The floor stack to reset the default floor for.
|
|
13601
|
-
*/
|
|
13602
|
-
resetDefaultFloorForStack(floorStack: FloorStack): void;
|
|
14838
|
+
export class OutlineComponent implements Outline {
|
|
14839
|
+
color: string;
|
|
14840
|
+
dirty: boolean;
|
|
14841
|
+
visible: boolean;
|
|
14842
|
+
edgeColors?: BufferAttribute;
|
|
14843
|
+
geometry?: BufferGeometry;
|
|
14844
|
+
ranges?: {
|
|
14845
|
+
start: number;
|
|
14846
|
+
count: number;
|
|
14847
|
+
};
|
|
14848
|
+
topFaceVerticesIndices?: number[];
|
|
14849
|
+
get currentOpacity(): number;
|
|
14850
|
+
get currentColor(): [number, number, number];
|
|
14851
|
+
constructor(color: string);
|
|
13603
14852
|
}
|
|
13604
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
13605
14853
|
export {};
|
|
13606
14854
|
}
|
|
13607
14855
|
|
|
13608
|
-
declare module '@mappedin/mappedin-js/geojson/src/
|
|
13609
|
-
import {
|
|
13610
|
-
|
|
13611
|
-
|
|
13612
|
-
|
|
13613
|
-
|
|
13614
|
-
|
|
13615
|
-
|
|
13616
|
-
|
|
13617
|
-
|
|
13618
|
-
|
|
13619
|
-
|
|
13620
|
-
|
|
13621
|
-
|
|
13622
|
-
visible?: boolean;
|
|
13623
|
-
};
|
|
13624
|
-
export type TSerializedColliderResponse = [number, 1 | 0, Rectangle?];
|
|
13625
|
-
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
|
|
13626
|
-
msgId: string;
|
|
13627
|
-
colliders: TSerializedColliderResponse[];
|
|
13628
|
-
debug: {
|
|
13629
|
-
x: number;
|
|
13630
|
-
y: number;
|
|
13631
|
-
w: number;
|
|
13632
|
-
h: number;
|
|
13633
|
-
}[];
|
|
13634
|
-
};
|
|
14856
|
+
declare module '@mappedin/mappedin-js/geojson/src/services/text3d/utils' {
|
|
14857
|
+
import type { Text } from 'troika-three-text';
|
|
14858
|
+
/**
|
|
14859
|
+
* Load font file and kick off the font processing.
|
|
14860
|
+
* Promise gets resolved when preloadFont finishes.
|
|
14861
|
+
*/
|
|
14862
|
+
export function preloadFont(fontUrl?: string): Promise<string>;
|
|
14863
|
+
/**
|
|
14864
|
+
* Fit text to area with a given max width and height, scaling the font size down if necessary.
|
|
14865
|
+
*/
|
|
14866
|
+
export function fitTextToArea(text: Text, maxWidth: number, maxHeight: number, scaleStep: number): Promise<{
|
|
14867
|
+
size: [width: number, height: number];
|
|
14868
|
+
}>;
|
|
14869
|
+
export function syncText(text: Text): Promise<void>;
|
|
13635
14870
|
}
|
|
13636
14871
|
|
|
13637
14872
|
declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
|