@mappedin/mappedin-js 6.0.1-beta.28 → 6.0.1-beta.29
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-UWNB5FW6.js → GLTFExporter-Y7BSZVBH.js} +1 -1
- package/lib/esm/{GLTFLoader-EHOLL6QD.js → GLTFLoader-K67N4RFF.js} +1 -1
- package/lib/esm/{browser-36I3UDN5.js → browser-JCMKWIF4.js} +1 -1
- package/lib/esm/{chunk-HOUALCYP.js → chunk-3RUMFBSI.js} +1 -1
- package/lib/esm/{chunk-CWTAYD5M.js → chunk-EXW3BL3F.js} +1 -1
- package/lib/esm/chunk-GDH3UII5.js +1 -0
- package/lib/esm/{chunk-FTSZ2MDP.js → chunk-IJDVDF27.js} +1 -1
- package/lib/esm/{chunk-XAEMBIGG.js → chunk-IKRJZNLL.js} +1 -1
- package/lib/esm/{chunk-GA4W7KUL.js → chunk-PDOJBYQZ.js} +1 -1
- package/lib/esm/index.d.ts +1742 -1618
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-ZXJ6QSPB.js → inspector-JWG7GWP6.js} +1 -1
- package/lib/esm/{internal-2IDGIWLZ.js → internal-5XNJMK3S.js} +1 -1
- package/lib/esm/{outdoor-context-v4-IOQIULYA.js → outdoor-context-v4-XK734ARV.js} +1 -1
- package/lib/esm/{text3d-7RL4HDA7.js → text3d-ZKED4HTQ.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-S2PYW35Z.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -162,6 +162,11 @@ declare module '@mappedin/mappedin-js' {
|
|
|
162
162
|
* @default 'bottom-right'
|
|
163
163
|
*/
|
|
164
164
|
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
165
|
+
/**
|
|
166
|
+
* Whether to show a feedback link next to the attributions.
|
|
167
|
+
* @default true
|
|
168
|
+
*/
|
|
169
|
+
feedback?: boolean;
|
|
165
170
|
};
|
|
166
171
|
/**
|
|
167
172
|
* First floor to be rendered.
|
|
@@ -216,6 +221,12 @@ declare module '@mappedin/mappedin-js' {
|
|
|
216
221
|
floorHeight?: number;
|
|
217
222
|
updateCameraElevationOnFloorChange?: boolean;
|
|
218
223
|
};
|
|
224
|
+
/**
|
|
225
|
+
* @experimental
|
|
226
|
+
* @internal
|
|
227
|
+
* @default false
|
|
228
|
+
*/
|
|
229
|
+
keepOutdoorGeometryVisible?: boolean;
|
|
219
230
|
};
|
|
220
231
|
/**
|
|
221
232
|
* @internal
|
|
@@ -297,14 +308,14 @@ declare module '@mappedin/mappedin-js' {
|
|
|
297
308
|
export { parseMVF, unzipMVF, enableTestMode, preloadFont };
|
|
298
309
|
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, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, };
|
|
299
310
|
export type * from 'geojson';
|
|
300
|
-
export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone,
|
|
311
|
+
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, } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
301
312
|
export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
302
313
|
export type { Label, Marker, Path, Shape, CameraTransform, Model, Image, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
303
314
|
export type { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
|
|
304
315
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
305
316
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
306
|
-
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image as ImageData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, Facade, Node, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
307
|
-
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, StackedMaps, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
317
|
+
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image as ImageData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, Facade, Node, Area, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
318
|
+
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, StackedMaps, DynamicFocus, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
308
319
|
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
309
320
|
export type { TFindNearestOptions, TFindNearestResult, TQueriables, Query } from '@mappedin/mappedin-js/mappedin-js/src/query';
|
|
310
321
|
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
@@ -314,12 +325,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
314
325
|
import { Analytics } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
315
326
|
import { PubSub } from '@packages/internal/common';
|
|
316
327
|
import type { TSearchOptions } from '@packages/internal/mvf-utils';
|
|
317
|
-
import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate, FloorStack, Node, Facade, Area } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
318
|
-
import type EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
|
|
319
|
-
import type EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
|
|
320
|
-
import type EnterpriseVenue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
|
|
328
|
+
import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate, FloorStack, Node, Facade, Area, EnterpriseCategory, EnterpriseLocation, EnterpriseVenue } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
321
329
|
import { Search } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
322
|
-
import type { TNavigationTarget, TGetDirectionsOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
330
|
+
import type { TNavigationTarget, TGetDirectionsOptions, TMapDataObjectTypes } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
323
331
|
import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions';
|
|
324
332
|
import type { Query } from '@mappedin/mappedin-js/mappedin-js/src/query';
|
|
325
333
|
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
@@ -508,8 +516,17 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
508
516
|
* @example
|
|
509
517
|
* const space = mapData.getById('space', 'space-id');
|
|
510
518
|
*/
|
|
511
|
-
getById<T extends
|
|
512
|
-
|
|
519
|
+
getById<T extends keyof TMapDataObjectTypes>(type: T, id: string): TMapDataObjectTypes[T] | undefined;
|
|
520
|
+
/**
|
|
521
|
+
* Retrieves an array of map features by their type and shared external ID.
|
|
522
|
+
*
|
|
523
|
+
* @param type The type of the element to retrieve (e.g., 'space', 'object').
|
|
524
|
+
* @param externalId The external ID of the element.
|
|
525
|
+
* @returns An array of features with the given type and external ID if they exist.
|
|
526
|
+
* @example
|
|
527
|
+
* const spaces = mapData.getByExternalId('space', 'space-external-id');
|
|
528
|
+
*/
|
|
529
|
+
getByExternalId<T extends keyof Omit<TMapDataObjectTypes, 'annotation' | 'facade'>>(type: T, externalId: string): TMapDataObjectTypes[T][];
|
|
513
530
|
/**
|
|
514
531
|
* Get the GeoJSON for a map data object on the map.
|
|
515
532
|
* @param mapDataObject
|
|
@@ -748,7 +765,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
748
765
|
import Image from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image';
|
|
749
766
|
import FloorStack from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor-stack';
|
|
750
767
|
import Facade from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/facade';
|
|
751
|
-
import type { MapDataRecords } from '@mappedin/mappedin-js/mappedin-js/src/utils/data-creation';
|
|
768
|
+
import type { MapDataRecords, EnterpriseMapDataRecords } from '@mappedin/mappedin-js/mappedin-js/src/utils/data-creation';
|
|
752
769
|
import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, FloorProperties as MVFFloor, FloorStack as MVFFloorStack, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseCategory as MVFEnterpriseCategory, Language, AreaCollection } from '@mappedin/mvf';
|
|
753
770
|
import { AnalyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
754
771
|
import EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
|
|
@@ -758,7 +775,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
758
775
|
import type { LanguagePack, Places, TMapDataInternalOptions } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
759
776
|
import { type LocalePackUrls } from '@packages/internal/mvf-utils';
|
|
760
777
|
import type { EnvControl } from '@packages/internal/mvf-utils/mvf-utils';
|
|
761
|
-
import type { TGetDirectionsOptions, TNavigationTarget } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
778
|
+
import type { TMapDataObjectTypes, TGetDirectionsOptions, TNavigationTarget } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
762
779
|
import { type Directions, DirectionsInternal } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions';
|
|
763
780
|
import { type THydrateMapDataBundle } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
764
781
|
import { Query } from '@mappedin/mappedin-js/mappedin-js/src/query';
|
|
@@ -812,11 +829,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
812
829
|
pointsOfInterestById: MapDataRecords['poisById'];
|
|
813
830
|
annotationsById: MapDataRecords['annotationsById'];
|
|
814
831
|
areasById: MapDataRecords['areasById'];
|
|
815
|
-
locationsById:
|
|
816
|
-
categoriesById:
|
|
832
|
+
locationsById: EnterpriseMapDataRecords['locationsById'];
|
|
833
|
+
categoriesById: EnterpriseMapDataRecords['categoriesById'];
|
|
817
834
|
doorsByNodeId: MapDataRecords['doorsByNodeId'];
|
|
818
|
-
|
|
819
|
-
locationIdsByNodeId:
|
|
835
|
+
mvfLocationsBySpaceId: EnterpriseMapDataRecords['mvfLocationsBySpaceId'];
|
|
836
|
+
locationIdsByNodeId: EnterpriseMapDataRecords['locationIdsByNodeId'];
|
|
820
837
|
mvfAnnotationsById: MapDataRecords['mvfAnnotationsById'];
|
|
821
838
|
mvfConnectionsById: MapDataRecords['mvfConnectionsById'];
|
|
822
839
|
mvfConnectionsByNodeId: MapDataRecords['mvfConnectionsByNodeId'];
|
|
@@ -827,6 +844,17 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
827
844
|
mvfFloorsById: MapDataRecords['mvfFloorsById'];
|
|
828
845
|
mvfFloorStacksById: MapDataRecords['mvfFloorStacksById'];
|
|
829
846
|
mvfAreasById: MapDataRecords['mvfAreasById'];
|
|
847
|
+
spacesByExternalId: MapDataRecords['spacesByExternalId'];
|
|
848
|
+
nodesByExternalId: MapDataRecords['nodesByExternalId'];
|
|
849
|
+
objectsByExternalId: MapDataRecords['objectsByExternalId'];
|
|
850
|
+
poisByExternalId: MapDataRecords['poisByExternalId'];
|
|
851
|
+
floorsByExternalId: MapDataRecords['floorsByExternalId'];
|
|
852
|
+
floorStacksByExternalId: MapDataRecords['floorStacksByExternalId'];
|
|
853
|
+
doorsByExternalId: MapDataRecords['doorsByExternalId'];
|
|
854
|
+
areasByExternalId: MapDataRecords['areasByExternalId'];
|
|
855
|
+
connectionsByExternalId: EnterpriseMapDataRecords['connectionsByExternalId'];
|
|
856
|
+
locationsByExternalId: EnterpriseMapDataRecords['locationsByExternalId'];
|
|
857
|
+
categoriesByExternalId: EnterpriseMapDataRecords['categoriesByExternalId'];
|
|
830
858
|
mvfNodesByFloorId: MapDataRecords['mvfNodesByFloorId'];
|
|
831
859
|
mvfSpacesByFloorId: MapDataRecords['mvfSpacesByFloorId'];
|
|
832
860
|
mvfPoisByFloorId: MapDataRecords['mvfPoisByFloorId'];
|
|
@@ -937,10 +965,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
937
965
|
*
|
|
938
966
|
* @param type The type of the object (e.g., 'space', 'door').
|
|
939
967
|
* @param id The ID of the object.
|
|
940
|
-
* @returns
|
|
968
|
+
* @returns The requested object, or undefined if not found.
|
|
941
969
|
*/
|
|
942
|
-
getById<T extends
|
|
943
|
-
|
|
970
|
+
getById<T extends keyof TMapDataObjectTypes>(type: T, id: string): TMapDataObjectTypes[T] | undefined;
|
|
971
|
+
getByExternalId<T extends keyof Omit<TMapDataObjectTypes, 'annotation' | 'facade'>>(type: T, externalId: string): TMapDataObjectTypes[T][];
|
|
944
972
|
getMapDataById(id: string): Places | undefined;
|
|
945
973
|
/**
|
|
946
974
|
* Retrieves a feature by its type and ID from the Mappedin Venue Format (MVF) data.
|
|
@@ -998,7 +1026,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
998
1026
|
import { PubSub } from '@packages/internal/common';
|
|
999
1027
|
import { type TEvents, type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
1000
1028
|
import type { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
1001
|
-
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
1029
|
+
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images, DynamicFocus } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
1002
1030
|
import type { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
1003
1031
|
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
1004
1032
|
import type { Annotation, Coordinate, Door, Floor, MapObject, PointOfInterest, Space, Node, EnterpriseLocation, FloorStack, Facade } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
@@ -1082,7 +1110,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1082
1110
|
* @internal
|
|
1083
1111
|
* @experimental
|
|
1084
1112
|
*/
|
|
1085
|
-
get DynamicFocus():
|
|
1113
|
+
get DynamicFocus(): DynamicFocus;
|
|
1086
1114
|
/**
|
|
1087
1115
|
* @internal
|
|
1088
1116
|
*/
|
|
@@ -1419,7 +1447,7 @@ declare module '@mappedin/mappedin-js/geojson/src' {
|
|
|
1419
1447
|
export type { AddText3DOptions, InitializeText3DState, UpdatableText3DState } from '@mappedin/mappedin-js/geojson/src/components/text3d';
|
|
1420
1448
|
export { ATTRIBUTION_POSITIONS } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
|
|
1421
1449
|
export { ANIMATION_TWEENS } from '@mappedin/mappedin-js/geojson/src/camera';
|
|
1422
|
-
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, };
|
|
1450
|
+
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, RendererCoreOptions, };
|
|
1423
1451
|
export function createRenderer(container: HTMLElement, options?: RendererCoreOptions & {
|
|
1424
1452
|
[key: string]: any;
|
|
1425
1453
|
}): Promise<RendererCore>;
|
|
@@ -1497,10 +1525,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay' {
|
|
|
1497
1525
|
|
|
1498
1526
|
declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
1499
1527
|
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1500
|
-
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection,
|
|
1528
|
+
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, EnterpriseLocation, Node, Area, Facade, FloorStack, Annotation, EnterpriseCategory, EnterpriseVenue } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
1501
1529
|
import type { Label, Marker, Model, Image, Shape, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
1502
1530
|
import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
1503
|
-
import type { InsetPaddingOption,
|
|
1531
|
+
import type { InsetPaddingOption, UpdatableText3DState, Text3DState, AddText3DOptions } from '@mappedin/mappedin-js/geojson/src';
|
|
1504
1532
|
export type DeepRequired<T> = Required<{
|
|
1505
1533
|
[K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
|
|
1506
1534
|
}>;
|
|
@@ -1662,12 +1690,17 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1662
1690
|
*/
|
|
1663
1691
|
opacity: number;
|
|
1664
1692
|
};
|
|
1665
|
-
export type TMarkerState = Omit<Required<TAddMarkerOptions>, 'id'> & {
|
|
1693
|
+
export type TMarkerState = Omit<Required<TAddMarkerOptions>, 'id' | 'zIndex'> & {
|
|
1666
1694
|
type: 'marker';
|
|
1667
1695
|
/**
|
|
1668
1696
|
* HTML element for the marker.
|
|
1669
1697
|
*/
|
|
1670
1698
|
element: HTMLElement;
|
|
1699
|
+
/**
|
|
1700
|
+
* The z-index of the marker. Can be used used in conjunction with rank: 'always-visible' override the default distance from the camera based
|
|
1701
|
+
* sorting of markers and show certain markers always in front
|
|
1702
|
+
*/
|
|
1703
|
+
zIndex?: number;
|
|
1671
1704
|
};
|
|
1672
1705
|
/**
|
|
1673
1706
|
* Represents the state of a shape.
|
|
@@ -1846,18 +1879,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1846
1879
|
*/
|
|
1847
1880
|
interruptible?: boolean;
|
|
1848
1881
|
};
|
|
1849
|
-
/**
|
|
1850
|
-
* A map element that can be focused on by the camera.
|
|
1851
|
-
*/
|
|
1852
|
-
export type TFocusable = Floor | Space | Coordinate | MapObject | Connection | PointOfInterest | Door | Annotation | Area | Node | EnterpriseLocation | Facade
|
|
1853
|
-
/**
|
|
1854
|
-
* @experimental
|
|
1855
|
-
*/
|
|
1856
|
-
| Position;
|
|
1857
|
-
/**
|
|
1858
|
-
* Defines the target(s) for the {@link Camera.focusOn} animation.
|
|
1859
|
-
*/
|
|
1860
|
-
export type TCameraFocusOnTarget = TFocusable | TFocusable[];
|
|
1861
1882
|
/**
|
|
1862
1883
|
* Defines the target for camera operations.
|
|
1863
1884
|
*/
|
|
@@ -1895,7 +1916,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1895
1916
|
geometry: Feature<MultiPolygon | Polygon>;
|
|
1896
1917
|
/**
|
|
1897
1918
|
* The additional cost for navigation through the zone, from 0 to Infinity.
|
|
1898
|
-
* The final cost is calculated as the sum of basic cost that comes from the {@MapData}
|
|
1919
|
+
* The final cost is calculated as the sum of basic cost that comes from the {@link MapData}
|
|
1899
1920
|
* and the additional zone cost.
|
|
1900
1921
|
* A additional zone cost of 0 will make the zone free to navigate through
|
|
1901
1922
|
* A additional zone cost of Infinity will make the zone impossible to navigate through
|
|
@@ -2202,6 +2223,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2202
2223
|
* ```
|
|
2203
2224
|
*/
|
|
2204
2225
|
zones?: TDirectionZone[];
|
|
2226
|
+
/**
|
|
2227
|
+
* @experimental
|
|
2228
|
+
* Enterprise only. Connections that should not be used for directions.
|
|
2229
|
+
*
|
|
2230
|
+
* If a connection is excluded, it will not be used in the directions even if it is the shortest (or only) path.
|
|
2231
|
+
* If there is no path that does not include the these connections, the directions will be undefined.
|
|
2232
|
+
*/
|
|
2233
|
+
excludedConnections?: Connection[];
|
|
2205
2234
|
};
|
|
2206
2235
|
/**
|
|
2207
2236
|
* The target for the add model operation.
|
|
@@ -2317,6 +2346,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2317
2346
|
* Whether the marker is enabled.
|
|
2318
2347
|
*/
|
|
2319
2348
|
enabled?: boolean;
|
|
2349
|
+
/**
|
|
2350
|
+
* The z-index of the marker. Can be used used in conjunction with rank: 'always-visible' override the default distance from the camera based
|
|
2351
|
+
* sorting of markers and show certain markers always in front
|
|
2352
|
+
*/
|
|
2353
|
+
zIndex?: number;
|
|
2320
2354
|
};
|
|
2321
2355
|
/**
|
|
2322
2356
|
* Options for creating a new {@link Label} with {@link Labels.add}.
|
|
@@ -2460,6 +2494,41 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
2460
2494
|
};
|
|
2461
2495
|
};
|
|
2462
2496
|
export type UpdateGlobalState = DeepPartial<GlobalState>;
|
|
2497
|
+
/**
|
|
2498
|
+
* A map element that can be focused on by the camera.
|
|
2499
|
+
*/
|
|
2500
|
+
export type TFocusTarget = Coordinate | Space | Area | MapObject | Floor | Shape;
|
|
2501
|
+
/**
|
|
2502
|
+
* A class that implements IFocusable can be focused on by the camera.
|
|
2503
|
+
*/
|
|
2504
|
+
export interface IFocusable {
|
|
2505
|
+
get focusTarget(): TFocusTarget | TFocusTarget[];
|
|
2506
|
+
}
|
|
2507
|
+
/**
|
|
2508
|
+
* A class that implements IAnchorable can have 2D elements like {@link Label}s and {@link Marker}s anchored to it.
|
|
2509
|
+
*/
|
|
2510
|
+
export interface IAnchorable {
|
|
2511
|
+
get anchorTarget(): Coordinate;
|
|
2512
|
+
}
|
|
2513
|
+
/**
|
|
2514
|
+
* Associates MapData type strings with their corresponding classes.
|
|
2515
|
+
*/
|
|
2516
|
+
export type TMapDataObjectTypes = {
|
|
2517
|
+
node: Node;
|
|
2518
|
+
space: Space;
|
|
2519
|
+
door: Door;
|
|
2520
|
+
floor: Floor;
|
|
2521
|
+
'floor-stack': FloorStack;
|
|
2522
|
+
connection: Connection;
|
|
2523
|
+
object: MapObject;
|
|
2524
|
+
'point-of-interest': PointOfInterest;
|
|
2525
|
+
annotation: Annotation;
|
|
2526
|
+
'enterprise-location': EnterpriseLocation;
|
|
2527
|
+
'enterprise-category': EnterpriseCategory;
|
|
2528
|
+
'enterprise-venue': EnterpriseVenue;
|
|
2529
|
+
area: Area;
|
|
2530
|
+
facade: Facade;
|
|
2531
|
+
};
|
|
2463
2532
|
}
|
|
2464
2533
|
|
|
2465
2534
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
|
|
@@ -3007,6 +3076,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
|
|
|
3007
3076
|
export { default as Outdoor } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
|
|
3008
3077
|
export { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
|
|
3009
3078
|
export { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
3079
|
+
export { DynamicFocus } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus';
|
|
3010
3080
|
}
|
|
3011
3081
|
|
|
3012
3082
|
declare module '@mappedin/mappedin-js/mappedin-js/src/search' {
|
|
@@ -3025,399 +3095,556 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics' {
|
|
|
3025
3095
|
export type { AnalyticsUpdateOptions, AnalyticState, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
|
|
3026
3096
|
}
|
|
3027
3097
|
|
|
3028
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/
|
|
3029
|
-
import type {
|
|
3030
|
-
import type {
|
|
3031
|
-
import
|
|
3098
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions' {
|
|
3099
|
+
import type { ParsedMVF } from '@mappedin/mvf';
|
|
3100
|
+
import type { DirectionsCollection } from '@packages/internal/geojson-navigator';
|
|
3101
|
+
import { Connection, Coordinate, Node, type MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3102
|
+
import type { TDirectionInstruction, TDirectionZone, TNavigationTarget } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3032
3103
|
/**
|
|
3033
|
-
*
|
|
3034
|
-
* For example a mall may group locations into Food Court, Footwear and Women's Fashion. They can be accessed using the {@link MapData.getByType()} method as shown below.
|
|
3035
|
-
*
|
|
3036
|
-
* ```typescript
|
|
3037
|
-
* const categories = mapData.getByType('enterprise-category');
|
|
3038
|
-
* ```
|
|
3104
|
+
* Represents a set of directions between two points.
|
|
3039
3105
|
*
|
|
3040
|
-
*
|
|
3106
|
+
* Directions are used to represent the path between two points on the map,
|
|
3107
|
+
* as well as the instructions to follow the path.
|
|
3041
3108
|
*/
|
|
3042
|
-
class
|
|
3109
|
+
export class Directions {
|
|
3043
3110
|
#private;
|
|
3044
3111
|
/**
|
|
3045
3112
|
* @internal
|
|
3046
3113
|
*/
|
|
3047
|
-
|
|
3114
|
+
constructor(directions: DirectionsCollection, mapData: MapDataInternal);
|
|
3048
3115
|
/**
|
|
3049
3116
|
* @internal
|
|
3050
3117
|
*/
|
|
3051
|
-
|
|
3052
|
-
/**
|
|
3053
|
-
* The name of the category.
|
|
3054
|
-
*/
|
|
3055
|
-
name: string;
|
|
3056
|
-
/**
|
|
3057
|
-
* The color of the category.
|
|
3058
|
-
*/
|
|
3059
|
-
color?: string | undefined;
|
|
3060
|
-
/**
|
|
3061
|
-
* The external ID of the category.
|
|
3062
|
-
*/
|
|
3063
|
-
externalId: string;
|
|
3064
|
-
/**
|
|
3065
|
-
* Extra properties of the category.
|
|
3066
|
-
*/
|
|
3067
|
-
extra?: Record<string, unknown> | undefined;
|
|
3068
|
-
/**
|
|
3069
|
-
* A URL to the icon of the category.
|
|
3070
|
-
*/
|
|
3071
|
-
icon?: string | undefined;
|
|
3118
|
+
get path(): Node[];
|
|
3072
3119
|
/**
|
|
3073
|
-
*
|
|
3120
|
+
* All the coordinates ({@link Coordinate}) of the directions.
|
|
3074
3121
|
*/
|
|
3075
|
-
|
|
3122
|
+
get coordinates(): Coordinate[];
|
|
3076
3123
|
/**
|
|
3077
|
-
* The
|
|
3124
|
+
* The total distance of the path in meters.
|
|
3078
3125
|
*/
|
|
3079
|
-
|
|
3126
|
+
get distance(): number;
|
|
3080
3127
|
/**
|
|
3081
|
-
*
|
|
3082
|
-
*
|
|
3083
|
-
* @param instance The instance to check.
|
|
3084
|
-
* @returns {boolean} True if the instance is a EnterpriseCategory, false otherwise.
|
|
3128
|
+
* The array of instructions ({@link TDirectionInstruction}).
|
|
3085
3129
|
*/
|
|
3086
|
-
|
|
3130
|
+
get instructions(): TDirectionInstruction[];
|
|
3131
|
+
}
|
|
3132
|
+
export class DirectionsInternal {
|
|
3087
3133
|
/**
|
|
3088
|
-
* @
|
|
3134
|
+
* @hidden
|
|
3089
3135
|
*/
|
|
3090
|
-
constructor(
|
|
3091
|
-
|
|
3136
|
+
constructor({ nodes, geojsonCollection, connections, groupBy, }: {
|
|
3137
|
+
nodes: ParsedMVF['node.geojson'];
|
|
3138
|
+
geojsonCollection: ParsedMVF['obstruction'] | ParsedMVF['space'];
|
|
3139
|
+
connections: ParsedMVF['connection.json'];
|
|
3140
|
+
groupBy?: string;
|
|
3092
3141
|
});
|
|
3093
3142
|
/**
|
|
3094
|
-
*
|
|
3095
|
-
*/
|
|
3096
|
-
get children(): EnterpriseCategory[];
|
|
3097
|
-
/**
|
|
3098
|
-
* The {@link EnterpriseLocation}s within this category.
|
|
3099
|
-
*/
|
|
3100
|
-
get locations(): EnterpriseLocation[];
|
|
3101
|
-
/**
|
|
3102
|
-
* Serializes the EnterpriseCategory data to JSON.
|
|
3143
|
+
* Get directions between two navigation targets.
|
|
3103
3144
|
*
|
|
3104
|
-
* @
|
|
3145
|
+
* @hidden
|
|
3146
|
+
* @param from
|
|
3147
|
+
* @param to
|
|
3148
|
+
* @param options
|
|
3149
|
+
* @param mapData
|
|
3105
3150
|
*/
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3151
|
+
getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
|
|
3152
|
+
accessible: boolean;
|
|
3153
|
+
smoothing: {
|
|
3154
|
+
enabled: boolean;
|
|
3155
|
+
radius: number;
|
|
3156
|
+
};
|
|
3157
|
+
zones: TDirectionZone[];
|
|
3158
|
+
excludedConnections: Connection[];
|
|
3159
|
+
}, mapData: MapDataInternal) => Directions | undefined;
|
|
3110
3160
|
/**
|
|
3111
|
-
*
|
|
3161
|
+
* Get the node IDs that should be excluded from the navigation graph.
|
|
3112
3162
|
*
|
|
3113
|
-
* @
|
|
3163
|
+
* @hidden
|
|
3164
|
+
* @param accessible {boolean}
|
|
3114
3165
|
*/
|
|
3115
|
-
|
|
3166
|
+
getExcludedNodeIds: (accessible: boolean, excludedConnections: Connection[]) => string[];
|
|
3116
3167
|
}
|
|
3117
|
-
export default EnterpriseCategory;
|
|
3118
3168
|
}
|
|
3119
3169
|
|
|
3120
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
3121
|
-
import type
|
|
3122
|
-
import type
|
|
3123
|
-
import type
|
|
3124
|
-
import
|
|
3170
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types' {
|
|
3171
|
+
import type Area from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/area';
|
|
3172
|
+
import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
|
|
3173
|
+
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
3174
|
+
import type Space from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space';
|
|
3175
|
+
import type PointOfInterest from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/poi';
|
|
3176
|
+
import type Annotation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/annotation';
|
|
3177
|
+
import type Connection from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connection';
|
|
3178
|
+
import type MapObject from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/object';
|
|
3179
|
+
import type { EnterpriseLocation as MvfEnterpriseLocation, EnterpriseCategory as MvfEnterpriseCategory, ParsedMVFLocalePack, Feature } from '@mappedin/mvf';
|
|
3180
|
+
import type { PartialExcept } from '@mappedin/mvf/dist/locale';
|
|
3181
|
+
import type { LocalePackUrls } from '@packages/internal/mvf-utils';
|
|
3182
|
+
import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3183
|
+
import type { EnvControl } from '@packages/internal/mvf-utils/mvf-utils';
|
|
3125
3184
|
/**
|
|
3126
|
-
*
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3185
|
+
* Places are the main objects that can be searched for.
|
|
3186
|
+
*/
|
|
3187
|
+
export type Places = Space | Floor | Door | Connection | MapObject | PointOfInterest | Annotation | Area;
|
|
3188
|
+
export type LocationWithLocale = PartialExcept<MvfEnterpriseLocation, 'id'>;
|
|
3189
|
+
export type CategoryWithLocale = PartialExcept<MvfEnterpriseCategory, 'id'>;
|
|
3190
|
+
export type LanguagePack = {
|
|
3191
|
+
type: 'downloaded';
|
|
3192
|
+
data: ParsedMVFLocalePack;
|
|
3193
|
+
optimized: {
|
|
3194
|
+
locations: Record<string, LocationWithLocale> | undefined;
|
|
3195
|
+
categories: Record<string, CategoryWithLocale> | undefined;
|
|
3196
|
+
};
|
|
3197
|
+
} | {
|
|
3198
|
+
type: 'initial';
|
|
3199
|
+
optimized: {
|
|
3200
|
+
locations: Record<string, MvfEnterpriseLocation>;
|
|
3201
|
+
categories: Record<string, MvfEnterpriseCategory>;
|
|
3202
|
+
};
|
|
3203
|
+
};
|
|
3204
|
+
export type TMapDataInternalOptions = {
|
|
3205
|
+
env?: EnvControl;
|
|
3206
|
+
enterprise?: boolean;
|
|
3207
|
+
outdoorViewToken?: string;
|
|
3208
|
+
localePacksUrls?: LocalePackUrls;
|
|
3209
|
+
languagePacks?: LanguagePackHydrationItem[];
|
|
3210
|
+
binaryBundle?: Uint8Array;
|
|
3211
|
+
sasToken?: string;
|
|
3212
|
+
};
|
|
3213
|
+
/**
|
|
3214
|
+
* A class that implements IGeoJSONData has a underlying GeoJSON datathat can be accessed.
|
|
3215
|
+
*/
|
|
3216
|
+
export interface IGeoJSONData {
|
|
3217
|
+
/** Gets the underlying GeoJSON Feature representation of this object. */
|
|
3218
|
+
geoJSON: Feature<any, null>;
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
|
|
3222
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform' {
|
|
3223
|
+
import type { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
3224
|
+
/**
|
|
3225
|
+
* Class representing camera transformation data.
|
|
3134
3226
|
*/
|
|
3135
|
-
class
|
|
3227
|
+
export class CameraTransform {
|
|
3136
3228
|
#private;
|
|
3137
3229
|
/**
|
|
3138
3230
|
* @internal
|
|
3139
3231
|
*/
|
|
3140
|
-
|
|
3141
|
-
/**
|
|
3142
|
-
* @internal
|
|
3143
|
-
*/
|
|
3144
|
-
readonly __type = "enterprise-location";
|
|
3145
|
-
/**
|
|
3146
|
-
* The description of the location.
|
|
3147
|
-
*/
|
|
3148
|
-
description?: string | undefined;
|
|
3149
|
-
/**
|
|
3150
|
-
* The name of the location.
|
|
3151
|
-
*/
|
|
3152
|
-
name: string;
|
|
3232
|
+
constructor(camera: Camera);
|
|
3153
3233
|
/**
|
|
3154
|
-
*
|
|
3234
|
+
* Getter for the center coordinate of the camera.
|
|
3235
|
+
*
|
|
3236
|
+
* @returns Center Coordinate.
|
|
3155
3237
|
*/
|
|
3156
|
-
|
|
3238
|
+
get center(): import("..").Coordinate;
|
|
3157
3239
|
/**
|
|
3158
|
-
*
|
|
3240
|
+
* Getter for the camera's bearing in degrees.
|
|
3241
|
+
*
|
|
3242
|
+
* @returns Camera bearing in degrees.
|
|
3159
3243
|
*/
|
|
3160
|
-
|
|
3244
|
+
get bearing(): number;
|
|
3161
3245
|
/**
|
|
3162
|
-
*
|
|
3246
|
+
* Getter for the camera's pitch in degrees.
|
|
3247
|
+
*
|
|
3248
|
+
* @returns Camera pitch in degrees.
|
|
3163
3249
|
*/
|
|
3164
|
-
|
|
3250
|
+
get pitch(): number;
|
|
3165
3251
|
/**
|
|
3166
|
-
*
|
|
3252
|
+
* Getter for the camera's zoom level in mercator zoom levels.
|
|
3253
|
+
*
|
|
3254
|
+
* @see https://wiki.openstreetmap.org/wiki/Zoom_levels
|
|
3255
|
+
*
|
|
3256
|
+
* @returns Zoom level in mercator zoom levels.
|
|
3167
3257
|
*/
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3258
|
+
get zoomLevel(): number;
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
|
|
3262
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot' {
|
|
3263
|
+
export { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3264
|
+
export type { TBlueDotEvents, GeolocationPositionExtended, TFollowCameraOptions, TFollowMode } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
3268
|
+
import MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
3269
|
+
import type { TEvents, TEventPayload, TClickPayload, THoverPayload, TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
3270
|
+
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/internal/mvf-utils';
|
|
3271
|
+
import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
|
|
3272
|
+
import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3273
|
+
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';
|
|
3274
|
+
import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
3275
|
+
export type { Text3D as Text3DApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
3276
|
+
import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, MapViewState } from '@mappedin/mappedin-js/geojson/src';
|
|
3277
|
+
import { enableTestMode, preloadFont } from '@mappedin/mappedin-js/geojson/src';
|
|
3278
|
+
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
3279
|
+
import type { TMappedinMapLibreOverlayEvents } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
|
|
3280
|
+
import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
|
|
3281
|
+
import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3282
|
+
import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
|
|
3283
|
+
import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3284
|
+
import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
3285
|
+
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
3286
|
+
/**
|
|
3287
|
+
* Represents all the available antialiasing options.
|
|
3288
|
+
*/
|
|
3289
|
+
type TAntialiasingOptions = {
|
|
3173
3290
|
/**
|
|
3174
|
-
*
|
|
3175
|
-
* Typically, there will be at least one node or polygon defined,
|
|
3176
|
-
* plus one or more other properties that are different from the parent.
|
|
3177
|
-
* The remaining properties will be the same as the parent.
|
|
3178
|
-
|
|
3179
|
-
* For example, suppose there is a location like this:
|
|
3180
|
-
*
|
|
3181
|
-
* ```json
|
|
3182
|
-
* {
|
|
3183
|
-
* "id": "location-id-1",
|
|
3184
|
-
* "name": "Location 1",
|
|
3185
|
-
* "nodes": ["node-1", "node-2"],
|
|
3186
|
-
* "polygons": ["polygon-1", "polygon-2"],
|
|
3187
|
-
* "externalId": "externalId-1",
|
|
3188
|
-
* "description": "Description 1",
|
|
3189
|
-
* }
|
|
3190
|
-
* ```
|
|
3191
|
-
*
|
|
3192
|
-
* (Note that for clarity, this example puts strings in for nodes and polygons, but in practice they would be objects.)
|
|
3193
|
-
*
|
|
3194
|
-
* Then suppose it had an `instances` array that contained an object that looked like this:
|
|
3195
|
-
*
|
|
3196
|
-
* ```json
|
|
3197
|
-
* {
|
|
3198
|
-
* "id": "instance-id-1",
|
|
3199
|
-
* "name": "Location 1 - A",
|
|
3200
|
-
* "nodes": ["node-1"],
|
|
3201
|
-
* "polygons": ["polygon-1"],
|
|
3202
|
-
* "externalId": "externalId-1-A",
|
|
3203
|
-
* "description": "Description 1",
|
|
3204
|
-
* }
|
|
3205
|
-
* ```
|
|
3206
|
-
* This says "Location 1" is the parent location, and "Location 1 - A" is an instance of it. The instance has a different name, and a different external ID, and it only applies to node `node-1` and polygon `polygon-1`.
|
|
3207
|
-
* The ID will always be different, but other properties (like the description) are the same as the parent.
|
|
3208
|
-
*
|
|
3209
|
-
* Example use cases:
|
|
3210
|
-
* - A Mall may have a location with two nodes and one polygon. It may then have an instance with one of the nodes, and operating hours
|
|
3211
|
-
* that are different from the parent. This indicates that this instance is an entrance for the location that is accessible at different times, perhaps for an interior mall entrance, when the main location (and other, exterior entrance) is open later than the rest of the mall.
|
|
3212
|
-
* - An airport may have a location with several polygons and nodes, and an instance for each node (and corresponding polygon, if any) with a different siblingGroup. The location in the sibling group may be the airport terminal, or airside vs landside.
|
|
3213
|
-
* This would allow an application to show the location once in a search result, but offer UX to select the instance that is in the right terminal.
|
|
3291
|
+
* Enable antialiasing. Only works when device supports WebGL2.
|
|
3214
3292
|
*
|
|
3215
|
-
*
|
|
3216
|
-
* only referenced from their parent location, and will not show up in other places in the map data. However, they should otherwise behave like normal EnterpriseLocations, being targetable for things like navigation and focus.
|
|
3293
|
+
* @default true
|
|
3217
3294
|
*/
|
|
3218
|
-
|
|
3295
|
+
enabled?: boolean;
|
|
3219
3296
|
/**
|
|
3220
|
-
*
|
|
3297
|
+
* Change the quality of antialiasing in the scene. Greater quality means less noise, but worse performance.
|
|
3298
|
+
*
|
|
3299
|
+
* @default 'medium'
|
|
3221
3300
|
*/
|
|
3222
|
-
|
|
3301
|
+
quality?: 'low' | 'medium' | 'high' | 'ultra';
|
|
3302
|
+
};
|
|
3303
|
+
/**
|
|
3304
|
+
* @interface
|
|
3305
|
+
* Options for the watermark.
|
|
3306
|
+
*/
|
|
3307
|
+
export type TWatermarkOptions = Omit<WatermarkOptions, 'visible'>;
|
|
3308
|
+
/**
|
|
3309
|
+
* Options for showing a 3D map.
|
|
3310
|
+
*
|
|
3311
|
+
* @experimental
|
|
3312
|
+
*/
|
|
3313
|
+
type TShow3DMapOptions = {
|
|
3223
3314
|
/**
|
|
3224
|
-
* The
|
|
3315
|
+
* The outdoor view options.
|
|
3225
3316
|
*/
|
|
3226
|
-
|
|
3317
|
+
outdoorView?: {
|
|
3318
|
+
/**
|
|
3319
|
+
* The token is used to fetch outdoor tiles, which will then be rendered.
|
|
3320
|
+
*/
|
|
3321
|
+
token?: string;
|
|
3322
|
+
/**
|
|
3323
|
+
* A url to a style specification conforming to the [Maplibre Style Spec](https://maplibre.org/maplibre-style-spec/).
|
|
3324
|
+
* Use the {@link Environment | `environment`} setting to switch environments.
|
|
3325
|
+
*/
|
|
3326
|
+
style?: string;
|
|
3327
|
+
/**
|
|
3328
|
+
* Enable or disable the outdoor view.
|
|
3329
|
+
*/
|
|
3330
|
+
enabled?: boolean;
|
|
3331
|
+
/**
|
|
3332
|
+
* Layers that should be hidden by geometry. This is useful when you want to hide certain layers when they are below the geometry.
|
|
3333
|
+
* @default ['building', 'building-top']
|
|
3334
|
+
*/
|
|
3335
|
+
layersHiddenByGeometry?: string[];
|
|
3336
|
+
};
|
|
3227
3337
|
/**
|
|
3228
|
-
* The
|
|
3338
|
+
* The initial bearing of the map, in degrees.
|
|
3339
|
+
*
|
|
3340
|
+
* @default 0
|
|
3229
3341
|
*/
|
|
3230
|
-
|
|
3231
|
-
number: string;
|
|
3232
|
-
extension?: string;
|
|
3233
|
-
} | undefined;
|
|
3342
|
+
bearing?: number;
|
|
3234
3343
|
/**
|
|
3235
|
-
*
|
|
3344
|
+
* The initial pitch of the map, in degrees.
|
|
3345
|
+
*
|
|
3346
|
+
* @default 45
|
|
3236
3347
|
*/
|
|
3237
|
-
|
|
3348
|
+
pitch?: number;
|
|
3238
3349
|
/**
|
|
3239
|
-
* The
|
|
3350
|
+
* The initial zoom level of the map, in mercator zoom levels.
|
|
3351
|
+
* If it is not specified, it will default to the level that fits the map bounds.
|
|
3240
3352
|
*/
|
|
3241
|
-
|
|
3353
|
+
zoomLevel?: number;
|
|
3242
3354
|
/**
|
|
3243
|
-
* Whether to
|
|
3355
|
+
* Whether or not to automatically add labels and interactivity to the map. Set to
|
|
3356
|
+
* false if you need finer control over what is labelled or interactive.
|
|
3357
|
+
*
|
|
3358
|
+
* @hidden
|
|
3359
|
+
* @default true
|
|
3244
3360
|
*/
|
|
3245
|
-
|
|
3361
|
+
auto?: boolean;
|
|
3246
3362
|
/**
|
|
3247
|
-
*
|
|
3363
|
+
* Antialiasing settings.
|
|
3364
|
+
*
|
|
3365
|
+
* TODO: Maybe we don't expose all of these settings.
|
|
3366
|
+
* @hidden
|
|
3367
|
+
* @default true
|
|
3248
3368
|
*/
|
|
3249
|
-
|
|
3369
|
+
antialiasing?: boolean | TAntialiasingOptions;
|
|
3250
3370
|
/**
|
|
3251
|
-
*
|
|
3371
|
+
* @experimental
|
|
3372
|
+
*
|
|
3373
|
+
* Enable debug mode to check the visual representation of performance stats.
|
|
3374
|
+
* @default false
|
|
3252
3375
|
*/
|
|
3253
|
-
|
|
3376
|
+
debug?: boolean;
|
|
3254
3377
|
/**
|
|
3255
|
-
*
|
|
3378
|
+
* Options when showing the watermark.
|
|
3379
|
+
*
|
|
3380
|
+
* @hidden
|
|
3256
3381
|
*/
|
|
3257
|
-
|
|
3258
|
-
facebook?: string;
|
|
3259
|
-
instagram?: string;
|
|
3260
|
-
twitter?: string;
|
|
3261
|
-
website?: string;
|
|
3262
|
-
} | undefined;
|
|
3382
|
+
watermark?: TWatermarkOptions;
|
|
3263
3383
|
/**
|
|
3264
|
-
*
|
|
3384
|
+
* Options for the attribution control.
|
|
3385
|
+
*
|
|
3386
|
+
* @hidden
|
|
3265
3387
|
*/
|
|
3266
|
-
|
|
3388
|
+
attribution?: {
|
|
3389
|
+
/**
|
|
3390
|
+
* Custom attribution content.
|
|
3391
|
+
*/
|
|
3392
|
+
custom?: string[];
|
|
3393
|
+
/**
|
|
3394
|
+
* Attribution position.
|
|
3395
|
+
* @default 'bottom-right'
|
|
3396
|
+
*/
|
|
3397
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
3398
|
+
/**
|
|
3399
|
+
* Whether to show a feedback link next to the attributions.
|
|
3400
|
+
* @default true
|
|
3401
|
+
*/
|
|
3402
|
+
feedback?: boolean;
|
|
3403
|
+
};
|
|
3267
3404
|
/**
|
|
3268
|
-
*
|
|
3405
|
+
* First floor to be rendered.
|
|
3406
|
+
* By default, floor with the elevation that's closest to 0 is rendered. All floors will be sorted by elevation in ascending order.
|
|
3269
3407
|
*/
|
|
3270
|
-
|
|
3408
|
+
initialFloor?: Floor | string;
|
|
3271
3409
|
/**
|
|
3272
|
-
*
|
|
3410
|
+
* Enable shading of bottoms of geometry along with outlines to make geometry stand out.
|
|
3411
|
+
* @default true
|
|
3412
|
+
* @deprecated Use `style.shading`.
|
|
3273
3413
|
*/
|
|
3274
|
-
|
|
3414
|
+
shadingAndOutlines?: boolean;
|
|
3275
3415
|
/**
|
|
3276
|
-
*
|
|
3416
|
+
* Specify a color for the top of wall geometry.
|
|
3417
|
+
* @deprecated Use `style.wallTopColor`.
|
|
3277
3418
|
*/
|
|
3278
|
-
|
|
3419
|
+
wallTopColor?: string;
|
|
3279
3420
|
/**
|
|
3280
|
-
*
|
|
3281
|
-
*
|
|
3282
|
-
* @param instance The instance to check.
|
|
3283
|
-
* @returns {boolean} True if the instance is a EnterpriseLocation, false otherwise.
|
|
3421
|
+
* Style options for the map.
|
|
3422
|
+
* @experimental
|
|
3284
3423
|
*/
|
|
3285
|
-
|
|
3424
|
+
style?: {
|
|
3425
|
+
/**
|
|
3426
|
+
* Background color. Only relevant if outdoor map is disabled.
|
|
3427
|
+
*/
|
|
3428
|
+
backgroundColor?: string;
|
|
3429
|
+
/**
|
|
3430
|
+
* Background alpha value. Only relevant if outdoor map is disabled.
|
|
3431
|
+
*/
|
|
3432
|
+
backgroundAlpha?: number;
|
|
3433
|
+
/**
|
|
3434
|
+
* Set the global shading for all elements. True will use default values, false will disable shading.
|
|
3435
|
+
* @default true
|
|
3436
|
+
*/
|
|
3437
|
+
shading?: boolean | Shading;
|
|
3438
|
+
/**
|
|
3439
|
+
* Set the global outlines for all elements. True will enable outlines, false will disable them.
|
|
3440
|
+
* @default true
|
|
3441
|
+
*/
|
|
3442
|
+
outlines?: boolean;
|
|
3443
|
+
/**
|
|
3444
|
+
* Specify a color for the top of wall geometry.
|
|
3445
|
+
*/
|
|
3446
|
+
wallTopColor?: string;
|
|
3447
|
+
};
|
|
3286
3448
|
/**
|
|
3449
|
+
* @experimental
|
|
3287
3450
|
* @internal
|
|
3288
3451
|
*/
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
parentId?: string;
|
|
3294
|
-
});
|
|
3295
|
-
get categories(): EnterpriseCategory[];
|
|
3296
|
-
get coordinates(): Coordinate[];
|
|
3297
|
-
get nodes(): Node[];
|
|
3298
|
-
get spaces(): Space[];
|
|
3299
|
-
/**
|
|
3300
|
-
* Serializes the EnterpriseLocation data to JSON.
|
|
3301
|
-
*
|
|
3302
|
-
* @returns An object representing the EnterpriseLocation.
|
|
3303
|
-
*/
|
|
3304
|
-
toJSON(): {
|
|
3305
|
-
id: string;
|
|
3306
|
-
name: string;
|
|
3452
|
+
multiFloorView?: {
|
|
3453
|
+
enabled?: boolean;
|
|
3454
|
+
floorHeight?: number;
|
|
3455
|
+
updateCameraElevationOnFloorChange?: boolean;
|
|
3307
3456
|
};
|
|
3308
3457
|
/**
|
|
3309
|
-
*
|
|
3310
|
-
*
|
|
3458
|
+
* @experimental
|
|
3311
3459
|
* @internal
|
|
3460
|
+
* @default false
|
|
3312
3461
|
*/
|
|
3313
|
-
|
|
3314
|
-
}
|
|
3315
|
-
|
|
3462
|
+
keepOutdoorGeometryVisible?: boolean;
|
|
3463
|
+
};
|
|
3464
|
+
/**
|
|
3465
|
+
* @internal
|
|
3466
|
+
* @deprecated Use {@link hydrateMapData} instead.
|
|
3467
|
+
*
|
|
3468
|
+
* Returns a {@link MapData} instance from a parsed MVF object.
|
|
3469
|
+
*/
|
|
3470
|
+
export const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions & {
|
|
3471
|
+
languagePacks?: LanguagePackHydrationItem[];
|
|
3472
|
+
}) => Promise<MapData>;
|
|
3473
|
+
/**
|
|
3474
|
+
* @internal
|
|
3475
|
+
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
3476
|
+
*/
|
|
3477
|
+
export function setUseEnterpriseAPI(value: boolean): void;
|
|
3478
|
+
export type THydrateMapDataBundle = {
|
|
3479
|
+
type: 'binary';
|
|
3480
|
+
options?: {
|
|
3481
|
+
enterprise?: boolean;
|
|
3482
|
+
};
|
|
3483
|
+
languagePacks?: {
|
|
3484
|
+
language: {
|
|
3485
|
+
code: string;
|
|
3486
|
+
name: string;
|
|
3487
|
+
};
|
|
3488
|
+
localePack: Uint8Array;
|
|
3489
|
+
}[];
|
|
3490
|
+
main: Uint8Array;
|
|
3491
|
+
} | {
|
|
3492
|
+
type: 'json';
|
|
3493
|
+
options?: {
|
|
3494
|
+
enterprise?: boolean;
|
|
3495
|
+
};
|
|
3496
|
+
languagePacks?: {
|
|
3497
|
+
language: {
|
|
3498
|
+
code: string;
|
|
3499
|
+
name: string;
|
|
3500
|
+
};
|
|
3501
|
+
localePack: ParsedMVFLocalePack;
|
|
3502
|
+
}[];
|
|
3503
|
+
main: TMVF;
|
|
3504
|
+
};
|
|
3505
|
+
/**
|
|
3506
|
+
* Load a MapData instance from a backup including language packs. Pass in userOptions to ensure outdoor view is available.
|
|
3507
|
+
*/
|
|
3508
|
+
export const hydrateMapData: (backup: THydrateMapDataBundle | TMVF, userOptions?: TGetMapDataOptions) => Promise<MapData>;
|
|
3509
|
+
/**
|
|
3510
|
+
* Asynchronously retrieves map data ({@link MapData}) based on user-provided options.
|
|
3511
|
+
*
|
|
3512
|
+
* @experimental
|
|
3513
|
+
* @param userOptions {TGetMapDataOptions} Options provided by the user to retrieve map data.
|
|
3514
|
+
* @returns {Promise<MapData>} Promise resolving to the MapData.
|
|
3515
|
+
* @example
|
|
3516
|
+
* const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
|
|
3517
|
+
*/
|
|
3518
|
+
export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
3519
|
+
/**
|
|
3520
|
+
* @internal
|
|
3521
|
+
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
3522
|
+
*/
|
|
3523
|
+
export const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
3524
|
+
/**
|
|
3525
|
+
* Mappedin JS makes use of MapLibre to render the outdoor portion of the map. Mappedin JS exposes this layer through {@link MapView.OutoorMap} and can be used to add additional layers as described in the [Outdoor Map Guide](https://developer.mappedin.com/web-sdk/outdoor-map).
|
|
3526
|
+
*
|
|
3527
|
+
* It is also possible to utilize the opposite architecture, by adding a MapView to a MapLibre Map.
|
|
3528
|
+
* This is accomplished by using {@link MappedinMapLibreOverlay} class. It allows a developer to easily add a Mappedin indoor map to an existing MapLibre based app.
|
|
3529
|
+
*
|
|
3530
|
+
* Refer to the [Mappedin MapLibre Overlay](https://developer.mappedin.com/web-sdk/mappedin-maplibre-overlay) for more information and interactive examples.
|
|
3531
|
+
|
|
3532
|
+
* @experimental
|
|
3533
|
+
*/
|
|
3534
|
+
export const createMapLibreOverlay: (mapData: MapData, showMapOptions?: TShow3DMapOptions) => MappedinMapLibreOverlay;
|
|
3535
|
+
export const show3dMap: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
3536
|
+
/**
|
|
3537
|
+
* @internal
|
|
3538
|
+
* @deprecated Use {@link show3dMap} instead.
|
|
3539
|
+
*/
|
|
3540
|
+
export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
3541
|
+
export { parseMVF, unzipMVF, enableTestMode, preloadFont };
|
|
3542
|
+
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, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, };
|
|
3543
|
+
export type * from 'geojson';
|
|
3544
|
+
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, } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3545
|
+
export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3546
|
+
export type { Label, Marker, Path, Shape, CameraTransform, Model, Image, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3547
|
+
export type { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
|
|
3548
|
+
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
3549
|
+
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3550
|
+
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image as ImageData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, Facade, Node, Area, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3551
|
+
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, StackedMaps, DynamicFocus, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
3552
|
+
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
3553
|
+
export type { TFindNearestOptions, TFindNearestResult, TQueriables, Query } from '@mappedin/mappedin-js/mappedin-js/src/query';
|
|
3554
|
+
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
3316
3555
|
}
|
|
3317
3556
|
|
|
3318
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
3319
|
-
import type {
|
|
3320
|
-
import
|
|
3557
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
|
|
3558
|
+
import type { NodeCollection } from '@mappedin/mvf';
|
|
3559
|
+
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
3560
|
+
import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3561
|
+
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
3321
3562
|
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3563
|
+
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
3564
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3322
3565
|
/**
|
|
3323
|
-
*
|
|
3324
|
-
* It can be accessed using the {@link MapData.getByType()} method as shown below.
|
|
3566
|
+
* A class representing {@link Path} node data within the map.
|
|
3325
3567
|
*
|
|
3326
|
-
*
|
|
3327
|
-
* const venue = mapData.getByType('enterprise-venue');
|
|
3328
|
-
* ```
|
|
3568
|
+
* Nodes are used to define points in the map's pathfinding graph.
|
|
3329
3569
|
*
|
|
3330
|
-
* Refer to the [EnterpriseVenue Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-venue) for more information.
|
|
3331
3570
|
*/
|
|
3332
|
-
class
|
|
3571
|
+
class Node extends BaseMetaData implements IGeoJSONData, IFocusable, IAnchorable {
|
|
3333
3572
|
#private;
|
|
3334
3573
|
/**
|
|
3335
3574
|
* @internal
|
|
3336
3575
|
*/
|
|
3337
|
-
static readonly __type = "
|
|
3576
|
+
static readonly __type = "node";
|
|
3338
3577
|
/**
|
|
3339
3578
|
* @internal
|
|
3340
3579
|
*/
|
|
3341
|
-
readonly __type = "
|
|
3342
|
-
/**
|
|
3343
|
-
* The country code of the venue.
|
|
3344
|
-
*/
|
|
3345
|
-
countrycode?: string | undefined;
|
|
3346
|
-
/**
|
|
3347
|
-
* The external ID of the venue.
|
|
3348
|
-
*/
|
|
3349
|
-
externalId: string;
|
|
3350
|
-
/**
|
|
3351
|
-
* The default language of the venue.
|
|
3352
|
-
*/
|
|
3353
|
-
defaultLanguage: Language;
|
|
3354
|
-
/**
|
|
3355
|
-
* The default map of the venue.
|
|
3356
|
-
*/
|
|
3357
|
-
defaultMap?: string | undefined;
|
|
3358
|
-
/**
|
|
3359
|
-
* Extra properties of the venue.
|
|
3360
|
-
*/
|
|
3361
|
-
extra?: Record<string, unknown> | undefined;
|
|
3362
|
-
/**
|
|
3363
|
-
* A URL to the icon of the venue.
|
|
3364
|
-
*/
|
|
3365
|
-
icon?: string | undefined;
|
|
3366
|
-
/**
|
|
3367
|
-
* The languages supported by the venue.
|
|
3368
|
-
*/
|
|
3369
|
-
languages: Language[];
|
|
3370
|
-
/**
|
|
3371
|
-
* The links of the venue.
|
|
3372
|
-
*/
|
|
3373
|
-
links: Hyperlink[];
|
|
3374
|
-
/**
|
|
3375
|
-
* A URL to the logo of the venue.
|
|
3376
|
-
*/
|
|
3377
|
-
logo?: string | undefined;
|
|
3580
|
+
readonly __type = "node";
|
|
3378
3581
|
/**
|
|
3379
|
-
*
|
|
3582
|
+
* Checks if the provided instance is of type Node.
|
|
3583
|
+
*
|
|
3584
|
+
* @param instance The instance to check.
|
|
3585
|
+
* @returns {boolean} True if the instance is a Node, false otherwise.
|
|
3380
3586
|
*/
|
|
3381
|
-
|
|
3587
|
+
static is(instance: object): instance is Node;
|
|
3382
3588
|
/**
|
|
3383
|
-
*
|
|
3589
|
+
* @internal
|
|
3384
3590
|
*/
|
|
3385
|
-
|
|
3591
|
+
constructor(data: MapDataInternal, options: {
|
|
3592
|
+
floorId: string;
|
|
3593
|
+
mvfData: NodeCollection['features'][number];
|
|
3594
|
+
});
|
|
3595
|
+
/** @internal */
|
|
3596
|
+
get locations(): EnterpriseLocation[];
|
|
3386
3597
|
/**
|
|
3387
|
-
*
|
|
3598
|
+
* Gets the {@link Floor} associated with the node.
|
|
3599
|
+
*
|
|
3600
|
+
* @returns {Floor} The floor object.
|
|
3601
|
+
* @throws Will throw an error if the floor is not found.
|
|
3388
3602
|
*/
|
|
3389
|
-
|
|
3603
|
+
get floor(): Floor;
|
|
3390
3604
|
/**
|
|
3391
|
-
*
|
|
3605
|
+
* Gets the {@link Coordinate} of the node.
|
|
3606
|
+
*
|
|
3607
|
+
* @returns {Coordinate} The node's coordinate.
|
|
3392
3608
|
*/
|
|
3393
|
-
|
|
3609
|
+
get coordinate(): Coordinate;
|
|
3394
3610
|
/**
|
|
3395
|
-
*
|
|
3611
|
+
* Gets the external ID of the node.
|
|
3396
3612
|
*
|
|
3397
|
-
* @
|
|
3398
|
-
* @returns {boolean} True if the instance is a EnterpriseVenue, false otherwise.
|
|
3613
|
+
* @returns {string} The external ID of the node.
|
|
3399
3614
|
*/
|
|
3400
|
-
|
|
3615
|
+
get externalId(): string;
|
|
3401
3616
|
/**
|
|
3402
|
-
*
|
|
3617
|
+
* Gets the neighboring nodes of this node.
|
|
3618
|
+
*
|
|
3619
|
+
* @returns {Node[]} An array of neighboring Node objects.
|
|
3403
3620
|
*/
|
|
3404
|
-
|
|
3405
|
-
mvfData: MVFEnterpriseVenue;
|
|
3406
|
-
});
|
|
3621
|
+
get neighbors(): Node[];
|
|
3407
3622
|
/**
|
|
3408
|
-
* Gets the
|
|
3409
|
-
*
|
|
3410
|
-
* @returns {string} The name of the EnterpriseVenue.
|
|
3623
|
+
* Gets the underlying GeoJSON Feature representation of this Node.
|
|
3411
3624
|
*/
|
|
3412
|
-
get
|
|
3625
|
+
get geoJSON(): {
|
|
3626
|
+
properties: null;
|
|
3627
|
+
type: import("@mappedin/mvf").FeatureType;
|
|
3628
|
+
geometry: import("@mappedin/mvf").Point;
|
|
3629
|
+
};
|
|
3630
|
+
/** @internal */
|
|
3631
|
+
get focusTarget(): Coordinate;
|
|
3632
|
+
/** @internal */
|
|
3633
|
+
get anchorTarget(): Coordinate;
|
|
3413
3634
|
/**
|
|
3414
|
-
* Serializes the
|
|
3635
|
+
* Serializes the node data to JSON.
|
|
3415
3636
|
*
|
|
3416
|
-
* @returns An object representing the
|
|
3637
|
+
* @returns An object representing the node.
|
|
3417
3638
|
*/
|
|
3418
3639
|
toJSON(): {
|
|
3419
3640
|
id: string;
|
|
3420
|
-
|
|
3641
|
+
floor: string;
|
|
3642
|
+
coordinate: {
|
|
3643
|
+
latitude: number;
|
|
3644
|
+
longitude: number;
|
|
3645
|
+
floor: string | undefined;
|
|
3646
|
+
};
|
|
3647
|
+
neighbors: string[];
|
|
3421
3648
|
};
|
|
3422
3649
|
/**
|
|
3423
3650
|
* Cleans up resources used by the instance.
|
|
@@ -3426,541 +3653,367 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
|
|
|
3426
3653
|
*/
|
|
3427
3654
|
destroy(): void;
|
|
3428
3655
|
}
|
|
3429
|
-
export default
|
|
3656
|
+
export default Node;
|
|
3430
3657
|
}
|
|
3431
3658
|
|
|
3432
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/
|
|
3433
|
-
import type {
|
|
3434
|
-
import type
|
|
3435
|
-
import
|
|
3436
|
-
import
|
|
3659
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/area' {
|
|
3660
|
+
import type { AreaCollection } from '@mappedin/mvf';
|
|
3661
|
+
import { Coordinate, type MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3662
|
+
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
3663
|
+
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
3664
|
+
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
3665
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3437
3666
|
/**
|
|
3438
|
-
*
|
|
3667
|
+
* An Area represents some grouping of multiple pieces of geometry, not
|
|
3668
|
+
* necessarily bounded by walls or any other physical feature of the map.
|
|
3439
3669
|
*
|
|
3440
|
-
*
|
|
3441
|
-
*
|
|
3670
|
+
* Areas are currently in a preview state, and may have changes to existing
|
|
3671
|
+
* functionality or new features added in the future.
|
|
3442
3672
|
*/
|
|
3443
|
-
|
|
3673
|
+
class Area extends BaseMapData implements IGeoJSONData, IFocusable, IAnchorable {
|
|
3444
3674
|
#private;
|
|
3445
3675
|
/**
|
|
3446
3676
|
* @internal
|
|
3447
3677
|
*/
|
|
3448
|
-
|
|
3678
|
+
static readonly __type = "area";
|
|
3449
3679
|
/**
|
|
3450
3680
|
* @internal
|
|
3451
3681
|
*/
|
|
3452
|
-
|
|
3453
|
-
/**
|
|
3454
|
-
* All the coordinates ({@link Coordinate}) of the directions.
|
|
3455
|
-
*/
|
|
3456
|
-
get coordinates(): Coordinate[];
|
|
3457
|
-
/**
|
|
3458
|
-
* The total distance of the path in meters.
|
|
3459
|
-
*/
|
|
3460
|
-
get distance(): number;
|
|
3682
|
+
readonly __type = "area";
|
|
3461
3683
|
/**
|
|
3462
|
-
*
|
|
3684
|
+
* Checks if the provided instance is of type Area.
|
|
3685
|
+
*
|
|
3686
|
+
* @param instance The instance to check.
|
|
3687
|
+
* @returns {boolean} True if the instance is a Area, false otherwise.
|
|
3463
3688
|
*/
|
|
3464
|
-
|
|
3465
|
-
}
|
|
3466
|
-
export class DirectionsInternal {
|
|
3689
|
+
static is(instance: object): instance is Area;
|
|
3467
3690
|
/**
|
|
3468
|
-
* @
|
|
3691
|
+
* @internal
|
|
3469
3692
|
*/
|
|
3470
|
-
constructor(
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
connections: ParsedMVF['connection.json'];
|
|
3474
|
-
groupBy?: string;
|
|
3693
|
+
constructor(data: MapDataInternal, options: {
|
|
3694
|
+
floorId: string;
|
|
3695
|
+
mvfData: AreaCollection['features'][number];
|
|
3475
3696
|
});
|
|
3476
3697
|
/**
|
|
3477
|
-
*
|
|
3698
|
+
* Gets the name of the area.
|
|
3478
3699
|
*
|
|
3479
|
-
* @
|
|
3480
|
-
* @param from
|
|
3481
|
-
* @param to
|
|
3482
|
-
* @param options
|
|
3483
|
-
* @param mapData
|
|
3700
|
+
* @returns {string} The name of the area.
|
|
3484
3701
|
*/
|
|
3485
|
-
|
|
3486
|
-
accessible: boolean;
|
|
3487
|
-
smoothing: {
|
|
3488
|
-
enabled: boolean;
|
|
3489
|
-
radius: number;
|
|
3490
|
-
};
|
|
3491
|
-
zones: TDirectionZone[];
|
|
3492
|
-
}, mapData: MapDataInternal) => Directions | undefined;
|
|
3702
|
+
get name(): string;
|
|
3493
3703
|
/**
|
|
3494
|
-
*
|
|
3704
|
+
* Gets the external identifier of the area.
|
|
3495
3705
|
*
|
|
3496
|
-
* @
|
|
3497
|
-
* @param accessible {boolean}
|
|
3498
|
-
*/
|
|
3499
|
-
getExcludedNodeIds: (accessible: boolean) => string[];
|
|
3500
|
-
}
|
|
3501
|
-
}
|
|
3502
|
-
|
|
3503
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types' {
|
|
3504
|
-
import type Area from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/area';
|
|
3505
|
-
import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
|
|
3506
|
-
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
3507
|
-
import type Space from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space';
|
|
3508
|
-
import type PointOfInterest from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/poi';
|
|
3509
|
-
import type Annotation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/annotation';
|
|
3510
|
-
import type Connection from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connection';
|
|
3511
|
-
import type MapObject from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/object';
|
|
3512
|
-
import type { EnterpriseLocation as MvfEnterpriseLocation, EnterpriseCategory as MvfEnterpriseCategory, ParsedMVFLocalePack, Feature } from '@mappedin/mvf';
|
|
3513
|
-
import type { PartialExcept } from '@mappedin/mvf/dist/locale';
|
|
3514
|
-
import type { LocalePackUrls } from '@packages/internal/mvf-utils';
|
|
3515
|
-
import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3516
|
-
import type { EnvControl } from '@packages/internal/mvf-utils/mvf-utils';
|
|
3517
|
-
/**
|
|
3518
|
-
* Places are the main objects that can be searched for.
|
|
3519
|
-
*/
|
|
3520
|
-
export type Places = Space | Floor | Door | Connection | MapObject | PointOfInterest | Annotation | Area;
|
|
3521
|
-
export type LocationWithLocale = PartialExcept<MvfEnterpriseLocation, 'id'>;
|
|
3522
|
-
export type CategoryWithLocale = PartialExcept<MvfEnterpriseCategory, 'id'>;
|
|
3523
|
-
export type LanguagePack = {
|
|
3524
|
-
type: 'downloaded';
|
|
3525
|
-
data: ParsedMVFLocalePack;
|
|
3526
|
-
optimized: {
|
|
3527
|
-
locations: Record<string, LocationWithLocale> | undefined;
|
|
3528
|
-
categories: Record<string, CategoryWithLocale> | undefined;
|
|
3529
|
-
};
|
|
3530
|
-
} | {
|
|
3531
|
-
type: 'initial';
|
|
3532
|
-
optimized: {
|
|
3533
|
-
locations: Record<string, MvfEnterpriseLocation>;
|
|
3534
|
-
categories: Record<string, MvfEnterpriseCategory>;
|
|
3535
|
-
};
|
|
3536
|
-
};
|
|
3537
|
-
export type TMapDataInternalOptions = {
|
|
3538
|
-
env?: EnvControl;
|
|
3539
|
-
enterprise?: boolean;
|
|
3540
|
-
outdoorViewToken?: string;
|
|
3541
|
-
localePacksUrls?: LocalePackUrls;
|
|
3542
|
-
languagePacks?: LanguagePackHydrationItem[];
|
|
3543
|
-
binaryBundle?: Uint8Array;
|
|
3544
|
-
sasToken?: string;
|
|
3545
|
-
};
|
|
3546
|
-
/**
|
|
3547
|
-
* A class that implements IGeoJSONData has a underlying GeoJSON datathat can be accessed.
|
|
3548
|
-
*/
|
|
3549
|
-
export interface IGeoJSONData {
|
|
3550
|
-
/** Gets the underlying GeoJSON Feature representation of this object. */
|
|
3551
|
-
geoJSON: Feature<any, null>;
|
|
3552
|
-
}
|
|
3553
|
-
}
|
|
3554
|
-
|
|
3555
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform' {
|
|
3556
|
-
import type { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
3557
|
-
/**
|
|
3558
|
-
* Class representing camera transformation data.
|
|
3559
|
-
*/
|
|
3560
|
-
export class CameraTransform {
|
|
3561
|
-
#private;
|
|
3562
|
-
/**
|
|
3563
|
-
* @internal
|
|
3706
|
+
* @returns {string} The external ID of the area, or an empty string if no external ID exists.
|
|
3564
3707
|
*/
|
|
3565
|
-
|
|
3708
|
+
get externalId(): string;
|
|
3566
3709
|
/**
|
|
3567
|
-
*
|
|
3710
|
+
* Gets the description of the area.
|
|
3568
3711
|
*
|
|
3569
|
-
* @returns
|
|
3712
|
+
* @returns {string} The description of the area, or an empty string if no description exists.
|
|
3570
3713
|
*/
|
|
3571
|
-
get
|
|
3714
|
+
get description(): string;
|
|
3572
3715
|
/**
|
|
3573
|
-
*
|
|
3716
|
+
* Gets the center {@link Coordinate} of the area.
|
|
3574
3717
|
*
|
|
3575
|
-
* @returns
|
|
3718
|
+
* @returns {Coordinate} The area's center coordinate.
|
|
3576
3719
|
*/
|
|
3577
|
-
get
|
|
3720
|
+
get center(): Coordinate;
|
|
3578
3721
|
/**
|
|
3579
|
-
*
|
|
3722
|
+
* Gets the {@link Floor} object associated with the area.
|
|
3580
3723
|
*
|
|
3581
|
-
* @returns
|
|
3724
|
+
* @returns {Floor} The floor object.
|
|
3725
|
+
* @throws Will throw an error if the floor is not found.
|
|
3582
3726
|
*/
|
|
3583
|
-
get
|
|
3727
|
+
get floor(): Floor;
|
|
3584
3728
|
/**
|
|
3585
|
-
*
|
|
3586
|
-
*
|
|
3587
|
-
* @see https://wiki.openstreetmap.org/wiki/Zoom_levels
|
|
3588
|
-
*
|
|
3589
|
-
* @returns Zoom level in mercator zoom levels.
|
|
3729
|
+
* Gets the underlying GeoJSON Feature representation of this Area.
|
|
3590
3730
|
*/
|
|
3591
|
-
get
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
3601
|
-
import MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
3602
|
-
import type { TEvents, TEventPayload, TClickPayload, THoverPayload, TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
3603
|
-
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/internal/mvf-utils';
|
|
3604
|
-
import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
|
|
3605
|
-
import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3606
|
-
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';
|
|
3607
|
-
import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
3608
|
-
export type { Text3D as Text3DApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
|
|
3609
|
-
import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, MapViewState } from '@mappedin/mappedin-js/geojson/src';
|
|
3610
|
-
import { enableTestMode, preloadFont } from '@mappedin/mappedin-js/geojson/src';
|
|
3611
|
-
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
3612
|
-
import type { TMappedinMapLibreOverlayEvents } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
|
|
3613
|
-
import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
|
|
3614
|
-
import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3615
|
-
import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
|
|
3616
|
-
import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3617
|
-
import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
3618
|
-
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
3619
|
-
/**
|
|
3620
|
-
* Represents all the available antialiasing options.
|
|
3621
|
-
*/
|
|
3622
|
-
type TAntialiasingOptions = {
|
|
3731
|
+
get geoJSON(): {
|
|
3732
|
+
properties: null;
|
|
3733
|
+
type: import("@mappedin/mvf").FeatureType;
|
|
3734
|
+
geometry: import("@mappedin/mvf").Polygon;
|
|
3735
|
+
};
|
|
3736
|
+
/** @internal */
|
|
3737
|
+
get focusTarget(): this;
|
|
3738
|
+
/** @internal */
|
|
3739
|
+
get anchorTarget(): Coordinate;
|
|
3623
3740
|
/**
|
|
3624
|
-
*
|
|
3741
|
+
* Serializes the space data to JSON.
|
|
3625
3742
|
*
|
|
3626
|
-
* @
|
|
3743
|
+
* @returns An object representing the space.
|
|
3627
3744
|
*/
|
|
3628
|
-
|
|
3745
|
+
toJSON(): {
|
|
3746
|
+
id: string;
|
|
3747
|
+
name: string;
|
|
3748
|
+
floor: string;
|
|
3749
|
+
};
|
|
3629
3750
|
/**
|
|
3630
|
-
*
|
|
3751
|
+
* Cleans up resources used by the instance.
|
|
3631
3752
|
*
|
|
3632
|
-
* @
|
|
3753
|
+
* @internal
|
|
3633
3754
|
*/
|
|
3634
|
-
|
|
3635
|
-
}
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3755
|
+
destroy(): void;
|
|
3756
|
+
}
|
|
3757
|
+
export default Area;
|
|
3758
|
+
}
|
|
3759
|
+
|
|
3760
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
|
|
3761
|
+
import type { EntranceCollection } from '@mappedin/mvf';
|
|
3762
|
+
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
3763
|
+
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
3764
|
+
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3765
|
+
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
3766
|
+
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
3767
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3641
3768
|
/**
|
|
3642
|
-
*
|
|
3769
|
+
* A class representing door data within the map.
|
|
3770
|
+
*
|
|
3771
|
+
* Doors are hidden by default. Doors can be made visible by setting their `visible` property to `true`.
|
|
3772
|
+
*
|
|
3773
|
+
* ```typescript
|
|
3774
|
+
* //Make interior doors visible and brown.
|
|
3775
|
+
* mapView.updateState(DOORS.Interior, {
|
|
3776
|
+
* visible: true,
|
|
3777
|
+
* color: '#5C4033',
|
|
3778
|
+
* opacity: 0.6,
|
|
3779
|
+
* });
|
|
3780
|
+
|
|
3781
|
+
* //Make exterior doors visible and black.
|
|
3782
|
+
* mapView.updateState(DOORS.Exterior, {
|
|
3783
|
+
* visible: true,
|
|
3784
|
+
* color: 'black',
|
|
3785
|
+
* opacity: 0.6,
|
|
3786
|
+
* });
|
|
3787
|
+
* ```
|
|
3788
|
+
* Doors can also be made visible on an individual basis by passing in a {@link Door} object to {@link MapView.updateState}.
|
|
3789
|
+
*
|
|
3790
|
+
* Refer to the [Door Guide](https://developer.mappedin.com/web-sdk/spaces#doors) for more information and interactive examples.
|
|
3791
|
+
*
|
|
3792
|
+
* Door appearance can be customized by changing the color or adding a texture to the top or sides of a door.
|
|
3793
|
+
* Refer to the [Textures & Colors Guide](https://developer.mappedin.com/web-sdk/images-textures#textures--colors) for more information and interactive examples.
|
|
3643
3794
|
*
|
|
3644
|
-
* @experimental
|
|
3645
3795
|
*/
|
|
3646
|
-
|
|
3796
|
+
class Door extends BaseMapData implements IGeoJSONData, IFocusable, IAnchorable {
|
|
3797
|
+
#private;
|
|
3647
3798
|
/**
|
|
3648
|
-
*
|
|
3799
|
+
* @internal
|
|
3649
3800
|
*/
|
|
3650
|
-
|
|
3651
|
-
/**
|
|
3652
|
-
* The token is used to fetch outdoor tiles, which will then be rendered.
|
|
3653
|
-
*/
|
|
3654
|
-
token?: string;
|
|
3655
|
-
/**
|
|
3656
|
-
* A url to a style specification conforming to the [Maplibre Style Spec](https://maplibre.org/maplibre-style-spec/).
|
|
3657
|
-
* Use the {@link Environment | `environment`} setting to switch environments.
|
|
3658
|
-
*/
|
|
3659
|
-
style?: string;
|
|
3660
|
-
/**
|
|
3661
|
-
* Enable or disable the outdoor view.
|
|
3662
|
-
*/
|
|
3663
|
-
enabled?: boolean;
|
|
3664
|
-
/**
|
|
3665
|
-
* Layers that should be hidden by geometry. This is useful when you want to hide certain layers when they are below the geometry.
|
|
3666
|
-
* @default ['building', 'building-top']
|
|
3667
|
-
*/
|
|
3668
|
-
layersHiddenByGeometry?: string[];
|
|
3669
|
-
};
|
|
3801
|
+
static readonly __type = "door";
|
|
3670
3802
|
/**
|
|
3671
|
-
*
|
|
3672
|
-
*
|
|
3673
|
-
* @default 0
|
|
3803
|
+
* @internal
|
|
3674
3804
|
*/
|
|
3675
|
-
|
|
3805
|
+
readonly __type = "door";
|
|
3676
3806
|
/**
|
|
3677
|
-
*
|
|
3807
|
+
* Checks if the provided instance is of type Door.
|
|
3678
3808
|
*
|
|
3679
|
-
* @
|
|
3809
|
+
* @param instance The instance to check.
|
|
3810
|
+
* @returns {boolean} True if the instance is a Door, false otherwise.
|
|
3680
3811
|
*/
|
|
3681
|
-
|
|
3812
|
+
static is(instance: object): instance is Door;
|
|
3682
3813
|
/**
|
|
3683
|
-
*
|
|
3684
|
-
* If it is not specified, it will default to the level that fits the map bounds.
|
|
3814
|
+
* @internal
|
|
3685
3815
|
*/
|
|
3686
|
-
|
|
3816
|
+
constructor(data: MapDataInternal, options: {
|
|
3817
|
+
floorId: string;
|
|
3818
|
+
mvfData: EntranceCollection['features'][number];
|
|
3819
|
+
});
|
|
3687
3820
|
/**
|
|
3688
|
-
*
|
|
3689
|
-
* false if you need finer control over what is labelled or interactive.
|
|
3821
|
+
* Gets the name of the door.
|
|
3690
3822
|
*
|
|
3691
|
-
* @
|
|
3692
|
-
* @default true
|
|
3823
|
+
* @returns {string} The name of the door.
|
|
3693
3824
|
*/
|
|
3694
|
-
|
|
3825
|
+
get name(): string;
|
|
3695
3826
|
/**
|
|
3696
|
-
*
|
|
3827
|
+
* Gets the external ID of the door.
|
|
3697
3828
|
*
|
|
3698
|
-
*
|
|
3699
|
-
* @hidden
|
|
3700
|
-
* @default true
|
|
3829
|
+
* @returns {string} The external ID of the door.
|
|
3701
3830
|
*/
|
|
3702
|
-
|
|
3831
|
+
get externalId(): string;
|
|
3703
3832
|
/**
|
|
3704
|
-
*
|
|
3833
|
+
* Gets the description of the door.
|
|
3705
3834
|
*
|
|
3706
|
-
*
|
|
3707
|
-
* @default false
|
|
3835
|
+
* @returns {string} The description of the door.
|
|
3708
3836
|
*/
|
|
3709
|
-
|
|
3837
|
+
get description(): string;
|
|
3710
3838
|
/**
|
|
3711
|
-
*
|
|
3839
|
+
* Gets the {@link Floor} object associated with the door.
|
|
3712
3840
|
*
|
|
3713
|
-
* @
|
|
3841
|
+
* @returns {Floor} The floor object.
|
|
3842
|
+
* @throws Will throw an error if the floor is not found.
|
|
3714
3843
|
*/
|
|
3715
|
-
|
|
3844
|
+
get floor(): Floor;
|
|
3716
3845
|
/**
|
|
3717
|
-
*
|
|
3846
|
+
* Calculates and gets the center {@link Coordinate} of the door.
|
|
3718
3847
|
*
|
|
3719
|
-
* @
|
|
3720
|
-
*/
|
|
3721
|
-
attribution?: {
|
|
3722
|
-
/**
|
|
3723
|
-
* Custom attribution content.
|
|
3724
|
-
*/
|
|
3725
|
-
custom?: string[];
|
|
3726
|
-
/**
|
|
3727
|
-
* Attribution position.
|
|
3728
|
-
* @default 'bottom-right'
|
|
3729
|
-
*/
|
|
3730
|
-
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
3731
|
-
};
|
|
3732
|
-
/**
|
|
3733
|
-
* First floor to be rendered.
|
|
3734
|
-
* By default, floor with the elevation that's closest to 0 is rendered. All floors will be sorted by elevation in ascending order.
|
|
3735
|
-
*/
|
|
3736
|
-
initialFloor?: Floor | string;
|
|
3737
|
-
/**
|
|
3738
|
-
* Enable shading of bottoms of geometry along with outlines to make geometry stand out.
|
|
3739
|
-
* @default true
|
|
3740
|
-
* @deprecated Use `style.shading`.
|
|
3848
|
+
* @returns {Coordinate} The center coordinate.
|
|
3741
3849
|
*/
|
|
3742
|
-
|
|
3850
|
+
get center(): Coordinate;
|
|
3743
3851
|
/**
|
|
3744
|
-
*
|
|
3745
|
-
* @deprecated Use `style.wallTopColor`.
|
|
3852
|
+
* Gets whether this door is an exterior door.
|
|
3746
3853
|
*/
|
|
3747
|
-
|
|
3854
|
+
get isExterior(): boolean;
|
|
3748
3855
|
/**
|
|
3749
|
-
*
|
|
3750
|
-
* @experimental
|
|
3856
|
+
* Gets the underlying GeoJSON Feature representation of this Door.
|
|
3751
3857
|
*/
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
backgroundColor?: string;
|
|
3757
|
-
/**
|
|
3758
|
-
* Background alpha value. Only relevant if outdoor map is disabled.
|
|
3759
|
-
*/
|
|
3760
|
-
backgroundAlpha?: number;
|
|
3761
|
-
/**
|
|
3762
|
-
* Set the global shading for all elements. True will use default values, false will disable shading.
|
|
3763
|
-
* @default true
|
|
3764
|
-
*/
|
|
3765
|
-
shading?: boolean | Shading;
|
|
3766
|
-
/**
|
|
3767
|
-
* Set the global outlines for all elements. True will enable outlines, false will disable them.
|
|
3768
|
-
* @default true
|
|
3769
|
-
*/
|
|
3770
|
-
outlines?: boolean;
|
|
3771
|
-
/**
|
|
3772
|
-
* Specify a color for the top of wall geometry.
|
|
3773
|
-
*/
|
|
3774
|
-
wallTopColor?: string;
|
|
3858
|
+
get geoJSON(): {
|
|
3859
|
+
properties: null;
|
|
3860
|
+
type: import("@mappedin/mvf").FeatureType;
|
|
3861
|
+
geometry: import("@mappedin/mvf").LineString;
|
|
3775
3862
|
};
|
|
3863
|
+
/** @internal */
|
|
3864
|
+
get focusTarget(): Coordinate;
|
|
3865
|
+
/** @internal */
|
|
3866
|
+
get anchorTarget(): Coordinate;
|
|
3776
3867
|
/**
|
|
3777
|
-
*
|
|
3778
|
-
*
|
|
3868
|
+
* Converts the door information to a JSON object.
|
|
3869
|
+
*
|
|
3870
|
+
* @returns An object representing the door.
|
|
3779
3871
|
*/
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
* @deprecated Use {@link hydrateMapData} instead.
|
|
3789
|
-
*
|
|
3790
|
-
* Returns a {@link MapData} instance from a parsed MVF object.
|
|
3791
|
-
*/
|
|
3792
|
-
export const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions & {
|
|
3793
|
-
languagePacks?: LanguagePackHydrationItem[];
|
|
3794
|
-
}) => Promise<MapData>;
|
|
3795
|
-
/**
|
|
3796
|
-
* @internal
|
|
3797
|
-
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
3798
|
-
*/
|
|
3799
|
-
export function setUseEnterpriseAPI(value: boolean): void;
|
|
3800
|
-
export type THydrateMapDataBundle = {
|
|
3801
|
-
type: 'binary';
|
|
3802
|
-
options?: {
|
|
3803
|
-
enterprise?: boolean;
|
|
3804
|
-
};
|
|
3805
|
-
languagePacks?: {
|
|
3806
|
-
language: {
|
|
3807
|
-
code: string;
|
|
3808
|
-
name: string;
|
|
3872
|
+
toJSON(): {
|
|
3873
|
+
id: string;
|
|
3874
|
+
name: string;
|
|
3875
|
+
floor: string;
|
|
3876
|
+
center: {
|
|
3877
|
+
latitude: number;
|
|
3878
|
+
longitude: number;
|
|
3879
|
+
floor: string | undefined;
|
|
3809
3880
|
};
|
|
3810
|
-
localePack: Uint8Array;
|
|
3811
|
-
}[];
|
|
3812
|
-
main: Uint8Array;
|
|
3813
|
-
} | {
|
|
3814
|
-
type: 'json';
|
|
3815
|
-
options?: {
|
|
3816
|
-
enterprise?: boolean;
|
|
3817
3881
|
};
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
};
|
|
3827
|
-
/**
|
|
3828
|
-
* Load a MapData instance from a backup including language packs. Pass in userOptions to ensure outdoor view is available.
|
|
3829
|
-
*/
|
|
3830
|
-
export const hydrateMapData: (backup: THydrateMapDataBundle | TMVF, userOptions?: TGetMapDataOptions) => Promise<MapData>;
|
|
3831
|
-
/**
|
|
3832
|
-
* Asynchronously retrieves map data ({@link MapData}) based on user-provided options.
|
|
3833
|
-
*
|
|
3834
|
-
* @experimental
|
|
3835
|
-
* @param userOptions {TGetMapDataOptions} Options provided by the user to retrieve map data.
|
|
3836
|
-
* @returns {Promise<MapData>} Promise resolving to the MapData.
|
|
3837
|
-
* @example
|
|
3838
|
-
* const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
|
|
3839
|
-
*/
|
|
3840
|
-
export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
3841
|
-
/**
|
|
3842
|
-
* @internal
|
|
3843
|
-
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
3844
|
-
*/
|
|
3845
|
-
export const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
3846
|
-
/**
|
|
3847
|
-
* Mappedin JS makes use of MapLibre to render the outdoor portion of the map. Mappedin JS exposes this layer through {@link MapView.OutoorMap} and can be used to add additional layers as described in the [Outdoor Map Guide](https://developer.mappedin.com/web-sdk/outdoor-map).
|
|
3848
|
-
*
|
|
3849
|
-
* It is also possible to utilize the opposite architecture, by adding a MapView to a MapLibre Map.
|
|
3850
|
-
* This is accomplished by using {@link MappedinMapLibreOverlay} class. It allows a developer to easily add a Mappedin indoor map to an existing MapLibre based app.
|
|
3851
|
-
*
|
|
3852
|
-
* Refer to the [Mappedin MapLibre Overlay](https://developer.mappedin.com/web-sdk/mappedin-maplibre-overlay) for more information and interactive examples.
|
|
3853
|
-
|
|
3854
|
-
* @experimental
|
|
3855
|
-
*/
|
|
3856
|
-
export const createMapLibreOverlay: (mapData: MapData, showMapOptions?: TShow3DMapOptions) => MappedinMapLibreOverlay;
|
|
3857
|
-
export const show3dMap: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
3858
|
-
/**
|
|
3859
|
-
* @internal
|
|
3860
|
-
* @deprecated Use {@link show3dMap} instead.
|
|
3861
|
-
*/
|
|
3862
|
-
export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
3863
|
-
export { parseMVF, unzipMVF, enableTestMode, preloadFont };
|
|
3864
|
-
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, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, };
|
|
3865
|
-
export type * from 'geojson';
|
|
3866
|
-
export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TFocusable, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3867
|
-
export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3868
|
-
export type { Label, Marker, Path, Shape, CameraTransform, Model, Image, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3869
|
-
export type { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
|
|
3870
|
-
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
3871
|
-
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3872
|
-
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image as ImageData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, Facade, Node, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3873
|
-
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, StackedMaps, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
3874
|
-
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
3875
|
-
export type { TFindNearestOptions, TFindNearestResult, TQueriables, Query } from '@mappedin/mappedin-js/mappedin-js/src/query';
|
|
3876
|
-
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
3882
|
+
/**
|
|
3883
|
+
* Cleans up resources used by the instance.
|
|
3884
|
+
*
|
|
3885
|
+
* @internal
|
|
3886
|
+
*/
|
|
3887
|
+
destroy(): void;
|
|
3888
|
+
}
|
|
3889
|
+
export default Door;
|
|
3877
3890
|
}
|
|
3878
3891
|
|
|
3879
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
3880
|
-
import type {
|
|
3892
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
3893
|
+
import type { SpaceCollection } from '@mappedin/mvf';
|
|
3881
3894
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
3882
3895
|
import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3883
3896
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
3884
|
-
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3885
3897
|
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
3898
|
+
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
3899
|
+
import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
|
|
3900
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3886
3901
|
/**
|
|
3887
|
-
*
|
|
3888
|
-
*
|
|
3889
|
-
*
|
|
3902
|
+
* Represents the various types of spaces that can be defined within a map.
|
|
3903
|
+
* - 'room': A standard room or enclosed area.
|
|
3904
|
+
* - 'hallway': A passageway connecting rooms.
|
|
3905
|
+
* - 'exterior': An outdoor area.
|
|
3906
|
+
* - 'void': An undefined or non-specific space.
|
|
3907
|
+
* - 'connection.stairs': A stairway connecting different floors.
|
|
3908
|
+
* - 'connection.elevator': An elevator connecting different floors.
|
|
3909
|
+
* - 'poi': A point of interest within the map.
|
|
3910
|
+
*/
|
|
3911
|
+
export type TSpaceType = 'room' | 'hallway' | 'exterior' | 'void' | 'connection.stairs' | 'connection.elevator' | 'poi';
|
|
3912
|
+
/**
|
|
3913
|
+
* A Space represents an area enclosed by walls, such as a hall or room. Spaces can be Interactive and have Labels and Markers added to them.
|
|
3914
|
+
* Spaces can also be customized with a color, texture and hover color.
|
|
3890
3915
|
*
|
|
3916
|
+
* Refer to the [Spaces Guide](https://developer.mappedin.com/web-sdk/spaces) for more information and interactive examples.
|
|
3891
3917
|
*/
|
|
3892
|
-
class
|
|
3918
|
+
class Space extends BaseMapData implements IGeoJSONData, IFocusable, IAnchorable {
|
|
3893
3919
|
#private;
|
|
3894
3920
|
/**
|
|
3895
3921
|
* @internal
|
|
3896
3922
|
*/
|
|
3897
|
-
static readonly __type = "
|
|
3923
|
+
static readonly __type = "space";
|
|
3898
3924
|
/**
|
|
3899
3925
|
* @internal
|
|
3900
3926
|
*/
|
|
3901
|
-
readonly __type = "
|
|
3927
|
+
readonly __type = "space";
|
|
3928
|
+
getMvfData(): import("@mappedin/mvf").Feature<import("@mappedin/mvf").LineString | import("@mappedin/mvf").Polygon | import("@mappedin/mvf").Point, import("@mappedin/mvf").SpaceProperties>;
|
|
3902
3929
|
/**
|
|
3903
|
-
* Checks if the provided instance is of type
|
|
3930
|
+
* Checks if the provided instance is of type Space.
|
|
3904
3931
|
*
|
|
3905
3932
|
* @param instance The instance to check.
|
|
3906
|
-
* @returns {boolean} True if the instance is a
|
|
3933
|
+
* @returns {boolean} True if the instance is a Space, false otherwise.
|
|
3907
3934
|
*/
|
|
3908
|
-
static is(instance: object): instance is
|
|
3935
|
+
static is(instance: object): instance is Space;
|
|
3909
3936
|
/**
|
|
3910
3937
|
* @internal
|
|
3911
3938
|
*/
|
|
3912
3939
|
constructor(data: MapDataInternal, options: {
|
|
3913
3940
|
floorId: string;
|
|
3914
|
-
mvfData:
|
|
3941
|
+
mvfData: SpaceCollection['features'][number];
|
|
3915
3942
|
});
|
|
3916
|
-
get locations(): EnterpriseLocation[];
|
|
3917
3943
|
/**
|
|
3918
|
-
* Gets the
|
|
3944
|
+
* Gets the name of the space.
|
|
3919
3945
|
*
|
|
3920
|
-
* @returns {
|
|
3921
|
-
* @throws Will throw an error if the floor is not found.
|
|
3946
|
+
* @returns {string} The name of the space.
|
|
3922
3947
|
*/
|
|
3923
|
-
get
|
|
3948
|
+
get name(): string;
|
|
3924
3949
|
/**
|
|
3925
|
-
* Gets the
|
|
3950
|
+
* Gets the type/kind of the space.
|
|
3926
3951
|
*
|
|
3927
|
-
* @returns {
|
|
3952
|
+
* @returns {TSpaceType} The type of the space.
|
|
3928
3953
|
*/
|
|
3929
|
-
get
|
|
3954
|
+
get type(): TSpaceType;
|
|
3930
3955
|
/**
|
|
3931
|
-
* Gets the
|
|
3956
|
+
* Gets the description of the space.
|
|
3932
3957
|
*
|
|
3933
|
-
* @returns {string} The
|
|
3958
|
+
* @returns {string} The description of the space, or an empty string if no description exists.
|
|
3959
|
+
*/
|
|
3960
|
+
get description(): string;
|
|
3961
|
+
/**
|
|
3962
|
+
* Gets the external identifier of the space.
|
|
3963
|
+
*
|
|
3964
|
+
* @returns {string} The external ID of the space, or an empty string if no external ID exists.
|
|
3934
3965
|
*/
|
|
3935
3966
|
get externalId(): string;
|
|
3936
3967
|
/**
|
|
3937
|
-
*
|
|
3968
|
+
* @internal
|
|
3969
|
+
*/
|
|
3970
|
+
get locations(): EnterpriseLocation[];
|
|
3971
|
+
/**
|
|
3972
|
+
* Gets the {@link Floor} object associated with the space.
|
|
3938
3973
|
*
|
|
3939
|
-
* @returns {
|
|
3974
|
+
* @returns {Floor} The floor object.
|
|
3975
|
+
* @throws Will throw an error if the floor is not found.
|
|
3940
3976
|
*/
|
|
3941
|
-
get
|
|
3977
|
+
get floor(): Floor;
|
|
3942
3978
|
/**
|
|
3943
|
-
* Gets the
|
|
3979
|
+
* Gets the array of {@link Door}s associated with the space.
|
|
3980
|
+
*
|
|
3981
|
+
* @returns {Door[]} The doors array.
|
|
3982
|
+
*/
|
|
3983
|
+
get doors(): Door[];
|
|
3984
|
+
/**
|
|
3985
|
+
* Gets the center {@link Coordinate} of the space.
|
|
3986
|
+
*
|
|
3987
|
+
* @returns {Coordinate} The space's center coordinate.
|
|
3988
|
+
*/
|
|
3989
|
+
get center(): Coordinate;
|
|
3990
|
+
/**
|
|
3991
|
+
* Gets the underlying GeoJSON Feature representation of this Space.
|
|
3944
3992
|
*/
|
|
3945
3993
|
get geoJSON(): {
|
|
3946
3994
|
properties: null;
|
|
3947
3995
|
type: import("@mappedin/mvf").FeatureType;
|
|
3948
|
-
geometry: import("@mappedin/mvf").Point;
|
|
3996
|
+
geometry: import("@mappedin/mvf").LineString | import("@mappedin/mvf").Polygon | import("@mappedin/mvf").Point;
|
|
3949
3997
|
};
|
|
3998
|
+
/** @internal */
|
|
3999
|
+
get focusTarget(): Coordinate | this;
|
|
4000
|
+
/** @internal */
|
|
4001
|
+
get anchorTarget(): Coordinate;
|
|
3950
4002
|
/**
|
|
3951
|
-
* Serializes the
|
|
4003
|
+
* Serializes the space data to JSON.
|
|
3952
4004
|
*
|
|
3953
|
-
* @returns An object representing the
|
|
4005
|
+
* @returns An object representing the space.
|
|
3954
4006
|
*/
|
|
3955
4007
|
toJSON(): {
|
|
3956
4008
|
id: string;
|
|
4009
|
+
name: string;
|
|
4010
|
+
type: TSpaceType;
|
|
3957
4011
|
floor: string;
|
|
3958
|
-
|
|
4012
|
+
center: {
|
|
3959
4013
|
latitude: number;
|
|
3960
4014
|
longitude: number;
|
|
3961
4015
|
floor: string | undefined;
|
|
3962
4016
|
};
|
|
3963
|
-
neighbors: string[];
|
|
3964
4017
|
};
|
|
3965
4018
|
/**
|
|
3966
4019
|
* Cleans up resources used by the instance.
|
|
@@ -3969,221 +4022,231 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
|
|
|
3969
4022
|
*/
|
|
3970
4023
|
destroy(): void;
|
|
3971
4024
|
}
|
|
3972
|
-
export
|
|
4025
|
+
export const VALID_SPACE_TYPES: TSpaceType[];
|
|
4026
|
+
/**
|
|
4027
|
+
* validates space type and fallback to room
|
|
4028
|
+
*/
|
|
4029
|
+
export function validateSpaceType(input: string | null | undefined): TSpaceType;
|
|
4030
|
+
export default Space;
|
|
3973
4031
|
}
|
|
3974
4032
|
|
|
3975
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
3976
|
-
import type {
|
|
3977
|
-
import {
|
|
3978
|
-
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
4033
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
|
|
4034
|
+
import type { FloorProperties as MVFFloor } from '@mappedin/mvf';
|
|
4035
|
+
import type { Annotation, Connection, Door, MapDataInternal, PointOfInterest, Space, MapObject, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3979
4036
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
3980
|
-
import type {
|
|
4037
|
+
import type { IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3981
4038
|
/**
|
|
3982
|
-
*
|
|
3983
|
-
* necessarily bounded by walls or any other physical feature of the map.
|
|
4039
|
+
* A class representing floor data within the map.
|
|
3984
4040
|
*
|
|
3985
|
-
*
|
|
3986
|
-
* functionality or new features added in the future.
|
|
4041
|
+
* Floors are used to represent different levels within a map, each containing various map elements.
|
|
3987
4042
|
*/
|
|
3988
|
-
class
|
|
4043
|
+
class Floor extends BaseMapData implements IFocusable {
|
|
3989
4044
|
#private;
|
|
3990
4045
|
/**
|
|
3991
4046
|
* @internal
|
|
3992
4047
|
*/
|
|
3993
|
-
static readonly __type = "
|
|
4048
|
+
static readonly __type = "floor";
|
|
3994
4049
|
/**
|
|
3995
4050
|
* @internal
|
|
3996
4051
|
*/
|
|
3997
|
-
readonly __type = "
|
|
4052
|
+
readonly __type = "floor";
|
|
3998
4053
|
/**
|
|
3999
|
-
* Checks if the provided instance is of type
|
|
4054
|
+
* Checks if the provided instance is of type Floor.
|
|
4000
4055
|
*
|
|
4001
4056
|
* @param instance The instance to check.
|
|
4002
|
-
* @returns {boolean} True if the instance is a
|
|
4057
|
+
* @returns {boolean} True if the instance is a Floor, false otherwise.
|
|
4003
4058
|
*/
|
|
4004
|
-
static is(instance: object): instance is
|
|
4059
|
+
static is(instance: object): instance is Floor;
|
|
4005
4060
|
/**
|
|
4006
4061
|
* @internal
|
|
4007
4062
|
*/
|
|
4008
4063
|
constructor(data: MapDataInternal, options: {
|
|
4009
|
-
|
|
4010
|
-
mvfData: AreaCollection['features'][number];
|
|
4064
|
+
mvfData: MVFFloor;
|
|
4011
4065
|
});
|
|
4066
|
+
/** @internal */
|
|
4067
|
+
get focusTarget(): this;
|
|
4012
4068
|
/**
|
|
4013
|
-
* Gets the name of the
|
|
4069
|
+
* Gets the name of the floor.
|
|
4014
4070
|
*
|
|
4015
|
-
* @returns {string} The name of the
|
|
4071
|
+
* @returns {string} The name of the floor.
|
|
4016
4072
|
*/
|
|
4017
4073
|
get name(): string;
|
|
4018
4074
|
/**
|
|
4019
|
-
* Gets the external
|
|
4075
|
+
* Gets the external ID of the floor.
|
|
4020
4076
|
*
|
|
4021
|
-
* @returns {string} The external ID of the
|
|
4077
|
+
* @returns {string} The external ID of the floor.
|
|
4022
4078
|
*/
|
|
4023
4079
|
get externalId(): string;
|
|
4024
4080
|
/**
|
|
4025
|
-
* Gets the
|
|
4081
|
+
* Gets the elevation of the floor.
|
|
4026
4082
|
*
|
|
4027
|
-
* @returns {
|
|
4083
|
+
* @returns {number} The elevation of the floor.
|
|
4028
4084
|
*/
|
|
4029
|
-
get
|
|
4085
|
+
get elevation(): number;
|
|
4030
4086
|
/**
|
|
4031
|
-
* Gets the
|
|
4087
|
+
* Gets the spaces ({@link Space}) located on this floor.
|
|
4032
4088
|
*
|
|
4033
|
-
* @returns {
|
|
4089
|
+
* @returns {Space[]} An array of Space objects on this floor.
|
|
4034
4090
|
*/
|
|
4035
|
-
get
|
|
4091
|
+
get spaces(): Space[];
|
|
4036
4092
|
/**
|
|
4037
|
-
* Gets the {@link
|
|
4093
|
+
* Gets the objects ({@link MapObject}) located on this floor.
|
|
4038
4094
|
*
|
|
4039
|
-
* @returns {
|
|
4040
|
-
* @throws Will throw an error if the floor is not found.
|
|
4095
|
+
* @returns {MapObject[]} An array of MapObject objects on this floor.
|
|
4041
4096
|
*/
|
|
4042
|
-
get
|
|
4097
|
+
get objects(): MapObject[];
|
|
4043
4098
|
/**
|
|
4044
|
-
* Gets the
|
|
4099
|
+
* Gets the connections ({@link Connection}) associated with this floor.
|
|
4100
|
+
*
|
|
4101
|
+
* @returns {Connection[]} An array of Connection objects linked to this floor.
|
|
4045
4102
|
*/
|
|
4046
|
-
get
|
|
4047
|
-
properties: null;
|
|
4048
|
-
type: import("@mappedin/mvf").FeatureType;
|
|
4049
|
-
geometry: import("@mappedin/mvf").Polygon;
|
|
4050
|
-
};
|
|
4103
|
+
get connections(): Connection[];
|
|
4051
4104
|
/**
|
|
4052
|
-
*
|
|
4105
|
+
* Gets the doors ({@link Door}) located on this floor.
|
|
4053
4106
|
*
|
|
4054
|
-
* @returns An
|
|
4107
|
+
* @returns {Door[]} An array of Door objects on this floor.
|
|
4055
4108
|
*/
|
|
4056
|
-
|
|
4057
|
-
id: string;
|
|
4058
|
-
name: string;
|
|
4059
|
-
floor: string;
|
|
4060
|
-
};
|
|
4109
|
+
get doors(): Door[];
|
|
4061
4110
|
/**
|
|
4062
|
-
*
|
|
4111
|
+
* Gets the annotations ({@link Annotation}) associated with this floor.
|
|
4063
4112
|
*
|
|
4064
|
-
* @
|
|
4113
|
+
* @returns {Annotation[]} An array of Annotation objects linked to this floor.
|
|
4065
4114
|
*/
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4115
|
+
get annotations(): Annotation[];
|
|
4116
|
+
/**
|
|
4117
|
+
* Gets the points of interest ({@link PointOfInterest}) located on this floor.
|
|
4118
|
+
*
|
|
4119
|
+
* @returns {PointOfInterest[]} An array of PointOfInterest objects on this floor.
|
|
4120
|
+
*/
|
|
4121
|
+
get pois(): PointOfInterest[];
|
|
4122
|
+
/**
|
|
4123
|
+
* Gets the FloorStack ({@link FloorStack}) that this floor belongs to.
|
|
4124
|
+
*
|
|
4125
|
+
* @returns {FloorStack} The FloorStack that this floor belongs to.
|
|
4126
|
+
*/
|
|
4127
|
+
get floorStack(): FloorStack;
|
|
4128
|
+
/**
|
|
4129
|
+
* Serializes the floor data to JSON.
|
|
4130
|
+
*
|
|
4131
|
+
* @returns An object representing the floor.
|
|
4132
|
+
*/
|
|
4133
|
+
toJSON(): {
|
|
4134
|
+
id: string;
|
|
4135
|
+
name: string;
|
|
4136
|
+
elevation: number;
|
|
4137
|
+
spaces: string[];
|
|
4138
|
+
objects: string[];
|
|
4139
|
+
connections: string[];
|
|
4140
|
+
doors: string[];
|
|
4141
|
+
annotations: string[];
|
|
4142
|
+
pois: string[];
|
|
4143
|
+
};
|
|
4144
|
+
/**
|
|
4145
|
+
* Cleans up resources used by the instance.
|
|
4146
|
+
*
|
|
4147
|
+
* @internal
|
|
4148
|
+
*/
|
|
4149
|
+
destroy(): void;
|
|
4150
|
+
}
|
|
4151
|
+
export default Floor;
|
|
4152
|
+
}
|
|
4153
|
+
|
|
4154
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connection' {
|
|
4155
|
+
import type { Feature, FeatureCollection, Point, SpaceProperties, Connection as MVFConnection } from '@mappedin/mvf';
|
|
4156
|
+
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4157
|
+
import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
4158
|
+
import type { Floor, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4159
|
+
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
4160
|
+
import type { IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
4161
|
+
/**
|
|
4162
|
+
* A class representing connection data within the map.
|
|
4104
4163
|
*
|
|
4164
|
+
* Connections are used to represent pathways between different map nodes.
|
|
4105
4165
|
*/
|
|
4106
|
-
class
|
|
4166
|
+
class Connection extends BaseMapData implements IFocusable {
|
|
4107
4167
|
#private;
|
|
4108
4168
|
/**
|
|
4109
4169
|
* @internal
|
|
4110
4170
|
*/
|
|
4111
|
-
static readonly __type = "
|
|
4171
|
+
static readonly __type = "connection";
|
|
4112
4172
|
/**
|
|
4113
4173
|
* @internal
|
|
4114
4174
|
*/
|
|
4115
|
-
readonly __type = "
|
|
4175
|
+
readonly __type = "connection";
|
|
4116
4176
|
/**
|
|
4117
|
-
* Checks if the provided instance is of type
|
|
4177
|
+
* Checks if the provided instance is of type Connection.
|
|
4118
4178
|
*
|
|
4119
4179
|
* @param instance The instance to check.
|
|
4120
|
-
* @returns {boolean} True if the instance is a
|
|
4180
|
+
* @returns {boolean} True if the instance is a Connection, false otherwise.
|
|
4121
4181
|
*/
|
|
4122
|
-
static is(instance: object): instance is
|
|
4182
|
+
static is(instance: object): instance is Connection;
|
|
4123
4183
|
/**
|
|
4124
4184
|
* @internal
|
|
4125
4185
|
*/
|
|
4126
4186
|
constructor(data: MapDataInternal, options: {
|
|
4127
|
-
|
|
4128
|
-
|
|
4187
|
+
mvfDataByFloorId: Record<string, FeatureCollection<Point, SpaceProperties>['features'][number]> | Record<string, Feature<Point, MVFConnection>>;
|
|
4188
|
+
accessible?: boolean;
|
|
4129
4189
|
});
|
|
4130
4190
|
/**
|
|
4131
|
-
* Gets the name of the
|
|
4191
|
+
* Gets the name of the connection.
|
|
4132
4192
|
*
|
|
4133
|
-
* @returns {string} The name of the
|
|
4193
|
+
* @returns {string} The name of the connection.
|
|
4134
4194
|
*/
|
|
4135
4195
|
get name(): string;
|
|
4196
|
+
get description(): string;
|
|
4136
4197
|
/**
|
|
4137
|
-
*
|
|
4198
|
+
* Whether the connection is accessible. For example elevators are accessible while stairs are not.
|
|
4138
4199
|
*
|
|
4139
|
-
* @returns {
|
|
4200
|
+
* @returns {boolean} Whether the connection is accessible.
|
|
4140
4201
|
*/
|
|
4141
|
-
get
|
|
4202
|
+
get accessible(): boolean;
|
|
4142
4203
|
/**
|
|
4143
|
-
* Gets the
|
|
4204
|
+
* Gets the external ID of the connection.
|
|
4144
4205
|
*
|
|
4145
|
-
* @returns {string} The
|
|
4206
|
+
* @returns {string} The external ID of the connection.
|
|
4146
4207
|
*/
|
|
4147
|
-
get
|
|
4208
|
+
get externalId(): string;
|
|
4148
4209
|
/**
|
|
4149
|
-
|
|
4210
|
+
/**
|
|
4211
|
+
* Gets the type of the connection.
|
|
4150
4212
|
*
|
|
4151
|
-
* @returns {
|
|
4152
|
-
* @throws Will throw an error if the floor is not found.
|
|
4213
|
+
* @returns {string} The type of the connection.
|
|
4153
4214
|
*/
|
|
4154
|
-
get
|
|
4215
|
+
get type(): string;
|
|
4155
4216
|
/**
|
|
4156
|
-
*
|
|
4217
|
+
* Gets the coordinates ({@link Coordinate}) of the connection.
|
|
4157
4218
|
*
|
|
4158
|
-
* @returns {Coordinate}
|
|
4219
|
+
* @returns {Coordinate[]} An array of coordinates for the connection.
|
|
4159
4220
|
*/
|
|
4160
|
-
get
|
|
4221
|
+
get coordinates(): Coordinate[];
|
|
4161
4222
|
/**
|
|
4162
|
-
* Gets
|
|
4223
|
+
* Gets the nodes ({@link Node}) associated with the connection.
|
|
4163
4224
|
*/
|
|
4164
|
-
get
|
|
4225
|
+
get nodes(): Node[];
|
|
4165
4226
|
/**
|
|
4166
|
-
* Gets the
|
|
4227
|
+
* Gets the floors ({@link Floor}) associated with the connection.
|
|
4228
|
+
*
|
|
4229
|
+
* @returns {Floor[]} An array of floors for the connection.
|
|
4167
4230
|
*/
|
|
4168
|
-
get
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
geometry: import("@mappedin/mvf").LineString;
|
|
4172
|
-
};
|
|
4231
|
+
get floors(): Floor[];
|
|
4232
|
+
/** @internal */
|
|
4233
|
+
get focusTarget(): Coordinate[];
|
|
4173
4234
|
/**
|
|
4174
|
-
*
|
|
4235
|
+
* Serializes the connection data to JSON.
|
|
4175
4236
|
*
|
|
4176
|
-
* @returns An object representing the
|
|
4237
|
+
* @returns An object representing the connection.
|
|
4177
4238
|
*/
|
|
4178
4239
|
toJSON(): {
|
|
4179
4240
|
id: string;
|
|
4180
4241
|
name: string;
|
|
4181
|
-
|
|
4182
|
-
|
|
4242
|
+
type: string;
|
|
4243
|
+
externalId: string;
|
|
4244
|
+
coordinates: {
|
|
4183
4245
|
latitude: number;
|
|
4184
4246
|
longitude: number;
|
|
4185
4247
|
floor: string | undefined;
|
|
4186
|
-
};
|
|
4248
|
+
}[];
|
|
4249
|
+
floors: string[];
|
|
4187
4250
|
};
|
|
4188
4251
|
/**
|
|
4189
4252
|
* Cleans up resources used by the instance.
|
|
@@ -4192,123 +4255,107 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
|
|
|
4192
4255
|
*/
|
|
4193
4256
|
destroy(): void;
|
|
4194
4257
|
}
|
|
4195
|
-
export default
|
|
4258
|
+
export default Connection;
|
|
4196
4259
|
}
|
|
4197
4260
|
|
|
4198
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
4199
|
-
import type {
|
|
4261
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/object' {
|
|
4262
|
+
import type { ObstructionCollection } from '@mappedin/mvf';
|
|
4200
4263
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4201
|
-
import type {
|
|
4264
|
+
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4202
4265
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
4203
|
-
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
4204
|
-
import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
|
|
4205
4266
|
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
4267
|
+
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
4268
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
4206
4269
|
/**
|
|
4207
|
-
*
|
|
4208
|
-
* - 'room': A standard room or enclosed area.
|
|
4209
|
-
* - 'hallway': A passageway connecting rooms.
|
|
4210
|
-
* - 'exterior': An outdoor area.
|
|
4211
|
-
* - 'void': An undefined or non-specific space.
|
|
4212
|
-
* - 'connection.stairs': A stairway connecting different floors.
|
|
4213
|
-
* - 'connection.elevator': An elevator connecting different floors.
|
|
4214
|
-
* - 'poi': A point of interest within the map.
|
|
4215
|
-
*/
|
|
4216
|
-
export type TSpaceType = 'room' | 'hallway' | 'exterior' | 'void' | 'connection.stairs' | 'connection.elevator' | 'poi';
|
|
4217
|
-
/**
|
|
4218
|
-
* A Space represents an area enclosed by walls, such as a hall or room. Spaces can be Interactive and have Labels and Markers added to them.
|
|
4219
|
-
* Spaces can also be customized with a color, texture and hover color.
|
|
4270
|
+
* A class representing generic map object data within the map.
|
|
4220
4271
|
*
|
|
4221
|
-
*
|
|
4272
|
+
* It could represent various objects on the map, such as desks, chairs, etc.
|
|
4273
|
+
*
|
|
4274
|
+
* MapObject appearance can be customized by changing the color or adding a texture to its top or sides.
|
|
4275
|
+
* Refer to the [Textures & Colors Guide](https://developer.mappedin.com/web-sdk/images-textures#textures--colors) for more information and interactive examples.
|
|
4222
4276
|
*/
|
|
4223
|
-
class
|
|
4277
|
+
export class MapObject extends BaseMapData implements IGeoJSONData, IFocusable, IAnchorable {
|
|
4224
4278
|
#private;
|
|
4225
4279
|
/**
|
|
4226
4280
|
* @internal
|
|
4227
4281
|
*/
|
|
4228
|
-
static readonly __type = "
|
|
4282
|
+
static readonly __type = "object";
|
|
4229
4283
|
/**
|
|
4230
4284
|
* @internal
|
|
4231
4285
|
*/
|
|
4232
|
-
readonly __type = "
|
|
4233
|
-
getMvfData(): import("@mappedin/mvf").Feature<import("@mappedin/mvf").Polygon | import("@mappedin/mvf").LineString | import("@mappedin/mvf").Point, import("@mappedin/mvf").SpaceProperties>;
|
|
4286
|
+
readonly __type = "object";
|
|
4234
4287
|
/**
|
|
4235
|
-
* Checks if the provided instance is of type
|
|
4288
|
+
* Checks if the provided instance is of type MapObject.
|
|
4236
4289
|
*
|
|
4237
4290
|
* @param instance The instance to check.
|
|
4238
|
-
* @returns {boolean} True if the instance is a
|
|
4291
|
+
* @returns {boolean} True if the instance is a MapObject, false otherwise.
|
|
4239
4292
|
*/
|
|
4240
|
-
static is(instance: object): instance is
|
|
4293
|
+
static is(instance: object): instance is MapObject;
|
|
4241
4294
|
/**
|
|
4242
4295
|
* @internal
|
|
4243
4296
|
*/
|
|
4244
4297
|
constructor(data: MapDataInternal, options: {
|
|
4245
4298
|
floorId: string;
|
|
4246
|
-
mvfData:
|
|
4299
|
+
mvfData: ObstructionCollection['features'][number];
|
|
4247
4300
|
});
|
|
4248
4301
|
/**
|
|
4249
|
-
* Gets the name of the
|
|
4302
|
+
* Gets the name of the MapObject.
|
|
4250
4303
|
*
|
|
4251
|
-
* @returns {string} The name of the
|
|
4304
|
+
* @returns {string} The name of the object.
|
|
4252
4305
|
*/
|
|
4253
4306
|
get name(): string;
|
|
4254
4307
|
/**
|
|
4255
|
-
* Gets the
|
|
4308
|
+
* Gets the external ID of the MapObject.
|
|
4256
4309
|
*
|
|
4257
|
-
* @returns {
|
|
4310
|
+
* @returns {string} The external ID of the object.
|
|
4258
4311
|
*/
|
|
4259
|
-
get
|
|
4312
|
+
get externalId(): string;
|
|
4260
4313
|
/**
|
|
4261
|
-
* Gets the description of the
|
|
4314
|
+
* Gets the description of the MapObject.
|
|
4262
4315
|
*
|
|
4263
|
-
* @returns {string} The description of the
|
|
4316
|
+
* @returns {string} The description of the object.
|
|
4264
4317
|
*/
|
|
4265
4318
|
get description(): string;
|
|
4266
4319
|
/**
|
|
4267
|
-
* Gets the
|
|
4320
|
+
* Gets the type of the MapObject.
|
|
4268
4321
|
*
|
|
4269
|
-
* @returns {string} The
|
|
4270
|
-
*/
|
|
4271
|
-
get externalId(): string;
|
|
4272
|
-
/**
|
|
4273
|
-
* @internal
|
|
4322
|
+
* @returns {string} The kind of the object.
|
|
4274
4323
|
*/
|
|
4275
|
-
get
|
|
4324
|
+
get type(): string;
|
|
4276
4325
|
/**
|
|
4277
|
-
* Gets the {@link Floor}
|
|
4326
|
+
* Gets the {@link Floor} associated with the MapObject.
|
|
4278
4327
|
*
|
|
4279
4328
|
* @returns {Floor} The floor object.
|
|
4280
4329
|
* @throws Will throw an error if the floor is not found.
|
|
4281
4330
|
*/
|
|
4282
4331
|
get floor(): Floor;
|
|
4283
4332
|
/**
|
|
4284
|
-
* Gets the
|
|
4285
|
-
*
|
|
4286
|
-
* @returns {Door[]} The doors array.
|
|
4287
|
-
*/
|
|
4288
|
-
get doors(): Door[];
|
|
4289
|
-
/**
|
|
4290
|
-
* Gets the center {@link Coordinate} of the space.
|
|
4333
|
+
* Gets the center {@link Coordinate} of the MapObject.
|
|
4291
4334
|
*
|
|
4292
|
-
* @returns {Coordinate} The
|
|
4335
|
+
* @returns {Coordinate} The object's center coordinate.
|
|
4293
4336
|
*/
|
|
4294
4337
|
get center(): Coordinate;
|
|
4295
4338
|
/**
|
|
4296
|
-
* Gets the underlying GeoJSON Feature representation of this
|
|
4339
|
+
* Gets the underlying GeoJSON Feature representation of this Object.
|
|
4297
4340
|
*/
|
|
4298
4341
|
get geoJSON(): {
|
|
4299
4342
|
properties: null;
|
|
4300
4343
|
type: import("@mappedin/mvf").FeatureType;
|
|
4301
|
-
geometry: import("@mappedin/mvf").
|
|
4344
|
+
geometry: import("@mappedin/mvf").LineString | import("@mappedin/mvf").Polygon;
|
|
4302
4345
|
};
|
|
4346
|
+
/** @internal */
|
|
4347
|
+
get anchorTarget(): Coordinate;
|
|
4348
|
+
/** @internal */
|
|
4349
|
+
get focusTarget(): Coordinate | this;
|
|
4303
4350
|
/**
|
|
4304
|
-
* Serializes the
|
|
4351
|
+
* Serializes the MapObject data to JSON.
|
|
4305
4352
|
*
|
|
4306
|
-
* @returns An object representing the
|
|
4353
|
+
* @returns An object representing the MapObject.
|
|
4307
4354
|
*/
|
|
4308
4355
|
toJSON(): {
|
|
4309
4356
|
id: string;
|
|
4310
4357
|
name: string;
|
|
4311
|
-
type:
|
|
4358
|
+
type: string;
|
|
4312
4359
|
floor: string;
|
|
4313
4360
|
center: {
|
|
4314
4361
|
latitude: number;
|
|
@@ -4323,121 +4370,78 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
|
4323
4370
|
*/
|
|
4324
4371
|
destroy(): void;
|
|
4325
4372
|
}
|
|
4326
|
-
export
|
|
4327
|
-
/**
|
|
4328
|
-
* validates space type and fallback to room
|
|
4329
|
-
*/
|
|
4330
|
-
export function validateSpaceType(input: string | null | undefined): TSpaceType;
|
|
4331
|
-
export default Space;
|
|
4373
|
+
export default MapObject;
|
|
4332
4374
|
}
|
|
4333
4375
|
|
|
4334
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
4335
|
-
import type {
|
|
4336
|
-
import type { Annotation, Connection, Door, MapDataInternal, PointOfInterest, Space, MapObject, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4337
|
-
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
4376
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate' {
|
|
4377
|
+
import type { IFocusable, IAnchorable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
4338
4378
|
/**
|
|
4339
|
-
*
|
|
4379
|
+
* Class representing a pseudo-mercator coordinate.
|
|
4340
4380
|
*
|
|
4341
|
-
*
|
|
4381
|
+
* The Pseudo-Mercator projection is a type of cylindrical and conformal map projection.
|
|
4382
|
+
* It is identified as EPSG:3857 ({@link https://epsg.io/3857}).
|
|
4383
|
+
* This projection is a modified version of the traditional Mercator projection,
|
|
4384
|
+
* which is commonly used in marine navigation.
|
|
4342
4385
|
*/
|
|
4343
|
-
class
|
|
4344
|
-
#private;
|
|
4345
|
-
/**
|
|
4346
|
-
* @internal
|
|
4347
|
-
*/
|
|
4348
|
-
static readonly __type = "floor";
|
|
4386
|
+
class Coordinate implements IFocusable, IAnchorable {
|
|
4349
4387
|
/**
|
|
4350
4388
|
* @internal
|
|
4351
4389
|
*/
|
|
4352
|
-
readonly __type = "
|
|
4353
|
-
/**
|
|
4354
|
-
* Checks if the provided instance is of type Floor.
|
|
4355
|
-
*
|
|
4356
|
-
* @param instance The instance to check.
|
|
4357
|
-
* @returns {boolean} True if the instance is a Floor, false otherwise.
|
|
4358
|
-
*/
|
|
4359
|
-
static is(instance: object): instance is Floor;
|
|
4390
|
+
static readonly __type = "coordinate";
|
|
4360
4391
|
/**
|
|
4361
4392
|
* @internal
|
|
4362
4393
|
*/
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
});
|
|
4366
|
-
/**
|
|
4367
|
-
* Gets the name of the floor.
|
|
4368
|
-
*
|
|
4369
|
-
* @returns {string} The name of the floor.
|
|
4370
|
-
*/
|
|
4371
|
-
get name(): string;
|
|
4372
|
-
/**
|
|
4373
|
-
* Gets the external ID of the floor.
|
|
4374
|
-
*
|
|
4375
|
-
* @returns {string} The external ID of the floor.
|
|
4376
|
-
*/
|
|
4377
|
-
get externalId(): string;
|
|
4394
|
+
readonly __type = "coordinate";
|
|
4395
|
+
id: string;
|
|
4378
4396
|
/**
|
|
4379
|
-
*
|
|
4380
|
-
*
|
|
4381
|
-
* @returns {number} The elevation of the floor.
|
|
4397
|
+
* The latitude of the coordinate.
|
|
4398
|
+
* @type {number}
|
|
4382
4399
|
*/
|
|
4383
|
-
|
|
4400
|
+
readonly latitude: number;
|
|
4384
4401
|
/**
|
|
4385
|
-
*
|
|
4386
|
-
*
|
|
4387
|
-
* @returns {Space[]} An array of Space objects on this floor.
|
|
4402
|
+
* The longitude of the coordinate.
|
|
4403
|
+
* @type {number}
|
|
4388
4404
|
*/
|
|
4389
|
-
|
|
4405
|
+
readonly longitude: number;
|
|
4390
4406
|
/**
|
|
4391
|
-
*
|
|
4392
|
-
*
|
|
4393
|
-
* @returns {MapObject[]} An array of MapObject objects on this floor.
|
|
4407
|
+
* The floor ID of the coordinate.
|
|
4394
4408
|
*/
|
|
4395
|
-
|
|
4409
|
+
readonly floorId?: string;
|
|
4396
4410
|
/**
|
|
4397
|
-
*
|
|
4411
|
+
* Checks if the provided instance is of type Coordinate.
|
|
4398
4412
|
*
|
|
4399
|
-
* @
|
|
4413
|
+
* @param instance The instance to check.
|
|
4414
|
+
* @returns {boolean} True if the instance is a Coordinate, false otherwise.
|
|
4400
4415
|
*/
|
|
4401
|
-
|
|
4416
|
+
static is(instance: object): instance is Coordinate;
|
|
4402
4417
|
/**
|
|
4403
|
-
*
|
|
4404
|
-
*
|
|
4405
|
-
* @returns {Door[]} An array of Door objects on this floor.
|
|
4418
|
+
* @internal
|
|
4406
4419
|
*/
|
|
4407
|
-
|
|
4420
|
+
constructor(latitude: number, longitude: number, floorId?: string);
|
|
4408
4421
|
/**
|
|
4409
|
-
*
|
|
4410
|
-
*
|
|
4411
|
-
* @returns {Annotation[]} An array of Annotation objects linked to this floor.
|
|
4422
|
+
* @internal
|
|
4412
4423
|
*/
|
|
4413
|
-
get
|
|
4424
|
+
get anchorTarget(): this;
|
|
4414
4425
|
/**
|
|
4415
|
-
*
|
|
4416
|
-
*
|
|
4417
|
-
* @returns {PointOfInterest[]} An array of PointOfInterest objects on this floor.
|
|
4426
|
+
* @internal
|
|
4418
4427
|
*/
|
|
4419
|
-
get
|
|
4428
|
+
get focusTarget(): this;
|
|
4420
4429
|
/**
|
|
4421
|
-
*
|
|
4430
|
+
* Checks if this coordinate is equal to another coordinate.
|
|
4422
4431
|
*
|
|
4423
|
-
* @
|
|
4432
|
+
* @param coordinate The coordinate to compare with.
|
|
4433
|
+
* @returns {boolean} True if coordinates are equal, false otherwise.
|
|
4424
4434
|
*/
|
|
4425
|
-
|
|
4435
|
+
isEqual(coordinate: Coordinate): boolean;
|
|
4426
4436
|
/**
|
|
4427
|
-
* Serializes the
|
|
4437
|
+
* Serializes the coordinate data to JSON.
|
|
4428
4438
|
*
|
|
4429
|
-
* @returns An object representing the
|
|
4439
|
+
* @returns An object representing the coordinate.
|
|
4430
4440
|
*/
|
|
4431
4441
|
toJSON(): {
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
spaces: string[];
|
|
4436
|
-
objects: string[];
|
|
4437
|
-
connections: string[];
|
|
4438
|
-
doors: string[];
|
|
4439
|
-
annotations: string[];
|
|
4440
|
-
pois: string[];
|
|
4442
|
+
latitude: number;
|
|
4443
|
+
longitude: number;
|
|
4444
|
+
floor: string | undefined;
|
|
4441
4445
|
};
|
|
4442
4446
|
/**
|
|
4443
4447
|
* Cleans up resources used by the instance.
|
|
@@ -4446,102 +4450,103 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
|
|
|
4446
4450
|
*/
|
|
4447
4451
|
destroy(): void;
|
|
4448
4452
|
}
|
|
4449
|
-
export default
|
|
4453
|
+
export default Coordinate;
|
|
4450
4454
|
}
|
|
4451
4455
|
|
|
4452
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
4453
|
-
import type {
|
|
4454
|
-
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4455
|
-
import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
4456
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/poi' {
|
|
4457
|
+
import type { FeatureCollection, Point, SpaceProperties } from '@mappedin/mvf';
|
|
4456
4458
|
import type { Floor, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4459
|
+
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4460
|
+
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
4457
4461
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
4462
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
4458
4463
|
/**
|
|
4459
|
-
* A class representing
|
|
4464
|
+
* A class representing point of interest data within the map.
|
|
4460
4465
|
*
|
|
4461
|
-
*
|
|
4466
|
+
* Points of interest are used to represent specific points
|
|
4467
|
+
* on the map with additional information(e.g. ATMs, Water Fountains).
|
|
4462
4468
|
*/
|
|
4463
|
-
class
|
|
4469
|
+
class PointOfInterest extends BaseMapData implements IGeoJSONData, IFocusable, IAnchorable {
|
|
4464
4470
|
#private;
|
|
4465
4471
|
/**
|
|
4466
4472
|
* @internal
|
|
4467
4473
|
*/
|
|
4468
|
-
static readonly __type = "
|
|
4474
|
+
static readonly __type = "point-of-interest";
|
|
4469
4475
|
/**
|
|
4470
4476
|
* @internal
|
|
4471
4477
|
*/
|
|
4472
|
-
readonly __type = "
|
|
4478
|
+
readonly __type = "point-of-interest";
|
|
4473
4479
|
/**
|
|
4474
|
-
* Checks if the provided instance is of type
|
|
4480
|
+
* Checks if the provided instance is of type PointOfInterest.
|
|
4475
4481
|
*
|
|
4476
4482
|
* @param instance The instance to check.
|
|
4477
|
-
* @returns {boolean} True if the instance is a
|
|
4483
|
+
* @returns {boolean} True if the instance is a PointOfInterest, false otherwise.
|
|
4478
4484
|
*/
|
|
4479
|
-
static is(instance: object): instance is
|
|
4485
|
+
static is(instance: object): instance is PointOfInterest;
|
|
4480
4486
|
/**
|
|
4481
4487
|
* @internal
|
|
4482
4488
|
*/
|
|
4483
4489
|
constructor(data: MapDataInternal, options: {
|
|
4484
|
-
|
|
4485
|
-
|
|
4490
|
+
floorId: string;
|
|
4491
|
+
mvfData: FeatureCollection<Point, SpaceProperties>['features'][number];
|
|
4486
4492
|
});
|
|
4487
4493
|
/**
|
|
4488
|
-
* Gets the name of the
|
|
4494
|
+
* Gets the name of the POI.
|
|
4489
4495
|
*
|
|
4490
|
-
* @returns {string} The name of the
|
|
4496
|
+
* @returns {string} The name of the POI.
|
|
4491
4497
|
*/
|
|
4492
4498
|
get name(): string;
|
|
4493
|
-
get description(): string;
|
|
4494
4499
|
/**
|
|
4495
|
-
*
|
|
4500
|
+
* Gets the description of the POI.
|
|
4496
4501
|
*
|
|
4497
|
-
* @returns {
|
|
4502
|
+
* @returns {string} The description of the POI.
|
|
4498
4503
|
*/
|
|
4499
|
-
get
|
|
4504
|
+
get description(): string;
|
|
4500
4505
|
/**
|
|
4501
|
-
* Gets the
|
|
4506
|
+
* Gets the {@link Floor} object associated with the POI.
|
|
4502
4507
|
*
|
|
4503
|
-
* @returns {
|
|
4508
|
+
* @returns {Floor} The floor object.
|
|
4509
|
+
* @throws Will throw an error if the floor is not found.
|
|
4504
4510
|
*/
|
|
4505
|
-
get
|
|
4506
|
-
/**
|
|
4511
|
+
get floor(): Floor;
|
|
4507
4512
|
/**
|
|
4508
|
-
* Gets the
|
|
4513
|
+
* Gets the {@link Coordinate} of the POI.
|
|
4509
4514
|
*
|
|
4510
|
-
* @returns {
|
|
4515
|
+
* @returns {Coordinate} The POI's coordinate.
|
|
4511
4516
|
*/
|
|
4512
|
-
get
|
|
4517
|
+
get coordinate(): Coordinate;
|
|
4513
4518
|
/**
|
|
4514
|
-
* Gets the
|
|
4519
|
+
* Gets the external ID of the POI.
|
|
4515
4520
|
*
|
|
4516
|
-
* @returns {
|
|
4517
|
-
*/
|
|
4518
|
-
get coordinates(): Coordinate[];
|
|
4519
|
-
/**
|
|
4520
|
-
* Gets the nodes ({@link Node}) associated with the connection.
|
|
4521
|
+
* @returns {string} The external ID of the POI.
|
|
4521
4522
|
*/
|
|
4522
|
-
get
|
|
4523
|
+
get externalId(): string;
|
|
4523
4524
|
/**
|
|
4524
|
-
* Gets the
|
|
4525
|
-
*
|
|
4526
|
-
* @returns {Floor[]} An array of floors for the connection.
|
|
4525
|
+
* Gets the underlying GeoJSON Feature representation of this PointOfInterest.
|
|
4527
4526
|
*/
|
|
4528
|
-
get
|
|
4527
|
+
get geoJSON(): {
|
|
4528
|
+
properties: null;
|
|
4529
|
+
type: import("@mappedin/mvf").FeatureType;
|
|
4530
|
+
geometry: Point;
|
|
4531
|
+
};
|
|
4532
|
+
/** @internal */
|
|
4533
|
+
get focusTarget(): Coordinate;
|
|
4534
|
+
/** @internal */
|
|
4535
|
+
get anchorTarget(): Coordinate;
|
|
4529
4536
|
/**
|
|
4530
|
-
* Serializes the
|
|
4537
|
+
* Serializes the POI data to JSON.
|
|
4531
4538
|
*
|
|
4532
|
-
* @returns An object representing the
|
|
4539
|
+
* @returns An object representing the POI.
|
|
4533
4540
|
*/
|
|
4534
4541
|
toJSON(): {
|
|
4535
4542
|
id: string;
|
|
4536
4543
|
name: string;
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
coordinates: {
|
|
4544
|
+
floor: string;
|
|
4545
|
+
coordinate: {
|
|
4540
4546
|
latitude: number;
|
|
4541
4547
|
longitude: number;
|
|
4542
4548
|
floor: string | undefined;
|
|
4543
|
-
}
|
|
4544
|
-
floors: string[];
|
|
4549
|
+
};
|
|
4545
4550
|
};
|
|
4546
4551
|
/**
|
|
4547
4552
|
* Cleans up resources used by the instance.
|
|
@@ -4550,104 +4555,100 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connectio
|
|
|
4550
4555
|
*/
|
|
4551
4556
|
destroy(): void;
|
|
4552
4557
|
}
|
|
4553
|
-
export default
|
|
4558
|
+
export default PointOfInterest;
|
|
4554
4559
|
}
|
|
4555
4560
|
|
|
4556
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
4557
|
-
import type {
|
|
4561
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/annotation' {
|
|
4562
|
+
import type { AnnotationCollection } from '@mappedin/mvf';
|
|
4563
|
+
import type { Floor, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4558
4564
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4559
|
-
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4560
|
-
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
4561
4565
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
4562
4566
|
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
4567
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
4563
4568
|
/**
|
|
4564
|
-
* A class representing
|
|
4565
|
-
*
|
|
4566
|
-
* It could represent various objects on the map, such as desks, chairs, etc.
|
|
4569
|
+
* A class representing annotation data within the map.
|
|
4567
4570
|
*
|
|
4568
|
-
*
|
|
4569
|
-
*
|
|
4571
|
+
* Annotations are used to mark specific points or areas on the map with additional information.
|
|
4572
|
+
* It includes some details on a map that may be relevant to safety or accessibility (e.g. Fire Extinguishers).
|
|
4573
|
+
* Refer to the [Annotation Guide](https://developer.mappedin.com/web-sdk/annotations) for more information.
|
|
4570
4574
|
*/
|
|
4571
|
-
|
|
4575
|
+
class Annotation extends BaseMapData implements IGeoJSONData, IFocusable, IAnchorable {
|
|
4572
4576
|
#private;
|
|
4573
4577
|
/**
|
|
4574
4578
|
* @internal
|
|
4575
4579
|
*/
|
|
4576
|
-
static readonly __type = "
|
|
4580
|
+
static readonly __type = "annotation";
|
|
4577
4581
|
/**
|
|
4578
4582
|
* @internal
|
|
4579
4583
|
*/
|
|
4580
|
-
readonly __type = "
|
|
4584
|
+
readonly __type = "annotation";
|
|
4581
4585
|
/**
|
|
4582
|
-
* Checks if the provided instance is of type
|
|
4586
|
+
* Checks if the provided instance is of type Annotation.
|
|
4583
4587
|
*
|
|
4584
4588
|
* @param instance The instance to check.
|
|
4585
|
-
* @returns {boolean} True if the instance is
|
|
4589
|
+
* @returns {boolean} True if the instance is an Annotation, false otherwise.
|
|
4586
4590
|
*/
|
|
4587
|
-
static is(instance: object): instance is
|
|
4591
|
+
static is(instance: object): instance is Annotation;
|
|
4588
4592
|
/**
|
|
4589
4593
|
* @internal
|
|
4590
4594
|
*/
|
|
4591
4595
|
constructor(data: MapDataInternal, options: {
|
|
4592
4596
|
floorId: string;
|
|
4593
|
-
mvfData:
|
|
4597
|
+
mvfData: AnnotationCollection['features'][number];
|
|
4594
4598
|
});
|
|
4595
4599
|
/**
|
|
4596
|
-
* Gets the
|
|
4600
|
+
* Gets the group of the annotation.
|
|
4597
4601
|
*
|
|
4598
|
-
* @returns {string} The
|
|
4602
|
+
* @returns {string} The annotation group.
|
|
4599
4603
|
*/
|
|
4600
|
-
get
|
|
4604
|
+
get group(): string;
|
|
4601
4605
|
/**
|
|
4602
|
-
* Gets the
|
|
4606
|
+
* Gets the type of the annotation.
|
|
4603
4607
|
*
|
|
4604
|
-
* @returns {string} The
|
|
4608
|
+
* @returns {string} The annotation type.
|
|
4605
4609
|
*/
|
|
4606
|
-
get
|
|
4610
|
+
get type(): string;
|
|
4607
4611
|
/**
|
|
4608
|
-
* Gets the
|
|
4612
|
+
* Gets the external ID of the annotation.
|
|
4609
4613
|
*
|
|
4610
|
-
* @returns {string} The
|
|
4614
|
+
* @returns {string} The external ID of the annotation.
|
|
4611
4615
|
*/
|
|
4612
|
-
get
|
|
4616
|
+
get externalId(): string;
|
|
4613
4617
|
/**
|
|
4614
|
-
* Gets the
|
|
4618
|
+
* Gets the center {@link Coordinate} of the annotation.
|
|
4615
4619
|
*
|
|
4616
|
-
* @returns {
|
|
4620
|
+
* @returns {Coordinate} The annotation's coordinate.
|
|
4617
4621
|
*/
|
|
4618
|
-
get
|
|
4622
|
+
get coordinate(): Coordinate;
|
|
4619
4623
|
/**
|
|
4620
|
-
* Gets the {@link Floor} associated with the
|
|
4624
|
+
* Gets the {@link Floor} object associated with the annotation.
|
|
4621
4625
|
*
|
|
4622
4626
|
* @returns {Floor} The floor object.
|
|
4623
4627
|
* @throws Will throw an error if the floor is not found.
|
|
4624
4628
|
*/
|
|
4625
4629
|
get floor(): Floor;
|
|
4626
4630
|
/**
|
|
4627
|
-
* Gets the
|
|
4628
|
-
*
|
|
4629
|
-
* @returns {Coordinate} The object's center coordinate.
|
|
4630
|
-
*/
|
|
4631
|
-
get center(): Coordinate;
|
|
4632
|
-
/**
|
|
4633
|
-
* Gets the underlying GeoJSON Feature representation of this Object.
|
|
4631
|
+
* Gets the underlying GeoJSON Feature representation of this Annotation.
|
|
4634
4632
|
*/
|
|
4635
4633
|
get geoJSON(): {
|
|
4636
4634
|
properties: null;
|
|
4637
4635
|
type: import("@mappedin/mvf").FeatureType;
|
|
4638
|
-
geometry: import("@mappedin/mvf").
|
|
4636
|
+
geometry: import("@mappedin/mvf").Point;
|
|
4639
4637
|
};
|
|
4638
|
+
/** @internal */
|
|
4639
|
+
get focusTarget(): Coordinate;
|
|
4640
|
+
/** @internal */
|
|
4641
|
+
get anchorTarget(): Coordinate;
|
|
4640
4642
|
/**
|
|
4641
|
-
*
|
|
4643
|
+
* Converts the annotation information to a JSON object.
|
|
4642
4644
|
*
|
|
4643
|
-
* @returns An object representing the
|
|
4645
|
+
* @returns An object representing the annotation.
|
|
4644
4646
|
*/
|
|
4645
4647
|
toJSON(): {
|
|
4646
4648
|
id: string;
|
|
4647
|
-
|
|
4649
|
+
group: string;
|
|
4648
4650
|
type: string;
|
|
4649
|
-
|
|
4650
|
-
center: {
|
|
4651
|
+
coordinate: {
|
|
4651
4652
|
latitude: number;
|
|
4652
4653
|
longitude: number;
|
|
4653
4654
|
floor: string | undefined;
|
|
@@ -4660,69 +4661,120 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/object' {
|
|
|
4660
4661
|
*/
|
|
4661
4662
|
destroy(): void;
|
|
4662
4663
|
}
|
|
4663
|
-
export default
|
|
4664
|
+
export default Annotation;
|
|
4664
4665
|
}
|
|
4665
4666
|
|
|
4666
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
4667
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/hyperlink' {
|
|
4668
|
+
import type { Hyperlink as MVFHyperlink } from '@mappedin/mvf';
|
|
4669
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
4667
4670
|
/**
|
|
4668
|
-
*
|
|
4669
|
-
*
|
|
4670
|
-
* The Pseudo-Mercator projection is a type of cylindrical and conformal map projection.
|
|
4671
|
-
* It is identified as EPSG:3857 ({@link https://epsg.io/3857}).
|
|
4672
|
-
* This projection is a modified version of the traditional Mercator projection,
|
|
4673
|
-
* which is commonly used in marine navigation.
|
|
4671
|
+
* A class representing hyperlink link data within the map.
|
|
4674
4672
|
*/
|
|
4675
|
-
class
|
|
4673
|
+
class Hyperlink extends BaseMetaData {
|
|
4674
|
+
#private;
|
|
4676
4675
|
/**
|
|
4677
4676
|
* @internal
|
|
4678
4677
|
*/
|
|
4679
|
-
static readonly __type = "
|
|
4678
|
+
static readonly __type = "hyperlink";
|
|
4679
|
+
/**
|
|
4680
|
+
* Checks if the provided instance is of type Hyperlink.
|
|
4681
|
+
*
|
|
4682
|
+
* @param instance The instance to check.
|
|
4683
|
+
* @returns {boolean} True if the instance is a Hyperlink, false otherwise.
|
|
4684
|
+
*/
|
|
4685
|
+
static is(instance: object): instance is Hyperlink;
|
|
4686
|
+
/**
|
|
4687
|
+
* @internal
|
|
4688
|
+
*/
|
|
4689
|
+
constructor(options: {
|
|
4690
|
+
mvfData: MVFHyperlink;
|
|
4691
|
+
});
|
|
4692
|
+
/**
|
|
4693
|
+
* Gets the url of the hyperlink.
|
|
4694
|
+
*
|
|
4695
|
+
* @returns {string} The url of the hyperlink.
|
|
4696
|
+
*/
|
|
4697
|
+
get url(): string;
|
|
4698
|
+
/**
|
|
4699
|
+
* Gets the name of the hyperlink.
|
|
4700
|
+
*
|
|
4701
|
+
* @returns {string | undefined } The name of the hyperlink.
|
|
4702
|
+
*/
|
|
4703
|
+
get name(): string | undefined;
|
|
4704
|
+
/**
|
|
4705
|
+
* Serializes the hyperlink data to JSON.
|
|
4706
|
+
*
|
|
4707
|
+
* @returns An object representing the hyperlink.
|
|
4708
|
+
*/
|
|
4709
|
+
toJSON(): {
|
|
4710
|
+
id: string;
|
|
4711
|
+
url: string;
|
|
4712
|
+
name: string | undefined;
|
|
4713
|
+
};
|
|
4680
4714
|
/**
|
|
4715
|
+
* Cleans up resources used by the instance.
|
|
4716
|
+
*
|
|
4681
4717
|
* @internal
|
|
4682
4718
|
*/
|
|
4683
|
-
|
|
4684
|
-
|
|
4719
|
+
destroy(): void;
|
|
4720
|
+
}
|
|
4721
|
+
export default Hyperlink;
|
|
4722
|
+
}
|
|
4723
|
+
|
|
4724
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image' {
|
|
4725
|
+
import type { Image as MVFImage } from '@mappedin/mvf';
|
|
4726
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
4727
|
+
/**
|
|
4728
|
+
* A class representing image link data within the map.
|
|
4729
|
+
*/
|
|
4730
|
+
class Image extends BaseMetaData {
|
|
4731
|
+
#private;
|
|
4685
4732
|
/**
|
|
4686
|
-
*
|
|
4687
|
-
* @type {number}
|
|
4733
|
+
* @internal
|
|
4688
4734
|
*/
|
|
4689
|
-
readonly
|
|
4735
|
+
static readonly __type = "image";
|
|
4690
4736
|
/**
|
|
4691
|
-
*
|
|
4692
|
-
*
|
|
4737
|
+
* Checks if the provided instance is of type Image.
|
|
4738
|
+
*
|
|
4739
|
+
* @param instance The instance to check.
|
|
4740
|
+
* @returns {boolean} True if the instance is a Image, false otherwise.
|
|
4693
4741
|
*/
|
|
4694
|
-
|
|
4742
|
+
static is(instance: object): instance is Image;
|
|
4695
4743
|
/**
|
|
4696
|
-
*
|
|
4744
|
+
* @internal
|
|
4697
4745
|
*/
|
|
4698
|
-
|
|
4746
|
+
constructor(options: {
|
|
4747
|
+
mvfData: MVFImage;
|
|
4748
|
+
});
|
|
4699
4749
|
/**
|
|
4700
|
-
*
|
|
4750
|
+
* Gets the url of the image.
|
|
4701
4751
|
*
|
|
4702
|
-
* @
|
|
4703
|
-
* @returns {boolean} True if the instance is a Coordinate, false otherwise.
|
|
4752
|
+
* @returns {string | undefined} The url of the image.
|
|
4704
4753
|
*/
|
|
4705
|
-
|
|
4754
|
+
get url(): string | undefined;
|
|
4706
4755
|
/**
|
|
4707
|
-
*
|
|
4756
|
+
* Gets the alt text of the image.
|
|
4757
|
+
*
|
|
4758
|
+
* @returns {string | undefined } The alt text of the image.
|
|
4759
|
+
* @deprecated Use {@link altText} instead.
|
|
4708
4760
|
*/
|
|
4709
|
-
|
|
4761
|
+
get name(): string | undefined;
|
|
4710
4762
|
/**
|
|
4711
|
-
*
|
|
4763
|
+
* Gets the alt text of the image.
|
|
4712
4764
|
*
|
|
4713
|
-
* @
|
|
4714
|
-
* @returns {boolean} True if coordinates are equal, false otherwise.
|
|
4765
|
+
* @returns {string | undefined } The alt text of the image.
|
|
4715
4766
|
*/
|
|
4716
|
-
|
|
4767
|
+
get altText(): string | undefined;
|
|
4717
4768
|
/**
|
|
4718
|
-
|
|
4769
|
+
/**
|
|
4770
|
+
* Serializes the image data to JSON.
|
|
4719
4771
|
*
|
|
4720
|
-
* @returns An object representing the
|
|
4772
|
+
* @returns An object representing the image.
|
|
4721
4773
|
*/
|
|
4722
4774
|
toJSON(): {
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4775
|
+
id: string;
|
|
4776
|
+
url: string | undefined;
|
|
4777
|
+
name: string | undefined;
|
|
4726
4778
|
};
|
|
4727
4779
|
/**
|
|
4728
4780
|
* Cleans up resources used by the instance.
|
|
@@ -4731,98 +4783,80 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinat
|
|
|
4731
4783
|
*/
|
|
4732
4784
|
destroy(): void;
|
|
4733
4785
|
}
|
|
4734
|
-
export default
|
|
4786
|
+
export default Image;
|
|
4735
4787
|
}
|
|
4736
4788
|
|
|
4737
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
4738
|
-
import type {
|
|
4739
|
-
import type { Floor,
|
|
4740
|
-
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4789
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor-stack' {
|
|
4790
|
+
import type { FloorStack as MVFFloorStack } from '@mappedin/mvf';
|
|
4791
|
+
import type { MapDataInternal, Floor, Facade } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4741
4792
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
4742
|
-
import type { IGeoJSONData } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
4743
4793
|
/**
|
|
4744
|
-
* A class representing
|
|
4794
|
+
* A class representing floor stack data within the map.
|
|
4745
4795
|
*
|
|
4746
|
-
*
|
|
4747
|
-
* on the map with additional information(e.g. ATMs, Water Fountains).
|
|
4796
|
+
* FloorStacks are used to represent a group of floors that are part of a single entity.
|
|
4748
4797
|
*/
|
|
4749
|
-
class
|
|
4798
|
+
class FloorStack extends BaseMapData {
|
|
4750
4799
|
#private;
|
|
4751
4800
|
/**
|
|
4752
4801
|
* @internal
|
|
4753
4802
|
*/
|
|
4754
|
-
static readonly __type = "
|
|
4803
|
+
static readonly __type = "floor-stack";
|
|
4755
4804
|
/**
|
|
4756
4805
|
* @internal
|
|
4757
4806
|
*/
|
|
4758
|
-
readonly __type = "
|
|
4807
|
+
readonly __type = "floor-stack";
|
|
4759
4808
|
/**
|
|
4760
|
-
* Checks if the provided instance is of type
|
|
4809
|
+
* Checks if the provided instance is of type FloorStack.
|
|
4761
4810
|
*
|
|
4762
4811
|
* @param instance The instance to check.
|
|
4763
|
-
* @returns {boolean} True if the instance is a
|
|
4812
|
+
* @returns {boolean} True if the instance is a FloorStack, false otherwise.
|
|
4764
4813
|
*/
|
|
4765
|
-
static is(instance: object): instance is
|
|
4814
|
+
static is(instance: object): instance is FloorStack;
|
|
4766
4815
|
/**
|
|
4767
4816
|
* @internal
|
|
4768
4817
|
*/
|
|
4769
4818
|
constructor(data: MapDataInternal, options: {
|
|
4770
|
-
|
|
4771
|
-
|
|
4819
|
+
mvfData: MVFFloorStack;
|
|
4820
|
+
facadeId?: string;
|
|
4772
4821
|
});
|
|
4773
4822
|
/**
|
|
4774
|
-
* Gets the
|
|
4775
|
-
*
|
|
4776
|
-
* @returns {string} The name of the POI.
|
|
4823
|
+
* Gets the type of FloorStack.
|
|
4777
4824
|
*/
|
|
4778
|
-
get
|
|
4825
|
+
get type(): MVFFloorStack['type'];
|
|
4779
4826
|
/**
|
|
4780
|
-
* Gets the
|
|
4827
|
+
* Gets the name of the FloorStack.
|
|
4781
4828
|
*
|
|
4782
|
-
* @returns {string} The
|
|
4829
|
+
* @returns {string} The name of the FloorStack.
|
|
4783
4830
|
*/
|
|
4784
|
-
get
|
|
4831
|
+
get name(): string;
|
|
4785
4832
|
/**
|
|
4786
|
-
* Gets the
|
|
4787
|
-
*
|
|
4788
|
-
* @returns {Floor} The floor object.
|
|
4789
|
-
* @throws Will throw an error if the floor is not found.
|
|
4833
|
+
* Gets the externalId of FloorStack
|
|
4790
4834
|
*/
|
|
4791
|
-
get
|
|
4835
|
+
get externalId(): string;
|
|
4792
4836
|
/**
|
|
4793
|
-
* Gets the {@link
|
|
4837
|
+
* Gets the floors ({@link Floor}) included in this FloorStack.
|
|
4794
4838
|
*
|
|
4795
|
-
* @returns {
|
|
4839
|
+
* @returns {Floor[]} An array of Floor objects in this FloorStack.
|
|
4796
4840
|
*/
|
|
4797
|
-
get
|
|
4841
|
+
get floors(): [Floor, ...Floor[]];
|
|
4798
4842
|
/**
|
|
4799
|
-
*
|
|
4800
|
-
*
|
|
4801
|
-
* @returns {string} The external ID of the POI.
|
|
4843
|
+
* Get the default floor for this floor stack
|
|
4802
4844
|
*/
|
|
4803
|
-
get
|
|
4845
|
+
get defaultFloor(): Floor;
|
|
4804
4846
|
/**
|
|
4805
|
-
* Gets the
|
|
4847
|
+
* Gets the facade ({@link Facade}) representing this floor stack, if it exists.
|
|
4806
4848
|
*/
|
|
4807
|
-
get
|
|
4808
|
-
properties: null;
|
|
4809
|
-
type: import("@mappedin/mvf").FeatureType;
|
|
4810
|
-
geometry: Point;
|
|
4811
|
-
};
|
|
4849
|
+
get facade(): Facade | undefined;
|
|
4812
4850
|
/**
|
|
4813
|
-
* Serializes the
|
|
4851
|
+
* Serializes the FloorStack data to JSON.
|
|
4814
4852
|
*
|
|
4815
|
-
* @returns An object representing the
|
|
4853
|
+
* @returns An object representing the FloorStack.
|
|
4816
4854
|
*/
|
|
4817
4855
|
toJSON(): {
|
|
4818
4856
|
id: string;
|
|
4819
4857
|
name: string;
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
latitude: number;
|
|
4823
|
-
longitude: number;
|
|
4824
|
-
floor: string | undefined;
|
|
4825
|
-
};
|
|
4858
|
+
type: "Building" | "Outdoor" | undefined;
|
|
4859
|
+
floors: string[];
|
|
4826
4860
|
};
|
|
4827
4861
|
/**
|
|
4828
4862
|
* Cleans up resources used by the instance.
|
|
@@ -4831,221 +4865,332 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/poi' {
|
|
|
4831
4865
|
*/
|
|
4832
4866
|
destroy(): void;
|
|
4833
4867
|
}
|
|
4834
|
-
export default
|
|
4868
|
+
export default FloorStack;
|
|
4835
4869
|
}
|
|
4836
4870
|
|
|
4837
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
4838
|
-
import type {
|
|
4839
|
-
import
|
|
4840
|
-
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4871
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/facade' {
|
|
4872
|
+
import type { Space, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4873
|
+
import { Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4841
4874
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
4842
|
-
import type {
|
|
4875
|
+
import type { Facade as MVFFacade } from '@mappedin/mvf';
|
|
4876
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
4877
|
+
/**
|
|
4878
|
+
* A Facade is a collection of spaces that make up the exterior representation of a Floor Stack ({@link FloorStack}).
|
|
4879
|
+
*/
|
|
4880
|
+
class Facade extends BaseMapData implements IFocusable, IAnchorable {
|
|
4881
|
+
#private;
|
|
4882
|
+
static readonly __type = "facade";
|
|
4883
|
+
readonly __type = "facade";
|
|
4884
|
+
/**
|
|
4885
|
+
* Checks if the provided instance is of type Floor.
|
|
4886
|
+
*
|
|
4887
|
+
* @param instance The instance to check.
|
|
4888
|
+
* @returns {boolean} True if the instance is a Floor, false otherwise.
|
|
4889
|
+
*/
|
|
4890
|
+
static is(instance: object): instance is Facade;
|
|
4891
|
+
/** @internal */
|
|
4892
|
+
constructor(data: MapDataInternal, options: {
|
|
4893
|
+
mvfData: MVFFacade;
|
|
4894
|
+
floorStackId: string;
|
|
4895
|
+
});
|
|
4896
|
+
/**
|
|
4897
|
+
* Gets the floor stack that this Facade represents.
|
|
4898
|
+
*/
|
|
4899
|
+
get floorStack(): import("./floor-stack").default;
|
|
4900
|
+
/**
|
|
4901
|
+
* Gets the collection of spaces that make up this Facade.
|
|
4902
|
+
*/
|
|
4903
|
+
get spaces(): Space[];
|
|
4904
|
+
/**
|
|
4905
|
+
* Gets the center {@link Coordinate} of the Facade.
|
|
4906
|
+
*/
|
|
4907
|
+
get center(): Coordinate;
|
|
4908
|
+
/** @internal */
|
|
4909
|
+
get focusTarget(): Space[];
|
|
4910
|
+
/** @internal */
|
|
4911
|
+
get anchorTarget(): Coordinate;
|
|
4912
|
+
}
|
|
4913
|
+
export default Facade;
|
|
4914
|
+
}
|
|
4915
|
+
|
|
4916
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/utils/data-creation' {
|
|
4917
|
+
import type { AnnotationCollection, EntranceCollection, FeatureCollection, Connection as MVFConnection, EnterpriseCategory as MVFEnterpriseCategory, EnterpriseCategoryId as MVFEnterpriseCategoryId, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseLocationId as MVFEnterpriseLocationId, EnterpriseVenue as MVFEnterpriseVenue, FloorProperties as MVFFloor, FloorStack as MVFFloorStack, NodeCollection, ObstructionCollection, ParsedMVF, Point, SpaceCollection, SpaceProperties, AreaCollection, AreaId, EnterpriseLocationInstance } from '@mappedin/mvf';
|
|
4918
|
+
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4919
|
+
import { Annotation, Area, Connection, Door, EnterpriseCategory, EnterpriseLocation, Facade, Floor, FloorStack, MapObject, Node, PointOfInterest, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4920
|
+
export type MapDataRecords = {
|
|
4921
|
+
spacesById: Record<string, Space>;
|
|
4922
|
+
nodesById: Record<string, Node>;
|
|
4923
|
+
objectsById: Record<string, MapObject>;
|
|
4924
|
+
floorsById: Record<string, Floor>;
|
|
4925
|
+
floorStacksById: Record<string, FloorStack>;
|
|
4926
|
+
facadesById: Record<string, Facade>;
|
|
4927
|
+
facadesBySpaceId: Record<string, Facade>;
|
|
4928
|
+
connectionsById: Record<string, Connection>;
|
|
4929
|
+
doorsById: Record<string, Door>;
|
|
4930
|
+
doorsByNodeId: Record<string, Door>;
|
|
4931
|
+
poisById: Record<string, PointOfInterest>;
|
|
4932
|
+
annotationsById: Record<string, Annotation>;
|
|
4933
|
+
areasById: Record<AreaId, Area>;
|
|
4934
|
+
spacesByExternalId: Record<string, Space[]>;
|
|
4935
|
+
nodesByExternalId: Record<string, Node[]>;
|
|
4936
|
+
poisByExternalId: Record<string, PointOfInterest[]>;
|
|
4937
|
+
doorsByExternalId: Record<string, Door[]>;
|
|
4938
|
+
floorStacksByExternalId: Record<string, FloorStack[]>;
|
|
4939
|
+
floorsByExternalId: Record<string, Floor[]>;
|
|
4940
|
+
objectsByExternalId: Record<string, MapObject[]>;
|
|
4941
|
+
areasByExternalId: Record<string, Area[]>;
|
|
4942
|
+
spaceIdsByDestinationNodeId: Record<string, string[]>;
|
|
4943
|
+
objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
|
|
4944
|
+
obstructionIdByEntranceId: Record<string, string>;
|
|
4945
|
+
connectionIdsByLatLon: Record<string, string[]>;
|
|
4946
|
+
mvfSpacesById: Record<string, SpaceCollection['features'][number]>;
|
|
4947
|
+
mvfNodesById: Record<string, NodeCollection['features'][number]>;
|
|
4948
|
+
mvfObstructionById: Record<string, ObstructionCollection['features'][number]>;
|
|
4949
|
+
mvfFloorsById: Record<string, MVFFloor>;
|
|
4950
|
+
mvfFloorStacksById: Record<string, MVFFloorStack>;
|
|
4951
|
+
mvfConnectionsById: Record<string, MVFConnection>;
|
|
4952
|
+
mvfConnectionsByNodeId: Record<string, MVFConnection>;
|
|
4953
|
+
mvfEntrancesById: Record<string, EntranceCollection['features'][number]>;
|
|
4954
|
+
mvfAnnotationsById: Record<string, AnnotationCollection['features'][number]>;
|
|
4955
|
+
mvfNodesByFloorId: {
|
|
4956
|
+
[floorId: string]: NodeCollection['features'][number][];
|
|
4957
|
+
};
|
|
4958
|
+
mvfSpacesByFloorId: {
|
|
4959
|
+
[floorId: string]: SpaceCollection['features'][number][];
|
|
4960
|
+
};
|
|
4961
|
+
mvfPoisByFloorId: {
|
|
4962
|
+
[floorId: string]: FeatureCollection<Point, SpaceProperties>['features'][number][];
|
|
4963
|
+
};
|
|
4964
|
+
mvfEntrancesByFloorId: {
|
|
4965
|
+
[floorId: string]: EntranceCollection['features'][number][];
|
|
4966
|
+
};
|
|
4967
|
+
mvfAnnotationsByFloorId: {
|
|
4968
|
+
[floorId: string]: AnnotationCollection['features'][number][];
|
|
4969
|
+
};
|
|
4970
|
+
mvfAreasById: Record<AreaId, AreaCollection['features'][number]>;
|
|
4971
|
+
};
|
|
4972
|
+
export type EnterpriseMapDataRecords = {
|
|
4973
|
+
connectionsByExternalId: Record<string, Connection[]>;
|
|
4974
|
+
locationsByExternalId: Record<string, EnterpriseLocation[]>;
|
|
4975
|
+
categoriesByExternalId: Record<string, EnterpriseCategory[]>;
|
|
4976
|
+
locationsById: Record<MVFEnterpriseLocationId, EnterpriseLocation>;
|
|
4977
|
+
categoriesById: Record<MVFEnterpriseCategoryId, EnterpriseCategory>;
|
|
4978
|
+
locationIdsByNodeId: Record<string, MVFEnterpriseLocationId[]>;
|
|
4979
|
+
locationInstancesById: Record<string, EnterpriseLocationInstance>;
|
|
4980
|
+
venue: MVFEnterpriseVenue;
|
|
4981
|
+
mvfCategoriesById: Record<string, MVFEnterpriseCategory>;
|
|
4982
|
+
mvfLocationsById: Record<string, MVFEnterpriseLocation>;
|
|
4983
|
+
mvfLocationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
|
|
4984
|
+
};
|
|
4985
|
+
export const processMVFSpaces: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "spacesById" | "spacesByExternalId" | "spaceIdsByDestinationNodeId" | "poisById" | "poisByExternalId" | "mvfSpacesById" | "objectEntranceNodeIdsByObstructionId" | "connectionsById" | "connectionIdsByLatLon" | "mvfSpacesByFloorId" | "mvfPoisByFloorId">;
|
|
4986
|
+
export const processMVFNodes: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "nodesById" | "nodesByExternalId" | "mvfNodesById" | "mvfNodesByFloorId">;
|
|
4987
|
+
export const processMVFObstructions: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "objectsById" | "objectsByExternalId" | "mvfObstructionById" | "obstructionIdByEntranceId">;
|
|
4988
|
+
export const processMVFFloors: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "floorsById" | "floorsByExternalId" | "mvfFloorsById">;
|
|
4989
|
+
export const processMVFFloorStacks: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "floorStacksById" | "floorStacksByExternalId" | "mvfFloorStacksById" | "facadesById" | "facadesBySpaceId">;
|
|
4990
|
+
export const processMVFConnections: (mvf: ParsedMVF) => Pick<MapDataRecords, "mvfConnectionsById" | "mvfConnectionsByNodeId">;
|
|
4991
|
+
export const processMVFEntrances: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "doorsById" | "doorsByExternalId" | "doorsByNodeId" | "mvfEntrancesById" | "mvfEntrancesByFloorId">;
|
|
4992
|
+
export const processMVFAnnotations: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "annotationsById" | "mvfAnnotationsById" | "mvfAnnotationsByFloorId">;
|
|
4993
|
+
export const processMVFAreas: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "areasById" | "areasByExternalId" | "mvfAreasById">;
|
|
4994
|
+
/**
|
|
4995
|
+
* @internal
|
|
4996
|
+
*/
|
|
4997
|
+
export const createEnterpriseDataFromMVF: (mvf: ParsedMVF, data: MapDataInternal) => EnterpriseMapDataRecords;
|
|
4843
4998
|
/**
|
|
4844
|
-
*
|
|
4999
|
+
* @internal
|
|
5000
|
+
*/
|
|
5001
|
+
export const createDataFromMVF: (mvf: ParsedMVF, data: MapDataInternal) => MapDataRecords;
|
|
5002
|
+
}
|
|
5003
|
+
|
|
5004
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location' {
|
|
5005
|
+
import type { EnterpriseLocation as MVFEnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
|
|
5006
|
+
import type { Coordinate, EnterpriseCategory, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5007
|
+
import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
5008
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
5009
|
+
import type { IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
5010
|
+
/**
|
|
5011
|
+
* An EnterpriseLocation contains metadata about a location, such as its name, description, logo, phone number, social medial links, hours of operation and more.
|
|
5012
|
+
* They can be accessed using the {@link MapData.getByType()} method as shown below.
|
|
4845
5013
|
*
|
|
4846
|
-
*
|
|
4847
|
-
*
|
|
4848
|
-
*
|
|
5014
|
+
* ```typescript
|
|
5015
|
+
* const allLocations = mapData.getByType('enterprise-location');
|
|
5016
|
+
* ```
|
|
5017
|
+
*
|
|
5018
|
+
* Refer to the [EnterpriseLocation Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-locations) for more information and interactive examples.
|
|
4849
5019
|
*/
|
|
4850
|
-
class
|
|
5020
|
+
class EnterpriseLocation extends BaseMetaData implements Omit<MVFEnterpriseLocation, 'polygons' | 'nodes' | 'links'>, IFocusable {
|
|
4851
5021
|
#private;
|
|
4852
5022
|
/**
|
|
4853
5023
|
* @internal
|
|
4854
5024
|
*/
|
|
4855
|
-
static readonly __type = "
|
|
5025
|
+
static readonly __type = "enterprise-location";
|
|
4856
5026
|
/**
|
|
4857
5027
|
* @internal
|
|
4858
5028
|
*/
|
|
4859
|
-
readonly __type = "
|
|
5029
|
+
readonly __type = "enterprise-location";
|
|
4860
5030
|
/**
|
|
4861
|
-
*
|
|
4862
|
-
*
|
|
4863
|
-
* @param instance The instance to check.
|
|
4864
|
-
* @returns {boolean} True if the instance is an Annotation, false otherwise.
|
|
5031
|
+
* The description of the location.
|
|
4865
5032
|
*/
|
|
4866
|
-
|
|
5033
|
+
description?: string | undefined;
|
|
4867
5034
|
/**
|
|
4868
|
-
*
|
|
5035
|
+
* The name of the location.
|
|
4869
5036
|
*/
|
|
4870
|
-
|
|
4871
|
-
floorId: string;
|
|
4872
|
-
mvfData: AnnotationCollection['features'][number];
|
|
4873
|
-
});
|
|
5037
|
+
name: string;
|
|
4874
5038
|
/**
|
|
4875
|
-
*
|
|
4876
|
-
*
|
|
4877
|
-
* @returns {string} The annotation group.
|
|
5039
|
+
* The amenity of the location.
|
|
4878
5040
|
*/
|
|
4879
|
-
|
|
5041
|
+
amenity?: string | undefined;
|
|
4880
5042
|
/**
|
|
4881
|
-
*
|
|
4882
|
-
*
|
|
4883
|
-
* @returns {string} The annotation type.
|
|
5043
|
+
* The external ID of the location.
|
|
4884
5044
|
*/
|
|
4885
|
-
|
|
5045
|
+
externalId: string;
|
|
4886
5046
|
/**
|
|
4887
|
-
*
|
|
4888
|
-
*
|
|
4889
|
-
* @returns {string} The external ID of the annotation.
|
|
5047
|
+
* Extra properties of the location.
|
|
4890
5048
|
*/
|
|
4891
|
-
|
|
5049
|
+
extra?: Record<string, unknown> | undefined;
|
|
4892
5050
|
/**
|
|
4893
|
-
*
|
|
4894
|
-
*
|
|
4895
|
-
* @returns {Coordinate} The annotation's coordinate.
|
|
5051
|
+
* The gallery of the location.
|
|
4896
5052
|
*/
|
|
4897
|
-
|
|
5053
|
+
gallery?: {
|
|
5054
|
+
caption?: string | null;
|
|
5055
|
+
image: string;
|
|
5056
|
+
embeddedUrl?: string | null;
|
|
5057
|
+
}[] | undefined;
|
|
4898
5058
|
/**
|
|
4899
|
-
*
|
|
5059
|
+
* Specific instances of this location with different properties.
|
|
5060
|
+
* Typically, there will be at least one node or polygon defined,
|
|
5061
|
+
* plus one or more other properties that are different from the parent.
|
|
5062
|
+
* The remaining properties will be the same as the parent.
|
|
5063
|
+
|
|
5064
|
+
* For example, suppose there is a location like this:
|
|
4900
5065
|
*
|
|
4901
|
-
*
|
|
4902
|
-
*
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
*
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
geometry: import("@mappedin/mvf").Point;
|
|
4912
|
-
};
|
|
4913
|
-
/**
|
|
4914
|
-
* Converts the annotation information to a JSON object.
|
|
5066
|
+
* ```json
|
|
5067
|
+
* {
|
|
5068
|
+
* "id": "location-id-1",
|
|
5069
|
+
* "name": "Location 1",
|
|
5070
|
+
* "nodes": ["node-1", "node-2"],
|
|
5071
|
+
* "polygons": ["polygon-1", "polygon-2"],
|
|
5072
|
+
* "externalId": "externalId-1",
|
|
5073
|
+
* "description": "Description 1",
|
|
5074
|
+
* }
|
|
5075
|
+
* ```
|
|
4915
5076
|
*
|
|
4916
|
-
*
|
|
5077
|
+
* (Note that for clarity, this example puts strings in for nodes and polygons, but in practice they would be objects.)
|
|
5078
|
+
*
|
|
5079
|
+
* Then suppose it had an `instances` array that contained an object that looked like this:
|
|
5080
|
+
*
|
|
5081
|
+
* ```json
|
|
5082
|
+
* {
|
|
5083
|
+
* "id": "instance-id-1",
|
|
5084
|
+
* "name": "Location 1 - A",
|
|
5085
|
+
* "nodes": ["node-1"],
|
|
5086
|
+
* "polygons": ["polygon-1"],
|
|
5087
|
+
* "externalId": "externalId-1-A",
|
|
5088
|
+
* "description": "Description 1",
|
|
5089
|
+
* }
|
|
5090
|
+
* ```
|
|
5091
|
+
* This says "Location 1" is the parent location, and "Location 1 - A" is an instance of it. The instance has a different name, and a different external ID, and it only applies to node `node-1` and polygon `polygon-1`.
|
|
5092
|
+
* The ID will always be different, but other properties (like the description) are the same as the parent.
|
|
5093
|
+
*
|
|
5094
|
+
* Example use cases:
|
|
5095
|
+
* - A Mall may have a location with two nodes and one polygon. It may then have an instance with one of the nodes, and operating hours
|
|
5096
|
+
* that are different from the parent. This indicates that this instance is an entrance for the location that is accessible at different times, perhaps for an interior mall entrance, when the main location (and other, exterior entrance) is open later than the rest of the mall.
|
|
5097
|
+
* - An airport may have a location with several polygons and nodes, and an instance for each node (and corresponding polygon, if any) with a different siblingGroup. The location in the sibling group may be the airport terminal, or airside vs landside.
|
|
5098
|
+
* This would allow an application to show the location once in a search result, but offer UX to select the instance that is in the right terminal.
|
|
5099
|
+
*
|
|
5100
|
+
* Note: Instances are actual EnterpriseLocations. This means they have all the properties of a normal EnterpriseLocation, including an `instances` property, that will always be undefined. They also do NOT have a parent property, or any other explicit reference to the parent location. These instances are
|
|
5101
|
+
* only referenced from their parent location, and will not show up in other places in the map data. However, they should otherwise behave like normal EnterpriseLocations, being targetable for things like navigation and focus.
|
|
4917
5102
|
*/
|
|
4918
|
-
|
|
4919
|
-
id: string;
|
|
4920
|
-
group: string;
|
|
4921
|
-
type: string;
|
|
4922
|
-
coordinate: {
|
|
4923
|
-
latitude: number;
|
|
4924
|
-
longitude: number;
|
|
4925
|
-
floor: string | undefined;
|
|
4926
|
-
};
|
|
4927
|
-
};
|
|
5103
|
+
instances?: EnterpriseLocation[] | undefined;
|
|
4928
5104
|
/**
|
|
4929
|
-
*
|
|
4930
|
-
*
|
|
4931
|
-
* @internal
|
|
5105
|
+
* A URL to the logo of the location.
|
|
4932
5106
|
*/
|
|
4933
|
-
|
|
4934
|
-
}
|
|
4935
|
-
export default Annotation;
|
|
4936
|
-
}
|
|
4937
|
-
|
|
4938
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/hyperlink' {
|
|
4939
|
-
import type { Hyperlink as MVFHyperlink } from '@mappedin/mvf';
|
|
4940
|
-
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
4941
|
-
/**
|
|
4942
|
-
* A class representing hyperlink link data within the map.
|
|
4943
|
-
*/
|
|
4944
|
-
class Hyperlink extends BaseMetaData {
|
|
4945
|
-
#private;
|
|
5107
|
+
logo?: string | undefined;
|
|
4946
5108
|
/**
|
|
4947
|
-
*
|
|
5109
|
+
* The operation hours of the location.
|
|
4948
5110
|
*/
|
|
4949
|
-
|
|
5111
|
+
operationHours?: OperationHours[] | undefined;
|
|
4950
5112
|
/**
|
|
4951
|
-
*
|
|
4952
|
-
*
|
|
4953
|
-
* @param instance The instance to check.
|
|
4954
|
-
* @returns {boolean} True if the instance is a Hyperlink, false otherwise.
|
|
5113
|
+
* The phone number of the location.
|
|
4955
5114
|
*/
|
|
4956
|
-
|
|
5115
|
+
phone?: {
|
|
5116
|
+
number: string;
|
|
5117
|
+
extension?: string;
|
|
5118
|
+
} | undefined;
|
|
4957
5119
|
/**
|
|
4958
|
-
*
|
|
5120
|
+
* A URL to the picture of the location.
|
|
4959
5121
|
*/
|
|
4960
|
-
|
|
4961
|
-
mvfData: MVFHyperlink;
|
|
4962
|
-
});
|
|
5122
|
+
picture?: string | undefined;
|
|
4963
5123
|
/**
|
|
4964
|
-
*
|
|
4965
|
-
*
|
|
4966
|
-
* @returns {string} The url of the hyperlink.
|
|
5124
|
+
* The short name of the location.
|
|
4967
5125
|
*/
|
|
4968
|
-
|
|
5126
|
+
shortName?: string | undefined;
|
|
4969
5127
|
/**
|
|
4970
|
-
*
|
|
4971
|
-
*
|
|
4972
|
-
* @returns {string | undefined } The name of the hyperlink.
|
|
5128
|
+
* Whether to show the floating label when an image is present.
|
|
4973
5129
|
*/
|
|
4974
|
-
|
|
5130
|
+
showFloatingLabelWhenImagePresent?: boolean | undefined;
|
|
4975
5131
|
/**
|
|
4976
|
-
*
|
|
4977
|
-
*
|
|
4978
|
-
* @returns An object representing the hyperlink.
|
|
5132
|
+
* Whether to show the logo.
|
|
4979
5133
|
*/
|
|
4980
|
-
|
|
4981
|
-
id: string;
|
|
4982
|
-
url: string;
|
|
4983
|
-
name: string | undefined;
|
|
4984
|
-
};
|
|
5134
|
+
showLogo?: boolean | undefined;
|
|
4985
5135
|
/**
|
|
4986
|
-
*
|
|
4987
|
-
*
|
|
4988
|
-
* @internal
|
|
5136
|
+
* The sibling groups of the location.
|
|
4989
5137
|
*/
|
|
4990
|
-
|
|
4991
|
-
}
|
|
4992
|
-
export default Hyperlink;
|
|
4993
|
-
}
|
|
4994
|
-
|
|
4995
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image' {
|
|
4996
|
-
import type { Image as MVFImage } from '@mappedin/mvf';
|
|
4997
|
-
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
4998
|
-
/**
|
|
4999
|
-
* A class representing image link data within the map.
|
|
5000
|
-
*/
|
|
5001
|
-
class Image extends BaseMetaData {
|
|
5002
|
-
#private;
|
|
5138
|
+
siblingGroups?: SiblingGroup[] | undefined;
|
|
5003
5139
|
/**
|
|
5004
|
-
*
|
|
5140
|
+
* The social media links of the location.
|
|
5005
5141
|
*/
|
|
5006
|
-
|
|
5142
|
+
social?: {
|
|
5143
|
+
facebook?: string;
|
|
5144
|
+
instagram?: string;
|
|
5145
|
+
twitter?: string;
|
|
5146
|
+
website?: string;
|
|
5147
|
+
} | undefined;
|
|
5007
5148
|
/**
|
|
5008
|
-
*
|
|
5009
|
-
*
|
|
5010
|
-
* @param instance The instance to check.
|
|
5011
|
-
* @returns {boolean} True if the instance is a Image, false otherwise.
|
|
5149
|
+
* The sort order of the location.
|
|
5012
5150
|
*/
|
|
5013
|
-
|
|
5151
|
+
sortOrder: number;
|
|
5014
5152
|
/**
|
|
5015
|
-
* @
|
|
5153
|
+
* The {@link LocationState}s of the location.
|
|
5016
5154
|
*/
|
|
5017
|
-
|
|
5018
|
-
mvfData: MVFImage;
|
|
5019
|
-
});
|
|
5155
|
+
states?: LocationState[] | undefined;
|
|
5020
5156
|
/**
|
|
5021
|
-
*
|
|
5022
|
-
*
|
|
5023
|
-
* @returns {string | undefined} The url of the image.
|
|
5157
|
+
* The tags of the location.
|
|
5024
5158
|
*/
|
|
5025
|
-
|
|
5159
|
+
tags?: string[] | undefined;
|
|
5026
5160
|
/**
|
|
5027
|
-
*
|
|
5028
|
-
*
|
|
5029
|
-
* @returns {string | undefined } The alt text of the image.
|
|
5030
|
-
* @deprecated Use {@link altText} instead.
|
|
5161
|
+
* The type of the location.
|
|
5031
5162
|
*/
|
|
5032
|
-
|
|
5163
|
+
type: string;
|
|
5033
5164
|
/**
|
|
5034
|
-
*
|
|
5165
|
+
* Checks if the provided instance is of type EnterpriseLocation.
|
|
5035
5166
|
*
|
|
5036
|
-
* @
|
|
5167
|
+
* @param instance The instance to check.
|
|
5168
|
+
* @returns {boolean} True if the instance is a EnterpriseLocation, false otherwise.
|
|
5037
5169
|
*/
|
|
5038
|
-
|
|
5170
|
+
static is(instance: object): instance is EnterpriseLocation;
|
|
5039
5171
|
/**
|
|
5172
|
+
* @internal
|
|
5173
|
+
*/
|
|
5174
|
+
constructor(data: MapDataInternal, options: {
|
|
5175
|
+
mvfData: MVFEnterpriseLocation;
|
|
5176
|
+
categoryIds: string[];
|
|
5177
|
+
locationInstances?: EnterpriseLocation[];
|
|
5178
|
+
parentId?: string;
|
|
5179
|
+
});
|
|
5180
|
+
/** @internal */
|
|
5181
|
+
get focusTarget(): Space[];
|
|
5182
|
+
get categories(): EnterpriseCategory[];
|
|
5183
|
+
get coordinates(): Coordinate[];
|
|
5184
|
+
get nodes(): Node[];
|
|
5185
|
+
get spaces(): Space[];
|
|
5040
5186
|
/**
|
|
5041
|
-
* Serializes the
|
|
5187
|
+
* Serializes the EnterpriseLocation data to JSON.
|
|
5042
5188
|
*
|
|
5043
|
-
* @returns An object representing the
|
|
5189
|
+
* @returns An object representing the EnterpriseLocation.
|
|
5044
5190
|
*/
|
|
5045
5191
|
toJSON(): {
|
|
5046
5192
|
id: string;
|
|
5047
|
-
|
|
5048
|
-
name: string | undefined;
|
|
5193
|
+
name: string;
|
|
5049
5194
|
};
|
|
5050
5195
|
/**
|
|
5051
5196
|
* Cleans up resources used by the instance.
|
|
@@ -5054,80 +5199,90 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image' {
|
|
|
5054
5199
|
*/
|
|
5055
5200
|
destroy(): void;
|
|
5056
5201
|
}
|
|
5057
|
-
export default
|
|
5202
|
+
export default EnterpriseLocation;
|
|
5058
5203
|
}
|
|
5059
5204
|
|
|
5060
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/
|
|
5061
|
-
import type {
|
|
5062
|
-
import type { MapDataInternal,
|
|
5063
|
-
import
|
|
5205
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category' {
|
|
5206
|
+
import type { EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
|
|
5207
|
+
import type { MapDataInternal, EnterpriseLocation } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5208
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
5064
5209
|
/**
|
|
5065
|
-
*
|
|
5210
|
+
* An EnterpriseCategory groups one or more EnterpriseLocation. These allow similar locations to be sorted in a logical fashion.
|
|
5211
|
+
* For example a mall may group locations into Food Court, Footwear and Women's Fashion. They can be accessed using the {@link MapData.getByType()} method as shown below.
|
|
5066
5212
|
*
|
|
5067
|
-
*
|
|
5213
|
+
* ```typescript
|
|
5214
|
+
* const categories = mapData.getByType('enterprise-category');
|
|
5215
|
+
* ```
|
|
5216
|
+
*
|
|
5217
|
+
* Refer to the [EnterpriseCategory Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-categories) for more information and interactive examples.
|
|
5068
5218
|
*/
|
|
5069
|
-
class
|
|
5219
|
+
class EnterpriseCategory extends BaseMetaData implements Omit<MVFEnterpriseCategory, 'children' | 'locations'> {
|
|
5070
5220
|
#private;
|
|
5071
5221
|
/**
|
|
5072
5222
|
* @internal
|
|
5073
5223
|
*/
|
|
5074
|
-
static readonly __type = "
|
|
5224
|
+
static readonly __type = "enterprise-category";
|
|
5075
5225
|
/**
|
|
5076
5226
|
* @internal
|
|
5077
5227
|
*/
|
|
5078
|
-
readonly __type = "
|
|
5228
|
+
readonly __type = "enterprise-category";
|
|
5079
5229
|
/**
|
|
5080
|
-
*
|
|
5081
|
-
*
|
|
5082
|
-
* @param instance The instance to check.
|
|
5083
|
-
* @returns {boolean} True if the instance is a FloorStack, false otherwise.
|
|
5230
|
+
* The name of the category.
|
|
5084
5231
|
*/
|
|
5085
|
-
|
|
5232
|
+
name: string;
|
|
5086
5233
|
/**
|
|
5087
|
-
*
|
|
5234
|
+
* The color of the category.
|
|
5088
5235
|
*/
|
|
5089
|
-
|
|
5090
|
-
mvfData: MVFFloorStack;
|
|
5091
|
-
facadeId?: string;
|
|
5092
|
-
});
|
|
5236
|
+
color?: string | undefined;
|
|
5093
5237
|
/**
|
|
5094
|
-
*
|
|
5238
|
+
* The external ID of the category.
|
|
5095
5239
|
*/
|
|
5096
|
-
|
|
5240
|
+
externalId: string;
|
|
5097
5241
|
/**
|
|
5098
|
-
*
|
|
5099
|
-
*
|
|
5100
|
-
* @returns {string} The name of the FloorStack.
|
|
5242
|
+
* Extra properties of the category.
|
|
5101
5243
|
*/
|
|
5102
|
-
|
|
5244
|
+
extra?: Record<string, unknown> | undefined;
|
|
5103
5245
|
/**
|
|
5104
|
-
*
|
|
5246
|
+
* A URL to the icon of the category.
|
|
5105
5247
|
*/
|
|
5106
|
-
|
|
5248
|
+
icon?: string | undefined;
|
|
5107
5249
|
/**
|
|
5108
|
-
*
|
|
5250
|
+
* The icon from the default list of icons.
|
|
5251
|
+
*/
|
|
5252
|
+
iconFromDefaultList?: string | null | undefined;
|
|
5253
|
+
/**
|
|
5254
|
+
* The sort order of the category.
|
|
5255
|
+
*/
|
|
5256
|
+
sortOrder: number;
|
|
5257
|
+
/**
|
|
5258
|
+
* Checks if the provided instance is of type EnterpriseCategory.
|
|
5109
5259
|
*
|
|
5110
|
-
* @
|
|
5260
|
+
* @param instance The instance to check.
|
|
5261
|
+
* @returns {boolean} True if the instance is a EnterpriseCategory, false otherwise.
|
|
5111
5262
|
*/
|
|
5112
|
-
|
|
5263
|
+
static is(instance: object): instance is EnterpriseCategory;
|
|
5113
5264
|
/**
|
|
5114
|
-
*
|
|
5265
|
+
* @internal
|
|
5115
5266
|
*/
|
|
5116
|
-
|
|
5267
|
+
constructor(data: MapDataInternal, options: {
|
|
5268
|
+
mvfData: MVFEnterpriseCategory;
|
|
5269
|
+
});
|
|
5117
5270
|
/**
|
|
5118
|
-
*
|
|
5271
|
+
* The child categories of the category.
|
|
5119
5272
|
*/
|
|
5120
|
-
get
|
|
5273
|
+
get children(): EnterpriseCategory[];
|
|
5121
5274
|
/**
|
|
5122
|
-
*
|
|
5275
|
+
* The {@link EnterpriseLocation}s within this category.
|
|
5276
|
+
*/
|
|
5277
|
+
get locations(): EnterpriseLocation[];
|
|
5278
|
+
/**
|
|
5279
|
+
* Serializes the EnterpriseCategory data to JSON.
|
|
5123
5280
|
*
|
|
5124
|
-
* @returns An object representing the
|
|
5281
|
+
* @returns An object representing the EnterpriseCategory.
|
|
5125
5282
|
*/
|
|
5126
5283
|
toJSON(): {
|
|
5127
5284
|
id: string;
|
|
5128
5285
|
name: string;
|
|
5129
|
-
type: "Building" | "Outdoor" | undefined;
|
|
5130
|
-
floors: string[];
|
|
5131
5286
|
};
|
|
5132
5287
|
/**
|
|
5133
5288
|
* Cleans up resources used by the instance.
|
|
@@ -5136,175 +5291,121 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor-sta
|
|
|
5136
5291
|
*/
|
|
5137
5292
|
destroy(): void;
|
|
5138
5293
|
}
|
|
5139
|
-
export default
|
|
5140
|
-
}
|
|
5141
|
-
|
|
5142
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/facade' {
|
|
5143
|
-
import type { Space, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5144
|
-
import { Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5145
|
-
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
5146
|
-
import type { Facade as MVFFacade } from '@mappedin/mvf';
|
|
5147
|
-
/**
|
|
5148
|
-
* A Facade is a collection of spaces that make up the exterior representation of a Floor Stack ({@link FloorStack}).
|
|
5149
|
-
*/
|
|
5150
|
-
class Facade extends BaseMapData {
|
|
5151
|
-
#private;
|
|
5152
|
-
static readonly __type = "facade";
|
|
5153
|
-
readonly __type = "facade";
|
|
5154
|
-
/**
|
|
5155
|
-
* Checks if the provided instance is of type Floor.
|
|
5156
|
-
*
|
|
5157
|
-
* @param instance The instance to check.
|
|
5158
|
-
* @returns {boolean} True if the instance is a Floor, false otherwise.
|
|
5159
|
-
*/
|
|
5160
|
-
static is(instance: object): instance is Facade;
|
|
5161
|
-
/** @internal */
|
|
5162
|
-
constructor(data: MapDataInternal, options: {
|
|
5163
|
-
mvfData: MVFFacade;
|
|
5164
|
-
floorStackId: string;
|
|
5165
|
-
});
|
|
5166
|
-
/**
|
|
5167
|
-
* Gets the floor stack that this Facade represents.
|
|
5168
|
-
*/
|
|
5169
|
-
get floorStack(): import("./floor-stack").default;
|
|
5170
|
-
/**
|
|
5171
|
-
* Gets the collection of spaces that make up this Facade.
|
|
5172
|
-
*/
|
|
5173
|
-
get spaces(): Space[];
|
|
5174
|
-
/**
|
|
5175
|
-
* Gets the center {@link Coordinate} of the Facade.
|
|
5176
|
-
*/
|
|
5177
|
-
get center(): Coordinate;
|
|
5178
|
-
}
|
|
5179
|
-
export default Facade;
|
|
5294
|
+
export default EnterpriseCategory;
|
|
5180
5295
|
}
|
|
5181
5296
|
|
|
5182
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/
|
|
5183
|
-
import type {
|
|
5184
|
-
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5185
|
-
import
|
|
5186
|
-
export type MapDataRecords = {
|
|
5187
|
-
spacesById: Record<string, Space>;
|
|
5188
|
-
nodesById: Record<string, Node>;
|
|
5189
|
-
objectsById: Record<string, MapObject>;
|
|
5190
|
-
floorsById: Record<string, Floor>;
|
|
5191
|
-
floorStacksById: Record<string, FloorStack>;
|
|
5192
|
-
facadesById: Record<string, Facade>;
|
|
5193
|
-
facadesBySpaceId: Record<string, Facade>;
|
|
5194
|
-
connectionsById: Record<string, Connection>;
|
|
5195
|
-
doorsById: Record<string, Door>;
|
|
5196
|
-
doorsByNodeId: Record<string, Door>;
|
|
5197
|
-
poisById: Record<string, PointOfInterest>;
|
|
5198
|
-
annotationsById: Record<string, Annotation>;
|
|
5199
|
-
locationsById: Record<MVFEnterpriseLocationId, EnterpriseLocation>;
|
|
5200
|
-
categoriesById: Record<MVFEnterpriseCategoryId, EnterpriseCategory>;
|
|
5201
|
-
locationIdsByNodeId: Record<string, MVFEnterpriseLocationId[]>;
|
|
5202
|
-
areasById: Record<AreaId, Area>;
|
|
5203
|
-
venue: MVFEnterpriseVenue;
|
|
5204
|
-
spaceIdsByDestinationNodeId: Record<string, string[]>;
|
|
5205
|
-
objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
|
|
5206
|
-
obstructionIdByEntranceId: Record<string, string>;
|
|
5207
|
-
connectionIdsByLatLon: Record<string, string[]>;
|
|
5208
|
-
mvfSpacesById: Record<string, SpaceCollection['features'][number]>;
|
|
5209
|
-
mvfNodesById: Record<string, NodeCollection['features'][number]>;
|
|
5210
|
-
mvfObstructionById: Record<string, ObstructionCollection['features'][number]>;
|
|
5211
|
-
mvfFloorsById: Record<string, MVFFloor>;
|
|
5212
|
-
mvfFloorStacksById: Record<string, MVFFloorStack>;
|
|
5213
|
-
mvfConnectionsById: Record<string, MVFConnection>;
|
|
5214
|
-
mvfConnectionsByNodeId: Record<string, MVFConnection>;
|
|
5215
|
-
mvfEntrancesById: Record<string, EntranceCollection['features'][number]>;
|
|
5216
|
-
mvfAnnotationsById: Record<string, AnnotationCollection['features'][number]>;
|
|
5217
|
-
mvfCategoriesById: Record<string, MVFEnterpriseCategory>;
|
|
5218
|
-
mvfLocationsById: Record<string, MVFEnterpriseLocation>;
|
|
5219
|
-
mvfLocationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
|
|
5220
|
-
mvfNodesByFloorId: {
|
|
5221
|
-
[floorId: string]: NodeCollection['features'][number][];
|
|
5222
|
-
};
|
|
5223
|
-
mvfSpacesByFloorId: {
|
|
5224
|
-
[floorId: string]: SpaceCollection['features'][number][];
|
|
5225
|
-
};
|
|
5226
|
-
mvfPoisByFloorId: {
|
|
5227
|
-
[floorId: string]: FeatureCollection<Point, SpaceProperties>['features'][number][];
|
|
5228
|
-
};
|
|
5229
|
-
mvfEntrancesByFloorId: {
|
|
5230
|
-
[floorId: string]: EntranceCollection['features'][number][];
|
|
5231
|
-
};
|
|
5232
|
-
mvfAnnotationsByFloorId: {
|
|
5233
|
-
[floorId: string]: AnnotationCollection['features'][number][];
|
|
5234
|
-
};
|
|
5235
|
-
mvfAreasById: Record<AreaId, AreaCollection['features'][number]>;
|
|
5236
|
-
};
|
|
5237
|
-
export const processMVFFloors: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "floorsById" | "mvfFloorsById">;
|
|
5238
|
-
export const processMVFFloorStacks: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "floorStacksById" | "mvfFloorStacksById" | "facadesById" | "facadesBySpaceId">;
|
|
5239
|
-
export const processMVFAreas: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "areasById" | "mvfAreasById">;
|
|
5240
|
-
/**
|
|
5241
|
-
* @internal
|
|
5242
|
-
*/
|
|
5243
|
-
export const createEnterpriseDataFromMVF: (mvf: ParsedMVF, data: MapDataInternal) => {
|
|
5244
|
-
locationIdsByNodeId: Record<string, string[]>;
|
|
5245
|
-
locationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
|
|
5246
|
-
mvfLocationsById: Record<string, MVFEnterpriseLocation>;
|
|
5247
|
-
mvfCategoriesById: Record<string, MVFEnterpriseCategory>;
|
|
5248
|
-
locationsById: Record<string, EnterpriseLocation>;
|
|
5249
|
-
locationInstancesById: Record<string, EnterpriseLocationInstance>;
|
|
5250
|
-
categoriesById: Record<string, EnterpriseCategory>;
|
|
5251
|
-
venue: MVFEnterpriseVenue;
|
|
5252
|
-
};
|
|
5297
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
|
|
5298
|
+
import type { EnterpriseVenue as MVFEnterpriseVenue, Language } from '@mappedin/mvf';
|
|
5299
|
+
import type { Hyperlink, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5300
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
5253
5301
|
/**
|
|
5254
|
-
*
|
|
5302
|
+
* The EnterpriseVenue class holds metadata bout the map, which includes the map name, supported languages, default language, top locations and more.
|
|
5303
|
+
* It can be accessed using the {@link MapData.getByType()} method as shown below.
|
|
5304
|
+
*
|
|
5305
|
+
* ```typescript
|
|
5306
|
+
* const venue = mapData.getByType('enterprise-venue');
|
|
5307
|
+
* ```
|
|
5308
|
+
*
|
|
5309
|
+
* Refer to the [EnterpriseVenue Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-venue) for more information.
|
|
5255
5310
|
*/
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5311
|
+
class EnterpriseVenue extends BaseMetaData implements MVFEnterpriseVenue {
|
|
5312
|
+
#private;
|
|
5313
|
+
/**
|
|
5314
|
+
* @internal
|
|
5315
|
+
*/
|
|
5316
|
+
static readonly __type = "enterprise-venue";
|
|
5317
|
+
/**
|
|
5318
|
+
* @internal
|
|
5319
|
+
*/
|
|
5320
|
+
readonly __type = "enterprise-venue";
|
|
5321
|
+
/**
|
|
5322
|
+
* The country code of the venue.
|
|
5323
|
+
*/
|
|
5324
|
+
countrycode?: string | undefined;
|
|
5325
|
+
/**
|
|
5326
|
+
* The external ID of the venue.
|
|
5327
|
+
*/
|
|
5328
|
+
externalId: string;
|
|
5329
|
+
/**
|
|
5330
|
+
* The default language of the venue.
|
|
5331
|
+
*/
|
|
5332
|
+
defaultLanguage: Language;
|
|
5333
|
+
/**
|
|
5334
|
+
* The default map of the venue.
|
|
5335
|
+
*/
|
|
5336
|
+
defaultMap?: string | undefined;
|
|
5337
|
+
/**
|
|
5338
|
+
* Extra properties of the venue.
|
|
5339
|
+
*/
|
|
5340
|
+
extra?: Record<string, unknown> | undefined;
|
|
5341
|
+
/**
|
|
5342
|
+
* A URL to the icon of the venue.
|
|
5343
|
+
*/
|
|
5344
|
+
icon?: string | undefined;
|
|
5345
|
+
/**
|
|
5346
|
+
* The languages supported by the venue.
|
|
5347
|
+
*/
|
|
5348
|
+
languages: Language[];
|
|
5349
|
+
/**
|
|
5350
|
+
* The links of the venue.
|
|
5351
|
+
*/
|
|
5352
|
+
links: Hyperlink[];
|
|
5353
|
+
/**
|
|
5354
|
+
* A URL to the logo of the venue.
|
|
5355
|
+
*/
|
|
5356
|
+
logo?: string | undefined;
|
|
5357
|
+
/**
|
|
5358
|
+
* A URL to a web page with [Mappedin Web](https://developer.mappedin.com/docs/enterprise-apps/mappedin-web-v2) for this venue.
|
|
5359
|
+
*/
|
|
5360
|
+
mappedinWebUrl?: string | undefined;
|
|
5361
|
+
/**
|
|
5362
|
+
* The slug of the venue.
|
|
5363
|
+
*/
|
|
5364
|
+
slug: string;
|
|
5365
|
+
/**
|
|
5366
|
+
* The top locations of the venue.
|
|
5367
|
+
*/
|
|
5368
|
+
topLocations?: string[] | undefined;
|
|
5369
|
+
/**
|
|
5370
|
+
* The timezone ID of the venue.
|
|
5371
|
+
*/
|
|
5372
|
+
tzid?: string | undefined;
|
|
5373
|
+
/**
|
|
5374
|
+
* Checks if the provided instance is of type EnterpriseVenue.
|
|
5375
|
+
*
|
|
5376
|
+
* @param instance The instance to check.
|
|
5377
|
+
* @returns {boolean} True if the instance is a EnterpriseVenue, false otherwise.
|
|
5378
|
+
*/
|
|
5379
|
+
static is(instance: object): instance is EnterpriseVenue;
|
|
5380
|
+
/**
|
|
5381
|
+
* @internal
|
|
5382
|
+
*/
|
|
5383
|
+
constructor(_data: MapDataInternal, options: {
|
|
5384
|
+
mvfData: MVFEnterpriseVenue;
|
|
5385
|
+
});
|
|
5386
|
+
/**
|
|
5387
|
+
* Gets the name of the EnterpriseVenue.
|
|
5388
|
+
*
|
|
5389
|
+
* @returns {string} The name of the EnterpriseVenue.
|
|
5390
|
+
*/
|
|
5391
|
+
get name(): string;
|
|
5392
|
+
/**
|
|
5393
|
+
* Serializes the EnterpriseVenue data to JSON.
|
|
5394
|
+
*
|
|
5395
|
+
* @returns An object representing the EnterpriseVenue.
|
|
5396
|
+
*/
|
|
5397
|
+
toJSON(): {
|
|
5398
|
+
id: string;
|
|
5399
|
+
name: string;
|
|
5306
5400
|
};
|
|
5307
|
-
|
|
5401
|
+
/**
|
|
5402
|
+
* Cleans up resources used by the instance.
|
|
5403
|
+
*
|
|
5404
|
+
* @internal
|
|
5405
|
+
*/
|
|
5406
|
+
destroy(): void;
|
|
5407
|
+
}
|
|
5408
|
+
export default EnterpriseVenue;
|
|
5308
5409
|
}
|
|
5309
5410
|
|
|
5310
5411
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes' {
|
|
@@ -5450,6 +5551,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
5450
5551
|
* ```
|
|
5451
5552
|
*/
|
|
5452
5553
|
interactive?: boolean | 'pointer-events-auto';
|
|
5554
|
+
/**
|
|
5555
|
+
* The z-index of the marker. Can be used used in conjunction with rank: 'always-visible' to make certain markers appear over others
|
|
5556
|
+
*/
|
|
5557
|
+
zIndex?: number;
|
|
5453
5558
|
};
|
|
5454
5559
|
/**
|
|
5455
5560
|
* 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.
|
|
@@ -5466,17 +5571,20 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
5466
5571
|
id: z.ZodOptional<z.ZodString>;
|
|
5467
5572
|
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">]>>;
|
|
5468
5573
|
dynamicResize: z.ZodOptional<z.ZodBoolean>;
|
|
5574
|
+
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
5469
5575
|
}, "strip", z.ZodTypeAny, {
|
|
5470
5576
|
interactive?: boolean | "pointer-events-auto" | undefined;
|
|
5471
5577
|
id?: string | undefined;
|
|
5472
5578
|
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;
|
|
5473
5579
|
dynamicResize?: boolean | undefined;
|
|
5580
|
+
zIndex?: number | undefined;
|
|
5474
5581
|
rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
|
|
5475
5582
|
}, {
|
|
5476
5583
|
interactive?: boolean | "pointer-events-auto" | undefined;
|
|
5477
5584
|
id?: string | undefined;
|
|
5478
5585
|
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;
|
|
5479
5586
|
dynamicResize?: boolean | undefined;
|
|
5587
|
+
zIndex?: number | undefined;
|
|
5480
5588
|
rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
|
|
5481
5589
|
}>;
|
|
5482
5590
|
export function validateMarker(coordinate: Position, contentHTML: string, options: AddMarkerOptions): void;
|
|
@@ -5511,6 +5619,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
5511
5619
|
* Dynamic resize of the marker. If set to true, the marker will resize based on the content.
|
|
5512
5620
|
*/
|
|
5513
5621
|
dynamicResize?: boolean;
|
|
5622
|
+
/**
|
|
5623
|
+
* The z-index of the marker. Can be used used in conjunction with rank: 'always-visible' to make certain markers appear over others
|
|
5624
|
+
*/
|
|
5625
|
+
zIndex?: number;
|
|
5514
5626
|
};
|
|
5515
5627
|
export class MarkerComponent {
|
|
5516
5628
|
id: string | number;
|
|
@@ -5520,7 +5632,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
5520
5632
|
initialRank: number;
|
|
5521
5633
|
activeAnchor: MarkerAnchor;
|
|
5522
5634
|
pointerEvents: 'auto' | 'none';
|
|
5523
|
-
options: Required<AddMarkerOptions
|
|
5635
|
+
options: Required<Omit<AddMarkerOptions, 'zIndex'>> & {
|
|
5636
|
+
zIndex?: number;
|
|
5637
|
+
};
|
|
5524
5638
|
projection: Vector2;
|
|
5525
5639
|
enabled: boolean;
|
|
5526
5640
|
/**
|
|
@@ -5529,7 +5643,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
5529
5643
|
canShow: boolean;
|
|
5530
5644
|
visible: boolean;
|
|
5531
5645
|
offscreen: boolean;
|
|
5532
|
-
activeStrategyIndex: number;
|
|
5533
5646
|
strategyIndex: number;
|
|
5534
5647
|
activeBoundingBox: {
|
|
5535
5648
|
x: number;
|
|
@@ -6240,7 +6353,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
|
|
|
6240
6353
|
static testId: number;
|
|
6241
6354
|
opacity: number;
|
|
6242
6355
|
visibilityNeedsUpdate: 'show' | 'hide' | false;
|
|
6243
|
-
activeStrategyIndex: number;
|
|
6244
6356
|
text: string;
|
|
6245
6357
|
style: TStyle;
|
|
6246
6358
|
projection: Vector2;
|
|
@@ -8467,7 +8579,10 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/watermark/system' {
|
|
|
8467
8579
|
*/
|
|
8468
8580
|
visible?: boolean;
|
|
8469
8581
|
};
|
|
8470
|
-
export type WatermarkUpdateOptions = Omit<WatermarkOptions, 'onClick' | 'visible'
|
|
8582
|
+
export type WatermarkUpdateOptions = Omit<WatermarkOptions, 'onClick' | 'visible'> & {
|
|
8583
|
+
/** Show the Mappedin watermark. Once it is visible it cannot be hidden again. */
|
|
8584
|
+
visible?: true;
|
|
8585
|
+
};
|
|
8471
8586
|
export class WatermarkSystem extends PubSub<{
|
|
8472
8587
|
'texture-loaded': void;
|
|
8473
8588
|
}> {
|
|
@@ -8491,8 +8606,6 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/watermark/system' {
|
|
|
8491
8606
|
x: number;
|
|
8492
8607
|
y: number;
|
|
8493
8608
|
};
|
|
8494
|
-
show(): void;
|
|
8495
|
-
hide(): void;
|
|
8496
8609
|
insertIntoQuadTree(quadTree: QuadTree<{
|
|
8497
8610
|
entityId: Geometry2D['id'];
|
|
8498
8611
|
}>): void;
|
|
@@ -8547,6 +8660,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/html-controls/system'
|
|
|
8547
8660
|
export type AttributionControlOptions = {
|
|
8548
8661
|
custom?: string[];
|
|
8549
8662
|
position?: AttributionPosition;
|
|
8663
|
+
feedback?: boolean;
|
|
8550
8664
|
};
|
|
8551
8665
|
export class HTMLControlsSystem {
|
|
8552
8666
|
controlContainerEl: HTMLDivElement;
|
|
@@ -8577,7 +8691,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/styles' {
|
|
|
8577
8691
|
}
|
|
8578
8692
|
|
|
8579
8693
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
8580
|
-
import type { RendererCore,
|
|
8694
|
+
import type { RendererCore, WatermarkUpdateOptions } from '@mappedin/core-sdk';
|
|
8581
8695
|
import { type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
8582
8696
|
import { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
8583
8697
|
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
@@ -8631,7 +8745,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
8631
8745
|
Shapes: Shapes;
|
|
8632
8746
|
Style: Style;
|
|
8633
8747
|
Images: Images;
|
|
8634
|
-
get DynamicFocus(): import("
|
|
8748
|
+
get DynamicFocus(): import("..").DynamicFocus;
|
|
8635
8749
|
get StackedMaps(): import("..").StackedMaps;
|
|
8636
8750
|
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
8637
8751
|
updateState<T extends Space | Text3DView | MapObject | Label | Shape | Marker | Door | Facade | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
@@ -8641,7 +8755,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
8641
8755
|
addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
|
|
8642
8756
|
setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
|
|
8643
8757
|
setFloorStack(floorStack: FloorStack | string): void;
|
|
8644
|
-
updateWatermark(options:
|
|
8758
|
+
updateWatermark(options: WatermarkUpdateOptions): void;
|
|
8645
8759
|
get currentFloorStack(): FloorStack;
|
|
8646
8760
|
get currentFloor(): Floor;
|
|
8647
8761
|
getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | string>(target: T): TGetState<T>;
|
|
@@ -8667,12 +8781,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
8667
8781
|
import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
|
|
8668
8782
|
import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
|
|
8669
8783
|
import type { Coordinate, Directions, Floor, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
8670
|
-
import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, TDirectionInstruction, TAddText3DOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
8784
|
+
import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, TDirectionInstruction, TAddText3DOptions, IAnchorable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
8671
8785
|
import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
|
|
8672
8786
|
import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
8673
8787
|
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
8674
8788
|
import type { Path, Shape, Label } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
8675
|
-
import { type
|
|
8789
|
+
import { type MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
8676
8790
|
import { type GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
8677
8791
|
import { FloorStackObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-stack-object';
|
|
8678
8792
|
import { DynamicFocus } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus';
|
|
@@ -8706,6 +8820,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
8706
8820
|
renderer: RendererCore;
|
|
8707
8821
|
api: GeoJsonApi;
|
|
8708
8822
|
mvf: ParsedMVF;
|
|
8823
|
+
options: TShow3DMapOptions;
|
|
8709
8824
|
styleMap: AggregatedStyleMap;
|
|
8710
8825
|
StackedMaps: StackedMaps;
|
|
8711
8826
|
DynamicFocus: DynamicFocus;
|
|
@@ -8752,8 +8867,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
8752
8867
|
remove: (id: string) => string | undefined;
|
|
8753
8868
|
};
|
|
8754
8869
|
Labels: {
|
|
8755
|
-
all: ({ onCreate
|
|
8756
|
-
onCreate: (labelId: string | number, text: string, target:
|
|
8870
|
+
all: ({ onCreate }: {
|
|
8871
|
+
onCreate: (labelId: string | number, text: string, target: IAnchorable) => void;
|
|
8757
8872
|
}) => void;
|
|
8758
8873
|
add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
|
|
8759
8874
|
floorId?: string;
|
|
@@ -8783,7 +8898,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
8783
8898
|
}
|
|
8784
8899
|
|
|
8785
8900
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
|
|
8786
|
-
import type {
|
|
8901
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
8787
8902
|
/**
|
|
8788
8903
|
* Class representing a label on the {@link MapView}.
|
|
8789
8904
|
*
|
|
@@ -8795,7 +8910,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
|
|
|
8795
8910
|
*
|
|
8796
8911
|
* Refer to the [Labels Guide](https://developer.mappedin.com/web-sdk/labels) for more information and interactive examples.
|
|
8797
8912
|
*/
|
|
8798
|
-
export class Label {
|
|
8913
|
+
export class Label implements IFocusable {
|
|
8799
8914
|
/**
|
|
8800
8915
|
* The label's id
|
|
8801
8916
|
*/
|
|
@@ -8807,7 +8922,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
|
|
|
8807
8922
|
/**
|
|
8808
8923
|
* The target object where the label is anchored.
|
|
8809
8924
|
*/
|
|
8810
|
-
readonly target:
|
|
8925
|
+
readonly target: IAnchorable;
|
|
8811
8926
|
/**
|
|
8812
8927
|
* @internal
|
|
8813
8928
|
*/
|
|
@@ -8823,22 +8938,24 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
|
|
|
8823
8938
|
* @returns {boolean} True if the instance is a Label, false otherwise.
|
|
8824
8939
|
*/
|
|
8825
8940
|
static is(instance: object): instance is Label;
|
|
8941
|
+
/** @internal */
|
|
8942
|
+
get focusTarget(): import("..").Coordinate;
|
|
8826
8943
|
/**
|
|
8827
8944
|
* @internal
|
|
8828
8945
|
*/
|
|
8829
|
-
constructor(id: string, text: string, target:
|
|
8946
|
+
constructor(id: string, text: string, target: IAnchorable);
|
|
8830
8947
|
}
|
|
8831
8948
|
}
|
|
8832
8949
|
|
|
8833
8950
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
|
|
8834
|
-
import type {
|
|
8951
|
+
import type { IAnchorable, IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
8835
8952
|
/**
|
|
8836
8953
|
* Mappedin JS allows adding and removing Markers on a map using the {@link Markers} class. Markers are elements containing HTML that Mappedin JS anchors to a {@link Door}, {@link Space}, {@link Coordinate} or {@link Node}.
|
|
8837
8954
|
* They are automatically rotated and repositioned when the camera moves.
|
|
8838
8955
|
*
|
|
8839
8956
|
* Refer to the [Markers Guide](https://developer.mappedin.com/web-sdk/markers) for more information and interactive examples.
|
|
8840
8957
|
*/
|
|
8841
|
-
export class Marker {
|
|
8958
|
+
export class Marker implements IFocusable {
|
|
8842
8959
|
#private;
|
|
8843
8960
|
/**
|
|
8844
8961
|
* The marker's id
|
|
@@ -8848,7 +8965,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
|
|
|
8848
8965
|
* @internal
|
|
8849
8966
|
*/
|
|
8850
8967
|
static readonly __type = "Marker";
|
|
8851
|
-
get target():
|
|
8968
|
+
get target(): IAnchorable;
|
|
8852
8969
|
/**
|
|
8853
8970
|
* @internal
|
|
8854
8971
|
*/
|
|
@@ -8867,11 +8984,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
|
|
|
8867
8984
|
/**
|
|
8868
8985
|
* @internal
|
|
8869
8986
|
*/
|
|
8870
|
-
constructor(id: string, contentEl: HTMLElement, target:
|
|
8987
|
+
constructor(id: string, contentEl: HTMLElement, target: IAnchorable);
|
|
8988
|
+
/** @internal */
|
|
8989
|
+
get focusTarget(): import("..").Coordinate;
|
|
8871
8990
|
/**
|
|
8872
8991
|
* @internal
|
|
8873
8992
|
*/
|
|
8874
|
-
updateTarget(target:
|
|
8993
|
+
updateTarget(target: IAnchorable): void;
|
|
8875
8994
|
}
|
|
8876
8995
|
}
|
|
8877
8996
|
|
|
@@ -8965,12 +9084,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/model' {
|
|
|
8965
9084
|
|
|
8966
9085
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
|
|
8967
9086
|
import { type Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9087
|
+
import type { IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
8968
9088
|
/**
|
|
8969
9089
|
* Class representing a path on the {@link MapView}.
|
|
8970
9090
|
*
|
|
8971
9091
|
* Paths are used to indicate a route on the map and can be added and removed using {@link Paths.add} and {@link Paths.remove}.
|
|
8972
9092
|
*/
|
|
8973
|
-
export class Path {
|
|
9093
|
+
export class Path implements IFocusable {
|
|
8974
9094
|
/**
|
|
8975
9095
|
* The label's id
|
|
8976
9096
|
*/
|
|
@@ -8987,6 +9107,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
|
|
|
8987
9107
|
* @internal
|
|
8988
9108
|
*/
|
|
8989
9109
|
readonly __type: 'Path';
|
|
9110
|
+
/** @internal */
|
|
9111
|
+
get focusTarget(): Coordinate[];
|
|
8990
9112
|
/**
|
|
8991
9113
|
* @internal
|
|
8992
9114
|
*/
|
|
@@ -8995,12 +9117,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
|
|
|
8995
9117
|
}
|
|
8996
9118
|
|
|
8997
9119
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape' {
|
|
9120
|
+
import type { IFocusable } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
8998
9121
|
/**
|
|
8999
9122
|
* Class representing GeoJSON shape on the {@link MapView}.
|
|
9000
9123
|
*
|
|
9001
9124
|
* Refer to the [Shapes Guide](https://developer.mappedin.com/web-sdk/shapes) for more information and interactive examples.
|
|
9002
9125
|
*/
|
|
9003
|
-
export class Shape {
|
|
9126
|
+
export class Shape implements IFocusable {
|
|
9004
9127
|
/**
|
|
9005
9128
|
* id of Shape
|
|
9006
9129
|
*/
|
|
@@ -9020,6 +9143,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape' {
|
|
|
9020
9143
|
* @returns {boolean} True if the instance is a Shape, false otherwise.
|
|
9021
9144
|
*/
|
|
9022
9145
|
static is(instance: object): instance is Shape;
|
|
9146
|
+
/** @internal */
|
|
9147
|
+
get focusTarget(): this;
|
|
9023
9148
|
/**
|
|
9024
9149
|
* @internal
|
|
9025
9150
|
*/
|
|
@@ -9061,7 +9186,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/text3d' {
|
|
|
9061
9186
|
}
|
|
9062
9187
|
|
|
9063
9188
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
|
|
9064
|
-
import type {
|
|
9189
|
+
import type { IFocusable, TCameraAnimationOptions, TCameraTarget, TFocusOnOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
9065
9190
|
import type { InsetPadding, RendererCore } from '@mappedin/core-sdk';
|
|
9066
9191
|
import { Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9067
9192
|
/**
|
|
@@ -9104,7 +9229,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
|
|
|
9104
9229
|
* // Focus on a single space
|
|
9105
9230
|
* mapView.Camera.focusOn(space, { minZoomLevel: 5, duration: 1000 });
|
|
9106
9231
|
*/
|
|
9107
|
-
focusOn(target:
|
|
9232
|
+
focusOn(target: IFocusable | IFocusable[], options?: TFocusOnOptions): Promise<void>;
|
|
9108
9233
|
/**
|
|
9109
9234
|
* Animates the camera to a specified target.
|
|
9110
9235
|
* @param target The target configuration for the camera.
|
|
@@ -9214,11 +9339,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
|
|
|
9214
9339
|
}
|
|
9215
9340
|
|
|
9216
9341
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels' {
|
|
9217
|
-
import type { TAddLabelOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
9342
|
+
import type { IAnchorable, TAddLabelOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
9218
9343
|
import { Label } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
9219
9344
|
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
9220
|
-
import type { PointOfInterest, MapObject } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
9221
|
-
import { Space, Door, Coordinate, Node } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9222
9345
|
/**
|
|
9223
9346
|
* Class used to add and remove a {@link Label} on the {@link MapView}.
|
|
9224
9347
|
*
|
|
@@ -9262,7 +9385,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels' {
|
|
|
9262
9385
|
*
|
|
9263
9386
|
* mapView.Labels.add(space, 'Welcome', { appearance: { color: 'blue' } });
|
|
9264
9387
|
*/
|
|
9265
|
-
add(target:
|
|
9388
|
+
add(target: IAnchorable, text: string, options?: TAddLabelOptions | undefined): Label;
|
|
9266
9389
|
/**
|
|
9267
9390
|
* Automatically adds all the labels ({@link Label}) to the map.
|
|
9268
9391
|
*
|
|
@@ -9294,10 +9417,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels' {
|
|
|
9294
9417
|
}
|
|
9295
9418
|
|
|
9296
9419
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
|
|
9297
|
-
import type { TAddMarkerOptions, TAnimationOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
9420
|
+
import type { IAnchorable, TAddMarkerOptions, TAnimationOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
9298
9421
|
import { Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
9299
9422
|
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
9300
|
-
import type { Space, Door, Coordinate, Node } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9301
9423
|
/**
|
|
9302
9424
|
* Mappedin JS allows adding and removing Markers on a map. Markers are elements containing HTML that Mappedin JS anchors to a {@link Door}, {@link Space}, {@link Coordinate} or {@link Node}.
|
|
9303
9425
|
* They are automatically rotated and repositioned when the camera moves.
|
|
@@ -9336,7 +9458,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
|
|
|
9336
9458
|
* // Add an interactive Marker to the map with custom HTML content.
|
|
9337
9459
|
* mapView.Markers.add(coordinate, '<div>Marker Content</div>', { interactive: true });
|
|
9338
9460
|
*/
|
|
9339
|
-
add(target:
|
|
9461
|
+
add(target: IAnchorable, html: string, options?: TAddMarkerOptions): Marker;
|
|
9340
9462
|
/**
|
|
9341
9463
|
* Removes a marker from the map.
|
|
9342
9464
|
*
|
|
@@ -9360,7 +9482,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
|
|
|
9360
9482
|
* const marker = mapView.Markers.add(coordinate, '<div>Marker Content</div>');
|
|
9361
9483
|
* mapView.Markers.setPosition(marker, newCoordinate);
|
|
9362
9484
|
*/
|
|
9363
|
-
setPosition(marker: Marker, target:
|
|
9485
|
+
setPosition(marker: Marker, target: IAnchorable): void;
|
|
9364
9486
|
/**
|
|
9365
9487
|
* Update the position of a marker with an animation.
|
|
9366
9488
|
* @param marker The {@link Marker} which should be updated.
|
|
@@ -9371,7 +9493,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
|
|
|
9371
9493
|
* const marker = mapView.Markers.add(coordinate, '<div>Marker Content</div>');
|
|
9372
9494
|
* mapView.Markers.animateTo(marker, newCoordinate, { duration: 1000 });
|
|
9373
9495
|
*/
|
|
9374
|
-
animateTo(marker: Marker, target:
|
|
9496
|
+
animateTo(marker: Marker, target: IAnchorable, options?: TAnimationOptions): Promise<void>;
|
|
9375
9497
|
}
|
|
9376
9498
|
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
9377
9499
|
export {};
|
|
@@ -9933,6 +10055,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images' {
|
|
|
9933
10055
|
export {};
|
|
9934
10056
|
}
|
|
9935
10057
|
|
|
10058
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus' {
|
|
10059
|
+
export { DynamicFocus } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus/dynamic-focus';
|
|
10060
|
+
}
|
|
10061
|
+
|
|
9936
10062
|
declare module '@mappedin/mappedin-js/mappedin-js/src/search/internal' {
|
|
9937
10063
|
import type { SearchResult as MiniSearchResult, Suggestion, MatchInfo } from 'minisearch';
|
|
9938
10064
|
import type { Places } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
@@ -11639,8 +11765,10 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/syst
|
|
|
11639
11765
|
focusablesDirty: boolean;
|
|
11640
11766
|
constructor(state: RendererState, camera: PerspectiveCamera);
|
|
11641
11767
|
resize(): void;
|
|
11642
|
-
update: () => void;
|
|
11768
|
+
update: (userIsInteracting?: boolean) => void;
|
|
11643
11769
|
updateRaf(): void;
|
|
11770
|
+
showRaycasters(): void;
|
|
11771
|
+
hideRaycasters(): void;
|
|
11644
11772
|
destroy(): void;
|
|
11645
11773
|
}
|
|
11646
11774
|
}
|
|
@@ -12116,7 +12244,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
|
|
|
12116
12244
|
export type WithId<T> = T & {
|
|
12117
12245
|
id?: string;
|
|
12118
12246
|
};
|
|
12119
|
-
export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<
|
|
12247
|
+
export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<LineString | Polygon | Point, WithPolygonImage<SpaceProperties> | WithPolygonImage<ObstructionProperties>>[]>;
|
|
12120
12248
|
export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
|
|
12121
12249
|
export const getTargetID: <T extends Space | Shape | MapObject | Label | Text3D | Marker | Model | Image | string>(target: T, api: GeoJsonApi) => string | undefined;
|
|
12122
12250
|
export function tweenToPromise(tween: Tween): Promise<void>;
|
|
@@ -12150,8 +12278,75 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-stack-ob
|
|
|
12150
12278
|
}
|
|
12151
12279
|
}
|
|
12152
12280
|
|
|
12153
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus' {
|
|
12154
|
-
|
|
12281
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus/dynamic-focus' {
|
|
12282
|
+
import { type RendererCore } from '@mappedin/core-sdk';
|
|
12283
|
+
import { PubSub } from '@packages/internal/common';
|
|
12284
|
+
import type { Floor, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
12285
|
+
import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
12286
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
12287
|
+
/**
|
|
12288
|
+
* @experimental
|
|
12289
|
+
* @internal
|
|
12290
|
+
*/
|
|
12291
|
+
export type TDynamicFocusEvents = {
|
|
12292
|
+
'focus-change': {
|
|
12293
|
+
facades: string[];
|
|
12294
|
+
spaces: string[];
|
|
12295
|
+
};
|
|
12296
|
+
};
|
|
12297
|
+
/**
|
|
12298
|
+
* @experimental
|
|
12299
|
+
* @internal
|
|
12300
|
+
*/
|
|
12301
|
+
export type TDynamicFocusOptions = {
|
|
12302
|
+
/**
|
|
12303
|
+
* The minimum zoom level at which Dynamic Focus will detect a Facade and reveal the interior spaces.
|
|
12304
|
+
* @default 17
|
|
12305
|
+
*/
|
|
12306
|
+
minZoomLevel?: number;
|
|
12307
|
+
};
|
|
12308
|
+
/**
|
|
12309
|
+
* @experimental
|
|
12310
|
+
* @internal
|
|
12311
|
+
*/
|
|
12312
|
+
export class DynamicFocus extends PubSub<TDynamicFocusEvents> {
|
|
12313
|
+
#private;
|
|
12314
|
+
/** @internal */
|
|
12315
|
+
constructor(core: RendererCore, geoJSONApi: GeoJsonApi, { currentMapGetter }: {
|
|
12316
|
+
currentMapGetter: CurrentMapGetter;
|
|
12317
|
+
});
|
|
12318
|
+
/**
|
|
12319
|
+
* @experimental
|
|
12320
|
+
* Enables Dynamic Focus and allows the camera to automatically set the floor stack when a facade is hovered.
|
|
12321
|
+
*/
|
|
12322
|
+
enable(options?: TDynamicFocusOptions): void;
|
|
12323
|
+
/**
|
|
12324
|
+
* @experimental
|
|
12325
|
+
* Disables Dynamic Focus and prevents the camera from automatically setting the floor stack when a facade is hovered.
|
|
12326
|
+
*/
|
|
12327
|
+
disable(): void;
|
|
12328
|
+
/**
|
|
12329
|
+
* @experimental
|
|
12330
|
+
* Returns the enabled state of Dynamic Focus.
|
|
12331
|
+
*/
|
|
12332
|
+
get enabled(): boolean;
|
|
12333
|
+
/**
|
|
12334
|
+
* @experimental
|
|
12335
|
+
* Sets the default floor for a floor stack. This is the floor that will be shown when the floor stack is in focus.
|
|
12336
|
+
* See {@link resetDefaultFloorForStack} to reset the default floor.
|
|
12337
|
+
* @param floorStack - The floor stack to set the default floor for.
|
|
12338
|
+
* @param floor - The floor to set as the default floor.
|
|
12339
|
+
*/
|
|
12340
|
+
setDefaultFloorForStack(floorStack: FloorStack, floor: Floor): void;
|
|
12341
|
+
/**
|
|
12342
|
+
* @experimental
|
|
12343
|
+
* Resets the default floor for a floor stack to it's initial value.
|
|
12344
|
+
* @param floorStack - The floor stack to reset the default floor for.
|
|
12345
|
+
*/
|
|
12346
|
+
resetDefaultFloorForStack(floorStack: FloorStack): void;
|
|
12347
|
+
}
|
|
12348
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
12349
|
+
export {};
|
|
12155
12350
|
}
|
|
12156
12351
|
|
|
12157
12352
|
declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-processor' {
|
|
@@ -20961,77 +21156,6 @@ declare module '@mappedin/mappedin-js/packages/geojson-navigator/src/types/coord
|
|
|
20961
21156
|
export type CoordinateFeature = Feature<Point, CoordinateProperties>;
|
|
20962
21157
|
}
|
|
20963
21158
|
|
|
20964
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus/dynamic-focus' {
|
|
20965
|
-
import { type RendererCore } from '@mappedin/core-sdk';
|
|
20966
|
-
import { PubSub } from '@packages/internal/common';
|
|
20967
|
-
import type { Floor, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
20968
|
-
import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
20969
|
-
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
20970
|
-
/**
|
|
20971
|
-
* @experimental
|
|
20972
|
-
* @internal
|
|
20973
|
-
*/
|
|
20974
|
-
export type TDynamicFocusEvents = {
|
|
20975
|
-
'focus-change': {
|
|
20976
|
-
facades: string[];
|
|
20977
|
-
spaces: string[];
|
|
20978
|
-
};
|
|
20979
|
-
};
|
|
20980
|
-
/**
|
|
20981
|
-
* @experimental
|
|
20982
|
-
* @internal
|
|
20983
|
-
*/
|
|
20984
|
-
export type TDynamicFocusOptions = {
|
|
20985
|
-
/**
|
|
20986
|
-
* The minimum zoom level at which Dynamic Focus will detect a Facade and reveal the interior spaces.
|
|
20987
|
-
* @default 17
|
|
20988
|
-
*/
|
|
20989
|
-
minZoomLevel?: number;
|
|
20990
|
-
};
|
|
20991
|
-
/**
|
|
20992
|
-
* @experimental
|
|
20993
|
-
* @internal
|
|
20994
|
-
*/
|
|
20995
|
-
export class DynamicFocus extends PubSub<TDynamicFocusEvents> {
|
|
20996
|
-
#private;
|
|
20997
|
-
/** @internal */
|
|
20998
|
-
constructor(core: RendererCore, geoJSONApi: GeoJsonApi, { currentMapGetter }: {
|
|
20999
|
-
currentMapGetter: CurrentMapGetter;
|
|
21000
|
-
});
|
|
21001
|
-
/**
|
|
21002
|
-
* @experimental
|
|
21003
|
-
* Enables Dynamic Focus and allows the camera to automatically set the floor stack when a facade is hovered.
|
|
21004
|
-
*/
|
|
21005
|
-
enable(options?: TDynamicFocusOptions): void;
|
|
21006
|
-
/**
|
|
21007
|
-
* @experimental
|
|
21008
|
-
* Disables Dynamic Focus and prevents the camera from automatically setting the floor stack when a facade is hovered.
|
|
21009
|
-
*/
|
|
21010
|
-
disable(): void;
|
|
21011
|
-
/**
|
|
21012
|
-
* @experimental
|
|
21013
|
-
* Returns the enabled state of Dynamic Focus.
|
|
21014
|
-
*/
|
|
21015
|
-
get enabled(): boolean;
|
|
21016
|
-
/**
|
|
21017
|
-
* @experimental
|
|
21018
|
-
* Sets the default floor for a floor stack. This is the floor that will be shown when the floor stack is in focus.
|
|
21019
|
-
* See {@link resetDefaultFloorForStack} to reset the default floor.
|
|
21020
|
-
* @param floorStack - The floor stack to set the default floor for.
|
|
21021
|
-
* @param floor - The floor to set as the default floor.
|
|
21022
|
-
*/
|
|
21023
|
-
setDefaultFloorForStack(floorStack: FloorStack, floor: Floor): void;
|
|
21024
|
-
/**
|
|
21025
|
-
* @experimental
|
|
21026
|
-
* Resets the default floor for a floor stack to it's initial value.
|
|
21027
|
-
* @param floorStack - The floor stack to reset the default floor for.
|
|
21028
|
-
*/
|
|
21029
|
-
resetDefaultFloorForStack(floorStack: FloorStack): void;
|
|
21030
|
-
}
|
|
21031
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
21032
|
-
export {};
|
|
21033
|
-
}
|
|
21034
|
-
|
|
21035
21159
|
declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/tap-controller' {
|
|
21036
21160
|
export enum TapType {
|
|
21037
21161
|
onefinger = 0,
|