@mappedin/mappedin-js 6.0.1-beta.43 → 6.0.1-beta.44
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 +5675 -2451
- package/lib/esm/{GLTFExporter-6UJSTWST.js → GLTFExporter-4THLS4PM.js} +1 -1
- package/lib/esm/{GLTFLoader-VHKTUT76.js → GLTFLoader-KOQIUT25.js} +1 -1
- package/lib/esm/{browser-JUQDIV75.js → browser-LGW6JLJT.js} +1 -1
- package/lib/esm/{chunk-NCE64JTI.js → chunk-5SY5TZBS.js} +1 -1
- package/lib/esm/chunk-A5SAO63E.js +1 -0
- package/lib/esm/chunk-KNDTFHOY.js +1 -0
- package/lib/esm/chunk-M46A4YQ5.js +1 -0
- package/lib/esm/chunk-Q2KR5YO7.js +1 -0
- package/lib/esm/{chunk-6XEFZ77W.js → chunk-QO7JQA7V.js} +1 -1
- package/lib/esm/chunk-XGYIT3MM.js +1 -0
- package/lib/esm/index.css +1 -1
- package/lib/esm/index.d.ts +1977 -732
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-GOK26VAV.css +1 -0
- package/lib/esm/{inspector-WHX467BE.js → inspector-KJE2KP6V.js} +1 -1
- package/lib/esm/internal-7A3UJNAV.css +1 -0
- package/lib/esm/{internal-CKIQLSVC.js → internal-RS3PVAR3.js} +1 -1
- package/lib/esm/outdoor-context-v4-6CUOE2HW.js +1 -0
- package/lib/esm/{roboto-regular-E2V4PXOH.js → roboto-regular-PKVZDOB2.js} +1 -1
- package/lib/esm/text3d-QIM5QGO6.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-4O5ABVXW.js +0 -1
- package/lib/esm/chunk-7MMSKILE.js +0 -1
- package/lib/esm/chunk-G2WDUYHG.js +0 -1
- package/lib/esm/chunk-HALSTKAB.js +0 -1
- package/lib/esm/chunk-MEAXYDH5.js +0 -1
- package/lib/esm/inspector-D2RCHDOY.css +0 -1
- package/lib/esm/internal-55777EMI.css +0 -1
- package/lib/esm/outdoor-context-v4-7JNIM35B.js +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
|
*
|
|
@@ -319,6 +313,7 @@ declare module '@mappedin/mappedin-js' {
|
|
|
319
313
|
export type THydrateMapDataBundle = {
|
|
320
314
|
type: 'binary';
|
|
321
315
|
options?: {
|
|
316
|
+
version?: '2.0.0' | '3.0.0';
|
|
322
317
|
enterprise?: boolean;
|
|
323
318
|
};
|
|
324
319
|
languagePacks?: {
|
|
@@ -332,6 +327,7 @@ declare module '@mappedin/mappedin-js' {
|
|
|
332
327
|
} | {
|
|
333
328
|
type: 'json';
|
|
334
329
|
options?: {
|
|
330
|
+
version?: '2.0.0' | '3.0.0';
|
|
335
331
|
enterprise?: boolean;
|
|
336
332
|
};
|
|
337
333
|
languagePacks?: {
|
|
@@ -382,14 +378,15 @@ declare module '@mappedin/mappedin-js' {
|
|
|
382
378
|
export { parseMVF, unzipMVF, enableTestMode, preloadFont, MAPPEDIN_COLORS };
|
|
383
379
|
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
380
|
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';
|
|
381
|
+
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
382
|
export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
387
383
|
export type { Label, Marker, Path, PathSegment, Shape, CameraTransform, Model, Image, Text3D, } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
388
384
|
export type { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
|
|
389
385
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
390
386
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
391
387
|
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
|
|
388
|
+
export { setWorkersUrl } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
389
|
+
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
390
|
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
394
391
|
export type { TFindNearestOptions, TFindNearestResult, TQueriables, Query } from '@mappedin/mappedin-js/mappedin-js/src/query';
|
|
395
392
|
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
@@ -708,7 +705,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
|
|
|
708
705
|
import type { TBlueDotEvents } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot';
|
|
709
706
|
import type { TDirectionInstruction } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
710
707
|
import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
711
|
-
export type TFloorChangeReason = '
|
|
708
|
+
export type TFloorChangeReason = 'blue-dot-floor-change' | 'stacked-maps-elevation-change' | 'navigation-connection-click' | string;
|
|
712
709
|
export type TClickPayload = {
|
|
713
710
|
/**
|
|
714
711
|
* The coordinate of the interaction.
|
|
@@ -796,14 +793,15 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
|
|
|
796
793
|
*/
|
|
797
794
|
'floor-change': TFloorChangePayload;
|
|
798
795
|
/**
|
|
799
|
-
*
|
|
800
|
-
* focus due to the camera moving.
|
|
801
|
-
*
|
|
802
|
-
* floor changing.
|
|
796
|
+
*
|
|
797
|
+
* Emitted when a different facade recieves focus due to the camera moving.
|
|
798
|
+
* This always occurs when the active floor changes to a different floor stack,
|
|
799
|
+
* but may also occur when the camera moves without the active floor changing.
|
|
803
800
|
*
|
|
804
801
|
* @property {Facade[]} facades - The facades that are in focus.
|
|
802
|
+
*
|
|
805
803
|
*/
|
|
806
|
-
'
|
|
804
|
+
'facades-in-view-change': {
|
|
807
805
|
facades: Facade[];
|
|
808
806
|
};
|
|
809
807
|
/**
|
|
@@ -882,6 +880,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
|
|
|
882
880
|
};
|
|
883
881
|
}
|
|
884
882
|
|
|
883
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils' {
|
|
884
|
+
export * from '@mappedin/mappedin-js/packages/mvf-utils/api-types';
|
|
885
|
+
export * from '@mappedin/mappedin-js/packages/mvf-utils/mvf-types';
|
|
886
|
+
export type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TGetVenueOptions, TSearchOptions, TGetVenueBundleOptions, LocalePackUrls, Environment, } from '@mappedin/mappedin-js/packages/mvf-utils/mvf-utils';
|
|
887
|
+
export { downloadVenueBundleMVF, downloadVenueBundleMVFAPIGateway, downloadMVF, parseOptions, getAccessToken, parseMVF, unzipMVF, parseMVFv1, unzipMVFv1, createEnvControl, getSasToken, parseLanguagePack, } from '@mappedin/mappedin-js/packages/mvf-utils/mvf-utils';
|
|
888
|
+
export { findAndSplitObstructionByAllEntrances as splitObstructionByAllEntrances } from '@mappedin/mappedin-js/packages/mvf-utils/geometry';
|
|
889
|
+
}
|
|
890
|
+
|
|
885
891
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
886
892
|
import Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
887
893
|
import Area from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/area';
|
|
@@ -1178,17 +1184,17 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
1178
1184
|
}
|
|
1179
1185
|
|
|
1180
1186
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
1181
|
-
import type
|
|
1187
|
+
import { type EasingCurve, type RendererCore, type WatermarkUpdateOptions } from '@mappedin/mappedin-js/geojson/src';
|
|
1182
1188
|
import { PubSub } from '@packages/internal/common';
|
|
1183
1189
|
import { type TEvents, type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
1184
1190
|
import type { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
1185
|
-
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images
|
|
1191
|
+
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
1186
1192
|
import type { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
1187
1193
|
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
1188
1194
|
import { Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
1189
1195
|
import type { Annotation, Door, Floor, MapObject, PointOfInterest, Space, Node, EnterpriseLocation, FloorStack, Facade } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
1190
1196
|
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';
|
|
1197
|
+
import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates, GlobalState, UpdateGlobalState, TSetFloorOptions, DeepPartial } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
1192
1198
|
import type { Label, Marker, Image, Shape, Text3D as Text3DView, Model, Path } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
1193
1199
|
import type { TEventPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
1194
1200
|
import type { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
|
|
@@ -1197,6 +1203,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1197
1203
|
import { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
|
|
1198
1204
|
import type { Text3D } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
1199
1205
|
import type { PathSegment } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
|
|
1206
|
+
import type { ExtractDeep } from '@mappedin/mappedin-js/mappedin-js/src/utils/types';
|
|
1207
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
1200
1208
|
/**
|
|
1201
1209
|
* The MapView class is the main class for rendering and interacting with the map.
|
|
1202
1210
|
*
|
|
@@ -1265,11 +1273,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1265
1273
|
* Controls for Stacked Maps.
|
|
1266
1274
|
*/
|
|
1267
1275
|
get StackedMaps(): StackedMaps;
|
|
1268
|
-
/**
|
|
1269
|
-
* @internal
|
|
1270
|
-
* @experimental
|
|
1271
|
-
*/
|
|
1272
|
-
get DynamicFocus(): DynamicFocus;
|
|
1273
1276
|
/**
|
|
1274
1277
|
* @internal
|
|
1275
1278
|
*/
|
|
@@ -1303,6 +1306,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1303
1306
|
*/
|
|
1304
1307
|
updateState<T extends Space | Text3DView | MapObject | Label | Marker | Shape | Door | Facade | Floor | WALLS | DOORS | Model | Path | PathSegment>(target: T, state: TUpdateState<T>): any;
|
|
1305
1308
|
updateState<T extends string & NonNullable<unknown>>(target: T, state: TUpdateStates): any;
|
|
1309
|
+
/**
|
|
1310
|
+
* Animate the state of a given target on the map from the current state to a new state. Only numeric properties and
|
|
1311
|
+
* colors can be animated.
|
|
1312
|
+
*/
|
|
1313
|
+
animateState<T extends Space | Model | Text3DView | MapObject | Label | Marker | Shape | Path | PathSegment | Floor>(target: T, state: DeepPartial<ExtractDeep<TGetState<T>, number | string | undefined>>, options?: {
|
|
1314
|
+
duration?: number;
|
|
1315
|
+
easing?: EasingCurve;
|
|
1316
|
+
}): Promise<void> & {
|
|
1317
|
+
cancel: () => void;
|
|
1318
|
+
};
|
|
1306
1319
|
/**
|
|
1307
1320
|
* Update global state of the MapView
|
|
1308
1321
|
*/
|
|
@@ -1348,12 +1361,27 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1348
1361
|
* Sets the current floor ({@link Floor}) of the map.
|
|
1349
1362
|
* @param floor The floor or floor ID to set.
|
|
1350
1363
|
*/
|
|
1351
|
-
setFloor(floor: Floor | string): void;
|
|
1364
|
+
setFloor(floor: Floor | string, options?: TSetFloorOptions): void;
|
|
1352
1365
|
/**
|
|
1353
1366
|
* Sets the current floor stack ({@link FloorStack}) of the map. The default floor of the stack will be set as the current floor.
|
|
1354
1367
|
* @param floorStack The floor stack or floor stack ID to set.
|
|
1355
1368
|
*/
|
|
1356
|
-
setFloorStack(floorStack: FloorStack | string): void;
|
|
1369
|
+
setFloorStack(floorStack: FloorStack | string, options?: TSetFloorOptions): void;
|
|
1370
|
+
/**
|
|
1371
|
+
* Create a tween object that will be updated on every render frame.
|
|
1372
|
+
* See https://tweenjs.github.io/tween.js/docs/user_guide.html for more information.
|
|
1373
|
+
*
|
|
1374
|
+
* When creating a large number of tween objects, it may be important to call {@link removeTween} to prevent memory leaks.
|
|
1375
|
+
*
|
|
1376
|
+
* @param object The data to be tweened.
|
|
1377
|
+
* @returns The tween object.
|
|
1378
|
+
*/
|
|
1379
|
+
tween<T extends Record<string, unknown>>(object: T): Tween<T>;
|
|
1380
|
+
/**
|
|
1381
|
+
* Remove a tween created with {@link tween}.
|
|
1382
|
+
* @param tween The tween to remove.
|
|
1383
|
+
*/
|
|
1384
|
+
removeTween(tween: Tween<any>): void;
|
|
1357
1385
|
/**
|
|
1358
1386
|
* The current floor stack ({@link FloorStack}) of the map.
|
|
1359
1387
|
*/
|
|
@@ -1369,7 +1397,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1369
1397
|
* @hidden
|
|
1370
1398
|
*/
|
|
1371
1399
|
updateWatermark(options: WatermarkUpdateOptions): void;
|
|
1372
|
-
getState<T extends Space | Model | Text3DView | MapObject | Label | Marker | Image | Shape | Path | PathSegment | Floor | string>(target: T): TGetState<T>;
|
|
1400
|
+
getState<T extends Space | Model | Text3DView | MapObject | Label | Marker | Image | Shape | Path | PathSegment | Floor | Facade | string>(target: T): TGetState<T>;
|
|
1373
1401
|
setHoverColor(c: string): void;
|
|
1374
1402
|
getHoverColor(): string | undefined;
|
|
1375
1403
|
/**
|
|
@@ -1550,6 +1578,18 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1550
1578
|
* @experimental
|
|
1551
1579
|
*/
|
|
1552
1580
|
takeScreenshot(): Promise<string>;
|
|
1581
|
+
/**
|
|
1582
|
+
* @internal
|
|
1583
|
+
* @hidden
|
|
1584
|
+
* Whether the floor visibility is being self managed or automatically handled by the SDK.
|
|
1585
|
+
*/
|
|
1586
|
+
get manualFloorVisibility(): boolean;
|
|
1587
|
+
/**
|
|
1588
|
+
* @internal
|
|
1589
|
+
* @hidden
|
|
1590
|
+
* Disables the default behavior of the SDK to automatically hide floors on setFloor.
|
|
1591
|
+
*/
|
|
1592
|
+
set manualFloorVisibility(value: boolean);
|
|
1553
1593
|
}
|
|
1554
1594
|
}
|
|
1555
1595
|
|
|
@@ -1558,6 +1598,29 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d' {
|
|
|
1558
1598
|
import type { TAddText3DOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
1559
1599
|
import type { CurrentMapGetter } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/types';
|
|
1560
1600
|
import { Text3D as Text3DView } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
1601
|
+
/**
|
|
1602
|
+
* Disables the Text3D web worker and falls back to processing on the main thread.
|
|
1603
|
+
*
|
|
1604
|
+
* This function should be called when using Text3D features in environments
|
|
1605
|
+
* with strict Content Security Policy (CSP) that blocks web workers from
|
|
1606
|
+
* being created using blob: URLs or unsafe-eval directives.
|
|
1607
|
+
*
|
|
1608
|
+
* While disabling the worker may slightly impact performance for complex text
|
|
1609
|
+
* rendering, it enables Text3D functionality in CSP-restricted environments.
|
|
1610
|
+
*
|
|
1611
|
+
* Ensure calling this before calling preloadFont
|
|
1612
|
+
*
|
|
1613
|
+
* @example
|
|
1614
|
+
* ```typescript
|
|
1615
|
+
* import {disableText3DWorker} from '@mappedin/mappedin-js';
|
|
1616
|
+
* // Disable Text3D worker for CSP compatibility
|
|
1617
|
+
* disableText3DWorker();
|
|
1618
|
+
*
|
|
1619
|
+
* // Then use Text3D features as normal
|
|
1620
|
+
* mapView.Text3D.labelAll();
|
|
1621
|
+
* ```
|
|
1622
|
+
*/
|
|
1623
|
+
export function disableText3DWorker(): void;
|
|
1561
1624
|
export class Text3D {
|
|
1562
1625
|
#private;
|
|
1563
1626
|
/**
|
|
@@ -1661,7 +1724,8 @@ declare module '@mappedin/mappedin-js/geojson/src' {
|
|
|
1661
1724
|
export type { EntityId, EntityState, LineStyle, PaintStyle, ModelProperties, Shading, ImagePlacementOptions, } from '@mappedin/mappedin-js/geojson/src/types';
|
|
1662
1725
|
export type * from 'geojson';
|
|
1663
1726
|
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';
|
|
1727
|
+
export { preloadFont, configureWorker } from '@mappedin/mappedin-js/geojson/src/systems/text3d/system';
|
|
1728
|
+
export { setWorkerUrl as setCollisionWorkerUrl } from '@mappedin/mappedin-js/geojson/src/systems/collisions/system';
|
|
1665
1729
|
export type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
|
|
1666
1730
|
export type { AttributionControlOptions, AttributionPosition } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
|
|
1667
1731
|
export type { Text3DStyle, ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles';
|
|
@@ -1751,6 +1815,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1751
1815
|
import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
1752
1816
|
import type { InsetPaddingOption, UpdatableText3DState, Text3DState, AddText3DOptions, EnvMapOptions, InitializeModelState, ModelState, UpdateModelState as GeoJsonUpdateModelState, ImagePlacementOptions, LabelAppearance } from '@mappedin/mappedin-js/geojson/src';
|
|
1753
1817
|
import type { PathSegment } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
|
|
1818
|
+
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
1754
1819
|
export type UpdateModelState = Omit<GeoJsonUpdateModelState, 'position' | 'scale'> & {
|
|
1755
1820
|
position?: Coordinate;
|
|
1756
1821
|
scale?: number | [number, number, number];
|
|
@@ -1940,6 +2005,22 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1940
2005
|
* The color of the path.
|
|
1941
2006
|
*/
|
|
1942
2007
|
color: string;
|
|
2008
|
+
/**
|
|
2009
|
+
* The complete fraction of the path.
|
|
2010
|
+
*/
|
|
2011
|
+
completeFraction: number;
|
|
2012
|
+
/**
|
|
2013
|
+
* The near radius of the path.
|
|
2014
|
+
*/
|
|
2015
|
+
nearRadius: number;
|
|
2016
|
+
/**
|
|
2017
|
+
* The far radius of the path.
|
|
2018
|
+
*/
|
|
2019
|
+
farRadius: number;
|
|
2020
|
+
/**
|
|
2021
|
+
* Whether the path is visible.
|
|
2022
|
+
*/
|
|
2023
|
+
visible: boolean;
|
|
1943
2024
|
};
|
|
1944
2025
|
/**
|
|
1945
2026
|
* Represents the state of a shape.
|
|
@@ -1977,6 +2058,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1977
2058
|
* The opacity of the facade.
|
|
1978
2059
|
*/
|
|
1979
2060
|
opacity: number;
|
|
2061
|
+
/**
|
|
2062
|
+
* Whether the facade is visible.
|
|
2063
|
+
*/
|
|
2064
|
+
visible: boolean;
|
|
1980
2065
|
};
|
|
1981
2066
|
/**
|
|
1982
2067
|
* Defines the state for geometry elements like {@link Space} when updated.
|
|
@@ -2035,7 +2120,68 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2035
2120
|
* Opacity of the floor geometry.
|
|
2036
2121
|
*/
|
|
2037
2122
|
opacity: number;
|
|
2123
|
+
/**
|
|
2124
|
+
* Visibility of floor geometry.
|
|
2125
|
+
*/
|
|
2126
|
+
visible: boolean;
|
|
2127
|
+
};
|
|
2128
|
+
labels: {
|
|
2129
|
+
/**
|
|
2130
|
+
* Whether the labels are enabled to be shown when the floor is visible.
|
|
2131
|
+
*/
|
|
2132
|
+
enabled: boolean;
|
|
2133
|
+
};
|
|
2134
|
+
markers: {
|
|
2135
|
+
/**
|
|
2136
|
+
* Whether the markers are enabled to be shown when the floor is visible.
|
|
2137
|
+
*/
|
|
2138
|
+
enabled: boolean;
|
|
2139
|
+
};
|
|
2140
|
+
footprint: {
|
|
2141
|
+
/**
|
|
2142
|
+
* Altitude of the footprint relative to the floor.
|
|
2143
|
+
*/
|
|
2144
|
+
altitude: number;
|
|
2145
|
+
/**
|
|
2146
|
+
* Whether the footprint is visible.
|
|
2147
|
+
*/
|
|
2148
|
+
visible: boolean;
|
|
2149
|
+
/**
|
|
2150
|
+
* Height of the footprint relative to altitude.
|
|
2151
|
+
*/
|
|
2152
|
+
height: number;
|
|
2153
|
+
/**
|
|
2154
|
+
* Opacity of the footprint.
|
|
2155
|
+
*/
|
|
2156
|
+
opacity: number;
|
|
2157
|
+
/**
|
|
2158
|
+
* Material side of the footprint.
|
|
2159
|
+
* @internal
|
|
2160
|
+
*/
|
|
2161
|
+
side: 'double' | 'front' | 'back';
|
|
2162
|
+
/**
|
|
2163
|
+
* Color of the footprint.
|
|
2164
|
+
*/
|
|
2165
|
+
color: string;
|
|
2166
|
+
};
|
|
2167
|
+
/**
|
|
2168
|
+
* @internal
|
|
2169
|
+
*/
|
|
2170
|
+
occlusion: {
|
|
2171
|
+
/**
|
|
2172
|
+
* @internal
|
|
2173
|
+
* Whether this floor should occlude labels and markers on other floors
|
|
2174
|
+
*/
|
|
2175
|
+
enabled: boolean;
|
|
2038
2176
|
};
|
|
2177
|
+
/**
|
|
2178
|
+
* The visibility of the floor, including the geometry, labels, and markers.
|
|
2179
|
+
*/
|
|
2180
|
+
visible: boolean;
|
|
2181
|
+
/**
|
|
2182
|
+
* The altitude of the floor.
|
|
2183
|
+
*/
|
|
2184
|
+
altitude: number;
|
|
2039
2185
|
};
|
|
2040
2186
|
export enum WALLS {
|
|
2041
2187
|
Exterior = "exterior-walls",
|
|
@@ -2048,7 +2194,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2048
2194
|
/**
|
|
2049
2195
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
2050
2196
|
*/
|
|
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 ?
|
|
2197
|
+
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
2198
|
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState> | Partial<TPathState>;
|
|
2053
2199
|
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
2200
|
/**
|
|
@@ -2516,6 +2662,28 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2516
2662
|
* sorting of markers and show certain markers always in front
|
|
2517
2663
|
*/
|
|
2518
2664
|
zIndex?: number;
|
|
2665
|
+
/**
|
|
2666
|
+
* Configuration for the low priority pin fallback strategy.
|
|
2667
|
+
* When enabled, shows a smaller pin version of the marker when all anchor positions have collisions.
|
|
2668
|
+
* @default { enabled: true, size: 2, color: '#666' }
|
|
2669
|
+
*/
|
|
2670
|
+
lowPriorityPin?: {
|
|
2671
|
+
/**
|
|
2672
|
+
* Whether to enable low priority pin strategy when all anchor positions have collisions.
|
|
2673
|
+
* @default true
|
|
2674
|
+
*/
|
|
2675
|
+
enabled?: boolean;
|
|
2676
|
+
/**
|
|
2677
|
+
* Size of the low priority pin in pixels.
|
|
2678
|
+
* @default 2
|
|
2679
|
+
*/
|
|
2680
|
+
size?: number;
|
|
2681
|
+
/**
|
|
2682
|
+
* Color of the low priority pin.
|
|
2683
|
+
* @default '#666'
|
|
2684
|
+
*/
|
|
2685
|
+
color?: string;
|
|
2686
|
+
};
|
|
2519
2687
|
};
|
|
2520
2688
|
/**
|
|
2521
2689
|
* Options for creating a new {@link Label} with {@link Labels.add}.
|
|
@@ -2732,6 +2900,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2732
2900
|
*/
|
|
2733
2901
|
bearingAndPitch?: boolean;
|
|
2734
2902
|
};
|
|
2903
|
+
export type TSetFloorOptions = {
|
|
2904
|
+
/**
|
|
2905
|
+
* Optionally provide the context for the floor change which will be published as the `reason` for the `floor-change` event.
|
|
2906
|
+
*/
|
|
2907
|
+
context?: TFloorChangeReason;
|
|
2908
|
+
};
|
|
2735
2909
|
}
|
|
2736
2910
|
|
|
2737
2911
|
declare module '@mappedin/mappedin-js/mappedin-js/src/constants' {
|
|
@@ -3122,7 +3296,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects' {
|
|
|
3122
3296
|
}
|
|
3123
3297
|
|
|
3124
3298
|
declare module '@mappedin/mappedin-js/mappedin-js/src/debug' {
|
|
3125
|
-
import type { RendererCore } from '@mappedin/
|
|
3299
|
+
import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
3126
3300
|
export class Debug {
|
|
3127
3301
|
state: RendererCore['Debug']['state'];
|
|
3128
3302
|
constructor(core: RendererCore);
|
|
@@ -3225,6 +3399,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
|
3225
3399
|
*/
|
|
3226
3400
|
animateArrowsOnPath?: boolean;
|
|
3227
3401
|
};
|
|
3402
|
+
/**
|
|
3403
|
+
* Controls whether the path drawing is animated across floors.
|
|
3404
|
+
* @default true
|
|
3405
|
+
*/
|
|
3406
|
+
animatePathDrawing?: boolean;
|
|
3228
3407
|
/**
|
|
3229
3408
|
* Options for the path.
|
|
3230
3409
|
*/
|
|
@@ -3385,6 +3564,141 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
|
3385
3564
|
export {};
|
|
3386
3565
|
}
|
|
3387
3566
|
|
|
3567
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
3568
|
+
import type { RendererCore, WatermarkUpdateOptions } from '@mappedin/core-sdk';
|
|
3569
|
+
import { type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
3570
|
+
import { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3571
|
+
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
3572
|
+
import type { FloorStack, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3573
|
+
import { Facade, Coordinate, MapObject, Space, Floor, Door } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3574
|
+
import type { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
3575
|
+
import { Label, Marker, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3576
|
+
import { Text3D as Text3DView, Model, Path, type Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3577
|
+
import { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
3578
|
+
import type { TGetState, TUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3579
|
+
import { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera';
|
|
3580
|
+
import { Exporter } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter';
|
|
3581
|
+
import { Labels } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels';
|
|
3582
|
+
import { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
3583
|
+
import { Markers } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers';
|
|
3584
|
+
import { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
|
|
3585
|
+
import { Models } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models';
|
|
3586
|
+
import { Paths } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths';
|
|
3587
|
+
import { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3588
|
+
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
3589
|
+
import { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
|
|
3590
|
+
import { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
|
|
3591
|
+
import Outdoor from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
|
|
3592
|
+
import { type BBox } from 'geojson';
|
|
3593
|
+
import { Text3D } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
3594
|
+
import { PathSegment } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
|
|
3595
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
3596
|
+
export class GeoJsonApi {
|
|
3597
|
+
core: RendererCore;
|
|
3598
|
+
mapObjects: GeojsonApiMapObject[];
|
|
3599
|
+
id: string;
|
|
3600
|
+
mapDataExternal: {
|
|
3601
|
+
[key in string]: MapData;
|
|
3602
|
+
};
|
|
3603
|
+
mapData?: MapData;
|
|
3604
|
+
currentMap: GeojsonApiMapObject;
|
|
3605
|
+
hiddenOutdoorGeometries: [
|
|
3606
|
+
BBox,
|
|
3607
|
+
polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[],
|
|
3608
|
+
layers: string[]
|
|
3609
|
+
][];
|
|
3610
|
+
manualFloorVisibility: boolean;
|
|
3611
|
+
mapView: MapView;
|
|
3612
|
+
Camera: Camera;
|
|
3613
|
+
Labels: Labels;
|
|
3614
|
+
Text3D: Text3D;
|
|
3615
|
+
Markers: Markers;
|
|
3616
|
+
Models: Models;
|
|
3617
|
+
Paths: Paths;
|
|
3618
|
+
Exporter: Exporter;
|
|
3619
|
+
Navigation: Navigation;
|
|
3620
|
+
Outdoor: Outdoor;
|
|
3621
|
+
BlueDot: BlueDot;
|
|
3622
|
+
Shapes: Shapes;
|
|
3623
|
+
Style: Style;
|
|
3624
|
+
Images: Images;
|
|
3625
|
+
get StackedMaps(): import("..").StackedMaps;
|
|
3626
|
+
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
3627
|
+
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;
|
|
3628
|
+
update: () => void;
|
|
3629
|
+
getMapDataInternal(): MapDataInternal | undefined;
|
|
3630
|
+
getMapData(): MapData | undefined;
|
|
3631
|
+
addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
|
|
3632
|
+
setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
|
|
3633
|
+
setFloorStack(floorStack: FloorStack | string, reason?: TFloorChangeReason): void;
|
|
3634
|
+
updateWatermark(options: WatermarkUpdateOptions): void;
|
|
3635
|
+
get currentFloorStack(): FloorStack;
|
|
3636
|
+
get currentFloor(): Floor;
|
|
3637
|
+
getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | Model | Path | PathSegment | Floor | Facade | string>(target: T): TGetState<T>;
|
|
3638
|
+
setHoverColor(c: string): void;
|
|
3639
|
+
getHoverColor(): string | undefined;
|
|
3640
|
+
/**
|
|
3641
|
+
* Create a coordinate from a screen coordinate
|
|
3642
|
+
* @param x - The x coordinate of the screen
|
|
3643
|
+
* @param y - The y coordinate of the screen
|
|
3644
|
+
* @param floor - The floor to use for the coordinate
|
|
3645
|
+
* @returns The coordinate
|
|
3646
|
+
*/
|
|
3647
|
+
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor): Coordinate | undefined;
|
|
3648
|
+
getScreenCoordinateFromCoordinate(coordinate: Coordinate): {
|
|
3649
|
+
x: number;
|
|
3650
|
+
y: number;
|
|
3651
|
+
};
|
|
3652
|
+
isInView(target: Space | MapObject | Label | Marker | string): boolean;
|
|
3653
|
+
auto(): {
|
|
3654
|
+
labels: Label[];
|
|
3655
|
+
};
|
|
3656
|
+
tween<T extends Record<string, unknown>>(object: T): Tween<T>;
|
|
3657
|
+
removeTween(tween: Tween<any>): void;
|
|
3658
|
+
/**
|
|
3659
|
+
* @internal
|
|
3660
|
+
*/
|
|
3661
|
+
get __core(): RendererCore;
|
|
3662
|
+
clear(): void;
|
|
3663
|
+
destroy(): void;
|
|
3664
|
+
}
|
|
3665
|
+
/**
|
|
3666
|
+
* Sets the base URL directory where worker scripts are hosted for CSP compatibility.
|
|
3667
|
+
*
|
|
3668
|
+
* This function configures both the MapLibre and collision system workers to load from
|
|
3669
|
+
* external URLs instead of using inline blob URLs. The SDK expects two specific worker
|
|
3670
|
+
* files to be available in the provided directory:
|
|
3671
|
+
* - `maplibre-worker.csp.js` - For MapLibre map rendering
|
|
3672
|
+
* - `collision-worker.csp.js` - For the collision detection system
|
|
3673
|
+
*
|
|
3674
|
+
* Using this approach enables compatibility with strict Content Security Policies
|
|
3675
|
+
* that block unsafe-eval and blob: URLs.
|
|
3676
|
+
*
|
|
3677
|
+
* @param baseUrl - Base URL directory where worker scripts are hosted (without trailing slash)
|
|
3678
|
+
* Example: "https://cdn.example.com/workers"
|
|
3679
|
+
*
|
|
3680
|
+
* @example
|
|
3681
|
+
* ```typescript
|
|
3682
|
+
* import { setWorkersUrl } from '@mappedin/mappedin-js';
|
|
3683
|
+
*
|
|
3684
|
+
* // Call before initializing any maps
|
|
3685
|
+
* setWorkersUrl('https://cdn.example.com/workers');
|
|
3686
|
+
* // This will load:
|
|
3687
|
+
* // - https://cdn.example.com/workers/maplibre-worker.csp.js
|
|
3688
|
+
* // - https://cdn.example.com/workers/collision-worker.csp.js
|
|
3689
|
+
* ```
|
|
3690
|
+
*
|
|
3691
|
+
* @remarks
|
|
3692
|
+
* - The worker files can be found in the published package at:
|
|
3693
|
+
* `node_modules/@mappedin/mappedin-js/lib/esm/workers/`
|
|
3694
|
+
* - For deployment, copy these files to your web server or CDN
|
|
3695
|
+
* - A better approach is to add these files to your build process to ensure
|
|
3696
|
+
* they're always in sync with your application
|
|
3697
|
+
* - Call this function before creating any map instances
|
|
3698
|
+
*/
|
|
3699
|
+
export function setWorkersUrl(baseUrl: string): void;
|
|
3700
|
+
}
|
|
3701
|
+
|
|
3388
3702
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
|
|
3389
3703
|
export { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
3390
3704
|
export { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot';
|
|
@@ -3401,7 +3715,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
|
|
|
3401
3715
|
export { default as Outdoor } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
|
|
3402
3716
|
export { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
|
|
3403
3717
|
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
3718
|
}
|
|
3406
3719
|
|
|
3407
3720
|
declare module '@mappedin/mappedin-js/mappedin-js/src/search' {
|
|
@@ -3624,12 +3937,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot' {
|
|
|
3624
3937
|
declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
3625
3938
|
import MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
3626
3939
|
import type { TEvents, TEventPayload, TClickPayload, THoverPayload, TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
3627
|
-
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/
|
|
3940
|
+
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, Environment } from '@mappedin/mappedin-js/packages/mvf-utils';
|
|
3628
3941
|
import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
|
|
3629
3942
|
import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3630
3943
|
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
3944
|
import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
3632
3945
|
export type { Text3D as Text3DApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
3946
|
+
export { disableText3DWorker } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
3633
3947
|
import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, EnvMapOptions, MapViewState, UpdateModelState, InitializeModelState, WatermarkUpdateOptions } from '@mappedin/mappedin-js/geojson/src';
|
|
3634
3948
|
import { enableTestMode, preloadFont } from '@mappedin/mappedin-js/geojson/src';
|
|
3635
3949
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
@@ -3637,7 +3951,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3637
3951
|
import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
|
|
3638
3952
|
import type { LanguagePackHydrationItem, TImagePlacementOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3639
3953
|
import { MAPPEDIN_COLORS } from '@mappedin/mappedin-js/mappedin-js/src/constants';
|
|
3640
|
-
import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
|
|
3641
3954
|
import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3642
3955
|
import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
3643
3956
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
@@ -3830,12 +4143,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3830
4143
|
floorHeight?: number;
|
|
3831
4144
|
updateCameraElevationOnFloorChange?: boolean;
|
|
3832
4145
|
};
|
|
3833
|
-
/**
|
|
3834
|
-
* @experimental
|
|
3835
|
-
* @internal
|
|
3836
|
-
* @default false
|
|
3837
|
-
*/
|
|
3838
|
-
keepOutdoorGeometryVisible?: boolean;
|
|
3839
4146
|
/**
|
|
3840
4147
|
* @experimental
|
|
3841
4148
|
*
|
|
@@ -3908,6 +4215,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3908
4215
|
export type THydrateMapDataBundle = {
|
|
3909
4216
|
type: 'binary';
|
|
3910
4217
|
options?: {
|
|
4218
|
+
version?: '2.0.0' | '3.0.0';
|
|
3911
4219
|
enterprise?: boolean;
|
|
3912
4220
|
};
|
|
3913
4221
|
languagePacks?: {
|
|
@@ -3921,6 +4229,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3921
4229
|
} | {
|
|
3922
4230
|
type: 'json';
|
|
3923
4231
|
options?: {
|
|
4232
|
+
version?: '2.0.0' | '3.0.0';
|
|
3924
4233
|
enterprise?: boolean;
|
|
3925
4234
|
};
|
|
3926
4235
|
languagePacks?: {
|
|
@@ -3971,41 +4280,834 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3971
4280
|
export { parseMVF, unzipMVF, enableTestMode, preloadFont, MAPPEDIN_COLORS };
|
|
3972
4281
|
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
4282
|
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';
|
|
4283
|
+
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
4284
|
export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3976
4285
|
export type { Label, Marker, Path, PathSegment, Shape, CameraTransform, Model, Image, Text3D, } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3977
4286
|
export type { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
|
|
3978
4287
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
3979
4288
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3980
4289
|
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
|
|
4290
|
+
export { setWorkersUrl } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
4291
|
+
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
4292
|
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
3983
4293
|
export type { TFindNearestOptions, TFindNearestResult, TQueriables, Query } from '@mappedin/mappedin-js/mappedin-js/src/query';
|
|
3984
4294
|
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
3985
4295
|
}
|
|
3986
4296
|
|
|
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';
|
|
4297
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/api-types' {
|
|
3995
4298
|
/**
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4299
|
+
* This file contains the API types for MappedinSDK - before they get turned into Classes
|
|
4300
|
+
*/
|
|
4301
|
+
export type TLocationType = 'amenities' | 'tenant';
|
|
4302
|
+
export type TNode = {
|
|
4303
|
+
id: string;
|
|
4304
|
+
x: number;
|
|
4305
|
+
y: number;
|
|
4306
|
+
map: string;
|
|
4307
|
+
externalId?: string;
|
|
4308
|
+
paths: {
|
|
4309
|
+
node: string;
|
|
4310
|
+
map: string;
|
|
4311
|
+
weight?: number;
|
|
4312
|
+
}[];
|
|
4313
|
+
[propName: string]: any;
|
|
4314
|
+
};
|
|
4315
|
+
export type TImage = {
|
|
4316
|
+
original?: string;
|
|
4317
|
+
large?: string;
|
|
4318
|
+
'140x140'?: string;
|
|
4319
|
+
xxlarge?: string;
|
|
4320
|
+
xsmall?: string;
|
|
4321
|
+
'66x66'?: string;
|
|
4322
|
+
xlarge?: string;
|
|
4323
|
+
medium?: string;
|
|
4324
|
+
xxsmall?: string;
|
|
4325
|
+
small?: string;
|
|
4326
|
+
};
|
|
4327
|
+
export type TLogo = TImage;
|
|
4328
|
+
export type TGalleryImage = {
|
|
4329
|
+
image: TImage;
|
|
4330
|
+
caption?: string;
|
|
4331
|
+
};
|
|
4332
|
+
export type TPhone = {
|
|
4333
|
+
number?: string;
|
|
4334
|
+
};
|
|
4335
|
+
export type TSocial = {
|
|
4336
|
+
website?: string;
|
|
4337
|
+
twitter?: string;
|
|
4338
|
+
facebook?: string;
|
|
4339
|
+
instagram?: string;
|
|
4340
|
+
};
|
|
4341
|
+
export type TColor = {
|
|
4342
|
+
hex: string;
|
|
4343
|
+
opacity: number;
|
|
4344
|
+
rgba: string;
|
|
4345
|
+
};
|
|
4346
|
+
export type TVortex = {
|
|
4347
|
+
id: string;
|
|
4348
|
+
name: string;
|
|
4349
|
+
type: string;
|
|
4350
|
+
weight: number;
|
|
4351
|
+
multiplier: number;
|
|
4352
|
+
[propName: string]: any;
|
|
4353
|
+
};
|
|
4354
|
+
export type TPicture = {
|
|
4355
|
+
original?: string;
|
|
4356
|
+
};
|
|
4357
|
+
export type TOpeningHours = {
|
|
4358
|
+
'@type': string;
|
|
4359
|
+
opens: string;
|
|
4360
|
+
closes: string;
|
|
4361
|
+
dayOfWeek: string[];
|
|
4362
|
+
validFrom?: string;
|
|
4363
|
+
validThrough?: string;
|
|
4364
|
+
};
|
|
4365
|
+
export type TSiblingGroup = {
|
|
4366
|
+
label: string;
|
|
4367
|
+
siblings: string[];
|
|
4368
|
+
};
|
|
4369
|
+
export type TState = {
|
|
4370
|
+
type: string;
|
|
4371
|
+
start?: string;
|
|
4372
|
+
end?: string;
|
|
4373
|
+
};
|
|
4374
|
+
export type TCategory = {
|
|
4375
|
+
name?: string;
|
|
4376
|
+
externalId?: string;
|
|
4377
|
+
parents?: string[];
|
|
4378
|
+
id?: string;
|
|
4379
|
+
icon?: TPicture;
|
|
4380
|
+
};
|
|
4381
|
+
export type TEvent = {
|
|
4382
|
+
id: string;
|
|
4383
|
+
type: string;
|
|
4384
|
+
name: string;
|
|
4385
|
+
location?: string;
|
|
4386
|
+
description?: string;
|
|
4387
|
+
image?: TImage;
|
|
4388
|
+
startDate?: number;
|
|
4389
|
+
endDate?: number;
|
|
4390
|
+
showDate?: number;
|
|
4391
|
+
};
|
|
4392
|
+
export interface TGeoReference {
|
|
4393
|
+
target: {
|
|
4394
|
+
x: number;
|
|
4395
|
+
y: number;
|
|
4396
|
+
};
|
|
4397
|
+
control: {
|
|
4398
|
+
x: number;
|
|
4399
|
+
y: number;
|
|
4400
|
+
};
|
|
4401
|
+
}
|
|
4402
|
+
export interface TMap {
|
|
4403
|
+
id: string;
|
|
4404
|
+
name: string;
|
|
4405
|
+
shortName: string;
|
|
4406
|
+
elevation?: number;
|
|
4407
|
+
scale?: number;
|
|
4408
|
+
x_scale?: number;
|
|
4409
|
+
georeference?: TGeoReference[];
|
|
4410
|
+
[propName: string]: any;
|
|
4411
|
+
}
|
|
4412
|
+
export type TMapGroup = {
|
|
4413
|
+
name: string;
|
|
4414
|
+
id: string;
|
|
4415
|
+
};
|
|
4416
|
+
export type TBuilding = TLocation & {
|
|
4417
|
+
groupId: string;
|
|
4418
|
+
};
|
|
4419
|
+
export type TLocation = {
|
|
4420
|
+
id: string;
|
|
4421
|
+
name: string;
|
|
4422
|
+
type: string;
|
|
4423
|
+
nodes: {
|
|
4424
|
+
map: TMap['id'];
|
|
4425
|
+
node: TNode['id'];
|
|
4426
|
+
}[];
|
|
4427
|
+
polygons: {
|
|
4428
|
+
map: TMap['id'];
|
|
4429
|
+
id: TPolygon['id'];
|
|
4430
|
+
}[];
|
|
4431
|
+
categories: string[];
|
|
4432
|
+
description?: string;
|
|
4433
|
+
sortOrder?: number;
|
|
4434
|
+
logo?: TLogo;
|
|
4435
|
+
phone?: TPhone;
|
|
4436
|
+
social?: TSocial;
|
|
4437
|
+
color?: TColor;
|
|
4438
|
+
shortName?: string;
|
|
4439
|
+
detailsUrl?: string;
|
|
4440
|
+
parent?: string | null;
|
|
4441
|
+
tags?: string[];
|
|
4442
|
+
externalId?: string;
|
|
4443
|
+
picture?: TPicture;
|
|
4444
|
+
states?: TState[];
|
|
4445
|
+
operationHours?: TOpeningHours[] | undefined;
|
|
4446
|
+
siblingGroups?: TSiblingGroup[] | undefined;
|
|
4447
|
+
gallery?: TGalleryImage[] | undefined;
|
|
4448
|
+
[propName: string]: any;
|
|
4449
|
+
};
|
|
4450
|
+
export type TPolygon = {
|
|
4451
|
+
id: string;
|
|
4452
|
+
map: string;
|
|
4453
|
+
layer?: string;
|
|
4454
|
+
layerId?: string;
|
|
4455
|
+
externalId?: string;
|
|
4456
|
+
name?: string;
|
|
4457
|
+
entrances: {
|
|
4458
|
+
map: TMap['id'];
|
|
4459
|
+
id: TNode['id'];
|
|
4460
|
+
}[];
|
|
4461
|
+
};
|
|
4462
|
+
export type TPolygonRanking = {
|
|
4463
|
+
polygonId: string;
|
|
4464
|
+
entranceNodeId: string;
|
|
4465
|
+
score: number;
|
|
4466
|
+
};
|
|
4467
|
+
export type TLocationState = {
|
|
4468
|
+
id: string;
|
|
4469
|
+
name: string;
|
|
4470
|
+
value: string;
|
|
4471
|
+
};
|
|
4472
|
+
export type TVenue = {
|
|
4473
|
+
address?: string;
|
|
4474
|
+
city?: string;
|
|
4475
|
+
countrycode?: string;
|
|
4476
|
+
defaultMap?: string;
|
|
4477
|
+
externalId?: string;
|
|
4478
|
+
id?: string;
|
|
4479
|
+
latitude?: number;
|
|
4480
|
+
logo?: TLogo;
|
|
4481
|
+
longitude?: number;
|
|
4482
|
+
metadata?: any;
|
|
4483
|
+
name?: string;
|
|
4484
|
+
operationHours?: TOpeningHours[];
|
|
4485
|
+
postal?: string;
|
|
4486
|
+
slug?: string;
|
|
4487
|
+
state?: string;
|
|
4488
|
+
telephone?: string;
|
|
4489
|
+
tzid?: string;
|
|
4490
|
+
tzidOverride?: string;
|
|
4491
|
+
utcOffset?: string;
|
|
4492
|
+
website?: string;
|
|
4493
|
+
};
|
|
4494
|
+
export type TMappedinAPI = {
|
|
4495
|
+
nodes: TNode[];
|
|
4496
|
+
locations: TLocation[];
|
|
4497
|
+
categories: TCategory[];
|
|
4498
|
+
mapGroups: TMapGroup[];
|
|
4499
|
+
polygons: TPolygon[];
|
|
4500
|
+
maps: TMap[];
|
|
4501
|
+
themes: any;
|
|
4502
|
+
venue: TVenue;
|
|
4503
|
+
vortexes: TVortex[];
|
|
4504
|
+
locationStates?: TLocationState[];
|
|
4505
|
+
imageBinaries?: Map<string, Uint8Array>;
|
|
4506
|
+
};
|
|
4507
|
+
}
|
|
4508
|
+
|
|
4509
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/mvf-types' {
|
|
4510
|
+
import type { MapId, Style, Feature, LineString, ObstructionProperties, EntranceProperties, SpaceProperties, ObstructionCollection, EntranceCollection, SpaceCollection, FloorImageProperties, BaseTextAreaProperties, EnterpriseTexture } from '@mappedin/mvf';
|
|
4511
|
+
import type { FeatureCollection, MultiPolygon, Point, Polygon } from 'geojson';
|
|
4512
|
+
import type { TImage, TMap, TNode, TOpeningHours, TPhone, TSiblingGroup, TSocial } from '@mappedin/mappedin-js/packages/mvf-utils/api-types';
|
|
4513
|
+
export type WithIDs<T> = Map<string, T>;
|
|
4514
|
+
type ManifestFile = {
|
|
4515
|
+
type: 'file';
|
|
4516
|
+
name: string;
|
|
4517
|
+
};
|
|
4518
|
+
type ManifestFolder = {
|
|
4519
|
+
type: 'folder';
|
|
4520
|
+
name: string;
|
|
4521
|
+
children: ManifestFile[];
|
|
4522
|
+
};
|
|
4523
|
+
export type MVFStyle = Style & {
|
|
4524
|
+
type: string;
|
|
4525
|
+
width?: number;
|
|
4526
|
+
};
|
|
4527
|
+
export type MVFObstructionFeature = ObstructionCollection['features'][number];
|
|
4528
|
+
export type MVFEntranceFeature = EntranceCollection['features'][number];
|
|
4529
|
+
export type MVFSpaceFeature = SpaceCollection['features'][number];
|
|
4530
|
+
export type WithPolygonImage<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4531
|
+
image?: FloorImageProperties;
|
|
4532
|
+
};
|
|
4533
|
+
export type WithTextArea<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4534
|
+
textArea?: BaseTextAreaProperties;
|
|
4535
|
+
};
|
|
4536
|
+
export type WithEntepriseStyle<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4537
|
+
style?: {
|
|
4538
|
+
styleId: string;
|
|
4539
|
+
edgeOffset?: number;
|
|
4540
|
+
};
|
|
4541
|
+
};
|
|
4542
|
+
export type WithTextures<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4543
|
+
textures?: EnterpriseTexture[];
|
|
4544
|
+
};
|
|
4545
|
+
export type PolygonFeatureProperties<T extends SpaceProperties | ObstructionProperties> = WithEntepriseStyle<T> | WithPolygonImage<T> | WithTextures<T>;
|
|
4546
|
+
export type MVFv1PolygonLikeProperties = {
|
|
4547
|
+
id: string;
|
|
4548
|
+
altitude?: number;
|
|
4549
|
+
color?: string;
|
|
4550
|
+
externalId?: string | null;
|
|
4551
|
+
height?: number;
|
|
4552
|
+
opacity?: number;
|
|
4553
|
+
layer?: string;
|
|
4554
|
+
level: string;
|
|
4555
|
+
parent?: string | null;
|
|
4556
|
+
};
|
|
4557
|
+
export type MVFv1SpaceProperties = MVFv1PolygonLikeProperties & {
|
|
4558
|
+
entrances: {
|
|
4559
|
+
level: TMap['id'];
|
|
4560
|
+
id: TNode['id'];
|
|
4561
|
+
}[];
|
|
4562
|
+
};
|
|
4563
|
+
export type MVFv1ObstructionProperties = MVFv1PolygonLikeProperties;
|
|
4564
|
+
export type MVFv1ConnectionProperties = {
|
|
4565
|
+
id: string;
|
|
4566
|
+
/**
|
|
4567
|
+
* Indicates that a connection is accessible
|
|
4568
|
+
*/
|
|
4569
|
+
accessible: boolean;
|
|
4570
|
+
/**
|
|
4571
|
+
* Array of node ids that this Connection connects with.
|
|
4572
|
+
*/
|
|
4573
|
+
destinations: string[];
|
|
4574
|
+
level: string;
|
|
4575
|
+
multiplier: number;
|
|
4576
|
+
name: string;
|
|
4577
|
+
/**
|
|
4578
|
+
* Type of the connection such as `escalator` or `elevator`
|
|
4579
|
+
*/
|
|
4580
|
+
type: string;
|
|
4581
|
+
weight: number;
|
|
4582
|
+
};
|
|
4583
|
+
export type MVFv1NodeProperties = {
|
|
4584
|
+
id: string;
|
|
4585
|
+
/**
|
|
4586
|
+
* Indicates that a node is accessible
|
|
4587
|
+
*/
|
|
4588
|
+
accessible: boolean;
|
|
4589
|
+
/**
|
|
4590
|
+
* External id of a node is used to sync and connect to external systems to Mappedin data
|
|
4591
|
+
*/
|
|
4592
|
+
externalId: string | null;
|
|
4593
|
+
level: string;
|
|
4594
|
+
multiplier: number;
|
|
4595
|
+
neighbors: string[];
|
|
4596
|
+
weight: number;
|
|
4597
|
+
};
|
|
4598
|
+
export type MVFv1LevelProperties = {
|
|
4599
|
+
id: string;
|
|
4600
|
+
abbreviation?: string;
|
|
4601
|
+
building?: string;
|
|
4602
|
+
elevation?: number;
|
|
4603
|
+
name: string;
|
|
4604
|
+
};
|
|
4605
|
+
export type MVFv1ManifestProperties = {
|
|
4606
|
+
/**
|
|
4607
|
+
* Name of the venue
|
|
4608
|
+
*/
|
|
4609
|
+
name: string;
|
|
4610
|
+
folder_struct: (ManifestFolder | ManifestFile)[];
|
|
4611
|
+
/**
|
|
4612
|
+
* Mappedin Venue Format version number of the MVF bundle
|
|
4613
|
+
*/
|
|
4614
|
+
version: string;
|
|
4615
|
+
/**
|
|
4616
|
+
* Timestamp when the MVF bundle was generated. E.g. `2022-02-25T16:26:09.908Z`
|
|
4617
|
+
*/
|
|
4618
|
+
time: string;
|
|
4619
|
+
};
|
|
4620
|
+
export type MVFv1BuildingProperties = {
|
|
4621
|
+
id: string;
|
|
4622
|
+
name: string;
|
|
4623
|
+
venue: string;
|
|
4624
|
+
};
|
|
4625
|
+
export type MVFv1CategoryProperties = {
|
|
4626
|
+
id: string;
|
|
4627
|
+
name: string;
|
|
4628
|
+
picture?: TImage;
|
|
4629
|
+
};
|
|
4630
|
+
export type MVFv1LocationProperties = {
|
|
4631
|
+
id: string;
|
|
4632
|
+
address?: string | null;
|
|
4633
|
+
/**
|
|
4634
|
+
* Array of {@link MICategoryProperties | category} ids
|
|
4635
|
+
*/
|
|
4636
|
+
categories: string[];
|
|
4637
|
+
/**
|
|
4638
|
+
* A text description of the location usually indicating what the location is used for
|
|
4639
|
+
*/
|
|
4640
|
+
description?: string | null;
|
|
4641
|
+
/**
|
|
4642
|
+
* Email address to for contacting this location
|
|
4643
|
+
*/
|
|
4644
|
+
email?: string | null;
|
|
4645
|
+
/**
|
|
4646
|
+
* External id used to connect Mappedin Location to an external system
|
|
4647
|
+
*/
|
|
4648
|
+
externalId?: string | null;
|
|
4649
|
+
/**
|
|
4650
|
+
* Opening hours of the location
|
|
4651
|
+
*/
|
|
4652
|
+
hours?: TOpeningHours[] | null;
|
|
4653
|
+
/**
|
|
4654
|
+
* Collection of links related to this location
|
|
4655
|
+
*/
|
|
4656
|
+
links?: {
|
|
4657
|
+
label: string;
|
|
4658
|
+
url: string;
|
|
4659
|
+
}[] | null;
|
|
4660
|
+
logo?: TImage | null;
|
|
4661
|
+
/**
|
|
4662
|
+
* Name of the location. By default this is the string displayed in the location label
|
|
4663
|
+
*/
|
|
4664
|
+
name: string;
|
|
4665
|
+
/**
|
|
4666
|
+
* Phone number for contacting this location
|
|
4667
|
+
*/
|
|
4668
|
+
phone?: TPhone | null;
|
|
4669
|
+
picture?: TImage | null;
|
|
4670
|
+
services?: string | null;
|
|
4671
|
+
siblingGroups?: TSiblingGroup[] | null;
|
|
4672
|
+
/**
|
|
4673
|
+
* Social media links of the location
|
|
4674
|
+
*/
|
|
4675
|
+
social?: TSocial | null;
|
|
4676
|
+
/**
|
|
4677
|
+
* Array of {@link MISpaceProperties | MVF Space} ids for this location
|
|
4678
|
+
*/
|
|
4679
|
+
spaces?: {
|
|
4680
|
+
id: string;
|
|
4681
|
+
map: string;
|
|
4682
|
+
}[] | null;
|
|
4683
|
+
states?: {
|
|
4684
|
+
type: string;
|
|
4685
|
+
start?: string;
|
|
4686
|
+
end?: string;
|
|
4687
|
+
}[] | null;
|
|
4688
|
+
type: string;
|
|
4689
|
+
};
|
|
4690
|
+
export type MVFv1ObstructionCollection = FeatureCollection<Polygon, MVFv1ObstructionProperties>;
|
|
4691
|
+
export type MVFv1SpaceCollection = FeatureCollection<Polygon, MVFv1SpaceProperties>;
|
|
4692
|
+
export type MVFv1ConnectionCollection = FeatureCollection<Point, MVFv1ConnectionProperties>;
|
|
4693
|
+
export type MVFv1NodeCollection = FeatureCollection<Point, MVFv1NodeProperties>;
|
|
4694
|
+
export type MVFv1LevelCollection = FeatureCollection<Polygon | MultiPolygon, MVFv1LevelProperties>;
|
|
4695
|
+
export type MVFv1ManifestCollection = FeatureCollection<Point, MVFv1ManifestProperties>;
|
|
4696
|
+
export type MVFv1BuildingCollection = FeatureCollection<Polygon, MVFv1BuildingProperties>;
|
|
4697
|
+
export type MVFv1CategoryCollection = FeatureCollection<null, MVFv1CategoryProperties>;
|
|
4698
|
+
export type MVFv1LocationCollection = FeatureCollection<null, MVFv1LocationProperties>;
|
|
4699
|
+
export type ParsedMVFv1 = {
|
|
4700
|
+
/**
|
|
4701
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4702
|
+
*/
|
|
4703
|
+
space: {
|
|
4704
|
+
[mapId: MapId]: MVFv1SpaceCollection | undefined;
|
|
4705
|
+
};
|
|
4706
|
+
/**
|
|
4707
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4708
|
+
*/
|
|
4709
|
+
obstruction: {
|
|
4710
|
+
[mapId: MapId]: MVFv1ObstructionCollection | undefined;
|
|
4711
|
+
};
|
|
4712
|
+
/**
|
|
4713
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4714
|
+
*/
|
|
4715
|
+
level: {
|
|
4716
|
+
[mapId: MapId]: MVFv1LevelCollection | undefined;
|
|
4717
|
+
};
|
|
4718
|
+
/**
|
|
4719
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4720
|
+
*/
|
|
4721
|
+
node: {
|
|
4722
|
+
[mapId: MapId]: MVFv1NodeCollection | undefined;
|
|
4723
|
+
};
|
|
4724
|
+
/**
|
|
4725
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4726
|
+
*/
|
|
4727
|
+
connection: {
|
|
4728
|
+
[mapId: MapId]: MVFv1ConnectionCollection | undefined;
|
|
4729
|
+
};
|
|
4730
|
+
'manifest.geojson': MVFv1ManifestCollection;
|
|
4731
|
+
'building.geojson': MVFv1BuildingCollection;
|
|
4732
|
+
'category.geojson': MVFv1CategoryCollection;
|
|
4733
|
+
'location.geojson': MVFv1LocationCollection;
|
|
4734
|
+
};
|
|
4735
|
+
export type RawMVFv1 = {
|
|
4736
|
+
'manifest.geojson': Uint8Array;
|
|
4737
|
+
'building.geojson': Uint8Array;
|
|
4738
|
+
'category.geojson': Uint8Array;
|
|
4739
|
+
'location.geojson': Uint8Array;
|
|
4740
|
+
level: Partial<Record<MapId, Uint8Array>>;
|
|
4741
|
+
node: Partial<Record<MapId, Uint8Array>>;
|
|
4742
|
+
space: Partial<Record<MapId, Uint8Array>>;
|
|
4743
|
+
obstruction: Partial<Record<MapId, Uint8Array>>;
|
|
4744
|
+
connection: Partial<Record<MapId, Uint8Array>>;
|
|
4745
|
+
};
|
|
4746
|
+
export type ObstructionFeature = Feature<LineString | Polygon, ObstructionProperties>;
|
|
4747
|
+
export type ObstructionWallFeature = Feature<LineString, ObstructionProperties>;
|
|
4748
|
+
export type EntranceFeature = Feature<LineString, EntranceProperties>;
|
|
4749
|
+
export {};
|
|
4750
|
+
}
|
|
4751
|
+
|
|
4752
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/mvf-utils' {
|
|
4753
|
+
import { type ParsedMVF, type ParsedMVFLocalePack, type RawMVF } from '@mappedin/mvf';
|
|
4754
|
+
import type { ParsedMVFv1, RawMVFv1 } from '@mappedin/mappedin-js/packages/mvf-utils/mvf-types';
|
|
4755
|
+
export * from '@mappedin/mappedin-js/packages/mvf-utils/tokens/access-token';
|
|
4756
|
+
export * from '@mappedin/mappedin-js/packages/mvf-utils/tokens/sas-token';
|
|
4757
|
+
/**
|
|
4758
|
+
* This is how we can avoid bundling in node-fetch (via isomorphic fetch),
|
|
4759
|
+
* which keeps popping up in security advisories
|
|
4760
|
+
* This is a pattern that most isomorphic libraries appear to use,
|
|
4761
|
+
* where when running in node, you can pass your own fetch function
|
|
4762
|
+
* as one is not provided by Node.js.
|
|
4763
|
+
*
|
|
4764
|
+
*/
|
|
4765
|
+
export function isomorphicFetch(): Window['fetch'];
|
|
4766
|
+
/**
|
|
4767
|
+
* @internal
|
|
4768
|
+
* export for test mocking
|
|
4769
|
+
*/
|
|
4770
|
+
export function __setFetchFn(fn: any): void;
|
|
4771
|
+
export type TGetVenueOptions = {
|
|
4772
|
+
accessToken?: string;
|
|
4773
|
+
clientId?: string;
|
|
4774
|
+
clientSecret?: string;
|
|
4775
|
+
baseUrl?: string;
|
|
4776
|
+
includeHidden?: boolean;
|
|
4777
|
+
noAuth?: boolean;
|
|
4778
|
+
perspective?: string;
|
|
4779
|
+
language?: string;
|
|
4780
|
+
headers?: {
|
|
4781
|
+
[key in string]: string;
|
|
4782
|
+
};
|
|
4783
|
+
venue: string;
|
|
4784
|
+
/**
|
|
4785
|
+
* An object specifying additional properties to fetch for each data item.
|
|
4786
|
+
* Each key represents a data item (e.g., 'locations', 'nodes'), and the value is an array of strings indicating extra properties to be included.
|
|
4787
|
+
* @example
|
|
4788
|
+
* For example:
|
|
4789
|
+
* ```
|
|
4790
|
+
* getVenue({
|
|
4791
|
+
* venue: 'some-venue',
|
|
4792
|
+
* things: { vortexes: [ 'material' ]
|
|
4793
|
+
* }})
|
|
4794
|
+
* ```
|
|
4795
|
+
*/
|
|
4796
|
+
things?: any;
|
|
4797
|
+
useDraftData?: boolean;
|
|
4798
|
+
platformString?: string;
|
|
4799
|
+
secure?: boolean;
|
|
4800
|
+
preloadMapGeometry?: boolean;
|
|
4801
|
+
};
|
|
4802
|
+
export type TGetVenueBundleOptions = TGetVenueOptions & {
|
|
4803
|
+
baseUri?: string;
|
|
4804
|
+
version?: string;
|
|
4805
|
+
/**
|
|
4806
|
+
* Parse bundle and convert images to blobs. Disabled in React Native
|
|
4807
|
+
* @private
|
|
4808
|
+
*/
|
|
4809
|
+
shouldPopulateBundledImagesAsBlobs?: boolean;
|
|
4810
|
+
};
|
|
4811
|
+
/** @internal */
|
|
4812
|
+
export type TGetVenueMVFOptions = TGetVenueBundleOptions & {
|
|
4813
|
+
onMVFParsed?: (mvf: ParsedMVF) => void;
|
|
4814
|
+
/**
|
|
4815
|
+
* Override initial MVF data
|
|
4816
|
+
*/
|
|
4817
|
+
override?: Partial<Pick<ParsedMVF, 'styles.json'>>;
|
|
4818
|
+
};
|
|
4819
|
+
/**
|
|
4820
|
+
* Options for configuring search functionality.
|
|
4821
|
+
*/
|
|
4822
|
+
export type TSearchOptions = {
|
|
4823
|
+
/**
|
|
4824
|
+
* Indicates whether search functionality is enabled.
|
|
4825
|
+
*/
|
|
4826
|
+
enabled: boolean;
|
|
4827
|
+
};
|
|
4828
|
+
export type TGetMapDataSharedOptions = {
|
|
4829
|
+
/**
|
|
4830
|
+
* Mappedin map ID.
|
|
4831
|
+
*/
|
|
4832
|
+
mapId: string;
|
|
4833
|
+
/**
|
|
4834
|
+
* Optionally provide a custom base URL for the Mappedin API request.
|
|
4835
|
+
* Use the {@link Environment | `environment`} setting to switch environments
|
|
4836
|
+
*/
|
|
4837
|
+
baseUri?: string;
|
|
4838
|
+
/**
|
|
4839
|
+
* Optionally provide a custom URI for authentication when obtaining an access token.
|
|
4840
|
+
* Use the {@link Environment | `environment`} setting to switch environments.
|
|
4841
|
+
*/
|
|
4842
|
+
baseAuthUri?: string;
|
|
4843
|
+
/**
|
|
4844
|
+
* Callback for when the Mappedin map data has been fetched and parsed as Mappedin Venue Format (MVF) data.
|
|
4845
|
+
* @param mvf Parsed MVF data.
|
|
4846
|
+
*/
|
|
4847
|
+
onMVFParsed?: (mvf: ParsedMVF) => void;
|
|
4848
|
+
/**
|
|
4849
|
+
* Load different view of mvf data based on configId
|
|
4850
|
+
*/
|
|
4851
|
+
viewId?: string;
|
|
4852
|
+
/**
|
|
4853
|
+
* set the target SDK environment
|
|
4854
|
+
* @default 'us'
|
|
4855
|
+
* @example
|
|
4856
|
+
* const mapData = getMapData({
|
|
4857
|
+
* key: '',
|
|
4858
|
+
* secret: '',
|
|
4859
|
+
* environment: 'eu'
|
|
4860
|
+
* })
|
|
4861
|
+
*/
|
|
4862
|
+
environment?: ServiceEnvironment;
|
|
4863
|
+
/**
|
|
4864
|
+
* The language of the map data.
|
|
4865
|
+
* The ISO 639-1 language code to change to (e.g., 'en' for English, 'fr' for French). Check ({@link EnterpriseVenue.languages}) for available languages
|
|
4866
|
+
*/
|
|
4867
|
+
language?: string;
|
|
4868
|
+
/**
|
|
4869
|
+
* Analytics configuration.
|
|
4870
|
+
*/
|
|
4871
|
+
analytics?: {
|
|
4872
|
+
/**
|
|
4873
|
+
* Whether to log analytics events.
|
|
4874
|
+
* @default false
|
|
4875
|
+
*/
|
|
4876
|
+
logEvents?: boolean;
|
|
4877
|
+
/**
|
|
4878
|
+
* Whether to send analytics events to the server.
|
|
4879
|
+
* @default false
|
|
4880
|
+
*/
|
|
4881
|
+
sendEvents?: boolean;
|
|
4882
|
+
/**
|
|
4883
|
+
* Custom base URI for analytics requests. If not provided, the default analytics endpoint will be used.
|
|
4884
|
+
* Use the {@link Environment | `environment`} setting to switch environments.
|
|
4885
|
+
*/
|
|
4886
|
+
baseUri?: string;
|
|
4887
|
+
/**
|
|
4888
|
+
* Context for analytics events.
|
|
4889
|
+
* @default 'websdk'
|
|
4890
|
+
* @internal
|
|
4891
|
+
*/
|
|
4892
|
+
context?: string;
|
|
4893
|
+
};
|
|
4894
|
+
search?: TSearchOptions;
|
|
4895
|
+
/**
|
|
4896
|
+
* @hidden
|
|
4897
|
+
* @internal
|
|
4898
|
+
*/
|
|
4899
|
+
layoutId?: 'draft';
|
|
4900
|
+
/**
|
|
4901
|
+
* @hidden
|
|
4902
|
+
* @internal
|
|
4903
|
+
*/
|
|
4904
|
+
mvfVersion?: '2.0.0' | '3.0.0';
|
|
4905
|
+
};
|
|
4906
|
+
/**
|
|
4907
|
+
* @interface
|
|
4908
|
+
*/
|
|
4909
|
+
export type TGetMapDataWithCredentialsOptions = {
|
|
4910
|
+
/**
|
|
4911
|
+
* Mappedin auth key.
|
|
4912
|
+
*/
|
|
4913
|
+
key: string;
|
|
4914
|
+
/**
|
|
4915
|
+
* Mappedin auth secret.
|
|
4916
|
+
*/
|
|
4917
|
+
secret: string;
|
|
4918
|
+
} & TGetMapDataSharedOptions;
|
|
4919
|
+
/**
|
|
4920
|
+
* @interface
|
|
4921
|
+
*/
|
|
4922
|
+
export type TGetMapDataWithAccessTokenOptions = {
|
|
4923
|
+
/**
|
|
4924
|
+
* Mappedin access token.
|
|
4925
|
+
*/
|
|
4926
|
+
accessToken: string;
|
|
4927
|
+
} & TGetMapDataSharedOptions;
|
|
4928
|
+
export type TGetMapDataOptions = TGetMapDataWithCredentialsOptions | TGetMapDataWithAccessTokenOptions;
|
|
4929
|
+
export type TProcessedMVFOptions = TGetMapDataOptions & {
|
|
4930
|
+
clientId: string;
|
|
4931
|
+
clientSecret: string;
|
|
4932
|
+
venue: string;
|
|
4933
|
+
accessToken: string;
|
|
4934
|
+
};
|
|
4935
|
+
export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & {
|
|
4936
|
+
perspective?: string;
|
|
4937
|
+
});
|
|
4938
|
+
export type TGetVenueOptionsInternal<T extends TAllGetVenueOptions> = Omit<T & {
|
|
4939
|
+
baseUrl?: string;
|
|
4940
|
+
supplementaryUrl?: string;
|
|
4941
|
+
noAuth?: boolean;
|
|
4942
|
+
includeHidden?: boolean;
|
|
4943
|
+
apiGateway?: string;
|
|
4944
|
+
authorization?: string;
|
|
4945
|
+
headers?: any;
|
|
4946
|
+
}, 'things'> & {
|
|
4947
|
+
things?: any;
|
|
4948
|
+
};
|
|
4949
|
+
export const defaultOptions: TGetVenueOptionsInternal<TGetVenueOptions>;
|
|
4950
|
+
/**
|
|
4951
|
+
* @internal
|
|
4952
|
+
*/
|
|
4953
|
+
export function parseOptions<T extends TAllGetVenueOptions>(options: T): TGetVenueOptionsInternal<T>;
|
|
4954
|
+
/**
|
|
4955
|
+
* Prepares the request and URL fields to pass into generateAPIRequest
|
|
4956
|
+
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
4957
|
+
* @param url string describing the url corresponding to the client's request
|
|
4958
|
+
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
4959
|
+
*/
|
|
4960
|
+
export function constructParamsForRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): {
|
|
4961
|
+
req: {
|
|
4962
|
+
method: string;
|
|
4963
|
+
headers: any;
|
|
4964
|
+
};
|
|
4965
|
+
url: string;
|
|
4966
|
+
};
|
|
4967
|
+
export function generateAPIRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): Promise<any>;
|
|
4968
|
+
export const getPerspectivesFromResponse: (res: unknown) => Record<string, {
|
|
4969
|
+
url: string;
|
|
4970
|
+
locale_packs: LocalePackUrls;
|
|
4971
|
+
}> | null;
|
|
4972
|
+
/**
|
|
4973
|
+
* Get the bundle URL and updated_at time.
|
|
4974
|
+
* @internal
|
|
4975
|
+
*/
|
|
4976
|
+
export function getVenueMVFURL(userOptions: TGetVenueBundleOptions, path?: string): Promise<{
|
|
4977
|
+
url: any;
|
|
4978
|
+
localePacks: any;
|
|
4979
|
+
updated_at: any;
|
|
4980
|
+
}>;
|
|
4981
|
+
export function getLanguagePackUnitArray(url: string, { signal }: {
|
|
4982
|
+
signal: AbortSignal;
|
|
4983
|
+
}): Promise<Uint8Array>;
|
|
4984
|
+
export function parseLanguagePack(data: Uint8Array): Promise<ParsedMVFLocalePack>;
|
|
4985
|
+
export function downloadLanguagePack(url: string, { signal }: {
|
|
4986
|
+
signal: AbortSignal;
|
|
4987
|
+
}): Promise<ParsedMVFLocalePack | undefined>;
|
|
4988
|
+
export function downloadVenueBundleMVFAPIGateway(options: TGetVenueBundleOptions): Promise<{
|
|
4989
|
+
compressed: Uint8Array;
|
|
4990
|
+
localePacks: LocalePackUrls;
|
|
4991
|
+
}>;
|
|
4992
|
+
export function downloadVenueBundleMVF(options: TGetVenueBundleOptions): Promise<Uint8Array>;
|
|
4993
|
+
export function parseMVFv1(raw: RawMVFv1): ParsedMVFv1;
|
|
4994
|
+
export function validateStaticMVFv1Files(data: unknown): boolean;
|
|
4995
|
+
export function unzipMVFv1(data: any): Promise<RawMVFv1>;
|
|
4996
|
+
export function downloadMVF(userOptions: TGetMapDataOptions, accessToken: string): Promise<Uint8Array>;
|
|
4997
|
+
export function getMakerBundleURL(userOptions: TGetMapDataOptions, token: string): Promise<{
|
|
4998
|
+
url: string;
|
|
4999
|
+
updated_at: string;
|
|
5000
|
+
}>;
|
|
5001
|
+
/**
|
|
5002
|
+
* @internal
|
|
5003
|
+
*/
|
|
5004
|
+
export function parseMVF(raw: RawMVF & {
|
|
5005
|
+
options?: {
|
|
5006
|
+
outdoorViewToken?: string;
|
|
5007
|
+
};
|
|
5008
|
+
}): ParsedMVF;
|
|
5009
|
+
/**
|
|
5010
|
+
* Figure out if the MVF data at least has the static files we expect.
|
|
5011
|
+
*/
|
|
5012
|
+
export function validateStaticMVFFiles(data: unknown): boolean;
|
|
5013
|
+
/**
|
|
5014
|
+
* @internal
|
|
5015
|
+
*/
|
|
5016
|
+
export function unzipMVF(data: Uint8Array): Promise<RawMVF>;
|
|
5017
|
+
export type LocalePackUrls = {
|
|
5018
|
+
[key: string]: string;
|
|
5019
|
+
};
|
|
5020
|
+
/**
|
|
5021
|
+
* Represents the environment state configuration.
|
|
5022
|
+
* @example
|
|
5023
|
+
* const mapData = getMapData({
|
|
5024
|
+
* key: '',
|
|
5025
|
+
* secret: '',
|
|
5026
|
+
* environment: 'eu'
|
|
5027
|
+
* })
|
|
5028
|
+
*/
|
|
5029
|
+
export type Environment = {
|
|
5030
|
+
/**
|
|
5031
|
+
* The base URI for the API.
|
|
5032
|
+
*/
|
|
5033
|
+
baseUri: string;
|
|
5034
|
+
/**
|
|
5035
|
+
* The base URI for authentication.
|
|
5036
|
+
*/
|
|
5037
|
+
baseAuthUri: string;
|
|
5038
|
+
/**
|
|
5039
|
+
* The base URI for analytics.
|
|
5040
|
+
*/
|
|
5041
|
+
analyticsBaseUri: string;
|
|
5042
|
+
/**
|
|
5043
|
+
* The URI for the tile server.
|
|
5044
|
+
*/
|
|
5045
|
+
tileServerUri: string;
|
|
5046
|
+
};
|
|
5047
|
+
type InternalServiceEnvironment = 'us' | 'eu' | 'us-staging-enterprise' | 'us-staging-self-serve';
|
|
5048
|
+
export type ServiceEnvironment = 'us' | 'eu';
|
|
5049
|
+
export function createEnvControl(): {
|
|
5050
|
+
/**
|
|
5051
|
+
* @internal
|
|
5052
|
+
*/
|
|
5053
|
+
updateByUserOption(userOption: TGetMapDataOptions): void;
|
|
5054
|
+
/**
|
|
5055
|
+
* @internal
|
|
5056
|
+
*/
|
|
5057
|
+
updateTileServerBaseUrl(url: string): void;
|
|
5058
|
+
/**
|
|
5059
|
+
* @internal
|
|
5060
|
+
*/
|
|
5061
|
+
updateEnvironment(env: InternalServiceEnvironment): void;
|
|
5062
|
+
getBaseUri(enterprise: boolean): string;
|
|
5063
|
+
getBaseAuthUri(enterprise?: boolean): string;
|
|
5064
|
+
getAnalyticsBaseUri(): string;
|
|
5065
|
+
getTileServerUri(): string;
|
|
5066
|
+
reset(): void;
|
|
5067
|
+
/**
|
|
5068
|
+
* @internal
|
|
5069
|
+
*/
|
|
5070
|
+
__getState: () => Environment;
|
|
5071
|
+
};
|
|
5072
|
+
export type EnvControl = ReturnType<typeof createEnvControl>;
|
|
5073
|
+
/**
|
|
5074
|
+
* Return IDs for all individual maps that are part of a multi-building MVF, not including the
|
|
5075
|
+
* outdoor map. If a map is not a multi-building map, an empty array is returned.
|
|
5076
|
+
*/
|
|
5077
|
+
export const getBuildingIds: (mvf: ParsedMVF) => string[];
|
|
5078
|
+
export function unzipAndParseMVFv2(data: Uint8Array, inputVersion?: '2.0.0' | '3.0.0'): Promise<ParsedMVF>;
|
|
5079
|
+
}
|
|
5080
|
+
|
|
5081
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/geometry' {
|
|
5082
|
+
import type { EntranceFeature, ObstructionWallFeature } from '@mappedin/mappedin-js/packages/mvf-utils/mvf-types';
|
|
5083
|
+
export function findAndSplitObstructionByAllEntrances(wall: ObstructionWallFeature, entrances: EntranceFeature[]): {
|
|
5084
|
+
entrances: EntranceFeature[];
|
|
5085
|
+
obstructions: ObstructionWallFeature[];
|
|
5086
|
+
};
|
|
5087
|
+
}
|
|
5088
|
+
|
|
5089
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
|
|
5090
|
+
import type { NodeCollection } from '@mappedin/mvf';
|
|
5091
|
+
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
5092
|
+
import type { EnterpriseLocation, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5093
|
+
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
5094
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
5095
|
+
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
5096
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
5097
|
+
/**
|
|
5098
|
+
* A class representing {@link Path} node data within the map.
|
|
5099
|
+
*
|
|
5100
|
+
* Nodes are used to define points in the map's pathfinding graph.
|
|
5101
|
+
*
|
|
5102
|
+
*/
|
|
5103
|
+
class Node extends BaseMetaData implements IGeoJSONData, IFocusable, IAnchorable {
|
|
5104
|
+
#private;
|
|
5105
|
+
/**
|
|
5106
|
+
* @internal
|
|
5107
|
+
*/
|
|
5108
|
+
static readonly __type = "node";
|
|
5109
|
+
/**
|
|
5110
|
+
* @internal
|
|
4009
5111
|
*/
|
|
4010
5112
|
readonly __type = "node";
|
|
4011
5113
|
/**
|
|
@@ -6175,6 +7277,27 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
|
|
|
6175
7277
|
}
|
|
6176
7278
|
}
|
|
6177
7279
|
|
|
7280
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/utils/types' {
|
|
7281
|
+
/**
|
|
7282
|
+
* Utility type that extracts nested values matching a specific type
|
|
7283
|
+
* @example
|
|
7284
|
+
* type A = ExtractDeep<{ a: { b: string; c: number; }; d: string; e: number; }, number>;
|
|
7285
|
+
* // { a: { c: number; } e: number; }
|
|
7286
|
+
*/
|
|
7287
|
+
export type ExtractDeep<T, U> = {
|
|
7288
|
+
[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;
|
|
7289
|
+
};
|
|
7290
|
+
/**
|
|
7291
|
+
* Makes all properties in an object (including nested ones) optional
|
|
7292
|
+
* @example
|
|
7293
|
+
* type A = DeepPartial<{ a: { b: string; c: number; }; d: string; }>;
|
|
7294
|
+
* // { a?: { b?: string; c?: number; }; d?: string; }
|
|
7295
|
+
*/
|
|
7296
|
+
export type DeepPartial<T> = T extends object ? {
|
|
7297
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
7298
|
+
} : T;
|
|
7299
|
+
}
|
|
7300
|
+
|
|
6178
7301
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/types' {
|
|
6179
7302
|
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
6180
7303
|
export type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
@@ -6188,6 +7311,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6188
7311
|
import type { CollisionRankingTier } from '@mappedin/mappedin-js/geojson/src/utils/collision-ranking-tier';
|
|
6189
7312
|
import { z } from 'zod';
|
|
6190
7313
|
import { type PackedBBoxes } from '@mappedin/mappedin-js/geojson/src/systems/collisions/system';
|
|
7314
|
+
import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
6191
7315
|
/**
|
|
6192
7316
|
* State reprsenting a Marker
|
|
6193
7317
|
*/
|
|
@@ -6220,32 +7344,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6220
7344
|
* Pointer to the HTML element of the marker in the DOM tree
|
|
6221
7345
|
*/
|
|
6222
7346
|
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;
|
|
7347
|
+
/**
|
|
7348
|
+
* The initial rank of the marker, which can be used to reset the rank of the marker to its initial value.
|
|
7349
|
+
*/
|
|
7350
|
+
initialRank: CollisionRankingTier | number;
|
|
7351
|
+
options: Omit<AddMarkerOptions, 'id'> & {
|
|
7352
|
+
lowPriorityPin: LowPriorityPinConfig;
|
|
6249
7353
|
};
|
|
6250
7354
|
/**
|
|
6251
7355
|
* 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 +7360,29 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6256
7360
|
*/
|
|
6257
7361
|
dynamicResize: boolean;
|
|
6258
7362
|
};
|
|
7363
|
+
export type MarkerStateUpdate = Omit<MarkerState, 'type' | 'parent' | 'id' | 'options'> & {
|
|
7364
|
+
options?: Partial<Omit<AddMarkerOptions, 'id' | 'lowPriorityPin'>>;
|
|
7365
|
+
};
|
|
7366
|
+
/**
|
|
7367
|
+
* Configuration for the low priority pin fallback strategy
|
|
7368
|
+
*/
|
|
7369
|
+
export type LowPriorityPinConfig = {
|
|
7370
|
+
/**
|
|
7371
|
+
* Whether to enable low priority pin strategy when all anchor positions have collisions.
|
|
7372
|
+
* @default true
|
|
7373
|
+
*/
|
|
7374
|
+
enabled: boolean;
|
|
7375
|
+
/**
|
|
7376
|
+
* Size of the low priority pin in pixels.
|
|
7377
|
+
* @default 2
|
|
7378
|
+
*/
|
|
7379
|
+
size: number;
|
|
7380
|
+
/**
|
|
7381
|
+
* Color of the low priority pin.
|
|
7382
|
+
* @default '#666'
|
|
7383
|
+
*/
|
|
7384
|
+
color: string;
|
|
7385
|
+
};
|
|
6259
7386
|
export const addMarkerOptionsSchema: z.ZodObject<{
|
|
6260
7387
|
rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
|
|
6261
7388
|
interactive: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"pointer-events-auto">]>>;
|
|
@@ -6263,6 +7390,19 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6263
7390
|
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
7391
|
dynamicResize: z.ZodOptional<z.ZodBoolean>;
|
|
6265
7392
|
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
7393
|
+
lowPriorityPin: z.ZodOptional<z.ZodObject<{
|
|
7394
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
7395
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
7396
|
+
color: z.ZodOptional<z.ZodString>;
|
|
7397
|
+
}, "strip", z.ZodTypeAny, {
|
|
7398
|
+
size?: number | undefined;
|
|
7399
|
+
color?: string | undefined;
|
|
7400
|
+
enabled?: boolean | undefined;
|
|
7401
|
+
}, {
|
|
7402
|
+
size?: number | undefined;
|
|
7403
|
+
color?: string | undefined;
|
|
7404
|
+
enabled?: boolean | undefined;
|
|
7405
|
+
}>>;
|
|
6266
7406
|
}, "strip", z.ZodTypeAny, {
|
|
6267
7407
|
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
7408
|
id?: string | undefined;
|
|
@@ -6270,6 +7410,11 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6270
7410
|
dynamicResize?: boolean | undefined;
|
|
6271
7411
|
zIndex?: number | undefined;
|
|
6272
7412
|
rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
|
|
7413
|
+
lowPriorityPin?: {
|
|
7414
|
+
size?: number | undefined;
|
|
7415
|
+
color?: string | undefined;
|
|
7416
|
+
enabled?: boolean | undefined;
|
|
7417
|
+
} | undefined;
|
|
6273
7418
|
}, {
|
|
6274
7419
|
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
7420
|
id?: string | undefined;
|
|
@@ -6277,9 +7422,15 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6277
7422
|
dynamicResize?: boolean | undefined;
|
|
6278
7423
|
zIndex?: number | undefined;
|
|
6279
7424
|
rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
|
|
7425
|
+
lowPriorityPin?: {
|
|
7426
|
+
size?: number | undefined;
|
|
7427
|
+
color?: string | undefined;
|
|
7428
|
+
enabled?: boolean | undefined;
|
|
7429
|
+
} | undefined;
|
|
6280
7430
|
}>;
|
|
6281
7431
|
export function validateMarker(coordinate: Position, contentHTML: string, options: AddMarkerOptions): void;
|
|
6282
7432
|
export type MarkerAnchor = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
7433
|
+
type InternalMarkerAnchor = MarkerAnchor | 'low-priority-pin';
|
|
6283
7434
|
/**
|
|
6284
7435
|
* Options for creating a new Marker
|
|
6285
7436
|
*/
|
|
@@ -6322,6 +7473,16 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6322
7473
|
* The vertical position of the marker relative to the floor.
|
|
6323
7474
|
*/
|
|
6324
7475
|
verticalOffset?: number;
|
|
7476
|
+
/**
|
|
7477
|
+
* The entity to attach the marker to.
|
|
7478
|
+
*/
|
|
7479
|
+
attachTo?: EntityId<GeometryState> | string | number | null;
|
|
7480
|
+
/**
|
|
7481
|
+
* Configuration for the low priority pin fallback strategy.
|
|
7482
|
+
* When enabled, shows a smaller pin version of the marker when all anchor positions have collisions.
|
|
7483
|
+
* @default { enabled: true, size: 2, color: '#666' }
|
|
7484
|
+
*/
|
|
7485
|
+
lowPriorityPin?: Partial<LowPriorityPinConfig>;
|
|
6325
7486
|
};
|
|
6326
7487
|
export class MarkerComponent {
|
|
6327
7488
|
id: string | number;
|
|
@@ -6329,9 +7490,11 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6329
7490
|
static testId: number;
|
|
6330
7491
|
rank: number;
|
|
6331
7492
|
initialRank: number;
|
|
6332
|
-
activeAnchor:
|
|
7493
|
+
activeAnchor: InternalMarkerAnchor;
|
|
6333
7494
|
pointerEvents: 'auto' | 'none';
|
|
6334
|
-
options: Required<Omit<AddMarkerOptions, 'zIndex'
|
|
7495
|
+
options: Required<Omit<AddMarkerOptions, 'zIndex' | 'attachTo'> & {
|
|
7496
|
+
lowPriorityPin: Required<LowPriorityPinConfig>;
|
|
7497
|
+
}> & {
|
|
6335
7498
|
zIndex?: number;
|
|
6336
7499
|
};
|
|
6337
7500
|
projection: Vector2;
|
|
@@ -6350,8 +7513,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6350
7513
|
w: number;
|
|
6351
7514
|
h: number;
|
|
6352
7515
|
};
|
|
6353
|
-
|
|
6354
|
-
|
|
7516
|
+
markerContainer: Entity2DHTMLDivElement;
|
|
7517
|
+
containerEl: HTMLElement;
|
|
7518
|
+
contentEl: HTMLElement | null;
|
|
6355
7519
|
contentHtml: string;
|
|
6356
7520
|
style: {
|
|
6357
7521
|
top: string;
|
|
@@ -6359,7 +7523,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6359
7523
|
};
|
|
6360
7524
|
dirty: boolean;
|
|
6361
7525
|
/** Flag used in 2d-projection system to determine if the parent has changed */
|
|
6362
|
-
|
|
7526
|
+
attachedDirty: boolean;
|
|
6363
7527
|
collisionDirty: boolean;
|
|
6364
7528
|
visibilityNeedsUpdate: 'show' | 'hide' | false;
|
|
6365
7529
|
constructor(contentHtml: string, options?: AddMarkerOptions);
|
|
@@ -6368,7 +7532,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6368
7532
|
currentStrategyIndex: number;
|
|
6369
7533
|
onStrategySelected: (strategyIndex: number, force?: boolean) => void;
|
|
6370
7534
|
get strategies(): {
|
|
6371
|
-
name:
|
|
7535
|
+
name: InternalMarkerAnchor;
|
|
6372
7536
|
getBoundingBox: () => number[];
|
|
6373
7537
|
}[];
|
|
6374
7538
|
toPackedMessage(isPanning?: boolean): {
|
|
@@ -6380,8 +7544,13 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
6380
7544
|
lockedToStrategyIndex: number;
|
|
6381
7545
|
shouldCollideWithScreenEdges: boolean;
|
|
6382
7546
|
};
|
|
7547
|
+
/**
|
|
7548
|
+
* Get the index of the low priority pin strategy
|
|
7549
|
+
*/
|
|
7550
|
+
get lowPriorityPinStrategyIndex(): number;
|
|
6383
7551
|
destroy(): void;
|
|
6384
7552
|
}
|
|
7553
|
+
export {};
|
|
6385
7554
|
}
|
|
6386
7555
|
|
|
6387
7556
|
declare module '@mappedin/mappedin-js/geojson/src/components/path' {
|
|
@@ -6989,6 +8158,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
|
|
|
6989
8158
|
* The vertical position of the label relative to the floor.
|
|
6990
8159
|
*/
|
|
6991
8160
|
verticalOffset?: number;
|
|
8161
|
+
/**
|
|
8162
|
+
* The entity to attach the label to.
|
|
8163
|
+
*/
|
|
8164
|
+
attachTo?: EntityId<GeometryState> | string | null;
|
|
6992
8165
|
};
|
|
6993
8166
|
type TStyle = {
|
|
6994
8167
|
top?: number;
|
|
@@ -7131,7 +8304,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
|
|
|
7131
8304
|
totalMarkerSize: number;
|
|
7132
8305
|
dirty: boolean;
|
|
7133
8306
|
/** Flag used in 2d-projection system to determine if the parent has changed */
|
|
7134
|
-
|
|
8307
|
+
attachedDirty: boolean;
|
|
7135
8308
|
collisionDirty: boolean;
|
|
7136
8309
|
lastTextAlign: any;
|
|
7137
8310
|
imageHash?: number;
|
|
@@ -7176,9 +8349,11 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/group-container' {
|
|
|
7176
8349
|
import type { BatchedText } from '@mappedin/mappedin-js/geojson/src/services/text3d/text3d';
|
|
7177
8350
|
import type { EntityTypes } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
7178
8351
|
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
8352
|
+
import type { FocusableComponent } from '@mappedin/mappedin-js/geojson/src/components/focusable';
|
|
7179
8353
|
export enum GroupContainerComponents {
|
|
7180
8354
|
Stack = 0,
|
|
7181
|
-
Interaction = 1
|
|
8355
|
+
Interaction = 1,
|
|
8356
|
+
Focusable = 2
|
|
7182
8357
|
}
|
|
7183
8358
|
/**
|
|
7184
8359
|
* State representing a Group Container, which is a container for other Group Containers, Geometry Groups, Labels, Markers and Paths.
|
|
@@ -7219,7 +8394,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/group-container' {
|
|
|
7219
8394
|
/** The effective opacity of the entity after all parent containers have been considered. */
|
|
7220
8395
|
computedOpacity: number;
|
|
7221
8396
|
};
|
|
7222
|
-
components: [StackComponent?, InteractionComponent?];
|
|
8397
|
+
components: [StackComponent?, InteractionComponent?, FocusableComponent?];
|
|
7223
8398
|
constructor(id: string);
|
|
7224
8399
|
addOccluderFeature(feature: Feature<Polygon | MultiPolygon, any>, occluderId: number): void;
|
|
7225
8400
|
addEntity(entityGroupOrContainer: GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | Geometry3DTypes): void;
|
|
@@ -7238,6 +8413,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry-group' {
|
|
|
7238
8413
|
import { type GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
7239
8414
|
import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
|
|
7240
8415
|
import { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
|
|
8416
|
+
import type { MaterialSide } from '@mappedin/mappedin-js/geojson/src/components/styles';
|
|
7241
8417
|
export enum GeometryGroupComponents {
|
|
7242
8418
|
GeometryGroupStyle = 0
|
|
7243
8419
|
}
|
|
@@ -7309,6 +8485,10 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry-group' {
|
|
|
7309
8485
|
* height of the geometry group
|
|
7310
8486
|
*/
|
|
7311
8487
|
height?: number;
|
|
8488
|
+
/**
|
|
8489
|
+
* Material side of the geometry group
|
|
8490
|
+
*/
|
|
8491
|
+
side?: MaterialSide;
|
|
7312
8492
|
};
|
|
7313
8493
|
export type ChildUpdatable<T> = T extends LineStyle ? Partial<Pick<LineStyle, 'color' | 'opacity' | 'visible'>> : Partial<Pick<PaintStyle, 'color' | 'opacity' | 'visible'>>;
|
|
7314
8494
|
export class GeometryGroupObject3D extends Object3D {
|
|
@@ -7321,7 +8501,6 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry-group' {
|
|
|
7321
8501
|
modelURL?: string;
|
|
7322
8502
|
opacity: number;
|
|
7323
8503
|
dirty: boolean;
|
|
7324
|
-
outlineDirty: boolean;
|
|
7325
8504
|
shadingDirty: boolean;
|
|
7326
8505
|
};
|
|
7327
8506
|
setVisible(visible: boolean): void;
|
|
@@ -7416,6 +8595,7 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
7416
8595
|
showImage?: boolean;
|
|
7417
8596
|
flipImageToFaceCamera?: boolean;
|
|
7418
8597
|
side?: MaterialSide;
|
|
8598
|
+
renderOrder?: number;
|
|
7419
8599
|
};
|
|
7420
8600
|
export type Shading = {
|
|
7421
8601
|
start?: number;
|
|
@@ -7435,6 +8615,7 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
7435
8615
|
shading?: Shading;
|
|
7436
8616
|
outline?: boolean;
|
|
7437
8617
|
side?: MaterialSide;
|
|
8618
|
+
renderOrder?: number;
|
|
7438
8619
|
};
|
|
7439
8620
|
export type Layer = {
|
|
7440
8621
|
id: string;
|
|
@@ -7728,7 +8909,7 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
7728
8909
|
}
|
|
7729
8910
|
|
|
7730
8911
|
declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
7731
|
-
import type { Texture, BufferGeometry,
|
|
8912
|
+
import type { Texture, BufferGeometry, Mesh } from 'three';
|
|
7732
8913
|
import { BatchedMesh, Color, Vector3 } from 'three';
|
|
7733
8914
|
import type { BatchedStandardMaterial } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material';
|
|
7734
8915
|
import type { EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
|
|
@@ -7850,7 +9031,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
|
7850
9031
|
#private;
|
|
7851
9032
|
mesh?: EntityBatchedMesh;
|
|
7852
9033
|
focusMesh?: Mesh;
|
|
7853
|
-
outline?: LineSegments;
|
|
7854
9034
|
imageMesh?: Mesh;
|
|
7855
9035
|
/**
|
|
7856
9036
|
* holds a pointer to space label text if the polygon has label active.
|
|
@@ -8272,7 +9452,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
8272
9452
|
import { Renderer } from '@mappedin/mappedin-js/geojson/src/services/renderer';
|
|
8273
9453
|
import { CollisionSystem } from '@mappedin/mappedin-js/geojson/src/systems/collisions/system';
|
|
8274
9454
|
import { InteractionSystem } from '@mappedin/mappedin-js/geojson/src/systems/interactions';
|
|
8275
|
-
import type { AddMarkerOptions, MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
9455
|
+
import type { AddMarkerOptions, MarkerState, MarkerStateUpdate } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
8276
9456
|
import type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
|
|
8277
9457
|
import { ExporterSystem } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
|
|
8278
9458
|
import type { AddLabelOptions, LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
@@ -8396,6 +9576,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
8396
9576
|
visible?: boolean;
|
|
8397
9577
|
altitude?: number;
|
|
8398
9578
|
interactive?: boolean;
|
|
9579
|
+
focusable?: boolean;
|
|
8399
9580
|
}, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GroupContainerState>;
|
|
8400
9581
|
addStackContainer(id: string, style?: {
|
|
8401
9582
|
visible?: true;
|
|
@@ -8508,7 +9689,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
8508
9689
|
*/
|
|
8509
9690
|
setState(object: Partial<Omit<MapViewState, 'type'>>): void;
|
|
8510
9691
|
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<
|
|
9692
|
+
setState<T extends EntityId<MarkerState>>(object: T | T['id'], state: Partial<MarkerStateUpdate>): void;
|
|
8512
9693
|
setState<T extends EntityId<GeometryGroupState>>(object: T | T['id'], state: Partial<GeometryGroupState>): void;
|
|
8513
9694
|
setState<T extends EntityId<GroupContainerState>>(object: T | T['id'], state: Partial<GroupContainerState>): void;
|
|
8514
9695
|
setState<T extends EntityId<GeometryState>>(object: T | T['id'], state: Partial<GeometryState>): void;
|
|
@@ -9323,8 +10504,8 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
|
|
|
9323
10504
|
export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
|
|
9324
10505
|
export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
|
|
9325
10506
|
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;
|
|
10507
|
+
export function updateOutline(entity: All3DTypes, state: RendererState, update?: boolean): boolean;
|
|
10508
|
+
export function updateFocusable(entity: Geometry3D | GroupContainerObject3D, update?: boolean): boolean;
|
|
9328
10509
|
export function updateIndividualGeometryRenderOrder(entity: Geometry3D, update?: number): boolean;
|
|
9329
10510
|
export function handlePathUpdate(geometry: Geometry3DTypes, state: RendererState, update: PathUpdateState): void;
|
|
9330
10511
|
export function pickPathOptions(update: PathUpdateState): Partial<PathUpdateState>;
|
|
@@ -9453,19 +10634,85 @@ declare module '@mappedin/mappedin-js/geojson/src/utils/constants' {
|
|
|
9453
10634
|
|
|
9454
10635
|
declare module '@mappedin/mappedin-js/geojson/src/utils/debug' {
|
|
9455
10636
|
import type Core from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
10637
|
+
/**
|
|
10638
|
+
* Default debug state configuration with all debug features disabled by default.
|
|
10639
|
+
*/
|
|
9456
10640
|
const DEFAULT_DEBUG_STATE: {
|
|
9457
|
-
|
|
9458
|
-
|
|
10641
|
+
/** Shows the text area mesh used for polygon label rendering */
|
|
10642
|
+
showPolygonLabelTextAreaMesh: boolean;
|
|
10643
|
+
/** Enables the basic environment map for lighting and reflections */
|
|
10644
|
+
showEnvMap: boolean;
|
|
10645
|
+
/** Shows collision detection boxes for debugging spatial interactions */
|
|
10646
|
+
showCollisionBoxes: boolean;
|
|
9459
10647
|
};
|
|
10648
|
+
/**
|
|
10649
|
+
* Type definition for the debug state configuration.
|
|
10650
|
+
* Represents all available debug options that can be toggled.
|
|
10651
|
+
*/
|
|
9460
10652
|
export type DebugState = typeof DEFAULT_DEBUG_STATE;
|
|
10653
|
+
/**
|
|
10654
|
+
* Debug utility class for toggling various debug visualization features.
|
|
10655
|
+
*
|
|
10656
|
+
* This class provides a centralized way to control debug features like:
|
|
10657
|
+
* - Text area mesh visualization for polygon labels
|
|
10658
|
+
* - Environment map rendering
|
|
10659
|
+
* - Collision box visualization
|
|
10660
|
+
*
|
|
10661
|
+
* @example
|
|
10662
|
+
* ```typescript
|
|
10663
|
+
* const debug = new Debug(core);
|
|
10664
|
+
*
|
|
10665
|
+
* // Enable collision boxes and environment map
|
|
10666
|
+
* debug.update({
|
|
10667
|
+
* showCollisionBoxes: true,
|
|
10668
|
+
* showEnvMap: true
|
|
10669
|
+
* });
|
|
10670
|
+
*
|
|
10671
|
+
* // Disable all debug features
|
|
10672
|
+
* debug.update({
|
|
10673
|
+
* showCollisionBoxes: false,
|
|
10674
|
+
* showEnvMap: false,
|
|
10675
|
+
* showPolygonLabelTextAreaMesh: false
|
|
10676
|
+
* });
|
|
10677
|
+
* ```
|
|
10678
|
+
*/
|
|
9461
10679
|
export class Debug {
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
10680
|
+
/** Current debug state configuration */
|
|
10681
|
+
state: {
|
|
10682
|
+
/** Shows the text area mesh used for polygon label rendering */
|
|
10683
|
+
showPolygonLabelTextAreaMesh: boolean;
|
|
10684
|
+
/** Enables the basic environment map for lighting and reflections */
|
|
10685
|
+
showEnvMap: boolean;
|
|
10686
|
+
/** Shows collision detection boxes for debugging spatial interactions */
|
|
10687
|
+
showCollisionBoxes: boolean;
|
|
10688
|
+
};
|
|
10689
|
+
/** Reference to the core renderer instance */
|
|
10690
|
+
core: Core;
|
|
10691
|
+
/**
|
|
10692
|
+
* Creates a new Debug instance.
|
|
10693
|
+
*
|
|
10694
|
+
* @param core - The core renderer instance to control debug features for
|
|
10695
|
+
*/
|
|
10696
|
+
constructor(core: Core);
|
|
10697
|
+
/**
|
|
10698
|
+
* Updates the debug state with new configuration options.
|
|
10699
|
+
* Only changed values will trigger updates to the corresponding systems.
|
|
10700
|
+
*
|
|
10701
|
+
* @param updateState - Partial debug state with the options to update
|
|
10702
|
+
*
|
|
10703
|
+
* @example
|
|
10704
|
+
* ```typescript
|
|
10705
|
+
* // Enable only collision boxes
|
|
10706
|
+
* debug.update({ showCollisionBoxes: true });
|
|
10707
|
+
*
|
|
10708
|
+
* // Enable multiple features at once
|
|
10709
|
+
* debug.update({
|
|
10710
|
+
* showEnvMap: true,
|
|
10711
|
+
* showPolygonLabelTextAreaMesh: true
|
|
10712
|
+
* });
|
|
10713
|
+
* ```
|
|
10714
|
+
*/
|
|
10715
|
+
update(updateState: Partial<DebugState>): void;
|
|
9469
10716
|
}
|
|
9470
10717
|
export {};
|
|
9471
10718
|
}
|
|
@@ -9585,9 +10832,13 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/text3d/system' {
|
|
|
9585
10832
|
showTextAreaMesh(): void;
|
|
9586
10833
|
hideTextAreaMesh(): void;
|
|
9587
10834
|
}
|
|
10835
|
+
export function configureWorker(useWorker: boolean): void;
|
|
9588
10836
|
/**
|
|
9589
10837
|
* Preload fonts and optionally pre-generate the SDF textures for particular glyphs up front.
|
|
9590
10838
|
* This is to avoid ondemand font generation can take long.
|
|
10839
|
+
*
|
|
10840
|
+
* If working in CSP-restricted environment, call `disableText3DWorker` before to avoid errors
|
|
10841
|
+
*
|
|
9591
10842
|
* @param fontUrl - url of the font file served.
|
|
9592
10843
|
* @returns A promise that resolves when the font is loaded
|
|
9593
10844
|
*
|
|
@@ -9597,150 +10848,166 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/text3d/system' {
|
|
|
9597
10848
|
export const DEFAULT_VERTICAL_OFFSET = 0.5;
|
|
9598
10849
|
}
|
|
9599
10850
|
|
|
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): {
|
|
10851
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
|
|
10852
|
+
import { QuadTree } from '@packages/internal/quad-tree';
|
|
10853
|
+
import '../../styles/collisions.scss';
|
|
10854
|
+
import type { MarkerComponent } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
10855
|
+
import type LabelComponent from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
10856
|
+
import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
|
|
10857
|
+
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
10858
|
+
import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-processor';
|
|
10859
|
+
import type { WatermarkPosition } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
|
|
10860
|
+
export type TMessageEvent = MessageEvent<{
|
|
10861
|
+
msgId: string;
|
|
10862
|
+
colliders: TSerializedColliderResponse[];
|
|
10863
|
+
debug: {
|
|
9728
10864
|
x: number;
|
|
9729
10865
|
y: number;
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
10866
|
+
w: number;
|
|
10867
|
+
h: number;
|
|
10868
|
+
}[];
|
|
10869
|
+
}>;
|
|
10870
|
+
export type TMessage = {
|
|
10871
|
+
msgId: string;
|
|
10872
|
+
totalWidth: number;
|
|
10873
|
+
totalHeight: number;
|
|
10874
|
+
watermarkWidth: number;
|
|
10875
|
+
watermarkHeight: number;
|
|
10876
|
+
watermarkPosition: WatermarkPosition;
|
|
10877
|
+
colliders: TSerializedCollider[];
|
|
10878
|
+
devicePixelRatio: number;
|
|
10879
|
+
};
|
|
10880
|
+
type TCollisionSystemEvent = {
|
|
10881
|
+
'visibility-changed': undefined;
|
|
10882
|
+
};
|
|
10883
|
+
export type PackedBBox = [x: number, y: number, w: number, h: number, index: number];
|
|
10884
|
+
export type PackedBBoxes = PackedBBox[];
|
|
10885
|
+
export type PackedCollider = [
|
|
10886
|
+
bboxes: PackedBBoxes,
|
|
10887
|
+
enabled: 0 | 1,
|
|
10888
|
+
alwaysVisible: 0 | 1,
|
|
10889
|
+
x: number,
|
|
10890
|
+
y: number,
|
|
10891
|
+
shouldCollideWithScreenEdges?: 0 | 1,
|
|
10892
|
+
onlyExposeStrategyIndex?: number
|
|
10893
|
+
];
|
|
10894
|
+
export type PackedMessage = [
|
|
10895
|
+
colliders: PackedCollider[],
|
|
10896
|
+
devicePixelRatio: number,
|
|
10897
|
+
totalHeight: number,
|
|
10898
|
+
totalWidth: number,
|
|
10899
|
+
watermarkWidth: number,
|
|
10900
|
+
watermarkHeight: number,
|
|
10901
|
+
watermarkPosition: WatermarkPosition
|
|
10902
|
+
];
|
|
10903
|
+
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
10904
|
+
collidersDirty: boolean;
|
|
10905
|
+
packedMessage: PackedMessage;
|
|
10906
|
+
visibleCollidersQTree: QuadTree<{
|
|
10907
|
+
entityId: string | number;
|
|
10908
|
+
}>;
|
|
10909
|
+
interactiveCollidersQTree: QuadTree<{
|
|
10910
|
+
entityId: string | number;
|
|
10911
|
+
}>;
|
|
10912
|
+
coreState: RendererState;
|
|
10913
|
+
constructor(debugCanvas: HTMLCanvasElement, coreState: RendererState, worker?: Worker);
|
|
10914
|
+
postMessage: () => void;
|
|
10915
|
+
showCollisionBoxes: () => void;
|
|
10916
|
+
hideCollisionBoxes: () => void;
|
|
10917
|
+
currentMsgId: string;
|
|
10918
|
+
working: boolean;
|
|
10919
|
+
componentArray: (MarkerComponent | LabelComponent)[];
|
|
10920
|
+
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, isPanning?: boolean) => void;
|
|
10921
|
+
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
10922
|
+
/**
|
|
10923
|
+
* Resolve collisions
|
|
10924
|
+
*/
|
|
10925
|
+
resolve: (e: MessageEvent<{
|
|
10926
|
+
msgId: string;
|
|
10927
|
+
colliders: TSerializedColliderResponse[];
|
|
10928
|
+
}>) => void;
|
|
10929
|
+
drawDebug: () => void;
|
|
10930
|
+
destroy: () => void;
|
|
10931
|
+
}
|
|
10932
|
+
/**
|
|
10933
|
+
* Sets the URL for the collision system worker script.
|
|
10934
|
+
*
|
|
10935
|
+
* This function allows specifying a custom URL for the collision system's web worker,
|
|
10936
|
+
* which is particularly useful in environments with strict Content Security Policy (CSP)
|
|
10937
|
+
* that don't allow blob: URLs or inline scripts.
|
|
10938
|
+
*
|
|
10939
|
+
* When provided, the collision system will load its worker from the specified URL
|
|
10940
|
+
* instead of creating an inline worker from a blob. This enables compatibility with
|
|
10941
|
+
* environments that have restrictive CSP settings.
|
|
10942
|
+
*
|
|
10943
|
+
* @param url - The absolute URL pointing to the collision worker script.
|
|
10944
|
+
* This should be a URL where the compiled version of the worker.ts file is hosted.
|
|
10945
|
+
*
|
|
10946
|
+
* @example
|
|
10947
|
+
* ```typescript
|
|
10948
|
+
* // Set a custom URL for the collision worker
|
|
10949
|
+
* import { setWorkerUrl } from '@mappedin/core-sdk';
|
|
10950
|
+
*
|
|
10951
|
+
* // Must be called before initializing any maps
|
|
10952
|
+
* setWorkerUrl('https://cdn.example.com/workers/collision-worker.js');
|
|
10953
|
+
* ```
|
|
10954
|
+
*
|
|
10955
|
+
* @remarks
|
|
10956
|
+
* - This function must be called before any map instances are created
|
|
10957
|
+
* - The worker file must be built and hosted separately as part of your deployment process
|
|
10958
|
+
* - Ideal for applications that need to comply with strict CSP requirements
|
|
10959
|
+
*/
|
|
10960
|
+
export function setWorkerUrl(url: string): void;
|
|
10961
|
+
export {};
|
|
10962
|
+
}
|
|
10963
|
+
|
|
10964
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/exporter' {
|
|
10965
|
+
export { ExporterSystem, type GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter';
|
|
10966
|
+
}
|
|
10967
|
+
|
|
10968
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/html-controls/system' {
|
|
10969
|
+
import type { Map } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
|
|
10970
|
+
import '../../styles/html-controls.scss';
|
|
10971
|
+
/**
|
|
10972
|
+
* All possible control anchor positions.
|
|
10973
|
+
*/
|
|
10974
|
+
export const ATTRIBUTION_POSITIONS: readonly ["top-left", "top-right", "bottom-left", "bottom-right"];
|
|
10975
|
+
export type AttributionPosition = (typeof ATTRIBUTION_POSITIONS)[number];
|
|
10976
|
+
export type AttributionControlOptions = {
|
|
10977
|
+
custom?: string[];
|
|
10978
|
+
position?: AttributionPosition;
|
|
10979
|
+
feedback?: boolean;
|
|
10980
|
+
};
|
|
10981
|
+
export class HTMLControlsSystem {
|
|
10982
|
+
controlContainerEl: HTMLDivElement;
|
|
10983
|
+
controlPositions: Record<AttributionPosition, HTMLDivElement>;
|
|
10984
|
+
compact: boolean | undefined;
|
|
10985
|
+
attribContainerEl?: HTMLDetailsElement;
|
|
10986
|
+
attribInnerEl?: HTMLDivElement;
|
|
10987
|
+
attribButtonEl?: HTMLElement;
|
|
10988
|
+
feedbackLinkEl?: HTMLAnchorElement;
|
|
10989
|
+
attribHTML: string;
|
|
10990
|
+
customAttributions: string[];
|
|
10991
|
+
constructor(container: HTMLElement);
|
|
10992
|
+
addAttributionControl(options?: AttributionControlOptions): void;
|
|
10993
|
+
toggleAttribution: (e: MouseEvent) => void;
|
|
10994
|
+
destroyAttributionControl(): void;
|
|
10995
|
+
resize(canvasWidth: number): void;
|
|
9735
10996
|
/**
|
|
9736
|
-
*
|
|
10997
|
+
* This should fire when Maplibre data changes.
|
|
9737
10998
|
*/
|
|
9738
|
-
|
|
9739
|
-
clear(): void;
|
|
10999
|
+
updateData(map: Map): void;
|
|
9740
11000
|
destroy(): void;
|
|
9741
11001
|
}
|
|
9742
11002
|
}
|
|
9743
11003
|
|
|
11004
|
+
declare module '@mappedin/mappedin-js/geojson/src/components/styles' {
|
|
11005
|
+
export { StyleComponent, DEFAULT_COLOR, type MaterialSide } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
|
|
11006
|
+
export { Text3DStyleComponent, type Text3DStyle, DEFAULT_TEXT_STYLE } from '@mappedin/mappedin-js/geojson/src/components/styles/text-style';
|
|
11007
|
+
export { ModelStyleComponnet, type ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles/model-style';
|
|
11008
|
+
export { DEFAULT_ROTATION, DEFAULT_SCALE } from '@mappedin/mappedin-js/geojson/src/components/styles/constants';
|
|
11009
|
+
}
|
|
11010
|
+
|
|
9744
11011
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
9745
11012
|
import type { ParsedMVF } from '@mappedin/mvf';
|
|
9746
11013
|
import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
|
|
@@ -9752,12 +11019,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
9752
11019
|
import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
|
|
9753
11020
|
import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
9754
11021
|
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
9755
|
-
import type { Path, Shape
|
|
11022
|
+
import type { Path, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
9756
11023
|
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9757
11024
|
import { Space, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9758
11025
|
import { type GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
9759
11026
|
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
11027
|
import type { Text3DState } from '@mappedin/core-sdk/src/components/text3d';
|
|
9762
11028
|
export class GeojsonApiMapObject extends PubSub<{
|
|
9763
11029
|
'floor-change': {
|
|
@@ -9793,7 +11059,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
9793
11059
|
options: TShow3DMapOptions;
|
|
9794
11060
|
styleMap: AggregatedStyleMap;
|
|
9795
11061
|
StackedMaps: StackedMaps;
|
|
9796
|
-
DynamicFocus: DynamicFocus;
|
|
9797
11062
|
get currentFloorStack(): FloorStackObject;
|
|
9798
11063
|
setFloorStack(floorStackId: string, reason?: TFloorChangeReason): void;
|
|
9799
11064
|
get currentFloor(): FloorObject;
|
|
@@ -9816,7 +11081,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
9816
11081
|
removeAll: () => void;
|
|
9817
11082
|
};
|
|
9818
11083
|
Markers: {
|
|
9819
|
-
add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions
|
|
11084
|
+
add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions & {
|
|
11085
|
+
attachTo?: string;
|
|
11086
|
+
}) => EntityId<MarkerState>;
|
|
9820
11087
|
remove: (id: string) => void;
|
|
9821
11088
|
getContentEl: (id: string) => HTMLElement | undefined;
|
|
9822
11089
|
removeAll: () => void;
|
|
@@ -9843,14 +11110,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
9843
11110
|
labelOptions?: TAddLabelOptions;
|
|
9844
11111
|
}) => void;
|
|
9845
11112
|
add: (coordinate: Coordinate, text: string, opts?: AddLabelOptions & {
|
|
9846
|
-
|
|
9847
|
-
parentId?: string;
|
|
11113
|
+
attachTo?: string;
|
|
9848
11114
|
verticalOffset?: number;
|
|
9849
11115
|
}) => {
|
|
9850
11116
|
id: string | number;
|
|
9851
11117
|
};
|
|
9852
|
-
remove: ({
|
|
9853
|
-
label: Label;
|
|
11118
|
+
remove: ({ entityId }: {
|
|
9854
11119
|
entityId: string;
|
|
9855
11120
|
}) => void;
|
|
9856
11121
|
removeAll: () => void;
|
|
@@ -10307,7 +11572,44 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
|
|
|
10307
11572
|
* @param options Optional settings for the camera animation.
|
|
10308
11573
|
*/
|
|
10309
11574
|
animateElevation(elevation: number, options?: TCameraAnimationOptions): Promise<void>;
|
|
11575
|
+
/**
|
|
11576
|
+
* @internal
|
|
11577
|
+
* @experimental
|
|
11578
|
+
* Force an update of the facades in view.
|
|
11579
|
+
*/
|
|
11580
|
+
updateFacadesInView(): void;
|
|
11581
|
+
}
|
|
11582
|
+
}
|
|
11583
|
+
|
|
11584
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter' {
|
|
11585
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
11586
|
+
import type { GLTFExportOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
11587
|
+
/**
|
|
11588
|
+
* API to export the scene.
|
|
11589
|
+
*
|
|
11590
|
+
* @hidden
|
|
11591
|
+
*/
|
|
11592
|
+
export class Exporter {
|
|
11593
|
+
#private;
|
|
11594
|
+
/**
|
|
11595
|
+
* @internal
|
|
11596
|
+
*/
|
|
11597
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
11598
|
+
/**
|
|
11599
|
+
* @internal
|
|
11600
|
+
*/
|
|
11601
|
+
constructor({ currentMapGetter }: {
|
|
11602
|
+
currentMapGetter: CurrentMapGetter;
|
|
11603
|
+
});
|
|
11604
|
+
/**
|
|
11605
|
+
* Exports the current scene as a GLTF file.
|
|
11606
|
+
*
|
|
11607
|
+
* @hidden
|
|
11608
|
+
*/
|
|
11609
|
+
getCurrentSceneGLTF(userOptions: GLTFExportOptions): Promise<Blob>;
|
|
10310
11610
|
}
|
|
11611
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11612
|
+
export {};
|
|
10311
11613
|
}
|
|
10312
11614
|
|
|
10313
11615
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels' {
|
|
@@ -10472,6 +11774,80 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
|
|
|
10472
11774
|
export {};
|
|
10473
11775
|
}
|
|
10474
11776
|
|
|
11777
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images' {
|
|
11778
|
+
import type { IAnchorable, TAddImageOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
11779
|
+
import { Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
11780
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
11781
|
+
/**
|
|
11782
|
+
* 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.
|
|
11783
|
+
* 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.
|
|
11784
|
+
*
|
|
11785
|
+
* This class is accessed using {@link MapView.Images}.
|
|
11786
|
+
*
|
|
11787
|
+
* 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.
|
|
11788
|
+
* 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.
|
|
11789
|
+
*
|
|
11790
|
+
* The following calculations illustrates how much memory is used for a given image:
|
|
11791
|
+
*
|
|
11792
|
+
* Formula: `width * height * 4 bytes/pixel = memory used`
|
|
11793
|
+
*
|
|
11794
|
+
* 512 x 512 Pixel Image: `512px * 512px * 4 bytes/pixel = 1MB`
|
|
11795
|
+
*
|
|
11796
|
+
* 4096 x 4096 Pixel Image: `4096px * 4096px * 4 bytes/pixel = 64MB`
|
|
11797
|
+
*
|
|
11798
|
+
* Refer to the [Images Guide](https://developer.mappedin.com/web-sdk/images-textures) for more information and interactive examples.
|
|
11799
|
+
*/
|
|
11800
|
+
export class Images {
|
|
11801
|
+
#private;
|
|
11802
|
+
/**
|
|
11803
|
+
* @internal
|
|
11804
|
+
*/
|
|
11805
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
11806
|
+
/**
|
|
11807
|
+
* @internal
|
|
11808
|
+
*/
|
|
11809
|
+
constructor({ currentMapGetter }: {
|
|
11810
|
+
currentMapGetter: CurrentMapGetter;
|
|
11811
|
+
});
|
|
11812
|
+
/**
|
|
11813
|
+
* @internal
|
|
11814
|
+
*/
|
|
11815
|
+
getById(id: string): {
|
|
11816
|
+
image: Image;
|
|
11817
|
+
entityId: string;
|
|
11818
|
+
} | undefined;
|
|
11819
|
+
/**
|
|
11820
|
+
* Adds an image to the map.
|
|
11821
|
+
*
|
|
11822
|
+
* @param target The target object ({@link IAnchorable}) for the image.
|
|
11823
|
+
* @param url The URL of the image.
|
|
11824
|
+
* @param options Optional additional options for the {@link Image}.
|
|
11825
|
+
* @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
|
|
11826
|
+
* @example
|
|
11827
|
+
* // Add an interactive {@link Image} to the map with custom HTML content.
|
|
11828
|
+
* mapView.Images.add(coordinate, '<div>Image Content</div>', { interactive: true });
|
|
11829
|
+
*/
|
|
11830
|
+
add(target: IAnchorable, url: string, options: TAddImageOptions): Image;
|
|
11831
|
+
/**
|
|
11832
|
+
* Removes a image from the map.
|
|
11833
|
+
*
|
|
11834
|
+
* @param image {Image} The {@link Image} which should be removed.
|
|
11835
|
+
* @example
|
|
11836
|
+
* mapView.Images.remove(image);
|
|
11837
|
+
*/
|
|
11838
|
+
remove(image: Image): void;
|
|
11839
|
+
/**
|
|
11840
|
+
* Remove all the images from the map.
|
|
11841
|
+
*
|
|
11842
|
+
* @example
|
|
11843
|
+
* mapView.Images.removeAll();
|
|
11844
|
+
*/
|
|
11845
|
+
removeAll(): Image[];
|
|
11846
|
+
}
|
|
11847
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11848
|
+
export {};
|
|
11849
|
+
}
|
|
11850
|
+
|
|
10475
11851
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models' {
|
|
10476
11852
|
import type { TAddModelOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
10477
11853
|
import { Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
@@ -10558,59 +11934,148 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths' {
|
|
|
10558
11934
|
*
|
|
10559
11935
|
* Paths is accessed using {@link MapView.Paths}.
|
|
10560
11936
|
*
|
|
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.
|
|
11937
|
+
* 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.
|
|
11938
|
+
* 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.
|
|
11939
|
+
* 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.
|
|
11940
|
+
*
|
|
11941
|
+
* 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.
|
|
11942
|
+
*
|
|
11943
|
+
* 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.
|
|
11944
|
+
*/
|
|
11945
|
+
export class Paths {
|
|
11946
|
+
#private;
|
|
11947
|
+
/**
|
|
11948
|
+
* @internal
|
|
11949
|
+
*/
|
|
11950
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
11951
|
+
/**
|
|
11952
|
+
* @internal
|
|
11953
|
+
*/
|
|
11954
|
+
constructor({ currentMapGetter }: {
|
|
11955
|
+
currentMapGetter: CurrentMapGetter;
|
|
11956
|
+
});
|
|
11957
|
+
/**
|
|
11958
|
+
* @internal
|
|
11959
|
+
*/
|
|
11960
|
+
getById(id: string): {
|
|
11961
|
+
path: Path;
|
|
11962
|
+
entityIds: string[];
|
|
11963
|
+
} | undefined;
|
|
11964
|
+
/**
|
|
11965
|
+
* Adds a path ({@link Path}) to the map.
|
|
11966
|
+
* @param coordinate Array of coordinates ({@link Coordinate}) to form the path.
|
|
11967
|
+
* @param options Optional additional option
|
|
11968
|
+
* @example
|
|
11969
|
+
* // Add a red path to the map
|
|
11970
|
+
* mapView.Paths.add(coordinate, { color: '#ff0000' });
|
|
11971
|
+
*/
|
|
11972
|
+
add(coordinate: Coordinate[], options?: TAddPathOptions): Path;
|
|
11973
|
+
/**
|
|
11974
|
+
* Removes a specific path ({@link Path}) from the map.
|
|
11975
|
+
* @param path The path to be removed.
|
|
11976
|
+
* @example
|
|
11977
|
+
* mapView.Paths.remove(path);
|
|
11978
|
+
*/
|
|
11979
|
+
remove(path: Path): void;
|
|
11980
|
+
/**
|
|
11981
|
+
* Removes all paths ({@link Path}) from the map.
|
|
11982
|
+
*
|
|
11983
|
+
* @example
|
|
11984
|
+
* mapView.Paths.removeAll();
|
|
11985
|
+
*/
|
|
11986
|
+
removeAll(): Path[];
|
|
11987
|
+
}
|
|
11988
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11989
|
+
export {};
|
|
11990
|
+
}
|
|
11991
|
+
|
|
11992
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style' {
|
|
11993
|
+
import type { StyleCollection } from '@mappedin/mvf';
|
|
11994
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
11995
|
+
export class Style {
|
|
11996
|
+
#private;
|
|
11997
|
+
/**
|
|
11998
|
+
* @internal
|
|
11999
|
+
*/
|
|
12000
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
12001
|
+
/**
|
|
12002
|
+
* @internal
|
|
12003
|
+
*/
|
|
12004
|
+
constructor({ currentMapGetter }: {
|
|
12005
|
+
currentMapGetter: CurrentMapGetter;
|
|
12006
|
+
});
|
|
12007
|
+
setFromStyleCollection(styleCollection: StyleCollection): void;
|
|
12008
|
+
}
|
|
12009
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
12010
|
+
export {};
|
|
12011
|
+
}
|
|
12012
|
+
|
|
12013
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor' {
|
|
12014
|
+
import { type RendererCore } from '@mappedin/core-sdk';
|
|
12015
|
+
import type { BBox } from 'geojson';
|
|
12016
|
+
export type HiddenOutdoorGeometry = [
|
|
12017
|
+
BBox,
|
|
12018
|
+
polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[],
|
|
12019
|
+
layers: string[]
|
|
12020
|
+
];
|
|
12021
|
+
/**
|
|
12022
|
+
* 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.
|
|
12023
|
+
*
|
|
12024
|
+
* The outdoor map is accessed using {@link MapView.Outdoor.map}, which returns a maplibregl.Map object.
|
|
12025
|
+
* [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.
|
|
12026
|
+
*
|
|
12027
|
+
* 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.
|
|
12028
|
+
* Developers can use most capabilities of MapLibre GL JS with key exceptions being Interactivity and Camera, which are not available.
|
|
10564
12029
|
*
|
|
10565
|
-
*
|
|
12030
|
+
* 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
12031
|
*
|
|
10567
|
-
* Refer to the [
|
|
12032
|
+
* Refer to the [Outdoor Map Guide](https://developer.mappedin.com/web-sdk/outdoor-map) for more information and interactive examples.
|
|
10568
12033
|
*/
|
|
10569
|
-
export class
|
|
12034
|
+
export default class Outdoor {
|
|
10570
12035
|
#private;
|
|
10571
12036
|
/**
|
|
10572
12037
|
* @internal
|
|
10573
12038
|
*/
|
|
10574
|
-
|
|
12039
|
+
constructor(core: RendererCore, hiddenOutdoorGeometry?: HiddenOutdoorGeometry[]);
|
|
10575
12040
|
/**
|
|
10576
|
-
*
|
|
12041
|
+
* 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.
|
|
12042
|
+
* @param style {any}
|
|
10577
12043
|
*/
|
|
10578
|
-
|
|
10579
|
-
currentMapGetter: CurrentMapGetter;
|
|
10580
|
-
});
|
|
12044
|
+
setStyle(style: any): void;
|
|
10581
12045
|
/**
|
|
10582
|
-
*
|
|
12046
|
+
* Returns a Maplibre map for advanced usage.
|
|
12047
|
+
*
|
|
12048
|
+
* @returns {object} Maplibre map instance
|
|
12049
|
+
*
|
|
12050
|
+
* Limitations:
|
|
12051
|
+
* - Maplibre interaction events are not supported, use Mappedin JS interaction events.
|
|
12052
|
+
* - Maplibre markers and labels may overlap as they are not integrated with the Mappedin JS collision engine.
|
|
10583
12053
|
*/
|
|
10584
|
-
|
|
10585
|
-
path: Path;
|
|
10586
|
-
entityIds: string[];
|
|
10587
|
-
} | undefined;
|
|
12054
|
+
get map(): import("@packages/internal/outdoor-context-v4").Map | undefined;
|
|
10588
12055
|
/**
|
|
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' });
|
|
12056
|
+
* Whether the outdoorView is enabled.
|
|
10595
12057
|
*/
|
|
10596
|
-
|
|
12058
|
+
get enabled(): boolean;
|
|
10597
12059
|
/**
|
|
10598
|
-
*
|
|
10599
|
-
* @param path The path to be removed.
|
|
10600
|
-
* @example
|
|
10601
|
-
* mapView.Paths.remove(path);
|
|
12060
|
+
* Whether the outdoorView is visible.
|
|
10602
12061
|
*/
|
|
10603
|
-
|
|
12062
|
+
get visible(): boolean;
|
|
10604
12063
|
/**
|
|
10605
|
-
*
|
|
10606
|
-
*
|
|
10607
|
-
* @example
|
|
10608
|
-
* mapView.Paths.removeAll();
|
|
12064
|
+
* Show the outdoor map.
|
|
10609
12065
|
*/
|
|
10610
|
-
|
|
12066
|
+
show(): void;
|
|
12067
|
+
/**
|
|
12068
|
+
* Hide the outdoor map.
|
|
12069
|
+
* @param excludedStyleLayerIds {string[]}
|
|
12070
|
+
*/
|
|
12071
|
+
hide(excludedStyleLayerIds?: string[]): void;
|
|
12072
|
+
/**
|
|
12073
|
+
* Set outdoor view opacity.
|
|
12074
|
+
* @param targetOpacity {number | 'initial'}
|
|
12075
|
+
* @param excludedStyleLayerIds {string[]}
|
|
12076
|
+
*/
|
|
12077
|
+
setOpacity(targetOpacity: number | 'initial', excludedStyleLayerIds?: string[]): void;
|
|
10611
12078
|
}
|
|
10612
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
10613
|
-
export {};
|
|
10614
12079
|
}
|
|
10615
12080
|
|
|
10616
12081
|
declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
|
|
@@ -10708,6 +12173,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
|
|
|
10708
12173
|
*/
|
|
10709
12174
|
animateArrowsOnPath?: boolean;
|
|
10710
12175
|
};
|
|
12176
|
+
/**
|
|
12177
|
+
* Controls whether the path drawing is animated across floors.
|
|
12178
|
+
* @default true
|
|
12179
|
+
*/
|
|
12180
|
+
animatePathDrawing?: boolean;
|
|
10711
12181
|
/**
|
|
10712
12182
|
* Options for the path.
|
|
10713
12183
|
*/
|
|
@@ -10830,242 +12300,44 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
|
|
|
10830
12300
|
*/
|
|
10831
12301
|
get activePath(): Path | undefined;
|
|
10832
12302
|
/**
|
|
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
|
|
12303
|
+
* The current list of floor stacks along the navigation paths.
|
|
11018
12304
|
*/
|
|
11019
|
-
get
|
|
12305
|
+
get floorStacks(): FloorStack[];
|
|
11020
12306
|
/**
|
|
11021
|
-
*
|
|
12307
|
+
* The current list of floors along the navigation paths.
|
|
11022
12308
|
*/
|
|
11023
|
-
|
|
11024
|
-
currentMapGetter: CurrentMapGetter;
|
|
11025
|
-
});
|
|
12309
|
+
get floors(): Floor[];
|
|
11026
12310
|
/**
|
|
11027
|
-
*
|
|
12311
|
+
* Sets the active path by index.
|
|
11028
12312
|
*/
|
|
11029
|
-
|
|
11030
|
-
image: Image;
|
|
11031
|
-
entityId: string;
|
|
11032
|
-
} | undefined;
|
|
12313
|
+
setActivePathByIndex(target: number): void;
|
|
11033
12314
|
/**
|
|
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 });
|
|
12315
|
+
* Sets the active path.
|
|
11043
12316
|
*/
|
|
11044
|
-
|
|
12317
|
+
setActivePath(target: Path): void;
|
|
11045
12318
|
/**
|
|
11046
|
-
*
|
|
11047
|
-
*
|
|
11048
|
-
* @param image {Image} The {@link Image} which should be removed.
|
|
11049
|
-
* @example
|
|
11050
|
-
* mapView.Images.remove(image);
|
|
12319
|
+
* Sets the active path by directions.
|
|
11051
12320
|
*/
|
|
11052
|
-
|
|
12321
|
+
setActivePathByDirections(target: Directions): void;
|
|
11053
12322
|
/**
|
|
11054
|
-
*
|
|
11055
|
-
*
|
|
11056
|
-
* @example
|
|
11057
|
-
* mapView.Images.removeAll();
|
|
12323
|
+
* @internal
|
|
11058
12324
|
*/
|
|
11059
|
-
|
|
12325
|
+
drawSync(directions: Directions | Directions[], options?: TNavigationOptions): void;
|
|
12326
|
+
/**
|
|
12327
|
+
* Draws the specified directions on the map.
|
|
12328
|
+
* @param directions The directions to be drawn.
|
|
12329
|
+
* @param options Optional additional options for the navigation.
|
|
12330
|
+
*/
|
|
12331
|
+
draw(directions: Directions | Directions[], options?: TNavigationOptions): Promise<unknown>;
|
|
12332
|
+
/**
|
|
12333
|
+
* Clears any drawn navigation paths or directions from the map.
|
|
12334
|
+
*/
|
|
12335
|
+
clear(): void;
|
|
11060
12336
|
}
|
|
11061
12337
|
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11062
12338
|
export {};
|
|
11063
12339
|
}
|
|
11064
12340
|
|
|
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
12341
|
declare module '@mappedin/mappedin-js/mappedin-js/src/search/internal' {
|
|
11070
12342
|
import type { SearchResult as MiniSearchResult, Suggestion, MatchInfo } from 'minisearch';
|
|
11071
12343
|
import type { Places } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
@@ -11645,6 +12917,60 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
|
|
|
11645
12917
|
export {};
|
|
11646
12918
|
}
|
|
11647
12919
|
|
|
12920
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/tokens/access-token' {
|
|
12921
|
+
import { type TGetMapDataWithCredentialsOptions } from '@mappedin/mappedin-js/packages/mvf-utils/mvf-utils';
|
|
12922
|
+
export const ACCESS_TOKEN_REFRESH_BUFFER_MINUTES = 60;
|
|
12923
|
+
export const ACCESS_TOKEN_REFRESH_BUFFER_MS: number;
|
|
12924
|
+
export const ACCESS_TOKEN_STORAGE_KEY = "accessTokens";
|
|
12925
|
+
type AccessToken = {
|
|
12926
|
+
accessToken: string;
|
|
12927
|
+
expiresTimestamp: number;
|
|
12928
|
+
};
|
|
12929
|
+
type TGetAccessTokenOptions = Pick<TGetMapDataWithCredentialsOptions, 'baseUri' | 'baseAuthUri' | 'key' | 'secret'>;
|
|
12930
|
+
/**
|
|
12931
|
+
* Get an access token from storage or fetch it from the API using API keys.
|
|
12932
|
+
*/
|
|
12933
|
+
export function getAccessToken(userOptions: TGetAccessTokenOptions, enterprise?: boolean): Promise<AccessToken>;
|
|
12934
|
+
/**
|
|
12935
|
+
* Fetch an access token for enterprise.
|
|
12936
|
+
*/
|
|
12937
|
+
export function fetchAccessTokenEnterprise(userOptions: TGetAccessTokenOptions, currentTimestamp: number): Promise<AccessToken>;
|
|
12938
|
+
export {};
|
|
12939
|
+
}
|
|
12940
|
+
|
|
12941
|
+
declare module '@mappedin/mappedin-js/packages/mvf-utils/tokens/sas-token' {
|
|
12942
|
+
export const SAS_TOKEN_REFRESH_BUFFER_MINUTES = 60;
|
|
12943
|
+
export const SAS_TOKEN_REFRESH_BUFFER_MS: number;
|
|
12944
|
+
export const SAS_TOKEN_STORAGE_KEY = "miSasTokens";
|
|
12945
|
+
type SasToken = {
|
|
12946
|
+
token: string;
|
|
12947
|
+
expires: number;
|
|
12948
|
+
};
|
|
12949
|
+
/**
|
|
12950
|
+
* Fetch the SAS Token either from sesion storage or from the API using the access token.
|
|
12951
|
+
* @param userOptions - The user options.
|
|
12952
|
+
* @returns The SAS Token.
|
|
12953
|
+
*/
|
|
12954
|
+
export function getSasToken(userOptions: {
|
|
12955
|
+
mapId: string;
|
|
12956
|
+
baseUri?: string;
|
|
12957
|
+
}, accessToken: string): Promise<SasToken>;
|
|
12958
|
+
/**
|
|
12959
|
+
* Fetch the SAS Token for private images using the access token.
|
|
12960
|
+
* @param userOptions - The user options.
|
|
12961
|
+
* @param accessToken - The access token.
|
|
12962
|
+
* @returns The SAS Token.
|
|
12963
|
+
*/
|
|
12964
|
+
export function fetchSasToken(userOptions: {
|
|
12965
|
+
mapId: string;
|
|
12966
|
+
baseUri?: string;
|
|
12967
|
+
}, accessToken: string): Promise<{
|
|
12968
|
+
token: string;
|
|
12969
|
+
expires: number;
|
|
12970
|
+
}>;
|
|
12971
|
+
export {};
|
|
12972
|
+
}
|
|
12973
|
+
|
|
11648
12974
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object' {
|
|
11649
12975
|
export default abstract class BaseMetaData {
|
|
11650
12976
|
/**
|
|
@@ -11745,90 +13071,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/opening-h
|
|
|
11745
13071
|
}
|
|
11746
13072
|
}
|
|
11747
13073
|
|
|
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
13074
|
declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
|
|
11833
13075
|
import { Object3D } from 'three';
|
|
11834
13076
|
import type { Mesh, Object3DEventMap, ShaderMaterial, Texture, TubeGeometry, Color, Vector2, Raycaster } from 'three';
|
|
@@ -11844,10 +13086,12 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
|
|
|
11844
13086
|
import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
11845
13087
|
import type { Text3DComponent } from '@mappedin/mappedin-js/geojson/src/components/text3d';
|
|
11846
13088
|
import type { ModelStyleComponnet, Text3DStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles';
|
|
13089
|
+
import type { OutlineComponent } from '@mappedin/mappedin-js/geojson/src/components/outline';
|
|
11847
13090
|
export enum Geometry3DComponents {
|
|
11848
13091
|
Mesh = 0,
|
|
11849
13092
|
Style = 1,
|
|
11850
|
-
Interaction = 2
|
|
13093
|
+
Interaction = 2,
|
|
13094
|
+
Outline = 3
|
|
11851
13095
|
}
|
|
11852
13096
|
type Geometry3DObjectTypes = 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image' | 'text3d';
|
|
11853
13097
|
export class Geometry3DObject3D extends Object3D {
|
|
@@ -11876,16 +13120,17 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
|
|
|
11876
13120
|
}
|
|
11877
13121
|
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | Text3DComponent | ImageComponent;
|
|
11878
13122
|
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
|
|
13123
|
+
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
13124
|
id: string | number;
|
|
11881
|
-
components: [M, S, I?];
|
|
13125
|
+
components: [M, S, I?, O?];
|
|
11882
13126
|
get object3d(): M["mesh"];
|
|
11883
13127
|
get parentObject3D(): GroupContainerObject3D | GeometryGroupObject3D | null;
|
|
11884
13128
|
get type(): T;
|
|
11885
13129
|
entities2D: Map<string | number, Geometry2D>;
|
|
11886
13130
|
constructor(meshComponent: M, styleComponent: S);
|
|
11887
|
-
|
|
11888
|
-
|
|
13131
|
+
/** Attaching a 2D entity to the 3D entity so it will follow the style changes */
|
|
13132
|
+
attach(entity: Geometry2D): void;
|
|
13133
|
+
detach(entity: Geometry2D): void;
|
|
11889
13134
|
removeAllEntities(): void;
|
|
11890
13135
|
}
|
|
11891
13136
|
export type TextGeometry3D = Geometry3D<Text3DComponent, Text3DStyleComponent, InteractionComponent, 'text3d'>;
|
|
@@ -11988,27 +13233,29 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry2d' {
|
|
|
11988
13233
|
import type { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
|
|
11989
13234
|
import { type GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
11990
13235
|
export enum Geometry2DComponents {
|
|
11991
|
-
|
|
11992
|
-
|
|
13236
|
+
UI = 0,
|
|
13237
|
+
Interaction = 1
|
|
11993
13238
|
}
|
|
11994
13239
|
export class Geometry2DObject3D extends Object3D {
|
|
11995
13240
|
}
|
|
11996
13241
|
export class Geometry2D {
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
13242
|
+
id: string | number;
|
|
13243
|
+
get type(): 'label' | 'marker';
|
|
13244
|
+
get parentObject3D(): GroupContainerObject3D | GeometryGroupObject3D | null;
|
|
13245
|
+
/** The geometry3D that this 2D entity is attached to */
|
|
13246
|
+
get attachedTo(): string | number | undefined;
|
|
13247
|
+
verticalOffset: number;
|
|
13248
|
+
/**
|
|
13249
|
+
* When the position of the entity changes, this should be set to true, so that systems like pan bounds can update
|
|
13250
|
+
*/
|
|
13251
|
+
positionDirty: boolean;
|
|
13252
|
+
occluderId?: number;
|
|
13253
|
+
object3d: Geometry2DObject3D;
|
|
13254
|
+
components: [MarkerComponent | LabelComponent, InteractionComponent?];
|
|
13255
|
+
disposed: boolean;
|
|
13256
|
+
constructor(ui: MarkerComponent | LabelComponent, position: Vector3, verticalOffset?: number);
|
|
13257
|
+
get position(): Vector3;
|
|
13258
|
+
setAltitude(z: number): void;
|
|
12012
13259
|
}
|
|
12013
13260
|
}
|
|
12014
13261
|
|
|
@@ -12033,13 +13280,17 @@ declare module '@mappedin/mappedin-js/geojson/src/services/text3d/text3d' {
|
|
|
12033
13280
|
import { BatchedText, Text } from 'troika-three-text';
|
|
12034
13281
|
import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
12035
13282
|
import type { Text3DComponent } from '@mappedin/mappedin-js/geojson/src/components/text3d';
|
|
13283
|
+
import { syncText } from '@mappedin/mappedin-js/geojson/src/services/text3d/utils';
|
|
13284
|
+
export function configureTroikaTextBuilder({ useWorker }: {
|
|
13285
|
+
useWorker: boolean;
|
|
13286
|
+
}): void;
|
|
12036
13287
|
export function createTroikaTextPoint(entityId: string | number, text3DComponent: Text3DComponent, styleComponent: Text3DStyleComponent, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): Promise<{
|
|
12037
13288
|
text: Text;
|
|
12038
13289
|
}>;
|
|
12039
13290
|
export function createTroikaTextArea(entityId: string | number, text3DComponent: Text3DComponent, styleComponent: Text3DStyleComponent, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): Promise<{
|
|
12040
13291
|
text: Text;
|
|
12041
13292
|
} | undefined>;
|
|
12042
|
-
export { BatchedText, Text };
|
|
13293
|
+
export { BatchedText, Text, syncText };
|
|
12043
13294
|
/**
|
|
12044
13295
|
* Promise caches the base64 font string. Then shared across all needed
|
|
12045
13296
|
*/
|
|
@@ -12057,11 +13308,21 @@ declare module '@mappedin/mappedin-js/geojson/src/services/text3d/text3d' {
|
|
|
12057
13308
|
export type ModuleType = {
|
|
12058
13309
|
createTroikaTextPoint: typeof createTroikaTextPoint;
|
|
12059
13310
|
createTroikaTextArea: typeof createTroikaTextArea;
|
|
13311
|
+
configureTroikaTextBuilder: typeof configureTroikaTextBuilder;
|
|
12060
13312
|
preloadFont: typeof preloadFont;
|
|
13313
|
+
syncText: typeof syncText;
|
|
12061
13314
|
BatchedText: typeof BatchedText;
|
|
12062
13315
|
};
|
|
12063
13316
|
}
|
|
12064
13317
|
|
|
13318
|
+
declare module '@mappedin/mappedin-js/geojson/src/components/focusable' {
|
|
13319
|
+
import type { Mesh } from 'three';
|
|
13320
|
+
export class FocusableComponent {
|
|
13321
|
+
focusMesh?: Mesh;
|
|
13322
|
+
dirty: boolean;
|
|
13323
|
+
}
|
|
13324
|
+
}
|
|
13325
|
+
|
|
12065
13326
|
declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-style' {
|
|
12066
13327
|
import { type Shading } from '@mappedin/mappedin-js/geojson/src/types';
|
|
12067
13328
|
type GeometryGroupStyle = {
|
|
@@ -12445,6 +13706,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
|
|
|
12445
13706
|
import { PubSub } from '@packages/internal/common';
|
|
12446
13707
|
import type { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
12447
13708
|
import type { ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles';
|
|
13709
|
+
import { OutlineComponent } from '@mappedin/mappedin-js/geojson/src/components/outline';
|
|
12448
13710
|
export class MeshCreationAndOptimizationSystem extends PubSub<{
|
|
12449
13711
|
'model-loaded': void;
|
|
12450
13712
|
'geometry-2d-added': void;
|
|
@@ -12454,7 +13716,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
|
|
|
12454
13716
|
loader?: GLTFLoader;
|
|
12455
13717
|
constructor(state: RendererState, convertTo3DMapPosition: any);
|
|
12456
13718
|
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">;
|
|
13719
|
+
createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon, MeshComponentProperties>, style?: LineStyle | PaintStyle): Geometry3D<MeshComponent, StyleComponent, import("../../components/interaction").InteractionComponent, "geometry", OutlineComponent | undefined>;
|
|
12458
13720
|
createModelFromFeature(id: string | number, feature: Feature<Point, ModelProperties>, style?: Partial<ModelStyle>): ModelGeometry3D;
|
|
12459
13721
|
populateEntityMesh(entity: Geometry3D, geometry: BufferGeometry): void;
|
|
12460
13722
|
populateModelGroup(entities: Set<string | number>, url: string, tree: GeometryGroupObject3D): Promise<Geometry3DObject3D>;
|
|
@@ -12812,7 +14074,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/dom-resize/system' {
|
|
|
12812
14074
|
observers: Map<string | number, ResizeObserver>;
|
|
12813
14075
|
constructor(state: RendererState, domTree: Entity2DHTMLDivElementContainer);
|
|
12814
14076
|
setupObserver(): void;
|
|
12815
|
-
updateDimensions: (mutations:
|
|
14077
|
+
updateDimensions: (mutations: ResizeObserverEntry[]) => void;
|
|
12816
14078
|
update(): void;
|
|
12817
14079
|
destroy(): void;
|
|
12818
14080
|
}
|
|
@@ -12854,9 +14116,9 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/
|
|
|
12854
14116
|
export class OutlineInterpolationSystem {
|
|
12855
14117
|
#private;
|
|
12856
14118
|
/**
|
|
12857
|
-
* Set to true when we need to update the outline
|
|
14119
|
+
* Set to true when we need to update the outline opacity of all entities, regardless of zoom level.
|
|
12858
14120
|
*/
|
|
12859
|
-
|
|
14121
|
+
outlineOpacitiesDirty: boolean;
|
|
12860
14122
|
get geometries3DDirty(): boolean;
|
|
12861
14123
|
set geometries3DDirty(value: boolean);
|
|
12862
14124
|
constructor(rendererState: RendererState);
|
|
@@ -12865,7 +14127,8 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/
|
|
|
12865
14127
|
* @param zoomLevel - The current zoom level.
|
|
12866
14128
|
* @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
14129
|
*/
|
|
12868
|
-
update(zoomLevel: number, isCameraZoomDirty?: boolean):
|
|
14130
|
+
update(zoomLevel: number, isCameraZoomDirty?: boolean): null | undefined;
|
|
14131
|
+
destroy(): void;
|
|
12869
14132
|
}
|
|
12870
14133
|
}
|
|
12871
14134
|
|
|
@@ -12909,6 +14172,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/syst
|
|
|
12909
14172
|
resize(): void;
|
|
12910
14173
|
update: (cameraIsMoving?: boolean, cameraStoppedMovingTime?: number) => void;
|
|
12911
14174
|
updateRaf(): void;
|
|
14175
|
+
raycast(): void;
|
|
12912
14176
|
showRaycasters(): void;
|
|
12913
14177
|
hideRaycasters(): void;
|
|
12914
14178
|
destroy(): void;
|
|
@@ -12916,14 +14180,16 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/syst
|
|
|
12916
14180
|
}
|
|
12917
14181
|
|
|
12918
14182
|
declare module '@mappedin/mappedin-js/geojson/src/systems/outdoor-layers/system' {
|
|
12919
|
-
import type { Map } from '@packages/internal/outdoor-context-v4';
|
|
14183
|
+
import type { LegacyFilterSpecification, Map } from '@packages/internal/outdoor-context-v4';
|
|
12920
14184
|
import type { Position } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
12921
14185
|
import { type BBox } from 'geojson';
|
|
12922
14186
|
export class OutdoorLayers {
|
|
14187
|
+
#private;
|
|
12923
14188
|
dirty: boolean;
|
|
12924
14189
|
hideLayersUnderPoint(point: Position, layers: string[]): void;
|
|
12925
14190
|
hideLayersIntersectingPolygons(bbox: BBox, polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[], layers: string[]): void;
|
|
12926
14191
|
constructor(map?: Map);
|
|
14192
|
+
expr: LegacyFilterSpecification[];
|
|
12927
14193
|
destroy(): void;
|
|
12928
14194
|
}
|
|
12929
14195
|
}
|
|
@@ -13007,7 +14273,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/styles/style' {
|
|
|
13007
14273
|
topColor?: string;
|
|
13008
14274
|
texture?: string;
|
|
13009
14275
|
topTexture?: string;
|
|
13010
|
-
outline: boolean;
|
|
13011
14276
|
showImage: boolean;
|
|
13012
14277
|
flipImageToFaceCamera: boolean;
|
|
13013
14278
|
url?: string;
|
|
@@ -13031,7 +14296,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/styles/style' {
|
|
|
13031
14296
|
altitude: number;
|
|
13032
14297
|
join: LineStyle['join'];
|
|
13033
14298
|
cap: LineStyle['cap'];
|
|
13034
|
-
outline: boolean;
|
|
13035
14299
|
showImage: boolean;
|
|
13036
14300
|
flipImageToFaceCamera: boolean;
|
|
13037
14301
|
url?: string;
|
|
@@ -13156,6 +14420,35 @@ declare module '@mappedin/mappedin-js/geojson/src/entities' {
|
|
|
13156
14420
|
export type { PathMesh, PatMeshContainer, PathMaterial, Geometry3DTypes, ImageGeometry3D, TextGeometry3D, ModelGeometry3D, CustomGeometry3D, MeshGeometry3D, } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
13157
14421
|
}
|
|
13158
14422
|
|
|
14423
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-processor' {
|
|
14424
|
+
import { Rectangle } from '@packages/internal/quad-tree';
|
|
14425
|
+
export type TSerializedCollider = {
|
|
14426
|
+
rank: number;
|
|
14427
|
+
enabledAndVisible: boolean;
|
|
14428
|
+
x: number;
|
|
14429
|
+
y: number;
|
|
14430
|
+
bboxes: {
|
|
14431
|
+
index: number;
|
|
14432
|
+
boundingBox: [number, number, number, number];
|
|
14433
|
+
boundingRect?: Rectangle;
|
|
14434
|
+
}[];
|
|
14435
|
+
shouldCollideWithScreenEdges?: boolean;
|
|
14436
|
+
lockedToStrategyIndex?: number;
|
|
14437
|
+
visible?: boolean;
|
|
14438
|
+
};
|
|
14439
|
+
export type TSerializedColliderResponse = [number, 1 | 0, Rectangle?];
|
|
14440
|
+
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
|
|
14441
|
+
msgId: string;
|
|
14442
|
+
colliders: TSerializedColliderResponse[];
|
|
14443
|
+
debug: {
|
|
14444
|
+
x: number;
|
|
14445
|
+
y: number;
|
|
14446
|
+
w: number;
|
|
14447
|
+
h: number;
|
|
14448
|
+
}[];
|
|
14449
|
+
};
|
|
14450
|
+
}
|
|
14451
|
+
|
|
13159
14452
|
declare module '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter' {
|
|
13160
14453
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
13161
14454
|
export type GLTFExportOptions = {
|
|
@@ -13428,12 +14721,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object'
|
|
|
13428
14721
|
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
13429
14722
|
class Layer {
|
|
13430
14723
|
containerId: string;
|
|
13431
|
-
labelIds: Set<string>;
|
|
13432
14724
|
layers: Map<string, string>;
|
|
13433
14725
|
renderer: RendererCore;
|
|
13434
14726
|
constructor(renderer: RendererCore, containerId: string, layers?: Map<any, any>);
|
|
13435
|
-
|
|
13436
|
-
|
|
14727
|
+
get visible(): boolean;
|
|
14728
|
+
setVisible(visible: boolean): void;
|
|
13437
14729
|
}
|
|
13438
14730
|
export class FloorObject implements MVFFloor {
|
|
13439
14731
|
#private;
|
|
@@ -13461,18 +14753,18 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object'
|
|
|
13461
14753
|
}
|
|
13462
14754
|
|
|
13463
14755
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
|
|
13464
|
-
import { Coordinate,
|
|
14756
|
+
import { Coordinate, MapObject, Space, type Floor, type Facade } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
13465
14757
|
import type { EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
|
|
13466
14758
|
import type { PolygonFeatureProperties } from '@packages/internal/mvf-utils';
|
|
13467
14759
|
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 {
|
|
14760
|
+
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle, Position, EntityId, PathState } from '@mappedin/core-sdk';
|
|
14761
|
+
import { type TGeometryState, type TLabelState, type TDirectionInstructionAction, type TShow3DMapOptions, type Label, type Marker, type Model, MapData } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
14762
|
+
import type { IAnchorable, TDoorsState, TMarkerState, TWallsState } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
13471
14763
|
import type { Image, Path, Shape, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
13472
14764
|
import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
13473
14765
|
import type { Tween } from '@tweenjs/tween.js';
|
|
13474
14766
|
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';
|
|
14767
|
+
import type { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
|
|
13476
14768
|
export function convertCoordinateToPosition(coord: Coordinate): Position;
|
|
13477
14769
|
export function convertPositionToCoordinate(coord: Position): Coordinate;
|
|
13478
14770
|
export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => {
|
|
@@ -13484,7 +14776,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
|
|
|
13484
14776
|
export function translateDoorsStateToGeojsonCore(state: Partial<TDoorsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
13485
14777
|
export function translateWallsStateToGeojsonCore(state: Partial<TWallsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
13486
14778
|
export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
13487
|
-
export function translateFloorGeometryStateToGeojsonCore(state: TFloorState['geometry']): Partial<GroupContainerState>;
|
|
13488
14779
|
export function differenceBetweenAngles(a: number, b: number): number;
|
|
13489
14780
|
export function getRelativeBearing(relativeBearingAngle: number, threshold: number): TDirectionInstructionAction['bearing'];
|
|
13490
14781
|
export function convertCollisionRankingTeirToNumber(tier: CollisionRankingTier): number;
|
|
@@ -13506,6 +14797,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
|
|
|
13506
14797
|
export function expandBbox(bbox: BBox, bboxToExpand: BBox): number[];
|
|
13507
14798
|
export function unique<T>(array: T[]): T[];
|
|
13508
14799
|
export function getTargetFloorObject(coordinate: Coordinate, floorsById: Map<string, FloorObject>, defaultFloor: FloorObject): FloorObject;
|
|
14800
|
+
/** Gets the ID of a geometry that 2D entities can attach to */
|
|
14801
|
+
export function getAttachableGeometryId(target: IAnchorable): string | undefined;
|
|
14802
|
+
export function determineFloorVisibleBasedOnPath(path: EntityId<PathState> & {
|
|
14803
|
+
coordinates: Coordinate[];
|
|
14804
|
+
}, mapData: MapData, api: GeoJsonApi): boolean;
|
|
13509
14805
|
}
|
|
13510
14806
|
|
|
13511
14807
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-stack-object' {
|
|
@@ -13533,105 +14829,54 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-stack-ob
|
|
|
13533
14829
|
}
|
|
13534
14830
|
}
|
|
13535
14831
|
|
|
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;
|
|
14832
|
+
declare module '@mappedin/mappedin-js/geojson/src/components/outline' {
|
|
14833
|
+
import type { BufferAttribute, BufferGeometry } from 'three';
|
|
14834
|
+
type Outline = {
|
|
14835
|
+
color: string;
|
|
14836
|
+
dirty: boolean;
|
|
14837
|
+
visible: boolean;
|
|
14838
|
+
edgeColors?: BufferAttribute;
|
|
14839
|
+
ranges?: {
|
|
14840
|
+
start: number;
|
|
14841
|
+
count: number;
|
|
14842
|
+
};
|
|
14843
|
+
geometry?: BufferGeometry;
|
|
14844
|
+
currentOpacity: number;
|
|
14845
|
+
currentColor: [number, number, number];
|
|
14846
|
+
topFaceVerticesIndices?: number[];
|
|
13562
14847
|
};
|
|
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;
|
|
14848
|
+
export class OutlineComponent implements Outline {
|
|
14849
|
+
color: string;
|
|
14850
|
+
dirty: boolean;
|
|
14851
|
+
visible: boolean;
|
|
14852
|
+
edgeColors?: BufferAttribute;
|
|
14853
|
+
geometry?: BufferGeometry;
|
|
14854
|
+
ranges?: {
|
|
14855
|
+
start: number;
|
|
14856
|
+
count: number;
|
|
14857
|
+
};
|
|
14858
|
+
topFaceVerticesIndices?: number[];
|
|
14859
|
+
get currentOpacity(): number;
|
|
14860
|
+
get currentColor(): [number, number, number];
|
|
14861
|
+
constructor(color: string);
|
|
13603
14862
|
}
|
|
13604
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
13605
14863
|
export {};
|
|
13606
14864
|
}
|
|
13607
14865
|
|
|
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
|
-
};
|
|
14866
|
+
declare module '@mappedin/mappedin-js/geojson/src/services/text3d/utils' {
|
|
14867
|
+
import type { Text } from 'troika-three-text';
|
|
14868
|
+
/**
|
|
14869
|
+
* Load font file and kick off the font processing.
|
|
14870
|
+
* Promise gets resolved when preloadFont finishes.
|
|
14871
|
+
*/
|
|
14872
|
+
export function preloadFont(fontUrl?: string): Promise<string>;
|
|
14873
|
+
/**
|
|
14874
|
+
* Fit text to area with a given max width and height, scaling the font size down if necessary.
|
|
14875
|
+
*/
|
|
14876
|
+
export function fitTextToArea(text: Text, maxWidth: number, maxHeight: number, scaleStep: number): Promise<{
|
|
14877
|
+
size: [width: number, height: number];
|
|
14878
|
+
}>;
|
|
14879
|
+
export function syncText(text: Text): Promise<void>;
|
|
13635
14880
|
}
|
|
13636
14881
|
|
|
13637
14882
|
declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
|