@mappedin/react-sdk 6.0.1-beta.15 → 6.0.1-beta.16
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/THIRD_PARTY_LICENSES.txt +1 -1
- package/lib/esm/{GLTFExporter-TQTK4DCG.js → GLTFExporter-LYJKUEAI.js} +1 -1
- package/lib/esm/{GLTFLoader-WTDQSOOI.js → GLTFLoader-EMVR6AZY.js} +1 -1
- package/lib/esm/{browser-KLWKRV3X.js → browser-M5V6EHYN.js} +1 -1
- package/lib/esm/{chunk-LZ5FNN3I.js → chunk-4NQHKR7V.js} +1 -1
- package/lib/esm/{chunk-VBRDM5DN.js → chunk-BIGS5XGW.js} +1 -1
- package/lib/esm/{chunk-LRECRSYM.js → chunk-BSJA3NVI.js} +1 -1
- package/lib/esm/chunk-CEZ47WEQ.js +1 -0
- package/lib/esm/{chunk-FO43QMXN.js → chunk-JKKS5T47.js} +1 -1
- package/lib/esm/index.css +1 -1
- package/lib/esm/index.d.ts +469 -234
- package/lib/esm/index.js +1 -1
- package/lib/esm/{internal-NBBO7CQY.css → inspector-7255DZYH.css} +1 -1
- package/lib/esm/inspector-TOLNZKGY.js +1 -0
- package/lib/esm/internal-AMJIXCXU.css +1 -0
- package/lib/esm/internal-M47PJXNV.js +1 -0
- package/lib/esm/{outdoor-context-v4-6CMLCTUP.js → outdoor-context-v4-TQR3BCAX.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-V7IQTI4J.js +0 -1
- package/lib/esm/inspector-OBUMFTII.css +0 -1
- package/lib/esm/inspector-SZQ6BTJR.js +0 -1
- package/lib/esm/internal-DNUBGOH7.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// ../react/@packages/internal/mvf-utils
|
|
5
5
|
// ../react/@mappedin/mvf
|
|
6
6
|
// ../react/@packages/internal/common/pubsub
|
|
7
|
+
// ../react/@packages/internal/mvf-utils/mvf-utils
|
|
7
8
|
// ../react/@packages/internal/common/Mappedin.Logger
|
|
8
9
|
// ../react/geojson
|
|
9
10
|
// ../react/@packages/internal/common
|
|
@@ -247,11 +248,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
247
248
|
import type { Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
248
249
|
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
249
250
|
import { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
250
|
-
import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/react-sdk/geojson/src';
|
|
251
|
+
import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/react-sdk/geojson/src';
|
|
251
252
|
import { enableTestMode } from '@mappedin/react-sdk/geojson/src';
|
|
252
253
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
253
254
|
import { MappedinMapLibreOverlay } from '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay';
|
|
254
255
|
import type { LanguagePackHydrationItem } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
256
|
+
import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
|
|
257
|
+
import type { TBlueDotEvents, TBlueDotAction, TBlueDotState } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
255
258
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
256
259
|
/**
|
|
257
260
|
* Represents all the available antialiasing options.
|
|
@@ -377,6 +380,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
377
380
|
token?: string;
|
|
378
381
|
/**
|
|
379
382
|
* A url to a style specification conforming to the [Maplibre Style Spec](https://maplibre.org/maplibre-style-spec/).
|
|
383
|
+
* Use the {@link Environment | `environment`} setting to switch environments.
|
|
380
384
|
*/
|
|
381
385
|
style?: string;
|
|
382
386
|
/**
|
|
@@ -564,7 +568,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
564
568
|
export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
565
569
|
export const show3dMap: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
566
570
|
export { parseMVF, unzipMVF, enableTestMode };
|
|
567
|
-
export type { MapView, MapData, MappedinMapLibreOverlay, TEvents, TEventPayload, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, };
|
|
571
|
+
export type { MapView, MapData, MappedinMapLibreOverlay, TBlueDotEvents, TBlueDotAction, TBlueDotState, TEvents, TEventPayload, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, };
|
|
568
572
|
export type * from 'geojson';
|
|
569
573
|
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
570
574
|
export { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
@@ -658,6 +662,19 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
|
658
662
|
constructor(internal: MapDataInternal, { search }?: {
|
|
659
663
|
search?: TSearchOptions;
|
|
660
664
|
});
|
|
665
|
+
/**
|
|
666
|
+
* Get the current environment.
|
|
667
|
+
*
|
|
668
|
+
* @example
|
|
669
|
+
* const env = mapData.getEnv();
|
|
670
|
+
* console.log(env.baseUri); // Get the API URL for the current environment
|
|
671
|
+
*/
|
|
672
|
+
getEnv(): {
|
|
673
|
+
readonly baseUri: string;
|
|
674
|
+
readonly baseAuthUri: string;
|
|
675
|
+
readonly analyticsBaseUri: string;
|
|
676
|
+
readonly tileServerUri: string;
|
|
677
|
+
};
|
|
661
678
|
/**
|
|
662
679
|
* The name of the map.
|
|
663
680
|
*
|
|
@@ -847,6 +864,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/events' {
|
|
|
847
864
|
import type { Coordinate, Floor, MapObject, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
848
865
|
import type { Label, Marker, Model, Path } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
849
866
|
import type { CameraTransform } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/camera-transform';
|
|
867
|
+
import type { TBlueDotEvents } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot';
|
|
850
868
|
export type TFloorChangeReason = '' | 'blue-dot-floor-change' | 'elevation-change';
|
|
851
869
|
export type TClickPayload = {
|
|
852
870
|
/**
|
|
@@ -938,6 +956,18 @@ declare module '@mappedin/react-sdk/mappedin-js/src/events' {
|
|
|
938
956
|
* Emitted when a user interaction with the map ends.
|
|
939
957
|
*/
|
|
940
958
|
'user-interaction-end': undefined;
|
|
959
|
+
/**
|
|
960
|
+
* Emitted when the Blue Dot's position is updated.
|
|
961
|
+
*/
|
|
962
|
+
'blue-dot-position-update': TBlueDotEvents['position-update'];
|
|
963
|
+
/**
|
|
964
|
+
* Emitted when the Blue Dot's state changes.
|
|
965
|
+
*/
|
|
966
|
+
'blue-dot-state-change': TBlueDotEvents['state-change'];
|
|
967
|
+
/**
|
|
968
|
+
* Emitted when the Blue Dot encounters an error.
|
|
969
|
+
*/
|
|
970
|
+
'blue-dot-error': TBlueDotEvents['error'];
|
|
941
971
|
} & TStackedMapsEvents;
|
|
942
972
|
export type TEventPayload<EventName extends keyof TEvents> = TEvents[EventName] extends {
|
|
943
973
|
data: null;
|
|
@@ -976,6 +1006,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
976
1006
|
import { PubSub } from '@packages/internal/common';
|
|
977
1007
|
import type { LanguagePack, Places, TMapDataInternalOptions } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
|
|
978
1008
|
import { type LocalePackUrls } from '@packages/internal/mvf-utils';
|
|
1009
|
+
import type { EnvControl } from '@packages/internal/mvf-utils/mvf-utils';
|
|
979
1010
|
import type { TGetDirectionsOptions, TNavigationTarget } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
980
1011
|
import { type Directions, DirectionsInternal } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions';
|
|
981
1012
|
import { type THydrateMapDataBundle } from '@mappedin/react-sdk/mappedin-js/src';
|
|
@@ -1047,10 +1078,17 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
1047
1078
|
[languageCode: string]: LanguagePack;
|
|
1048
1079
|
};
|
|
1049
1080
|
binaryBundle?: Uint8Array;
|
|
1081
|
+
envControl: EnvControl;
|
|
1050
1082
|
/**
|
|
1051
1083
|
* @internal
|
|
1052
1084
|
*/
|
|
1053
1085
|
constructor(mvf: ParsedMVF, options: TMapDataInternalOptions);
|
|
1086
|
+
getEnv(): {
|
|
1087
|
+
readonly baseUri: string;
|
|
1088
|
+
readonly baseAuthUri: string;
|
|
1089
|
+
readonly analyticsBaseUri: string;
|
|
1090
|
+
readonly tileServerUri: string;
|
|
1091
|
+
};
|
|
1054
1092
|
/**
|
|
1055
1093
|
* Retrieves the map name.
|
|
1056
1094
|
*
|
|
@@ -1185,10 +1223,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1185
1223
|
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
1186
1224
|
import type { Annotation, Coordinate, Door, Floor, MapObject, PointOfInterest, Space, Node, EnterpriseLocation } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
1187
1225
|
import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
1188
|
-
import type { Label, Marker, Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1226
|
+
import type { Label, Marker, Image, Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1189
1227
|
import type { TEventPayload } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
1190
1228
|
import type { Shapes } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes';
|
|
1191
1229
|
import type { TShowStackOptions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
1230
|
+
import type { InspectorOption } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/inspector/inspector';
|
|
1192
1231
|
export class MapView extends PubSub<TEvents> {
|
|
1193
1232
|
#private;
|
|
1194
1233
|
/**
|
|
@@ -1262,7 +1301,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1262
1301
|
* // Update the color of a space to red.
|
|
1263
1302
|
* map.updateState(space, { color: 'red' });
|
|
1264
1303
|
*/
|
|
1265
|
-
updateState<T extends Space | MapObject | Label | Marker | Door | WALLS | DOORS>(target: T, state: TUpdateState<T>): any;
|
|
1304
|
+
updateState<T extends Space | MapObject | Label | Marker | Shape | Door | WALLS | DOORS>(target: T, state: TUpdateState<T>): any;
|
|
1266
1305
|
updateState<T extends string & NonNullable<unknown>>(target: T, state: TUpdateStates): any;
|
|
1267
1306
|
update: () => void;
|
|
1268
1307
|
getMapData(): {
|
|
@@ -1312,7 +1351,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1312
1351
|
* @hidden
|
|
1313
1352
|
*/
|
|
1314
1353
|
updateWatermark(options: WatermarkUpdateOptions): void;
|
|
1315
|
-
getState<T extends Space | MapObject | Label | Marker | Image | string>(target: T): TGetState<T> | undefined;
|
|
1354
|
+
getState<T extends Space | MapObject | Label | Marker | Image | Shape | string>(target: T): TGetState<T> | undefined;
|
|
1316
1355
|
setHoverColor(c: string): void;
|
|
1317
1356
|
getHoverColor(): string | undefined;
|
|
1318
1357
|
/**
|
|
@@ -1430,7 +1469,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1430
1469
|
* @experimental
|
|
1431
1470
|
* Enable debug interface
|
|
1432
1471
|
*/
|
|
1433
|
-
enableDebug(): Promise<void>;
|
|
1472
|
+
enableDebug(opitons?: InspectorOption): Promise<void>;
|
|
1434
1473
|
}
|
|
1435
1474
|
}
|
|
1436
1475
|
|
|
@@ -1441,7 +1480,7 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
1441
1480
|
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
1442
1481
|
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
1443
1482
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types/geometry';
|
|
1444
|
-
import type { InsetPadding, RendererCoreOptions, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload } from '@mappedin/react-sdk/geojson/src/types';
|
|
1483
|
+
import type { InsetPadding, InsetPaddingOption, RendererCoreOptions, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload } from '@mappedin/react-sdk/geojson/src/types';
|
|
1445
1484
|
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
1446
1485
|
import type { ShapeState, CustomGeometryBuilder } from '@mappedin/react-sdk/geojson/src/components/custom';
|
|
1447
1486
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
@@ -1465,7 +1504,7 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
1465
1504
|
export type { GLTFExportOptions } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
1466
1505
|
export type { AttributionControlOptions, AttributionPosition } from '@mappedin/react-sdk/geojson/src/systems/html-controls/system';
|
|
1467
1506
|
export { ATTRIBUTION_POSITIONS } from '@mappedin/react-sdk/geojson/src/systems/html-controls/system';
|
|
1468
|
-
export type { AddPathOptions, AddMarkerOptions, AddLabelOptions, AnimateToOptions, FocusOnOptions, MapViewState, MarkerState, PathState, GroupContainerState, GeometryGroupState, ShapeState, CustomGeometryBuilder, LabelState, GeometryState, ModelState, EasingCurve, Camera, InsetPadding, Position, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload, CollisionRankingTier, LabelAppearance, RendererCore, };
|
|
1507
|
+
export type { AddPathOptions, AddMarkerOptions, AddLabelOptions, AnimateToOptions, FocusOnOptions, MapViewState, MarkerState, PathState, GroupContainerState, GeometryGroupState, ShapeState, CustomGeometryBuilder, LabelState, GeometryState, ModelState, EasingCurve, Camera, InsetPadding, InsetPaddingOption, Position, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload, CollisionRankingTier, LabelAppearance, RendererCore, };
|
|
1469
1508
|
export function createRenderer(container: HTMLElement, options?: RendererCoreOptions & {
|
|
1470
1509
|
[key: string]: any;
|
|
1471
1510
|
}): Promise<RendererCore>;
|
|
@@ -1503,9 +1542,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay' {
|
|
|
1503
1542
|
declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
1504
1543
|
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1505
1544
|
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation, EnterpriseLocation, Node } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
1506
|
-
import type { Label, Marker, Model, Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1545
|
+
import type { Label, Marker, Model, Image, Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1507
1546
|
import type { EasingCurve } from '@mappedin/core-sdk/src/camera';
|
|
1508
1547
|
import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
1548
|
+
import type { InsetPaddingOption } from '@mappedin/react-sdk/geojson/src';
|
|
1509
1549
|
export type DeepRequired<T> = Required<{
|
|
1510
1550
|
[K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
|
|
1511
1551
|
}>;
|
|
@@ -1701,6 +1741,36 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1701
1741
|
*/
|
|
1702
1742
|
coordinate: Coordinate;
|
|
1703
1743
|
};
|
|
1744
|
+
/**
|
|
1745
|
+
* Represents the state of a shape.
|
|
1746
|
+
*/
|
|
1747
|
+
export type TShapeState = {
|
|
1748
|
+
/**
|
|
1749
|
+
* The type of the shape.
|
|
1750
|
+
*/
|
|
1751
|
+
type: 'Shape';
|
|
1752
|
+
/**
|
|
1753
|
+
* Whether Shpae is visible
|
|
1754
|
+
*/
|
|
1755
|
+
visible: boolean;
|
|
1756
|
+
/**
|
|
1757
|
+
* The altitude of the shape.
|
|
1758
|
+
*/
|
|
1759
|
+
altitude: number;
|
|
1760
|
+
/**
|
|
1761
|
+
* The color of the shape.
|
|
1762
|
+
*/
|
|
1763
|
+
color: string;
|
|
1764
|
+
/**
|
|
1765
|
+
* The height of the shape.
|
|
1766
|
+
* Height cannot be updated at this time
|
|
1767
|
+
*/
|
|
1768
|
+
height: number;
|
|
1769
|
+
/**
|
|
1770
|
+
* The opacity of the shape.
|
|
1771
|
+
*/
|
|
1772
|
+
opacity: number;
|
|
1773
|
+
};
|
|
1704
1774
|
/**
|
|
1705
1775
|
* Defines the state for geometry elements like {@link Space} when updated.
|
|
1706
1776
|
*/
|
|
@@ -1758,9 +1828,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1758
1828
|
/**
|
|
1759
1829
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
1760
1830
|
*/
|
|
1761
|
-
export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS ? Partial<TDoorsState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Door ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
|
|
1831
|
+
export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS ? Partial<TDoorsState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Shape ? Partial<Omit<TShapeState, 'height' | 'type'>> : T extends Door ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
|
|
1762
1832
|
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
|
|
1763
|
-
export type TGetEntityState<T> = T extends WALLS ? TWallsState : T extends DOORS ? TDoorsState : T extends Marker ? TMarkerState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Image ? TImageState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
|
|
1833
|
+
export type TGetEntityState<T> = T extends WALLS ? TWallsState : T extends DOORS ? TDoorsState : T extends Marker ? TMarkerState : T extends Shape ? TShapeState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Image ? TImageState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
|
|
1764
1834
|
export type TGetState<T> = TGetEntityState<T> | undefined;
|
|
1765
1835
|
/**
|
|
1766
1836
|
* Options for {@link Camera} animations on the map.
|
|
@@ -1821,7 +1891,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1821
1891
|
*/
|
|
1822
1892
|
maxZoomLevel?: number;
|
|
1823
1893
|
/**
|
|
1824
|
-
* Camera bearing when focusing on a target
|
|
1894
|
+
* Camera bearing when focusing on a target in degrees clockwise from North. 0 degrees is North, 90 degrees is East, 180 degrees is South, and 270 degrees is West.
|
|
1825
1895
|
*/
|
|
1826
1896
|
bearing?: number;
|
|
1827
1897
|
/**
|
|
@@ -1831,12 +1901,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1831
1901
|
/**
|
|
1832
1902
|
* Screen offsets for the camera focus.
|
|
1833
1903
|
*/
|
|
1834
|
-
screenOffsets?:
|
|
1835
|
-
top: number;
|
|
1836
|
-
right: number;
|
|
1837
|
-
bottom: number;
|
|
1838
|
-
left: number;
|
|
1839
|
-
};
|
|
1904
|
+
screenOffsets?: InsetPaddingOption;
|
|
1840
1905
|
};
|
|
1841
1906
|
export type TCameraFocusOnTargets = Floor | Space | Coordinate | MapObject | Connection | PointOfInterest | Door | Annotation | Node;
|
|
1842
1907
|
/**
|
|
@@ -1859,7 +1924,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1859
1924
|
*/
|
|
1860
1925
|
zoomLevel?: number;
|
|
1861
1926
|
/**
|
|
1862
|
-
* Bearing for the camera target in degrees.
|
|
1927
|
+
* Bearing for the camera target in degrees clockwise from North. 0 degrees is North, 90 degrees is East, 180 degrees is South, and 270 degrees is West.
|
|
1863
1928
|
*/
|
|
1864
1929
|
bearing?: number;
|
|
1865
1930
|
/**
|
|
@@ -2129,7 +2194,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2129
2194
|
* | 'right' | Anchors the marker on the right side, convenient for when space is limited on the left.|
|
|
2130
2195
|
*
|
|
2131
2196
|
*/
|
|
2132
|
-
export type TMarkerAnchor = 'center' | 'top' | 'left' | 'bottom' | 'right';
|
|
2197
|
+
export type TMarkerAnchor = 'center' | 'top' | 'left' | 'bottom' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
2133
2198
|
/**
|
|
2134
2199
|
* Options for controlling the behavior of the {@link Directions}.
|
|
2135
2200
|
*/
|
|
@@ -2242,7 +2307,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2242
2307
|
*/
|
|
2243
2308
|
height: number;
|
|
2244
2309
|
/**
|
|
2245
|
-
* Rotation of the image in degrees.
|
|
2310
|
+
* Rotation of the image in degrees clockwise from North. 0 degrees is North, 90 degrees is East, 180 degrees is South, and 270 degrees is West.
|
|
2246
2311
|
*
|
|
2247
2312
|
* @default 0
|
|
2248
2313
|
*/
|
|
@@ -2274,7 +2339,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2274
2339
|
* Optional. Specifies the anchor point of the marker, determining its position relative to its coordinates.
|
|
2275
2340
|
* For the possible values and their descriptions, see {@link TMarkerAnchor}
|
|
2276
2341
|
*/
|
|
2277
|
-
anchor?: TMarkerAnchor;
|
|
2342
|
+
anchor?: TMarkerAnchor | TMarkerAnchor[];
|
|
2278
2343
|
/**
|
|
2279
2344
|
* Whether the {@link Marker} should be clickable
|
|
2280
2345
|
* @default false
|
|
@@ -2417,11 +2482,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2417
2482
|
*/
|
|
2418
2483
|
heading?: GeolocationPosition['coords']['heading'] | 'device' | undefined;
|
|
2419
2484
|
/**
|
|
2420
|
-
* Floor
|
|
2485
|
+
* Floor or floorId to override.
|
|
2421
2486
|
* Set to `'device'` to reset to the device's floor level.
|
|
2422
2487
|
* Set to `undefined` to disable floor level and show the BlueDot on all floors.
|
|
2423
2488
|
*/
|
|
2424
|
-
|
|
2489
|
+
floorOrFloorId?: Floor | string | 'device' | undefined;
|
|
2425
2490
|
};
|
|
2426
2491
|
export type LanguagePackHydrationItem = {
|
|
2427
2492
|
language: Language;
|
|
@@ -2429,6 +2494,120 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2429
2494
|
};
|
|
2430
2495
|
}
|
|
2431
2496
|
|
|
2497
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
|
|
2498
|
+
import type { RendererCore } from '@mappedin/core-sdk';
|
|
2499
|
+
import { PubSub } from '@packages/internal/common';
|
|
2500
|
+
import { Coordinate, type Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
2501
|
+
import type { TBlueDotOptions, TBlueDotPositionUpdate } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
2502
|
+
import type { GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
2503
|
+
export type TBlueDotEvents = {
|
|
2504
|
+
/**
|
|
2505
|
+
* Emitted when the Blue Dot's position is updated.
|
|
2506
|
+
*/
|
|
2507
|
+
'position-update': {
|
|
2508
|
+
floor: Floor | undefined;
|
|
2509
|
+
heading: GeolocationPosition['coords']['heading'] | undefined;
|
|
2510
|
+
accuracy: GeolocationPosition['coords']['accuracy'] | undefined;
|
|
2511
|
+
coordinate: Coordinate;
|
|
2512
|
+
};
|
|
2513
|
+
/**
|
|
2514
|
+
* Emitted when the Blue Dot's state changes.
|
|
2515
|
+
*/
|
|
2516
|
+
'state-change': {
|
|
2517
|
+
/**
|
|
2518
|
+
* The new state of the Blue Dot.
|
|
2519
|
+
*/
|
|
2520
|
+
state: TBlueDotState;
|
|
2521
|
+
/**
|
|
2522
|
+
* The action that caused the state change.
|
|
2523
|
+
*/
|
|
2524
|
+
action: TBlueDotAction;
|
|
2525
|
+
};
|
|
2526
|
+
/**
|
|
2527
|
+
* Emitted when the Blue Dot encounters an error.
|
|
2528
|
+
*/
|
|
2529
|
+
error: GeolocationPositionError;
|
|
2530
|
+
/**
|
|
2531
|
+
* Emitted when the Blue Dot's following state changes.
|
|
2532
|
+
*/
|
|
2533
|
+
'follow-change': {
|
|
2534
|
+
following: boolean;
|
|
2535
|
+
};
|
|
2536
|
+
};
|
|
2537
|
+
export type TBlueDotState = 'hidden' | 'active' | 'inactive' | 'disabled';
|
|
2538
|
+
export type TBlueDotAction = 'timeout' | 'error' | 'position-update' | 'enable' | 'disable';
|
|
2539
|
+
export type TBlueDotPositionUpdateWithFloor = Omit<TBlueDotPositionUpdate, 'floorOrFloorId'> & {
|
|
2540
|
+
floor?: Floor | 'device' | undefined;
|
|
2541
|
+
};
|
|
2542
|
+
export class BlueDot extends PubSub<TBlueDotEvents> {
|
|
2543
|
+
#private;
|
|
2544
|
+
state: TBlueDotState;
|
|
2545
|
+
/**
|
|
2546
|
+
* The direction the user is facing in degrees from north.
|
|
2547
|
+
*/
|
|
2548
|
+
get heading(): GeolocationPosition['coords']['heading'] | undefined;
|
|
2549
|
+
/**
|
|
2550
|
+
* The accuracy of the current position in metres.
|
|
2551
|
+
*/
|
|
2552
|
+
get accuracy(): GeolocationPosition['coords']['accuracy'] | undefined;
|
|
2553
|
+
/**
|
|
2554
|
+
* The coordinate of the current position.
|
|
2555
|
+
*/
|
|
2556
|
+
get coordinate(): Coordinate | undefined;
|
|
2557
|
+
/**
|
|
2558
|
+
* The floor the Blue Dot is currently on. If undefined, the Blue Dot will appear on every floor.
|
|
2559
|
+
*/
|
|
2560
|
+
get floor(): Floor | undefined;
|
|
2561
|
+
/**
|
|
2562
|
+
* @internal
|
|
2563
|
+
*/
|
|
2564
|
+
constructor(core: RendererCore, geoJSONApi: GeoJsonApi);
|
|
2565
|
+
/**
|
|
2566
|
+
* Enable the Blue Dot. It will be hidden until a position is received either from the browser or by calling {@link BlueDot.update}.
|
|
2567
|
+
* @param options - The options to setup the Blue Dot.
|
|
2568
|
+
*/
|
|
2569
|
+
enable(options?: TBlueDotOptions): void;
|
|
2570
|
+
/**
|
|
2571
|
+
* Disable the Blue Dot. It will be hidden and no longer update.
|
|
2572
|
+
*/
|
|
2573
|
+
disable(): void;
|
|
2574
|
+
/**
|
|
2575
|
+
* Enable or disable the devices's geolocation listener to automatically position the Blue Dot.
|
|
2576
|
+
* If enabled, the device will request permission to access the user's precise location.
|
|
2577
|
+
* @param watch - Whether to enable or disable the listener.
|
|
2578
|
+
*/
|
|
2579
|
+
watchDevicePosition(watch: boolean): void;
|
|
2580
|
+
/**
|
|
2581
|
+
* Manually override some position properties of the Blue Dot.
|
|
2582
|
+
* Accepts a full GeolocationPosition object or a partial {@link TBlueDotPositionUpdate} object.
|
|
2583
|
+
* @example Manually set the accuracy and heading
|
|
2584
|
+
* ```ts
|
|
2585
|
+
* api.BlueDot.update({ accuracy: 10, heading: 90 });
|
|
2586
|
+
* ```
|
|
2587
|
+
* @example Reset accuracy and heading to device values
|
|
2588
|
+
* ```ts
|
|
2589
|
+
* api.BlueDot.update({ accuracy: 'device', heading: 'device' });
|
|
2590
|
+
* ```
|
|
2591
|
+
*/
|
|
2592
|
+
update(position: GeolocationPositionExtended | TBlueDotPositionUpdate | undefined): void;
|
|
2593
|
+
}
|
|
2594
|
+
type TStateTransitions = {
|
|
2595
|
+
[Action in TBlueDotAction]?: TBlueDotState;
|
|
2596
|
+
};
|
|
2597
|
+
type TStateMachine = {
|
|
2598
|
+
[State in TBlueDotState]: {
|
|
2599
|
+
actions: TStateTransitions;
|
|
2600
|
+
};
|
|
2601
|
+
};
|
|
2602
|
+
export const stateMachine: TStateMachine;
|
|
2603
|
+
export type GeolocationPositionExtended = GeolocationPosition & {
|
|
2604
|
+
coords: GeolocationPosition['coords'] & {
|
|
2605
|
+
readonly floorLevel?: number;
|
|
2606
|
+
};
|
|
2607
|
+
};
|
|
2608
|
+
export {};
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2432
2611
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects' {
|
|
2433
2612
|
export { Label } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/label';
|
|
2434
2613
|
export { Marker } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/marker';
|
|
@@ -2454,25 +2633,30 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
|
|
|
2454
2633
|
*/
|
|
2455
2634
|
createMarkers?: {
|
|
2456
2635
|
/**
|
|
2457
|
-
* Controls whether a marker is created for the departure point.
|
|
2636
|
+
* Controls whether a marker is created for the departure point and allows a custom marker to be created.
|
|
2458
2637
|
* @default true
|
|
2459
2638
|
*/
|
|
2460
|
-
departure?: boolean;
|
|
2639
|
+
departure?: boolean | ((instruction: TDirectionInstruction) => Marker);
|
|
2461
2640
|
/**
|
|
2462
|
-
* Controls whether a marker is created for the destination point.
|
|
2641
|
+
* Controls whether a marker is created for the destination point and allows a custom marker to be created.
|
|
2463
2642
|
* @default true
|
|
2464
2643
|
*/
|
|
2465
|
-
destination?: boolean;
|
|
2644
|
+
destination?: boolean | ((instruction: TDirectionInstruction) => Marker);
|
|
2466
2645
|
/**
|
|
2467
|
-
* Controls whether markers are created for connection points.
|
|
2646
|
+
* Controls whether markers are created for connection points and allows a custom marker to be created.
|
|
2468
2647
|
* @default true
|
|
2469
2648
|
*/
|
|
2470
|
-
connection?: boolean;
|
|
2649
|
+
connection?: boolean | ((instruction: TDirectionInstruction) => Marker);
|
|
2471
2650
|
};
|
|
2472
2651
|
/**
|
|
2473
2652
|
* Options for the path.
|
|
2474
2653
|
*/
|
|
2475
2654
|
pathOptions?: {
|
|
2655
|
+
/**
|
|
2656
|
+
* duration in milliseconds for the path to be drawn
|
|
2657
|
+
* @default
|
|
2658
|
+
*/
|
|
2659
|
+
drawDuration: number;
|
|
2476
2660
|
/**
|
|
2477
2661
|
* The color of the path.
|
|
2478
2662
|
* @default '#40A9FF'
|
|
@@ -2959,6 +3143,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/camera-tran
|
|
|
2959
3143
|
}
|
|
2960
3144
|
}
|
|
2961
3145
|
|
|
3146
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot' {
|
|
3147
|
+
export { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3148
|
+
export type { TBlueDotEvents } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3149
|
+
}
|
|
3150
|
+
|
|
2962
3151
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node' {
|
|
2963
3152
|
import type { NodeCollection } from '@mappedin/mvf';
|
|
2964
3153
|
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
@@ -4127,8 +4316,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
|
|
|
4127
4316
|
import type MapObject from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/object';
|
|
4128
4317
|
import type { EnterpriseLocation as MvfEnterpriseLocation, EnterpriseCategory as MvfEnterpriseCategory, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
4129
4318
|
import type { PartialExcept } from '@mappedin/mvf/dist/locale';
|
|
4130
|
-
import { LocalePackUrls } from '@packages/internal/mvf-utils';
|
|
4131
|
-
import { LanguagePackHydrationItem } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
4319
|
+
import type { LocalePackUrls } from '@packages/internal/mvf-utils';
|
|
4320
|
+
import type { LanguagePackHydrationItem } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
4321
|
+
import type { EnvControl } from '@packages/internal/mvf-utils/mvf-utils';
|
|
4132
4322
|
/**
|
|
4133
4323
|
* Places are the main objects that can be searched for.
|
|
4134
4324
|
*/
|
|
@@ -4150,6 +4340,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
|
|
|
4150
4340
|
};
|
|
4151
4341
|
};
|
|
4152
4342
|
export type TMapDataInternalOptions = {
|
|
4343
|
+
env?: EnvControl;
|
|
4153
4344
|
enterprise?: boolean;
|
|
4154
4345
|
outdoorViewToken?: string;
|
|
4155
4346
|
localePacksUrls?: LocalePackUrls;
|
|
@@ -4158,89 +4349,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
|
|
|
4158
4349
|
};
|
|
4159
4350
|
}
|
|
4160
4351
|
|
|
4161
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
|
|
4162
|
-
import type { RendererCore } from '@mappedin/core-sdk';
|
|
4163
|
-
import { PubSub } from '@packages/internal/common';
|
|
4164
|
-
import type { GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
4165
|
-
import type { TBlueDotOptions, TBlueDotPositionUpdate } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
4166
|
-
import { Coordinate, type Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
4167
|
-
export type TBlueDotEvents = {
|
|
4168
|
-
'floor-change': {
|
|
4169
|
-
reason: 'blue-dot-floor-change';
|
|
4170
|
-
floorId: string;
|
|
4171
|
-
};
|
|
4172
|
-
};
|
|
4173
|
-
export type TBlueDotState = 'hidden' | 'active' | 'inactive' | 'disabled';
|
|
4174
|
-
export type TBlueDotAction = 'timeout' | 'error' | 'position-received' | 'enable' | 'disable';
|
|
4175
|
-
export class BlueDot extends PubSub<TBlueDotEvents> {
|
|
4176
|
-
#private;
|
|
4177
|
-
state: TBlueDotState;
|
|
4178
|
-
/**
|
|
4179
|
-
* The direction the user is facing in degrees from north.
|
|
4180
|
-
*/
|
|
4181
|
-
get heading(): GeolocationPosition['coords']['heading'] | undefined;
|
|
4182
|
-
/**
|
|
4183
|
-
* The accuracy of the current position in metres.
|
|
4184
|
-
*/
|
|
4185
|
-
get accuracy(): GeolocationPosition['coords']['accuracy'] | undefined;
|
|
4186
|
-
/**
|
|
4187
|
-
* The coordinate of the current position.
|
|
4188
|
-
*/
|
|
4189
|
-
get coordinate(): Coordinate | undefined;
|
|
4190
|
-
/**
|
|
4191
|
-
* The floor the Blue Dot is currently on. If undefined, the Blue Dot will appear on every floor.
|
|
4192
|
-
*/
|
|
4193
|
-
get floor(): Floor | undefined;
|
|
4194
|
-
/**
|
|
4195
|
-
* @internal
|
|
4196
|
-
*/
|
|
4197
|
-
constructor(core: RendererCore, geoJSONApi: GeoJsonApi);
|
|
4198
|
-
/**
|
|
4199
|
-
* Enable the Blue Dot. It will be hidden until a position is received either from the browser or by calling {@link BlueDot.update}.
|
|
4200
|
-
* @param options - The options to setup the Blue Dot.
|
|
4201
|
-
*/
|
|
4202
|
-
enable(options?: TBlueDotOptions): void;
|
|
4203
|
-
/**
|
|
4204
|
-
* Disable the Blue Dot. It will be hidden and no longer update.
|
|
4205
|
-
*/
|
|
4206
|
-
disable(): void;
|
|
4207
|
-
/**
|
|
4208
|
-
* Enable or disable the devices's geolocation listener to automatically position the Blue Dot.
|
|
4209
|
-
* If enabled, the device will request permission to access the user's precise location.
|
|
4210
|
-
* @param watch - Whether to enable or disable the listener.
|
|
4211
|
-
*/
|
|
4212
|
-
watchDevicePosition(watch: boolean): void;
|
|
4213
|
-
/**
|
|
4214
|
-
* Manually override some position properties of the Blue Dot.
|
|
4215
|
-
* Accepts a full GeolocationPosition object or a partial {@link TBlueDotPositionUpdate} object.
|
|
4216
|
-
* @example Manually set the accuracy and heading
|
|
4217
|
-
* ```ts
|
|
4218
|
-
* api.BlueDot.update({ accuracy: 10, heading: 90 });
|
|
4219
|
-
* ```
|
|
4220
|
-
* @example Reset accuracy and heading to device values
|
|
4221
|
-
* ```ts
|
|
4222
|
-
* api.BlueDot.update({ accuracy: 'device', heading: 'device' });
|
|
4223
|
-
* ```
|
|
4224
|
-
*/
|
|
4225
|
-
update(position: GeolocationPositionExtended | TBlueDotPositionUpdate | undefined): void;
|
|
4226
|
-
}
|
|
4227
|
-
type TStateTransitions = {
|
|
4228
|
-
[Action in TBlueDotAction]?: TBlueDotState;
|
|
4229
|
-
};
|
|
4230
|
-
type TStateMachine = {
|
|
4231
|
-
[State in TBlueDotState]: {
|
|
4232
|
-
actions: TStateTransitions;
|
|
4233
|
-
};
|
|
4234
|
-
};
|
|
4235
|
-
export const stateMachine: TStateMachine;
|
|
4236
|
-
export type GeolocationPositionExtended = GeolocationPosition & {
|
|
4237
|
-
coords: GeolocationPosition['coords'] & {
|
|
4238
|
-
readonly floorLevel?: number;
|
|
4239
|
-
};
|
|
4240
|
-
};
|
|
4241
|
-
export {};
|
|
4242
|
-
}
|
|
4243
|
-
|
|
4244
4352
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes' {
|
|
4245
4353
|
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
4246
4354
|
import { Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
@@ -4294,6 +4402,26 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes' {
|
|
|
4294
4402
|
export {};
|
|
4295
4403
|
}
|
|
4296
4404
|
|
|
4405
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/inspector/inspector' {
|
|
4406
|
+
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
4407
|
+
import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
4408
|
+
import type { GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
4409
|
+
export class Inspector {
|
|
4410
|
+
storeStateToLocalStorageEnabled: boolean;
|
|
4411
|
+
constructor(mv: MapView, api: GeoJsonApi);
|
|
4412
|
+
setMapData(data: MapData): void;
|
|
4413
|
+
enable(options?: InspectorOption): Promise<void>;
|
|
4414
|
+
get enabled(): boolean;
|
|
4415
|
+
}
|
|
4416
|
+
export type InspectorState = {
|
|
4417
|
+
camera: {
|
|
4418
|
+
focusOnClick: boolean;
|
|
4419
|
+
padding: [number, number, number, number];
|
|
4420
|
+
};
|
|
4421
|
+
};
|
|
4422
|
+
export type InspectorOption = Partial<InspectorState>;
|
|
4423
|
+
}
|
|
4424
|
+
|
|
4297
4425
|
declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
4298
4426
|
import './marker.scss';
|
|
4299
4427
|
import { Vector2 } from 'three';
|
|
@@ -4351,22 +4479,23 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
4351
4479
|
rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
|
|
4352
4480
|
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
4353
4481
|
id: z.ZodOptional<z.ZodString>;
|
|
4354
|
-
anchor: z.ZodOptional<z.ZodEnum<["top", "bottom", "left", "right", "center"]>>;
|
|
4482
|
+
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">]>>;
|
|
4355
4483
|
dynamicResize: z.ZodOptional<z.ZodBoolean>;
|
|
4356
4484
|
}, "strip", z.ZodTypeAny, {
|
|
4357
4485
|
interactive?: boolean | undefined;
|
|
4358
4486
|
id?: string | undefined;
|
|
4359
|
-
anchor?: "center" | "left" | "right" | "bottom" | "top" | undefined;
|
|
4487
|
+
anchor?: "center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
|
|
4360
4488
|
rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
|
|
4361
4489
|
dynamicResize?: boolean | undefined;
|
|
4362
4490
|
}, {
|
|
4363
4491
|
interactive?: boolean | undefined;
|
|
4364
4492
|
id?: string | undefined;
|
|
4365
|
-
anchor?: "center" | "left" | "right" | "bottom" | "top" | undefined;
|
|
4493
|
+
anchor?: "center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
|
|
4366
4494
|
rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
|
|
4367
4495
|
dynamicResize?: boolean | undefined;
|
|
4368
4496
|
}>;
|
|
4369
4497
|
export function validateMarker(coordinate: Position, contentHTML: string, options: AddMarkerOptions): void;
|
|
4498
|
+
export type MarkerAnchor = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
4370
4499
|
/**
|
|
4371
4500
|
* Options for creating a new Marker
|
|
4372
4501
|
*/
|
|
@@ -4388,9 +4517,9 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
4388
4517
|
*/
|
|
4389
4518
|
id?: string;
|
|
4390
4519
|
/**
|
|
4391
|
-
* Anchor point for the marker. This will determine the position of the marker relative to the position.
|
|
4520
|
+
* 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.
|
|
4392
4521
|
*/
|
|
4393
|
-
anchor?:
|
|
4522
|
+
anchor?: MarkerAnchor | MarkerAnchor[];
|
|
4394
4523
|
/**
|
|
4395
4524
|
* Dynamic resize of the marker. If set to true, the marker will resize based on the content.
|
|
4396
4525
|
*/
|
|
@@ -4402,7 +4531,8 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
4402
4531
|
static testId: number;
|
|
4403
4532
|
rank: number;
|
|
4404
4533
|
initialRank: number;
|
|
4405
|
-
|
|
4534
|
+
activeAnchor: MarkerAnchor;
|
|
4535
|
+
options: Required<AddMarkerOptions>;
|
|
4406
4536
|
projection: Vector2;
|
|
4407
4537
|
enabled: boolean;
|
|
4408
4538
|
activeStrategyIndex: number;
|
|
@@ -4428,9 +4558,9 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
4428
4558
|
visible: boolean;
|
|
4429
4559
|
animation: Animation | null;
|
|
4430
4560
|
currentStrategyIndex: number;
|
|
4431
|
-
onStrategySelected: (strategyIndex:
|
|
4561
|
+
onStrategySelected: (strategyIndex: number, force?: boolean) => void;
|
|
4432
4562
|
get strategies(): {
|
|
4433
|
-
name:
|
|
4563
|
+
name: MarkerAnchor;
|
|
4434
4564
|
getBoundingBox: () => number[];
|
|
4435
4565
|
}[];
|
|
4436
4566
|
toJSON(): {
|
|
@@ -4456,6 +4586,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/path' {
|
|
|
4456
4586
|
import type { PathMaterial, PatMeshContainer } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
4457
4587
|
import type { FeatureCollection, Point } from 'geojson';
|
|
4458
4588
|
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
4589
|
+
import { z } from 'zod';
|
|
4459
4590
|
export type PathProperties = {
|
|
4460
4591
|
/**
|
|
4461
4592
|
* The parentId of the point. The point will be anchored to the altitude of this parent group container.
|
|
@@ -4555,6 +4686,70 @@ declare module '@mappedin/react-sdk/geojson/src/components/path' {
|
|
|
4555
4686
|
*/
|
|
4556
4687
|
animateArrowsOnPath?: boolean;
|
|
4557
4688
|
};
|
|
4689
|
+
export const addPathOptionsSchema: z.ZodObject<{
|
|
4690
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
4691
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4692
|
+
nearRadius: z.ZodOptional<z.ZodNumber>;
|
|
4693
|
+
farRadius: z.ZodOptional<z.ZodNumber>;
|
|
4694
|
+
accentColor: z.ZodOptional<z.ZodString>;
|
|
4695
|
+
displayArrowsOnPath: z.ZodOptional<z.ZodBoolean>;
|
|
4696
|
+
animateArrowsOnPath: z.ZodOptional<z.ZodBoolean>;
|
|
4697
|
+
}, "strip", z.ZodTypeAny, {
|
|
4698
|
+
interactive?: boolean | undefined;
|
|
4699
|
+
id?: string | undefined;
|
|
4700
|
+
accentColor?: string | undefined;
|
|
4701
|
+
displayArrowsOnPath?: boolean | undefined;
|
|
4702
|
+
animateArrowsOnPath?: boolean | undefined;
|
|
4703
|
+
nearRadius?: number | undefined;
|
|
4704
|
+
farRadius?: number | undefined;
|
|
4705
|
+
}, {
|
|
4706
|
+
interactive?: boolean | undefined;
|
|
4707
|
+
id?: string | undefined;
|
|
4708
|
+
accentColor?: string | undefined;
|
|
4709
|
+
displayArrowsOnPath?: boolean | undefined;
|
|
4710
|
+
animateArrowsOnPath?: boolean | undefined;
|
|
4711
|
+
nearRadius?: number | undefined;
|
|
4712
|
+
farRadius?: number | undefined;
|
|
4713
|
+
}>;
|
|
4714
|
+
export const featureSchema: z.ZodObject<{
|
|
4715
|
+
type: z.ZodEnum<["Feature"]>;
|
|
4716
|
+
geometry: z.ZodObject<{
|
|
4717
|
+
type: z.ZodEnum<["Point"]>;
|
|
4718
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
4719
|
+
}, "strip", z.ZodTypeAny, {
|
|
4720
|
+
type: "Point";
|
|
4721
|
+
coordinates: number[];
|
|
4722
|
+
}, {
|
|
4723
|
+
type: "Point";
|
|
4724
|
+
coordinates: number[];
|
|
4725
|
+
}>;
|
|
4726
|
+
properties: z.ZodObject<{
|
|
4727
|
+
parentId: z.ZodOptional<z.ZodAny>;
|
|
4728
|
+
}, "strip", z.ZodTypeAny, {
|
|
4729
|
+
parentId?: any;
|
|
4730
|
+
}, {
|
|
4731
|
+
parentId?: any;
|
|
4732
|
+
}>;
|
|
4733
|
+
}, "strip", z.ZodTypeAny, {
|
|
4734
|
+
type: "Feature";
|
|
4735
|
+
geometry: {
|
|
4736
|
+
type: "Point";
|
|
4737
|
+
coordinates: number[];
|
|
4738
|
+
};
|
|
4739
|
+
properties: {
|
|
4740
|
+
parentId?: any;
|
|
4741
|
+
};
|
|
4742
|
+
}, {
|
|
4743
|
+
type: "Feature";
|
|
4744
|
+
geometry: {
|
|
4745
|
+
type: "Point";
|
|
4746
|
+
coordinates: number[];
|
|
4747
|
+
};
|
|
4748
|
+
properties: {
|
|
4749
|
+
parentId?: any;
|
|
4750
|
+
};
|
|
4751
|
+
}>;
|
|
4752
|
+
export function validatePath(geometry: FeatureCollection<Point, PathProperties>, options: AddPathOptions): void;
|
|
4558
4753
|
export class PathComponent {
|
|
4559
4754
|
#private;
|
|
4560
4755
|
readonly type = "path";
|
|
@@ -5211,6 +5406,10 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry-group' {
|
|
|
5211
5406
|
* The top texture URL of the geometry
|
|
5212
5407
|
*/
|
|
5213
5408
|
topTexture?: string;
|
|
5409
|
+
/**
|
|
5410
|
+
* altitude of the geometry group
|
|
5411
|
+
*/
|
|
5412
|
+
altitude?: number;
|
|
5214
5413
|
};
|
|
5215
5414
|
export type ChildUpdatable<T> = T extends LineStyle ? Partial<Pick<LineStyle, 'color' | 'opacity' | 'visible'>> : Partial<Pick<PaintStyle, 'color' | 'opacity' | 'visible'>>;
|
|
5216
5415
|
export class GeometryGroupObject3D extends Object3D {
|
|
@@ -5236,6 +5435,8 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry-group' {
|
|
|
5236
5435
|
* We use this logic a lot for getting the material of the group. since group does not have material and batched mesh does
|
|
5237
5436
|
*/
|
|
5238
5437
|
getfirstChildEntityId(): string | number | undefined;
|
|
5438
|
+
setAltitude(altitude: number): void;
|
|
5439
|
+
get altitude(): number;
|
|
5239
5440
|
}
|
|
5240
5441
|
}
|
|
5241
5442
|
|
|
@@ -5385,6 +5586,22 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
5385
5586
|
left: number;
|
|
5386
5587
|
bottom: number;
|
|
5387
5588
|
right: number;
|
|
5589
|
+
/**
|
|
5590
|
+
* The type of padding to use. If 'portion', the padding will be a portion of the canvas size. If 'pixel', the padding will be in pixels.
|
|
5591
|
+
* @defaultValue 'pixel'
|
|
5592
|
+
*/
|
|
5593
|
+
type: 'pixel' | 'portion';
|
|
5594
|
+
};
|
|
5595
|
+
/**
|
|
5596
|
+
* An option for setting the inset padding of the camera.
|
|
5597
|
+
* @interface
|
|
5598
|
+
*/
|
|
5599
|
+
export type InsetPaddingOption = Omit<InsetPadding, 'type'> & {
|
|
5600
|
+
/**
|
|
5601
|
+
* The type of padding to use. If 'portion', the padding will be a portion of the canvas size. If 'pixel', the padding will be in pixels.
|
|
5602
|
+
* @defaultValue 'pixel'
|
|
5603
|
+
*/
|
|
5604
|
+
type?: InsetPadding['type'];
|
|
5388
5605
|
};
|
|
5389
5606
|
export * from '@mappedin/react-sdk/geojson/src/types/constants';
|
|
5390
5607
|
/**
|
|
@@ -5669,19 +5886,39 @@ declare module '@mappedin/react-sdk/geojson/src/components/custom' {
|
|
|
5669
5886
|
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
5670
5887
|
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
5671
5888
|
/**
|
|
5672
|
-
*
|
|
5889
|
+
* Represents the state of a custom shape.
|
|
5673
5890
|
*/
|
|
5674
5891
|
export type ShapeState = {
|
|
5892
|
+
/**
|
|
5893
|
+
* The unique identifier of the shape.
|
|
5894
|
+
*/
|
|
5675
5895
|
readonly id: string;
|
|
5896
|
+
/**
|
|
5897
|
+
* The type of the shape, which is always 'custom-geometry'.
|
|
5898
|
+
*/
|
|
5676
5899
|
readonly type: 'custom-geometry';
|
|
5677
5900
|
/**
|
|
5678
|
-
* The position of the geometry in [
|
|
5901
|
+
* The position of the geometry in [longitude, latitude].
|
|
5679
5902
|
*/
|
|
5680
5903
|
readonly position: Position;
|
|
5904
|
+
/**
|
|
5905
|
+
* Whether the geometry is visible.
|
|
5906
|
+
*/
|
|
5681
5907
|
visible?: boolean;
|
|
5908
|
+
/**
|
|
5909
|
+
* The altitude of the geometry, in meters.
|
|
5910
|
+
*/
|
|
5682
5911
|
altitude?: number;
|
|
5683
5912
|
/**
|
|
5684
|
-
* The
|
|
5913
|
+
* The color of the shape.
|
|
5914
|
+
*/
|
|
5915
|
+
color: string;
|
|
5916
|
+
/**
|
|
5917
|
+
* The opacity of the shape.
|
|
5918
|
+
*/
|
|
5919
|
+
opacity: number;
|
|
5920
|
+
/**
|
|
5921
|
+
* The parent container of the geometry.
|
|
5685
5922
|
*/
|
|
5686
5923
|
readonly parent: EntityId<GroupContainerState> | string | number;
|
|
5687
5924
|
};
|
|
@@ -6119,7 +6356,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
6119
6356
|
/**
|
|
6120
6357
|
* Add a Path along a set of GeoJSON coordinates that can be animated.
|
|
6121
6358
|
*/
|
|
6122
|
-
addPath(geometry: FeatureCollection<Point, PathProperties>, options?: AddPathOptions, parent?: EntityId<GroupContainerState> | string | null): EntityId<PathState
|
|
6359
|
+
addPath(geometry: FeatureCollection<Point, PathProperties>, options?: AddPathOptions, parent?: EntityId<GroupContainerState> | string | null): EntityId<PathState> | undefined;
|
|
6123
6360
|
/**
|
|
6124
6361
|
* Updates the watermark on the map.
|
|
6125
6362
|
*
|
|
@@ -6310,13 +6547,13 @@ declare module '@mappedin/react-sdk/geojson/src/camera' {
|
|
|
6310
6547
|
import type { RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
6311
6548
|
import type { Position as GeoJSONPosition } from 'geojson';
|
|
6312
6549
|
import { type InsetPadding, type Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
6313
|
-
import type { RendererState, Systems } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6550
|
+
import type { InsetPaddingOption, RendererState, Systems } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6314
6551
|
export type EasingCurve = 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
|
|
6315
6552
|
export type FocusOnOptions = {
|
|
6316
6553
|
bearing?: number;
|
|
6317
6554
|
pitch?: number;
|
|
6318
6555
|
duration?: number;
|
|
6319
|
-
padding?:
|
|
6556
|
+
padding?: InsetPaddingOption;
|
|
6320
6557
|
minZoomLevel?: number;
|
|
6321
6558
|
maxZoomLevel?: number;
|
|
6322
6559
|
easing?: EasingCurve;
|
|
@@ -6407,7 +6644,7 @@ declare module '@mappedin/react-sdk/geojson/src/camera' {
|
|
|
6407
6644
|
*/
|
|
6408
6645
|
setMaxPitch(pitch: number): void;
|
|
6409
6646
|
/**
|
|
6410
|
-
* The camera's current
|
|
6647
|
+
* The camera's current clockwise rotation in degrees from north.
|
|
6411
6648
|
*/
|
|
6412
6649
|
get bearing(): number;
|
|
6413
6650
|
/**
|
|
@@ -6436,10 +6673,9 @@ declare module '@mappedin/react-sdk/geojson/src/camera' {
|
|
|
6436
6673
|
*/
|
|
6437
6674
|
get insetsPadding(): InsetPadding;
|
|
6438
6675
|
/**
|
|
6439
|
-
*
|
|
6440
6676
|
* @param padding The padding around the edges of the map when focusing on a set of coordinates (in screen pixels).
|
|
6441
6677
|
*/
|
|
6442
|
-
setInsetPadding(padding
|
|
6678
|
+
setInsetPadding(padding: InsetPadding): void;
|
|
6443
6679
|
animateTo(options: AnimateToOptions): Promise<void>;
|
|
6444
6680
|
/**
|
|
6445
6681
|
* Focuses the camera on a set of coordinates, with optional animation
|
|
@@ -6791,6 +7027,83 @@ declare module '@mappedin/react-sdk/geojson/src/maplibre-overlay' {
|
|
|
6791
7027
|
}
|
|
6792
7028
|
}
|
|
6793
7029
|
|
|
7030
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
7031
|
+
import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
|
|
7032
|
+
import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
7033
|
+
import { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
7034
|
+
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
7035
|
+
import { Coordinate, MapObject, Space, Floor, type MapDataInternal, Door } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
7036
|
+
import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
7037
|
+
import { Label, Marker, type Model, type Image, Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
7038
|
+
import { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
7039
|
+
import type { TGetState, TUpdateState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
7040
|
+
import { Camera } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera';
|
|
7041
|
+
import { Exporter } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/exporter';
|
|
7042
|
+
import { Labels } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/labels';
|
|
7043
|
+
import { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
7044
|
+
import { Markers } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/markers';
|
|
7045
|
+
import { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
|
|
7046
|
+
import { Models } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/models';
|
|
7047
|
+
import { Paths } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/paths';
|
|
7048
|
+
import { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
7049
|
+
import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
7050
|
+
import { Shapes } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes';
|
|
7051
|
+
import { Style } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/style';
|
|
7052
|
+
import Outdoor from '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor';
|
|
7053
|
+
import type { TShowStackOptions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
7054
|
+
export class GeoJsonApi {
|
|
7055
|
+
core: RendererCore;
|
|
7056
|
+
outdoors: GeojsonApiMapObject;
|
|
7057
|
+
mapObjects: GeojsonApiMapObject[];
|
|
7058
|
+
id: string;
|
|
7059
|
+
mapDataExternal: {
|
|
7060
|
+
[key in string]: MapData;
|
|
7061
|
+
};
|
|
7062
|
+
currentMap?: GeojsonApiMapObject;
|
|
7063
|
+
hiddenOutdoorGeometries: [Position, layer: string[]][];
|
|
7064
|
+
mapView: MapView;
|
|
7065
|
+
Camera: Camera;
|
|
7066
|
+
Labels: Labels;
|
|
7067
|
+
Markers: Markers;
|
|
7068
|
+
Models: Models;
|
|
7069
|
+
Paths: Paths;
|
|
7070
|
+
Exporter: Exporter;
|
|
7071
|
+
Navigation: Navigation;
|
|
7072
|
+
Outdoor: Outdoor;
|
|
7073
|
+
BlueDot: BlueDot;
|
|
7074
|
+
Shapes: Shapes;
|
|
7075
|
+
Style: Style;
|
|
7076
|
+
Images: Images;
|
|
7077
|
+
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
7078
|
+
updateState<T extends Space | MapObject | Label | Shape | Marker | Door | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
7079
|
+
update: () => void;
|
|
7080
|
+
getMapDataInternal(): MapDataInternal | undefined;
|
|
7081
|
+
getMapData(): MapData | undefined;
|
|
7082
|
+
expand(opts?: {
|
|
7083
|
+
excludeFloors: Floor[];
|
|
7084
|
+
}): Promise<void> | undefined;
|
|
7085
|
+
collapse(): Promise<void> | undefined;
|
|
7086
|
+
showStack(opts?: TShowStackOptions): Promise<void> | undefined;
|
|
7087
|
+
addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
|
|
7088
|
+
setFloor(floor: Floor | string, reason?: TFloorChangeReason): Promise<void> | undefined;
|
|
7089
|
+
updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
|
|
7090
|
+
get currentFloor(): Floor;
|
|
7091
|
+
getState<T extends Space | MapObject | Label | Marker | Shape | Model | Image | string>(target: T): TGetState<T> | undefined;
|
|
7092
|
+
setHoverColor(c: string): void;
|
|
7093
|
+
getHoverColor(): string | undefined;
|
|
7094
|
+
createCoordinate(latitude: number, longitude: number, floor?: Floor): Coordinate;
|
|
7095
|
+
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor): Coordinate | undefined;
|
|
7096
|
+
isInView(target: Space | MapObject | Label | Marker | string): boolean;
|
|
7097
|
+
auto(): void;
|
|
7098
|
+
/**
|
|
7099
|
+
* @internal
|
|
7100
|
+
*/
|
|
7101
|
+
get __core(): RendererCore;
|
|
7102
|
+
clear(): void;
|
|
7103
|
+
destroy(): void;
|
|
7104
|
+
}
|
|
7105
|
+
}
|
|
7106
|
+
|
|
6794
7107
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/label' {
|
|
6795
7108
|
/**
|
|
6796
7109
|
* Class representing a label on the {@link MapView}.
|
|
@@ -7077,88 +7390,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
7077
7390
|
}
|
|
7078
7391
|
}
|
|
7079
7392
|
|
|
7080
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
7081
|
-
import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
|
|
7082
|
-
import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
7083
|
-
import { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
7084
|
-
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
7085
|
-
import { Coordinate, MapObject, Space, Floor, type MapDataInternal, Door } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
7086
|
-
import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
7087
|
-
import { Label, Marker, type Model, type Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
7088
|
-
import { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
7089
|
-
import type { TGetState, TUpdateState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
7090
|
-
import { Camera } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera';
|
|
7091
|
-
import { Exporter } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/exporter';
|
|
7092
|
-
import { Labels } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/labels';
|
|
7093
|
-
import { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
7094
|
-
import { Markers } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/markers';
|
|
7095
|
-
import { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
|
|
7096
|
-
import { Models } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/models';
|
|
7097
|
-
import { Paths } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/paths';
|
|
7098
|
-
import { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
7099
|
-
import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
7100
|
-
import { Shapes } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes';
|
|
7101
|
-
import { Style } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/style';
|
|
7102
|
-
import Outdoor from '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor';
|
|
7103
|
-
import type { TShowStackOptions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
7104
|
-
export class GeoJsonApi {
|
|
7105
|
-
core: RendererCore;
|
|
7106
|
-
outdoors: GeojsonApiMapObject;
|
|
7107
|
-
mapObjects: GeojsonApiMapObject[];
|
|
7108
|
-
id: string;
|
|
7109
|
-
mapDataExternal: {
|
|
7110
|
-
[key in string]: MapData;
|
|
7111
|
-
};
|
|
7112
|
-
currentMap?: GeojsonApiMapObject;
|
|
7113
|
-
hiddenOutdoorGeometries: [Position, layer: string[]][];
|
|
7114
|
-
mapView: MapView;
|
|
7115
|
-
Camera: Camera;
|
|
7116
|
-
Labels: Labels;
|
|
7117
|
-
Markers: Markers;
|
|
7118
|
-
Models: Models;
|
|
7119
|
-
Paths: Paths;
|
|
7120
|
-
Exporter: Exporter;
|
|
7121
|
-
Navigation: Navigation;
|
|
7122
|
-
Outdoor: Outdoor;
|
|
7123
|
-
BlueDot: BlueDot;
|
|
7124
|
-
Shapes: Shapes;
|
|
7125
|
-
Style: Style;
|
|
7126
|
-
Images: Images;
|
|
7127
|
-
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
7128
|
-
updateState<T extends Space | MapObject | Label | Marker | Door | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
7129
|
-
update: () => void;
|
|
7130
|
-
getMapDataInternal(): MapDataInternal | undefined;
|
|
7131
|
-
getMapData(): MapData | undefined;
|
|
7132
|
-
expand(opts?: {
|
|
7133
|
-
excludeFloors: Floor[];
|
|
7134
|
-
}): Promise<void> | undefined;
|
|
7135
|
-
collapse(): Promise<void> | undefined;
|
|
7136
|
-
showStack(opts?: TShowStackOptions): Promise<void> | undefined;
|
|
7137
|
-
addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
|
|
7138
|
-
setFloor(floor: Floor | string, reason?: TFloorChangeReason): Promise<void> | undefined;
|
|
7139
|
-
updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
|
|
7140
|
-
get currentFloor(): Floor;
|
|
7141
|
-
getState<T extends Space | MapObject | Label | Marker | Model | Image | string>(target: T): TGetState<T> | undefined;
|
|
7142
|
-
setHoverColor(c: string): void;
|
|
7143
|
-
getHoverColor(): string | undefined;
|
|
7144
|
-
createCoordinate(latitude: number, longitude: number, floor?: Floor): Coordinate;
|
|
7145
|
-
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor): Coordinate | undefined;
|
|
7146
|
-
isInView(target: Space | MapObject | Label | Marker | string): boolean;
|
|
7147
|
-
auto(): void;
|
|
7148
|
-
/**
|
|
7149
|
-
* @internal
|
|
7150
|
-
*/
|
|
7151
|
-
get __core(): RendererCore;
|
|
7152
|
-
clear(): void;
|
|
7153
|
-
destroy(): void;
|
|
7154
|
-
}
|
|
7155
|
-
}
|
|
7156
|
-
|
|
7157
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot' {
|
|
7158
|
-
export { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
7159
|
-
export type { TBlueDotEvents } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
7160
|
-
}
|
|
7161
|
-
|
|
7162
7393
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera' {
|
|
7163
7394
|
import type { TCameraAnimationOptions, TCameraFocusOnTarget, TCameraTarget, TFocusOnOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
7164
7395
|
import type { InsetPadding, RendererCore } from '@mappedin/core-sdk';
|
|
@@ -7239,7 +7470,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera' {
|
|
|
7239
7470
|
*/
|
|
7240
7471
|
setMaxPitch: (maxPitch: number) => void;
|
|
7241
7472
|
/**
|
|
7242
|
-
* The current bearing of the camera in degrees.
|
|
7473
|
+
* The current bearing of the camera in degrees clockwise from North. 0 degrees is North, 90 degrees is East, 180 degrees is South, and 270 degrees is West.
|
|
7243
7474
|
*/
|
|
7244
7475
|
get bearing(): number;
|
|
7245
7476
|
/**
|
|
@@ -7680,6 +7911,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/search/internal' {
|
|
|
7680
7911
|
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
7681
7912
|
import { z } from 'zod';
|
|
7682
7913
|
export class InternalSearch {
|
|
7914
|
+
#private;
|
|
7683
7915
|
constructor(mapData: MapData);
|
|
7684
7916
|
/**
|
|
7685
7917
|
* Populates the search indexes with the map data.
|
|
@@ -8172,7 +8404,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
|
|
|
8172
8404
|
/** Flag to enable sending of events. */
|
|
8173
8405
|
sendEvents: boolean;
|
|
8174
8406
|
} & AnalyticsAuth;
|
|
8175
|
-
type AnalyticsOptions = Partial<Omit<AnalyticState, 'version' | 'analyticsBaseUrl' | 'geolocationMode' | '
|
|
8407
|
+
type AnalyticsOptions = Partial<Omit<AnalyticState, 'version' | 'analyticsBaseUrl' | 'geolocationMode' | 'userPosition'>>;
|
|
8176
8408
|
export type AnalyticsUpdateOptions = Omit<AnalyticsOptions, keyof AnalyticsAuth> & ((Required<Pick<AnalyticsAuth, 'key' | 'secret'>> & Partial<Pick<AnalyticsAuth, 'accessToken'>>) | (Required<Pick<AnalyticsAuth, 'accessToken'>> & Partial<Pick<AnalyticsAuth, 'key' | 'secret'>>));
|
|
8177
8409
|
/**
|
|
8178
8410
|
* Options for updating the current state of analytics.
|
|
@@ -9430,7 +9662,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
|
9430
9662
|
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle } from '@mappedin/core-sdk';
|
|
9431
9663
|
import { type TGeometryState, type TLabelState, type TDirectionInstructionAction, type TShow3DMapOptions, type Label, type Marker, type Model } from '@mappedin/react-sdk/mappedin-js/src';
|
|
9432
9664
|
import type { TDoorsState, TMarkerState, TWallsState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
9433
|
-
import type { Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
9665
|
+
import type { Image, Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
9434
9666
|
import type { GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
9435
9667
|
import type TWEEN from '@tweenjs/tween.js';
|
|
9436
9668
|
export function convertCoordinateToPosition(coord: Coordinate): Position;
|
|
@@ -9459,7 +9691,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
|
9459
9691
|
};
|
|
9460
9692
|
export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon, WithPolygonImage<SpaceProperties> | WithPolygonImage<ObstructionProperties>>[]>;
|
|
9461
9693
|
export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
|
|
9462
|
-
export const getTargetID: <T extends Space | MapObject | Label | Marker | Model | Image | string>(target: T, api: GeoJsonApi) => string | undefined;
|
|
9694
|
+
export const getTargetID: <T extends Space | Shape | MapObject | Label | Marker | Model | Image | string>(target: T, api: GeoJsonApi) => string | undefined;
|
|
9463
9695
|
export function tweenToPromise(tween: TWEEN.Tween): Promise<void>;
|
|
9464
9696
|
}
|
|
9465
9697
|
|
|
@@ -9664,7 +9896,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/camera/system' {
|
|
|
9664
9896
|
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
9665
9897
|
import * as CAMERA_CONSTANTS from '@mappedin/react-sdk/geojson/src/systems/camera/constants';
|
|
9666
9898
|
import type { AnimateCameraTarget, CameraControlsOptions, CameraFocusOnOptions } from '@mappedin/react-sdk/geojson/src/systems/camera/types';
|
|
9667
|
-
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
9899
|
+
import type { InsetPadding, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
9668
9900
|
type CameraEventName = (typeof CAMERA_CONSTANTS.EVENTS)[number];
|
|
9669
9901
|
type SpecificCameraEvents = {
|
|
9670
9902
|
'multi-start': {
|
|
@@ -10012,7 +10244,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/camera/system' {
|
|
|
10012
10244
|
*/
|
|
10013
10245
|
getZoomScaledMax: () => number;
|
|
10014
10246
|
/**
|
|
10015
|
-
* Sets the rotation to a specific orientation, in radians. Mostly useful to orient the map a certain way for a physical directory.
|
|
10247
|
+
* Sets the rotation to a specific orientation, clockwise in radians. Mostly useful to orient the map a certain way for a physical directory.
|
|
10016
10248
|
*
|
|
10017
10249
|
* @param radians {Number} Absolute rotation to set the camera to, in radians. 0 in the starting point.
|
|
10018
10250
|
* @param silent {Boolean} Whether to avoid emitting events
|
|
@@ -10039,12 +10271,6 @@ declare module '@mappedin/react-sdk/geojson/src/systems/camera/system' {
|
|
|
10039
10271
|
* Current camera zoom in mercator zoom level units.
|
|
10040
10272
|
*/
|
|
10041
10273
|
getZoomLevel: () => number;
|
|
10042
|
-
/**
|
|
10043
|
-
* Rotates the camera a set number of radians relative to the current rotation. Useful for an idle rotation animation.
|
|
10044
|
-
*
|
|
10045
|
-
* @param radians {Number} Number of radians to rotate the camera.
|
|
10046
|
-
*/
|
|
10047
|
-
rotate: (radians: number) => void;
|
|
10048
10274
|
/**
|
|
10049
10275
|
* Sets the tilt to a specific level, in radians. 0 is top down. Bounded by minTilt and maxTilt.
|
|
10050
10276
|
*
|
|
@@ -10099,18 +10325,27 @@ declare module '@mappedin/react-sdk/geojson/src/systems/camera/system' {
|
|
|
10099
10325
|
* @param zoomLevel{number} The mercator zoom level
|
|
10100
10326
|
*/
|
|
10101
10327
|
convertZoomLevelToAltitude: (zoomLevel: number) => number;
|
|
10102
|
-
|
|
10103
|
-
canvasWidth: any;
|
|
10104
|
-
canvasHeight: any;
|
|
10105
|
-
}, minZoom?: number, maxZoom?: number) => {
|
|
10106
|
-
position: Vector3;
|
|
10107
|
-
zoom: number;
|
|
10108
|
-
};
|
|
10328
|
+
static CAMERA_FRAME_PADDING_SIDES: readonly ["top", "bottom", "left", "right"];
|
|
10109
10329
|
debugContainer: Object3D<import("three").Object3DEventMap>;
|
|
10110
|
-
focusOn(pointCloud: Vector3[],
|
|
10330
|
+
focusOn(pointCloud: Vector3[], options: CameraFocusOnOptions & {
|
|
10331
|
+
padding: InsetPadding;
|
|
10332
|
+
}): void;
|
|
10111
10333
|
resize(canvasWidth: number, canvasHeight: number): void;
|
|
10112
10334
|
}
|
|
10113
10335
|
export { CameraSystem };
|
|
10336
|
+
export function getCameraFrameForPoints(pointCloud: Vector3[], { canvasWidth, orbit, paddingOption, canvasHeight, minZoom, maxZoom, camera, position, }: {
|
|
10337
|
+
paddingOption: InsetPadding;
|
|
10338
|
+
canvasWidth: number;
|
|
10339
|
+
canvasHeight: number;
|
|
10340
|
+
minZoom: number;
|
|
10341
|
+
maxZoom: number;
|
|
10342
|
+
orbit: Object3D;
|
|
10343
|
+
camera: PerspectiveCamera;
|
|
10344
|
+
position: Vector3;
|
|
10345
|
+
}): {
|
|
10346
|
+
position: Vector3;
|
|
10347
|
+
zoom: number;
|
|
10348
|
+
};
|
|
10114
10349
|
}
|
|
10115
10350
|
|
|
10116
10351
|
declare module '@mappedin/react-sdk/geojson/src/systems/camera/types' {
|