@mappedin/mappedin-js 6.0.1-beta.16 → 6.0.1-beta.18

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.
@@ -8,13 +8,12 @@
8
8
  // ../mappedin-js/geojson
9
9
  // ../mappedin-js/@packages/internal/common
10
10
  // ../mappedin-js/@mappedin/core-sdk
11
- // ../mappedin-js/@mappedin/core-sdk/src/camera
12
11
  // ../mappedin-js/@packages/internal/geojson-navigator
13
- // ../mappedin-js/@tweenjs/tween.js
14
12
  // ../mappedin-js/@mappedin/mvf/dist/locale
15
13
  // ../mappedin-js/three
16
14
  // ../mappedin-js/zod
17
15
  // ../mappedin-js/@packages/internal/shave-text/shave-text
16
+ // ../mappedin-js/@tweenjs/tween.js
18
17
  // ../mappedin-js/@turf/turf
19
18
  // ../mappedin-js/@packages/internal/quad-tree
20
19
  // ../mappedin-js/@packages/internal/outdoor-context-v4
@@ -32,11 +31,11 @@
32
31
 
33
32
  declare module '@mappedin/mappedin-js' {
34
33
  import MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
35
- import type { TEvents, TEventPayload, TClickPayload, THoverPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
34
+ import type { TEvents, TEventPayload, TClickPayload, THoverPayload, TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
36
35
  import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/internal/mvf-utils';
37
36
  import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
38
37
  import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
39
- import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, ParsedMVFLocalePack } from '@mappedin/mvf';
38
+ 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';
40
39
  import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
41
40
  import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
42
41
  import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
@@ -44,7 +43,8 @@ declare module '@mappedin/mappedin-js' {
44
43
  import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
45
44
  import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
46
45
  import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
47
- import type { TBlueDotEvents, TBlueDotAction, TBlueDotState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
46
+ import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
47
+ import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
48
48
  export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
49
49
  /**
50
50
  * Represents all the available antialiasing options.
@@ -358,15 +358,15 @@ declare module '@mappedin/mappedin-js' {
358
358
  export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
359
359
  export const show3dMap: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
360
360
  export { parseMVF, unzipMVF, enableTestMode };
361
- export type { MapView, MapData, MappedinMapLibreOverlay, TBlueDotEvents, TBlueDotAction, TBlueDotState, TEvents, TEventPayload, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, };
361
+ export type { MapView, MapData, MappedinMapLibreOverlay, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, };
362
362
  export type * from 'geojson';
363
- export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, } from '@mappedin/mappedin-js/mappedin-js/src/types';
363
+ 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';
364
364
  export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
365
- export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
365
+ export type { Label, Marker, Path, Shape, CameraTransform, Model, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
366
366
  export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
367
367
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
368
- export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, Node, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
369
- export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
368
+ export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image as ImageData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, Node, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
369
+ export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, StackedMaps, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
370
370
  export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
371
371
  export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
372
372
  }
@@ -630,7 +630,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
630
630
  import type { Label, Marker, Model, Path } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
631
631
  import type { CameraTransform } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform';
632
632
  import type { TBlueDotEvents } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot';
633
- export type TFloorChangeReason = '' | 'blue-dot-floor-change' | 'elevation-change';
633
+ import type { TDirectionInstruction } from '@mappedin/mappedin-js/mappedin-js/src/types';
634
+ import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src';
635
+ export type TFloorChangeReason = '' | 'blue-dot-floor-change' | 'stacked-maps-elevation-change' | 'navigation-connection-click';
634
636
  export type TClickPayload = {
635
637
  /**
636
638
  * The coordinate of the interaction.
@@ -733,6 +735,25 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
733
735
  * Emitted when the Blue Dot encounters an error.
734
736
  */
735
737
  'blue-dot-error': TBlueDotEvents['error'];
738
+ /**
739
+ * Emitted when the Blue Dot's follow mode changes.
740
+ */
741
+ 'blue-dot-follow-change': TBlueDotEvents['follow-change'];
742
+ /**
743
+ * Emitted when a navigation connection is clicked.
744
+ */
745
+ 'navigation-connection-click': {
746
+ fromFloor?: Floor;
747
+ toFloor: Floor;
748
+ instruction: TDirectionInstruction;
749
+ };
750
+ /**
751
+ * Emitted when the active path changes.
752
+ */
753
+ 'navigation-active-path-change': {
754
+ directions: Directions;
755
+ path: Path;
756
+ };
736
757
  } & TStackedMapsEvents;
737
758
  export type TEventPayload<EventName extends keyof TEvents> = TEvents[EventName] extends {
738
759
  data: null;
@@ -957,7 +978,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
957
978
  changeLanguage(languageCode: string): Promise<void>;
958
979
  getDirectionsMultiDestination: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | (TNavigationTarget | TNavigationTarget[])[], opt?: TGetDirectionsOptions) => Directions | Directions[] | undefined;
959
980
  getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | (TNavigationTarget | TNavigationTarget[])[], opt?: TGetDirectionsOptions & {
960
- multiSegment?: true;
981
+ multiDestination?: true;
961
982
  }) => Directions | Directions[] | undefined;
962
983
  getDistance(from: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node | EnterpriseLocation, to: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node | EnterpriseLocation): number;
963
984
  toJSONBundle({ downloadLanguagePacks, }?: {
@@ -991,7 +1012,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
991
1012
  import type { Label, Marker, Image, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
992
1013
  import type { TEventPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
993
1014
  import type { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
994
- import type { TShowStackOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
1015
+ import type { StackedMaps, TCollapseOptions, TExpandOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
995
1016
  import type { InspectorOption } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/inspector/inspector';
996
1017
  export class MapView extends PubSub<TEvents> {
997
1018
  #private;
@@ -1045,6 +1066,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
1045
1066
  * Controls for the outdoor map.
1046
1067
  */
1047
1068
  Outdoor: Outdoor;
1069
+ /**
1070
+ * Controls for the stacked maps.
1071
+ */
1072
+ get StackedMaps(): StackedMaps;
1048
1073
  /**
1049
1074
  * @internal
1050
1075
  */
@@ -1084,15 +1109,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
1084
1109
  /**
1085
1110
  * @experimental
1086
1111
  */
1087
- expand(opts?: {
1088
- excludeFloors: Floor[];
1089
- }): Promise<void> | undefined;
1090
- showStack(opts?: TShowStackOptions): Promise<void> | undefined;
1112
+ expand(opts?: TExpandOptions): Promise<void> | undefined;
1091
1113
  /**
1092
1114
  * @experimental
1093
1115
  * @hidden
1094
1116
  */
1095
- collapse(): Promise<void> | undefined;
1117
+ collapse(opts?: TCollapseOptions): Promise<void> | undefined;
1096
1118
  /**
1097
1119
  * Adds a map to the MapView.
1098
1120
  * @param mapData The map data to add.
@@ -1104,7 +1126,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
1104
1126
  * Sets the current floor ({@link Floor}) of the map.
1105
1127
  * @param floor The floor or floor ID to set.
1106
1128
  */
1107
- setFloor(floor: Floor | string): Promise<void> | undefined;
1129
+ setFloor(floor: Floor | string): void;
1108
1130
  /**
1109
1131
  * The current floor ({@link Floor}) of the map.
1110
1132
  */
@@ -1269,6 +1291,7 @@ declare module '@mappedin/mappedin-js/geojson/src' {
1269
1291
  export type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
1270
1292
  export type { AttributionControlOptions, AttributionPosition } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
1271
1293
  export { ATTRIBUTION_POSITIONS } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
1294
+ export { ANIMATION_TWEENS } from '@mappedin/mappedin-js/geojson/src/camera';
1272
1295
  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, };
1273
1296
  export function createRenderer(container: HTMLElement, options?: RendererCoreOptions & {
1274
1297
  [key: string]: any;
@@ -1308,9 +1331,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1308
1331
  import type { Feature, MultiPolygon, Polygon } from 'geojson';
1309
1332
  import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation, EnterpriseLocation, Node } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
1310
1333
  import type { Label, Marker, Model, Image, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
1311
- import type { EasingCurve } from '@mappedin/core-sdk/src/camera';
1312
1334
  import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
1313
- import type { InsetPaddingOption } from '@mappedin/mappedin-js/geojson/src';
1335
+ import { type InsetPaddingOption, Position } from '@mappedin/core-sdk';
1314
1336
  export type DeepRequired<T> = Required<{
1315
1337
  [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
1316
1338
  }>;
@@ -1449,9 +1471,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1449
1471
  */
1450
1472
  visible: boolean;
1451
1473
  };
1452
- /**
1453
- * @interface
1454
- */
1455
1474
  export type TDoorsState = {
1456
1475
  type: 'doors';
1457
1476
  /**
@@ -1495,8 +1514,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1495
1514
  rank: TCollisionRankingTier | 'initial';
1496
1515
  /**
1497
1516
  * Whether the marker is interactive.
1517
+ * `true` indicates that the marker will be registered in the SDK interaction events.
1518
+ * `'pointer-events-auto'` indicates that the marker will receive browser pointer events.
1498
1519
  */
1499
- interactive: boolean;
1520
+ interactive: boolean | 'pointer-events-auto';
1500
1521
  /**
1501
1522
  * Whether the marker is enabled.
1502
1523
  */
@@ -1595,8 +1616,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1595
1616
  */
1596
1617
  export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS ? Partial<TDoorsState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Shape ? Partial<Omit<TShapeState, 'height' | 'type'>> : T extends Door ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
1597
1618
  export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
1598
- export type TGetEntityState<T> = T extends WALLS ? TWallsState : T extends DOORS ? TDoorsState : T extends Marker ? TMarkerState : T extends Shape ? TShapeState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Image ? TImageState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
1599
- export type TGetState<T> = TGetEntityState<T> | undefined;
1619
+ export type TGetState<T> = T extends WALLS ? TWallsState | undefined : T extends DOORS ? TDoorsState | undefined : T extends Marker ? TMarkerState | undefined : T extends Shape ? TShapeState | undefined : T extends Model ? TModelState | undefined : T extends Label ? TLabelState | undefined : T extends Image ? TImageState | undefined : T extends Space | MapObject ? TGeometryState | undefined : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
1600
1620
  /**
1601
1621
  * Options for {@link Camera} animations on the map.
1602
1622
  */
@@ -1608,7 +1628,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1608
1628
  /**
1609
1629
  * Easing function to use for the animation.
1610
1630
  */
1611
- easing?: EasingCurve;
1631
+ easing?: TEasingFunction;
1612
1632
  };
1613
1633
  /**
1614
1634
  * Options for controlling animations on the map.
@@ -1623,7 +1643,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1623
1643
  * Easing function to use for the animation.
1624
1644
  * @default 'ease-in-out'
1625
1645
  */
1626
- easing?: EasingCurve;
1646
+ easing?: TEasingFunction;
1627
1647
  };
1628
1648
  /**
1629
1649
  * Types of easing for animations.
@@ -1664,16 +1684,28 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1664
1684
  */
1665
1685
  pitch?: number;
1666
1686
  /**
1667
- * Screen offsets for the camera focus.
1687
+ * Axis aligned padding to add to the bounding box in meters.
1668
1688
  */
1689
+ axisAlignedPadding?: {
1690
+ /**
1691
+ * Vertical padding to add to the bounding box in meters along the elevation axis.
1692
+ */
1693
+ vertical?: number;
1694
+ };
1669
1695
  screenOffsets?: InsetPaddingOption;
1670
1696
  };
1671
- export type TCameraFocusOnTargets = Floor | Space | Coordinate | MapObject | Connection | PointOfInterest | Door | Annotation | Node;
1672
1697
  /**
1673
- * Defines the target for the {@link Camera} focus operation.
1674
- * @interface
1698
+ * A map element that can be focused on by the camera.
1675
1699
  */
1676
- export type TCameraFocusOnTarget = TCameraFocusOnTargets | TCameraFocusOnTargets[];
1700
+ export type TFocusable = Floor | Space | Coordinate | MapObject | Connection | PointOfInterest | Door | Annotation | Node
1701
+ /**
1702
+ * @experimental
1703
+ */
1704
+ | Position;
1705
+ /**
1706
+ * Defines the target(s) for the {@link Camera.focusOn} animation.
1707
+ */
1708
+ export type TCameraFocusOnTarget = TFocusable | TFocusable[];
1677
1709
  /**
1678
1710
  * Defines the target for camera operations.
1679
1711
  */
@@ -1956,7 +1988,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1956
1988
  * | 'top' | Anchors the marker at the top, ideal for marking locations from above. |
1957
1989
  * | 'left' | Anchors the marker on the left side, useful for when space is limited on the right.|
1958
1990
  * | 'bottom' | Anchors the marker at the bottom, suitable for hanging markers or when space is limited above.|
1959
- * | 'right' | Anchors the marker on the right side, convenient for when space is limited on the left.|
1991
+ * | 'top-left' | Anchors the marker at the top-left corner. |
1992
+ * | 'top-right' | Anchors the marker at the top-right corner. |
1993
+ * | 'bottom-left' | Anchors the marker at the bottom-left corner. |
1994
+ * | 'bottom-right' | Anchors the marker at the bottom-right corner. |
1960
1995
  *
1961
1996
  */
1962
1997
  export type TMarkerAnchor = 'center' | 'top' | 'left' | 'bottom' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
@@ -2039,14 +2074,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2039
2074
  */
2040
2075
  scale?: [number, number, number];
2041
2076
  /**
2042
- * Whether the {@link } should be clickable
2077
+ * Whether the Model should be clickable
2043
2078
  * @default false
2044
2079
  */
2045
2080
  interactive?: boolean;
2046
2081
  };
2047
2082
  /**
2048
2083
  * Options for controlling the behavior of a {@link Model}.
2049
- * @interface
2050
2084
  */
2051
2085
  export type TAddModelOptions = {
2052
2086
  /**
@@ -2055,8 +2089,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2055
2089
  url: string;
2056
2090
  };
2057
2091
  /**
2058
- * Options for controlling the behavior of a {@link Marker}.
2059
- * @interface
2092
+ * Options for controlling the behavior of an {@link Image}.
2060
2093
  */
2061
2094
  export type TAddImageOptions = {
2062
2095
  /**
@@ -2092,7 +2125,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2092
2125
  };
2093
2126
  /**
2094
2127
  * Options for controlling the behavior of a {@link Marker}.
2095
- * @interface
2096
2128
  */
2097
2129
  export type TAddMarkerOptions = {
2098
2130
  /**
@@ -2101,15 +2133,21 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2101
2133
  */
2102
2134
  rank?: TCollisionRankingTier;
2103
2135
  /**
2104
- * Optional. Specifies the anchor point of the marker, determining its position relative to its coordinates.
2105
- * For the possible values and their descriptions, see {@link TMarkerAnchor}
2136
+ * Optional. Specifies the anchor point of the marker, determining its position relative to its coordinates.
2137
+ * If a list is provided, the marker will be anchored to the first anchor point that is available.
2138
+ *
2139
+ * The active anchor will be exposed as a DOM attribute `data-anchor` on the marker element.
2140
+ *
2141
+ * For the possible values and their descriptions, see {@link TMarkerAnchor}.
2106
2142
  */
2107
2143
  anchor?: TMarkerAnchor | TMarkerAnchor[];
2108
2144
  /**
2109
- * Whether the {@link Marker} should be clickable
2145
+ * Whether the {@link Marker} should be clickable.
2146
+ * If `true` the marker will be registered in the SDK interaction events.
2147
+ * If `'pointer-events-auto'` the marker will receive browser pointer events.
2110
2148
  * @default false
2111
2149
  */
2112
- interactive?: boolean;
2150
+ interactive?: boolean | 'pointer-events-auto';
2113
2151
  /**
2114
2152
  * Optional layer to attach the {@link Marker} to.
2115
2153
  */
@@ -2122,6 +2160,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2122
2160
  * Dynamic resize of the marker. If set to true, the marker will resize based on the content.
2123
2161
  */
2124
2162
  dynamicResize?: boolean;
2163
+ /**
2164
+ * Whether the marker should stop event propagation.
2165
+ * @internal
2166
+ * @default false
2167
+ */
2168
+ stopPropagation?: boolean;
2125
2169
  };
2126
2170
  /**
2127
2171
  * Options for creating a new {@link Label} with {@link Labels.add}.
@@ -2260,7 +2304,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2260
2304
  }
2261
2305
 
2262
2306
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
2263
- import type { RendererCore } from '@mappedin/core-sdk';
2307
+ import type { EasingCurve, RendererCore } from '@mappedin/core-sdk';
2264
2308
  import { PubSub } from '@packages/internal/common';
2265
2309
  import { Coordinate, type Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2266
2310
  import type { TBlueDotOptions, TBlueDotPositionUpdate } from '@mappedin/mappedin-js/mappedin-js/src/types';
@@ -2296,7 +2340,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-
2296
2340
  * Emitted when the Blue Dot's following state changes.
2297
2341
  */
2298
2342
  'follow-change': {
2343
+ /**
2344
+ * Whether the Blue Dot is following the user.
2345
+ */
2299
2346
  following: boolean;
2347
+ /**
2348
+ * The mode the Blue Dot is following the user in.
2349
+ */
2350
+ mode?: TFollowMode;
2300
2351
  };
2301
2352
  };
2302
2353
  export type TBlueDotState = 'hidden' | 'active' | 'inactive' | 'disabled';
@@ -2304,11 +2355,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-
2304
2355
  export type TBlueDotPositionUpdateWithFloor = Omit<TBlueDotPositionUpdate, 'floorOrFloorId'> & {
2305
2356
  floor?: Floor | 'device' | undefined;
2306
2357
  };
2358
+ /**
2359
+ * @experimental
2360
+ */
2307
2361
  export class BlueDot extends PubSub<TBlueDotEvents> {
2308
2362
  #private;
2309
2363
  state: TBlueDotState;
2364
+ following: boolean;
2310
2365
  /**
2311
- * The direction the user is facing in degrees from north.
2366
+ * The direction the user is facing in degrees from north clockwise.
2367
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates/heading
2312
2368
  */
2313
2369
  get heading(): GeolocationPosition['coords']['heading'] | undefined;
2314
2370
  /**
@@ -2355,7 +2411,48 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-
2355
2411
  * ```
2356
2412
  */
2357
2413
  update(position: GeolocationPositionExtended | TBlueDotPositionUpdate | undefined): void;
2414
+ /**
2415
+ * Sets the camera to follow the Blue Dot's position as it updates. User interaction will cancel following automatically.
2416
+ */
2417
+ follow: (mode: TFollowMode, cameraOptions?: TFollowCameraOptions) => void;
2358
2418
  }
2419
+ export type TFollowMode =
2420
+ /** Camera follows only the position of the Blue Dot. Bearing is not updated. */
2421
+ 'position-only'
2422
+ /** Camera follows both position and heading of the Blue Dot. */
2423
+ | 'position-and-heading'
2424
+ /** Camera follows position and automatically rotates to match the direction of the navigation path */
2425
+ | 'position-and-path-direction'
2426
+ /** Disables follow mode */
2427
+ | false;
2428
+ export type TFollowCameraOptions = {
2429
+ /**
2430
+ * @default 21
2431
+ */
2432
+ zoomLevel?: number;
2433
+ /**
2434
+ * @default 45
2435
+ */
2436
+ pitch?: number;
2437
+ /**
2438
+ * Camera bearing in degrees clockwise from North. 0 is North, 90 is East, 180 is South, 270 is West.
2439
+ * This option is only available in 'position-only' mode. In all other modes, the bearing will be calculated automatically.
2440
+ * @default undefined
2441
+ */
2442
+ bearing?: number;
2443
+ /**
2444
+ * @default undefined
2445
+ */
2446
+ elevation?: number;
2447
+ /**
2448
+ * @default 1000
2449
+ */
2450
+ duration?: number;
2451
+ /**
2452
+ * @default 'ease-in-out'
2453
+ */
2454
+ easing?: EasingCurve;
2455
+ };
2359
2456
  type TStateTransitions = {
2360
2457
  [Action in TBlueDotAction]?: TBlueDotState;
2361
2458
  };
@@ -2373,6 +2470,106 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-
2373
2470
  export {};
2374
2471
  }
2375
2472
 
2473
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
2474
+ import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
2475
+ import { PubSub } from '@packages/internal/common';
2476
+ import { type Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2477
+ import { type TCameraAnimationOptions } from '@mappedin/mappedin-js/mappedin-js/src';
2478
+ export const GAP_BELOW_FLOORS = 50;
2479
+ export const DURATION = 1000;
2480
+ export type TStackedMapsState =
2481
+ /**
2482
+ * Expands the floor stack.
2483
+ */
2484
+ 'expanded'
2485
+ /**
2486
+ * Collapses the floor stack.
2487
+ */
2488
+ | 'collapsed';
2489
+ export type TStackedMapsEvents = {
2490
+ 'stacked-maps-state-change': {
2491
+ state: TStackedMapsState;
2492
+ };
2493
+ };
2494
+ export type TExpandOptions = TCameraAnimationOptions & {
2495
+ /**
2496
+ * The floors to include in the stack.
2497
+ */
2498
+ includedFloors?: Floor[];
2499
+ /**
2500
+ * The distance between floors in the stack in meters.
2501
+ */
2502
+ distanceBetweenFloors?: number;
2503
+ /**
2504
+ * The pan mode to use when animating the camera.
2505
+ * @default 'elevation'
2506
+ */
2507
+ cameraPanMode?: 'default' | 'elevation';
2508
+ /**
2509
+ * Whether to change the floor on elevation changes.
2510
+ * @default true
2511
+ */
2512
+ changeFloorOnElevationChanges?: boolean;
2513
+ };
2514
+ export type TCollapseOptions = TCameraAnimationOptions;
2515
+ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
2516
+ /**
2517
+ * @experimental
2518
+ */
2519
+ export class StackedMaps extends PubSub<TStackedMapsEvents> {
2520
+ #private;
2521
+ get state(): TStackedMapsState;
2522
+ /**
2523
+ * @internal
2524
+ */
2525
+ constructor({ currentMapGetter }: {
2526
+ currentMapGetter: CurrentMapGetter;
2527
+ });
2528
+ /**
2529
+ * Whether the floor stack is expanded.
2530
+ */
2531
+ get expanded(): boolean;
2532
+ /**
2533
+ * The distance between floors in the stack in meters.
2534
+ */
2535
+ get gapBelowFloors(): number;
2536
+ /**
2537
+ * The factor of the expanded floor stack. 0 is collapsed, 1 is fully expanded.
2538
+ */
2539
+ expandedFactor: number;
2540
+ /**
2541
+ * The floors included in the stack.
2542
+ */
2543
+ get includedFloors(): Floor[];
2544
+ /**
2545
+ * The visibility mode for the stacked maps. 'all-floors' will show all floors, 'only-current-floor' will only show the current floor in the stack.
2546
+ * @default 'all-floors'
2547
+ */
2548
+ get floorVisibilityMode(): "all-floors" | "only-current-floor";
2549
+ /**
2550
+ * Set the visibility mode for the stacked maps.
2551
+ * @param mode The visibility mode to set. Either `all-floors` or `only-current-floor`.
2552
+ */
2553
+ setFloorVisiblityMode(mode: 'all-floors' | 'only-current-floor'): void;
2554
+ /**
2555
+ * Set whether to listen to camera elevation changes to automatically change the floor.
2556
+ */
2557
+ changeFloorOnElevationChanges(value: boolean): void;
2558
+ /**
2559
+ * Expand the floor stack.
2560
+ * @param opts Optional settings for the expansion.
2561
+ */
2562
+ expand(opts?: TExpandOptions): Promise<void>;
2563
+ /**
2564
+ * Collapse the floor stack.
2565
+ * @param opts Optional settings for the collapse.
2566
+ */
2567
+ collapse(opts?: TCollapseOptions): Promise<void>;
2568
+ destroy(): void;
2569
+ }
2570
+ export {};
2571
+ }
2572
+
2376
2573
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects' {
2377
2574
  export { Label } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label';
2378
2575
  export { Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker';
@@ -2393,6 +2590,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
2393
2590
  * Options for navigation.
2394
2591
  */
2395
2592
  export type TNavigationOptions = {
2593
+ /**
2594
+ * Controls whether the map should be set to the floor of the connection point when a connection point is clicked.
2595
+ * @default true
2596
+ */
2597
+ setMapOnConnectionClick?: boolean;
2396
2598
  /**
2397
2599
  * Controls whether markers are created for the departure, destination, and connection points.
2398
2600
  */
@@ -2413,15 +2615,61 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
2413
2615
  */
2414
2616
  connection?: boolean | ((instruction: TDirectionInstruction) => Marker);
2415
2617
  };
2618
+ /**
2619
+ * Path Options for the non-current path in multi-destination mode.
2620
+ */
2621
+ inactivePathOptions?: {
2622
+ /**
2623
+ * Duration in milliseconds for the path to be drawn.
2624
+ * @default 1000
2625
+ */
2626
+ drawDuration?: number;
2627
+ /**
2628
+ * The color of the path.
2629
+ * @default '#40A9FF'
2630
+ */
2631
+ color?: string;
2632
+ /**
2633
+ * Whether the path should be clickable.
2634
+ *
2635
+ * @defaultValue false
2636
+ */
2637
+ interactive?: boolean;
2638
+ /**
2639
+ * The accent color of the path. This is applied to arrows if they are displayed
2640
+ * @default 'blue'
2641
+ */
2642
+ accentColor?: string;
2643
+ /**
2644
+ * The radius of the path near the markers.
2645
+ * @default 0.25
2646
+ */
2647
+ nearRadius?: number;
2648
+ /**
2649
+ * The radius of the path far from the markers.
2650
+ * @default 1
2651
+ */
2652
+ farRadius?: number;
2653
+ /**
2654
+ * Controls whether arrows are displayed on the path.
2655
+ * @default false
2656
+ */
2657
+ displayArrowsOnPath?: boolean;
2658
+ /**
2659
+ * Controls whether arrows are animated.
2660
+ * @default false
2661
+ */
2662
+ animateArrowsOnPath?: boolean;
2663
+ };
2416
2664
  /**
2417
2665
  * Options for the path.
2418
2666
  */
2419
2667
  pathOptions?: {
2420
2668
  /**
2421
- * duration in milliseconds for the path to be drawn
2422
- * @default
2669
+ * Duration in milliseconds for the path to be drawn.
2670
+ * @default 1000
2423
2671
  */
2424
- drawDuration: number;
2672
+ drawDuration?: number;
2425
2673
  /**
2426
2674
  * The color of the path.
2427
2675
  * @default '#40A9FF'
@@ -2503,16 +2751,40 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
2503
2751
  instruction: TDirectionInstruction;
2504
2752
  marker: Marker;
2505
2753
  } | undefined;
2754
+ /**
2755
+ * @internal
2756
+ */
2757
+ get paths(): Path[];
2758
+ /**
2759
+ * The currently active directions.
2760
+ */
2761
+ get activeDirections(): Directions | undefined;
2762
+ /**
2763
+ * The currently active path.
2764
+ */
2765
+ get activePath(): Path | undefined;
2766
+ /**
2767
+ * Sets the active path by index.
2768
+ */
2769
+ setActivePathByIndex(target: number): void;
2770
+ /**
2771
+ * Sets the active path.
2772
+ */
2773
+ setActivePath(target: Path): void;
2774
+ /**
2775
+ * Sets the active path by directions.
2776
+ */
2777
+ setActivePathByDirections(target: Directions): void;
2506
2778
  /**
2507
2779
  * Draws the specified directions on the map.
2508
2780
  * @param directions The directions to be drawn.
2509
2781
  * @param options Optional additional options for the navigation.
2510
2782
  */
2511
- draw: (directions: Directions | Directions[], options?: TNavigationOptions) => Promise<unknown>;
2783
+ draw(directions: Directions | Directions[], options?: TNavigationOptions): Promise<unknown>;
2512
2784
  /**
2513
2785
  * Clears any drawn navigation paths or directions from the map.
2514
2786
  */
2515
- clear: () => void;
2787
+ clear(): void;
2516
2788
  }
2517
2789
  type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
2518
2790
  export {};
@@ -2527,11 +2799,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
2527
2799
  export { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
2528
2800
  export { Models } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models';
2529
2801
  export { Paths } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths';
2802
+ export { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation/index';
2530
2803
  export { Exporter } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter';
2531
2804
  export { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions';
2532
2805
  export { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
2533
2806
  export { default as Outdoor } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
2534
2807
  export { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
2808
+ export { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
2535
2809
  }
2536
2810
 
2537
2811
  declare module '@mappedin/mappedin-js/mappedin-js/src/search' {
@@ -2831,43 +3105,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions' {
2831
3105
  }
2832
3106
  }
2833
3107
 
2834
- declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
2835
- import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
2836
- import type { RendererCore } from '@mappedin/core-sdk';
2837
- import TWEEN from '@tweenjs/tween.js';
2838
- import { PubSub } from '@packages/internal/common';
2839
- import type { TFocusOnOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
2840
- export const GAP_BELOW_FLOORS = 50;
2841
- export const DURATION = 1000;
2842
- export type TStackedMapsEvents = {
2843
- expanded: void;
2844
- collapsed: void;
2845
- };
2846
- export type TShowStackOptions = {
2847
- numFloors?: number;
2848
- cameraOptions?: TFocusOnOptions;
2849
- };
2850
- export class StackedMaps extends PubSub<TStackedMapsEvents> {
2851
- #private;
2852
- constructor(api: GeojsonApiMapObject, core: RendererCore);
2853
- percentExpanded: number;
2854
- animateToCurrentFloorTween: TWEEN.Tween | null;
2855
- expanded: boolean;
2856
- handlePreRender: () => void;
2857
- handleUserInteractionStart: () => void;
2858
- handleUserInteractionEnd: () => void;
2859
- animateToCurrentFloor(): Promise<void>;
2860
- expand(opts?: {
2861
- excludeFloorIds: string[];
2862
- }): Promise<void>;
2863
- collapse(): Promise<void>;
2864
- showStack(opts?: TShowStackOptions): Promise<void>;
2865
- animate(direction: 'expand' | 'collapse', options?: {
2866
- duration: number;
2867
- }): Promise<void>;
2868
- }
2869
- }
2870
-
2871
3108
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform' {
2872
3109
  import type { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
2873
3110
  /**
@@ -2910,303 +3147,427 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-tr
2910
3147
 
2911
3148
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot' {
2912
3149
  export { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
2913
- export type { TBlueDotEvents } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
3150
+ export type { TBlueDotEvents, GeolocationPositionExtended, TFollowCameraOptions, TFollowMode } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
2914
3151
  }
2915
3152
 
2916
- declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
2917
- import type { NodeCollection } from '@mappedin/mvf';
2918
- import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
2919
- import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2920
- import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
2921
- import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
3153
+ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3154
+ import MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
3155
+ import type { TEvents, TEventPayload, TClickPayload, THoverPayload, TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
3156
+ import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/internal/mvf-utils';
3157
+ import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
3158
+ import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3159
+ 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';
3160
+ import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
3161
+ import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
3162
+ import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
3163
+ export type { PubSub } from '@packages/internal/common/pubsub';
3164
+ import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
3165
+ import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
3166
+ import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
3167
+ import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
3168
+ import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
3169
+ export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
2922
3170
  /**
2923
- * A class representing {@link Path} node data within the map.
2924
- *
2925
- * Nodes are used to define points in the map's pathfinding graph.
2926
- *
2927
- * @internal
3171
+ * Represents all the available antialiasing options.
2928
3172
  */
2929
- class Node extends BaseMapData {
2930
- #private;
3173
+ type TAntialiasingOptions = {
2931
3174
  /**
2932
- * @internal
3175
+ * Enable antialiasing. Only works when device supports WebGL2.
3176
+ *
3177
+ * @default true
2933
3178
  */
2934
- static readonly __type = "node";
3179
+ enabled?: boolean;
2935
3180
  /**
2936
- * @internal
3181
+ * Change the quality of antialiasing in the scene. Greater quality means less noise, but worse performance.
3182
+ *
3183
+ * @default 'medium'
2937
3184
  */
2938
- readonly __type = "node";
3185
+ quality?: 'low' | 'medium' | 'high' | 'ultra';
3186
+ };
3187
+ /**
3188
+ * Represents all the available ambient occlusion options.
3189
+ */
3190
+ type TAmbientOcclusionOptions = {
2939
3191
  /**
2940
- * Checks if the provided instance is of type Node.
3192
+ * Enable ambient occlusion. Only works in single buffer mode and when device supports WebGL2.
2941
3193
  *
2942
- * @param instance The instance to check.
2943
- * @returns {boolean} True if the instance is a Node, false otherwise.
3194
+ * @default false
2944
3195
  */
2945
- static is(instance: object): instance is Node;
3196
+ enabled?: boolean;
2946
3197
  /**
2947
- * @internal
2948
- */
2949
- constructor(data: MapDataInternal, options: {
2950
- floorId: string;
2951
- mvfData: NodeCollection['features'][number];
2952
- });
2953
- get locations(): EnterpriseLocation[];
2954
- /**
2955
- * Gets the {@link Floor} associated with the node.
3198
+ * Change the quality of ambient occlusion in the scene. Greater quality means less noise, but worse performance.
2956
3199
  *
2957
- * @returns {Floor} The floor object.
2958
- * @throws Will throw an error if the floor is not found.
3200
+ * The quality modes are as follows:
3201
+
3202
+ *Temporal stability refers to how consistent the AO is from frame to frame - it's important for a smooth experience.*
3203
+ | Quality Mode | AO Samples | Denoise Samples | Denoise Radius | Best For
3204
+ |:---:|:---:|:---:|:---:|:---:|
3205
+ | Performance (Less temporal stability, a bit noisy) | 8 | 4 | 12 | Mobile, Low-end iGPUs and laptops |
3206
+ | Low (Temporally stable, but low-frequency noise) | 16 | 4 | 12 | High-End Mobile, iGPUs, laptops |
3207
+ | Medium (Temporally stable and barely any noise) | 16 | 8 | 12 | High-End Mobile, laptops, desktops |
3208
+ | High (Significantly sharper AO, barely any noise) | 64 | 8 | 6 | Desktops, dedicated GPUs |
3209
+ | Ultra (Sharp AO, No visible noise whatsoever) | 64 | 16 | 6 | Desktops, dedicated GPUs|
3210
+
3211
+ Generally, half-res mode at "Ultra" quality is slightly slower than full-res mode at "Performance" quality, but produces significantly better results.
3212
+
3213
+ If you wish to make entirely custom quality setup, you can manually change `aoSamples`, `denoiseSamples` and `denoiseRadius`.
3214
+ *
3215
+ * @default 'medium'
2959
3216
  */
2960
- get floor(): Floor;
3217
+ quality?: 'performance' | 'low' | 'medium' | 'high' | 'ultra';
3218
+ samples?: number;
2961
3219
  /**
2962
- * Gets the {@link Coordinate} of the node.
2963
- *
2964
- * @returns {Coordinate} The node's coordinate.
3220
+ * Controls the radius/size of the ambient occlusion in world units. Should be set to how far you want the occlusion to extend from a given object.
3221
+ * Set it too low, and AO becomes an edge detector. Too high, and the AO becomes "soft" and might not highlight the details you want.
2965
3222
  */
2966
- get coordinate(): Coordinate;
3223
+ radius?: number;
3224
+ denoiseSamples?: number;
3225
+ denoiseRadius?: number;
2967
3226
  /**
2968
- * Gets the external ID of the node.
2969
- *
2970
- * @returns {string} The external ID of the node.
3227
+ * A purely artistic control for the intensity of the AO has the effect of darkening areas with more ambient occlusion.
3228
+ * Useful to make the effect more pronounced. An intensity of 2 generally produces soft ambient occlusion that isn't too noticeable,
3229
+ * whereas one of 5 produces heavily prominent ambient occlusion.
2971
3230
  */
2972
- get externalId(): string;
3231
+ intensity?: number;
3232
+ denoiseIterations?: number;
3233
+ renderMode?: number;
2973
3234
  /**
2974
- * Gets the neighboring nodes of this node.
3235
+ * The color of the ambient occlusion. By default, it is black, but it can be changed to any color to offer a crude approximation of global illumination.
3236
+ * Recommended in scenes where bounced light has a uniform "color", for instance a scene that is predominantly lit by a blue sky.
3237
+ * The color is expected to be in the sRGB color space, and is automatically converted to linear space for you. Keep the color pretty dark for sensible results.
2975
3238
  *
2976
- * @returns {Node[]} An array of neighboring Node objects.
3239
+ * Color formats:\
3240
+ * RGB String: `rgb(255, 0, 0)` or `rgb(100%, 0%, 0%)`\
3241
+ * HSL String: `hsl(0, 100%, 50%)`\
3242
+ * X11 color name - all 140 color names are supported. Note the lack of CamelCase in the name: `skyblue`
2977
3243
  */
2978
- get neighbors(): Node[];
3244
+ color?: string;
2979
3245
  /**
2980
- * Serializes the node data to JSON.
2981
- *
2982
- * @returns An object representing the node.
3246
+ * Should be automatically set to the correct value. If you are getting washed out colors, try setting `gammaCorrection` to false, and if you are getting dark colors, try setting it to true.
2983
3247
  */
2984
- toJSON(): {
2985
- id: string;
2986
- floor: string;
2987
- coordinate: {
2988
- latitude: number;
2989
- longitude: number;
2990
- floor: string | undefined;
2991
- };
2992
- neighbors: string[];
2993
- };
3248
+ gammaCorrection?: boolean;
3249
+ logarithmicDepthBuffer?: boolean;
2994
3250
  /**
2995
- * Cleans up resources used by the instance.
2996
- *
2997
- * @internal
3251
+ * When screenSpaceRadius is set to true, the `aoRadius` parameter represents the size of the ambient occlusion effect in pixels (recommended to be set between 16 and 64).
3252
+ * The `distanceFalloff` parameter becomes a ratio, representing the percent of the screen space radius at which the AO should fade away - it should be set to 0.2 in most cases,
3253
+ * but it accepts any value between 0 and 1 (technically even higher than 1, though that is not recommended).
2998
3254
  */
2999
- destroy(): void;
3000
- }
3001
- export default Node;
3002
- }
3003
-
3004
- declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
3005
- import type { EntranceCollection, Image } from '@mappedin/mvf';
3006
- import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
3007
- import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
3008
- import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3009
- import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
3255
+ screenSpaceRadius?: boolean;
3256
+ /**
3257
+ * Use half-resolution" mode for performance-critical applications. This will cause the AO to be calculated at half the resolution of the screen, and then upscaled to the full resolution.
3258
+ * This is a great way to get a performance boost (generally 2x-4x) at the cost of some quality (the AO will lack fine details and temporal stability will be slightly reduced).
3259
+ * @default 'full'
3260
+ */
3261
+ resolution?: 'half' | 'full';
3262
+ /**
3263
+ * The half `aoResolution` mode uses depth-aware upscaling by default.
3264
+ * The AO effect looks bad without depth-aware upscaling, so it is not recommended to disable it.
3265
+ * However, if performance is truly that critical, you can do so by setting `depthAwareUpsampling` to false.
3266
+ */
3267
+ depthAwareUpsampling?: boolean;
3268
+ /**
3269
+ * It is recommended to not change this value, otherwise rendering issues may occur.
3270
+ */
3271
+ autoRenderBeauty?: boolean;
3272
+ };
3010
3273
  /**
3011
- * A class representing door data within the map.
3274
+ * @interface
3275
+ * Options for the watermark.
3276
+ */
3277
+ export type TWatermarkOptions = Omit<WatermarkOptions, 'visible'>;
3278
+ /**
3279
+ * Options for showing a 3D map.
3012
3280
  *
3013
- * This class provides details and operations related to a door.
3281
+ * @experimental
3014
3282
  */
3015
- class Door extends BaseMapData {
3016
- #private;
3283
+ type TShow3DMapOptions = {
3017
3284
  /**
3018
- * @internal
3285
+ * The outdoor view options.
3019
3286
  */
3020
- static readonly __type = "door";
3287
+ outdoorView?: {
3288
+ /**
3289
+ * The token is used to fetch outdoor tiles, which will then be rendered.
3290
+ */
3291
+ token?: string;
3292
+ /**
3293
+ * A url to a style specification conforming to the [Maplibre Style Spec](https://maplibre.org/maplibre-style-spec/).
3294
+ * Use the {@link Environment | `environment`} setting to switch environments.
3295
+ */
3296
+ style?: string;
3297
+ /**
3298
+ * Enable or disable the outdoor view.
3299
+ */
3300
+ enabled?: boolean;
3301
+ /**
3302
+ * Layers that should be hidden by geometry. This is useful when you want to hide certain layers when they are below the geometry.
3303
+ * @default ['building', 'building-top']
3304
+ */
3305
+ layersHiddenByGeometry?: string[];
3306
+ };
3021
3307
  /**
3022
- * @internal
3308
+ * The initial bearing of the map, in degrees.
3309
+ *
3310
+ * @default 0
3023
3311
  */
3024
- readonly __type = "door";
3312
+ bearing?: number;
3025
3313
  /**
3026
- * Checks if the provided instance is of type Door.
3314
+ * The initial pitch of the map, in degrees.
3027
3315
  *
3028
- * @param instance The instance to check.
3029
- * @returns {boolean} True if the instance is a Door, false otherwise.
3316
+ * @default 45
3030
3317
  */
3031
- static is(instance: object): instance is Door;
3318
+ pitch?: number;
3032
3319
  /**
3033
- * @internal
3320
+ * The initial zoom level of the map, in mercator zoom levels.
3321
+ * If it is not specified, it will default to the level that fits the map bounds.
3034
3322
  */
3035
- constructor(data: MapDataInternal, options: {
3036
- floorId: string;
3037
- mvfData: EntranceCollection['features'][number];
3038
- });
3323
+ zoomLevel?: number;
3039
3324
  /**
3040
- * Gets the name of the door.
3325
+ * Whether or not to automatically add labels and interactivity to the map. Set to
3326
+ * false if you need finer control over what is labelled or interactive.
3041
3327
  *
3042
- * @returns {string} The name of the door.
3328
+ * @hidden
3329
+ * @default true
3043
3330
  */
3044
- get name(): string;
3331
+ auto?: boolean;
3045
3332
  /**
3046
- * Gets the external ID of the door.
3333
+ * Antialiasing settings.
3047
3334
  *
3048
- * @returns {string} The external ID of the door.
3335
+ * TODO: Maybe we don't expose all of these settings.
3336
+ * @hidden
3337
+ * @default true
3049
3338
  */
3050
- get externalId(): string;
3051
- get description(): string;
3052
- get images(): Image[];
3339
+ antialiasing?: boolean | TAntialiasingOptions;
3053
3340
  /**
3054
- * Gets the {@link Floor} object associated with the door.
3341
+ * @experimental
3055
3342
  *
3056
- * @returns {Floor} The floor object.
3057
- * @throws Will throw an error if the floor is not found.
3343
+ * Enable debug mode to check the visual representation of performance stats.
3344
+ * @default false
3058
3345
  */
3059
- get floor(): Floor;
3346
+ debug?: boolean;
3060
3347
  /**
3061
- * Calculates and gets the center {@link Coordinate} of the door.
3348
+ * Options when showing the watermark.
3062
3349
  *
3063
- * @returns {Coordinate} The center coordinate.
3064
- */
3065
- get center(): Coordinate;
3066
- /**
3067
- * Gets whether this door is an exterior door.
3350
+ * @hidden
3068
3351
  */
3069
- get isExterior(): boolean;
3352
+ watermark?: TWatermarkOptions;
3070
3353
  /**
3071
- * Converts the door information to a JSON object.
3354
+ * Options for the attribution control.
3072
3355
  *
3073
- * @returns An object representing the door.
3356
+ * @hidden
3074
3357
  */
3075
- toJSON(): {
3076
- id: string;
3077
- name: string;
3078
- floor: string;
3079
- center: {
3080
- latitude: number;
3081
- longitude: number;
3082
- floor: string | undefined;
3083
- };
3358
+ attribution?: {
3359
+ /**
3360
+ * Custom attribution content.
3361
+ */
3362
+ custom?: string[];
3363
+ /**
3364
+ * Attribution position.
3365
+ * @default 'bottom-right'
3366
+ */
3367
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
3084
3368
  };
3085
3369
  /**
3086
- * Cleans up resources used by the instance.
3087
- *
3088
- * @internal
3370
+ * First floor to be rendered.
3371
+ * By default, floor with the elevation that's closest to 0 is rendered. All floors will be sorted by elevation in ascending order.
3089
3372
  */
3090
- destroy(): void;
3091
- }
3092
- export default Door;
3093
- }
3094
-
3095
- declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
3096
- import type { Image, SpaceCollection } from '@mappedin/mvf';
3097
- import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
3098
- import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3099
- import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
3100
- import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
3101
- import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
3102
- /**
3103
- * Represents the various types of spaces that can be defined within a map.
3104
- * - 'room': A standard room or enclosed area.
3105
- * - 'hallway': A passageway connecting rooms.
3106
- * - 'exterior': An outdoor area.
3107
- * - 'void': An undefined or non-specific space.
3108
- * - 'connection.stairs': A stairway connecting different floors.
3109
- * - 'connection.elevator': An elevator connecting different floors.
3110
- * - 'poi': A point of interest within the map.
3111
- */
3112
- export type TSpaceType = 'room' | 'hallway' | 'exterior' | 'void' | 'connection.stairs' | 'connection.elevator' | 'poi';
3113
- /**
3114
- * A class representing space data within the map.
3115
- *
3116
- * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
3373
+ initialFloor?: Floor | string;
3374
+ /**
3375
+ * Enable shading of bottoms of geometry along with outlines to make geometry stand out.
3376
+ * @default true
3377
+ * @deprecated Use `style.shading`.
3378
+ */
3379
+ shadingAndOutlines?: boolean;
3380
+ /**
3381
+ * Specify a color for the top of wall geometry.
3382
+ * @deprecated Use `style.wallTopColor`.
3383
+ */
3384
+ wallTopColor?: string;
3385
+ /**
3386
+ * Style options for the map.
3387
+ * @experimental
3388
+ */
3389
+ style?: {
3390
+ /**
3391
+ * Background color. Only relevant if outdoor map is disabled.
3392
+ */
3393
+ backgroundColor?: string;
3394
+ /**
3395
+ * Background alpha value. Only relevant if outdoor map is disabled.
3396
+ */
3397
+ backgroundAlpha?: number;
3398
+ /**
3399
+ * Set the global shading for all elements. True will use default values, false will disable shading.
3400
+ * @default true
3401
+ */
3402
+ shading?: boolean | Shading;
3403
+ /**
3404
+ * Set the global outlines for all elements. True will enable outlines, false will disable them.
3405
+ * @default true
3406
+ */
3407
+ outlines?: boolean;
3408
+ /**
3409
+ * Specify a color for the top of wall geometry.
3410
+ */
3411
+ wallTopColor?: string;
3412
+ };
3413
+ };
3414
+ /**
3415
+ * @internal
3416
+ * @deprecated Use {@link hydrateMapData} instead.
3417
+ *
3418
+ * Returns a {@link MapData} instance from a parsed MVF object.
3117
3419
  */
3118
- class Space extends BaseMapData {
3420
+ export const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions & {
3421
+ languagePacks?: LanguagePackHydrationItem[];
3422
+ }) => Promise<MapData>;
3423
+ /**
3424
+ * @internal
3425
+ * @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
3426
+ */
3427
+ export function setUseEnterpriseAPI(value: boolean): void;
3428
+ export type THydrateMapDataBundle = {
3429
+ type: 'binary';
3430
+ options?: {
3431
+ enterprise?: boolean;
3432
+ };
3433
+ languagePacks?: {
3434
+ language: {
3435
+ code: string;
3436
+ name: string;
3437
+ };
3438
+ localePack: Uint8Array;
3439
+ }[];
3440
+ main: Uint8Array;
3441
+ } | {
3442
+ type: 'json';
3443
+ options?: {
3444
+ enterprise?: boolean;
3445
+ };
3446
+ languagePacks?: {
3447
+ language: {
3448
+ code: string;
3449
+ name: string;
3450
+ };
3451
+ localePack: ParsedMVFLocalePack;
3452
+ }[];
3453
+ main: TMVF;
3454
+ };
3455
+ /**
3456
+ * Load a MapData instance from a backup including language packs. Pass in userOptions to ensure outdoor view is available.
3457
+ */
3458
+ export const hydrateMapData: (backup: THydrateMapDataBundle | TMVF, userOptions?: TGetMapDataOptions) => Promise<MapData>;
3459
+ /**
3460
+ * Asynchronously retrieves map data ({@link MapData}) based on user-provided options.
3461
+ *
3462
+ * @experimental
3463
+ * @param userOptions {TGetMapDataOptions} Options provided by the user to retrieve map data.
3464
+ * @returns {Promise<MapData>} Promise resolving to the MapData.
3465
+ * @example
3466
+ * const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
3467
+ */
3468
+ export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
3469
+ /**
3470
+ * @internal
3471
+ * @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
3472
+ */
3473
+ export const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
3474
+ /**
3475
+ * Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
3476
+ * @experimental
3477
+ */
3478
+ export const createMapLibreOverlay: (mapData: MapData, showMapOptions?: TShow3DMapOptions) => MappedinMapLibreOverlay;
3479
+ export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
3480
+ export const show3dMap: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
3481
+ export { parseMVF, unzipMVF, enableTestMode };
3482
+ export type { MapView, MapData, MappedinMapLibreOverlay, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, };
3483
+ export type * from 'geojson';
3484
+ 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';
3485
+ export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
3486
+ export type { Label, Marker, Path, Shape, CameraTransform, Model, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
3487
+ export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
3488
+ export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3489
+ export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image as ImageData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, Node, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3490
+ export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, StackedMaps, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
3491
+ export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
3492
+ export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
3493
+ }
3494
+
3495
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
3496
+ import type { NodeCollection } from '@mappedin/mvf';
3497
+ import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
3498
+ import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3499
+ import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
3500
+ import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
3501
+ /**
3502
+ * A class representing {@link Path} node data within the map.
3503
+ *
3504
+ * Nodes are used to define points in the map's pathfinding graph.
3505
+ *
3506
+ */
3507
+ class Node extends BaseMapData {
3119
3508
  #private;
3120
3509
  /**
3121
3510
  * @internal
3122
3511
  */
3123
- static readonly __type = "space";
3512
+ static readonly __type = "node";
3124
3513
  /**
3125
3514
  * @internal
3126
3515
  */
3127
- readonly __type = "space";
3516
+ readonly __type = "node";
3128
3517
  /**
3129
- * Checks if the provided instance is of type Space.
3518
+ * Checks if the provided instance is of type Node.
3130
3519
  *
3131
3520
  * @param instance The instance to check.
3132
- * @returns {boolean} True if the instance is a Space, false otherwise.
3521
+ * @returns {boolean} True if the instance is a Node, false otherwise.
3133
3522
  */
3134
- static is(instance: object): instance is Space;
3523
+ static is(instance: object): instance is Node;
3135
3524
  /**
3136
3525
  * @internal
3137
3526
  */
3138
3527
  constructor(data: MapDataInternal, options: {
3139
3528
  floorId: string;
3140
- mvfData: SpaceCollection['features'][number];
3529
+ mvfData: NodeCollection['features'][number];
3141
3530
  });
3142
- /**
3143
- * Gets the name of the space.
3144
- *
3145
- * @returns {string} The name of the space.
3146
- */
3147
- get name(): string;
3148
- /**
3149
- * Gets the type/kind of the space.
3150
- *
3151
- * @returns {TSpaceType} The type of the space.
3152
- */
3153
- get type(): TSpaceType;
3154
- /**
3155
- * Gets the description of the space.
3156
- *
3157
- * @returns {string} The description of the space, or an empty string if no description exists.
3158
- */
3159
- get description(): string;
3160
- /**
3161
- * Gets the array of images associated with the space.
3162
- *
3163
- * @returns {Image[]} An array of Image objects, or an empty array if no images exist.
3164
- */
3165
- get images(): Image[];
3166
- /**
3167
- * Gets the external identifier of the space.
3168
- *
3169
- * @returns {string} The external ID of the space, or an empty string if no external ID exists.
3170
- */
3171
- get externalId(): string;
3172
- /**
3173
- * @internal
3174
- */
3175
3531
  get locations(): EnterpriseLocation[];
3176
3532
  /**
3177
- * Gets the {@link Floor} object associated with the space.
3533
+ * Gets the {@link Floor} associated with the node.
3178
3534
  *
3179
3535
  * @returns {Floor} The floor object.
3180
3536
  * @throws Will throw an error if the floor is not found.
3181
3537
  */
3182
3538
  get floor(): Floor;
3183
3539
  /**
3184
- * Gets the array of {@link Door}s associated with the space.
3540
+ * Gets the {@link Coordinate} of the node.
3185
3541
  *
3186
- * @returns {Door[]} The doors array.
3542
+ * @returns {Coordinate} The node's coordinate.
3187
3543
  */
3188
- get doors(): Door[];
3544
+ get coordinate(): Coordinate;
3189
3545
  /**
3190
- * Gets the center {@link Coordinate} of the space.
3546
+ * Gets the external ID of the node.
3191
3547
  *
3192
- * @returns {Coordinate} The space's center coordinate.
3548
+ * @returns {string} The external ID of the node.
3193
3549
  */
3194
- get center(): Coordinate;
3550
+ get externalId(): string;
3195
3551
  /**
3196
- * Serializes the space data to JSON.
3552
+ * Gets the neighboring nodes of this node.
3197
3553
  *
3198
- * @returns An object representing the space.
3554
+ * @returns {Node[]} An array of neighboring Node objects.
3555
+ */
3556
+ get neighbors(): Node[];
3557
+ /**
3558
+ * Serializes the node data to JSON.
3559
+ *
3560
+ * @returns An object representing the node.
3199
3561
  */
3200
3562
  toJSON(): {
3201
3563
  id: string;
3202
- name: string;
3203
- type: TSpaceType;
3204
3564
  floor: string;
3205
- center: {
3565
+ coordinate: {
3206
3566
  latitude: number;
3207
3567
  longitude: number;
3208
3568
  floor: string | undefined;
3209
3569
  };
3570
+ neighbors: string[];
3210
3571
  };
3211
3572
  /**
3212
3573
  * Cleans up resources used by the instance.
@@ -3215,64 +3576,281 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
3215
3576
  */
3216
3577
  destroy(): void;
3217
3578
  }
3218
- export const VALID_SPACE_TYPES: TSpaceType[];
3219
- /**
3220
- * validates space type and fallback to room
3221
- */
3222
- export function validateSpaceType(input: string | null | undefined): TSpaceType;
3223
- export default Space;
3579
+ export default Node;
3224
3580
  }
3225
3581
 
3226
- declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
3227
- import type { FloorProperties as MVFFloor } from '@mappedin/mvf';
3228
- import type { Annotation, Connection, Door, MapDataInternal, PointOfInterest, Space, MapObject, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3582
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
3583
+ import type { EntranceCollection, Image } from '@mappedin/mvf';
3584
+ import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
3585
+ import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
3586
+ import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3229
3587
  import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
3230
3588
  /**
3231
- * A class representing floor data within the map.
3589
+ * A class representing door data within the map.
3232
3590
  *
3233
- * Floors are used to represent different levels within a map, each containing various map elements.
3591
+ * This class provides details and operations related to a door.
3234
3592
  */
3235
- class Floor extends BaseMapData {
3593
+ class Door extends BaseMapData {
3236
3594
  #private;
3237
3595
  /**
3238
3596
  * @internal
3239
3597
  */
3240
- static readonly __type = "floor";
3598
+ static readonly __type = "door";
3241
3599
  /**
3242
3600
  * @internal
3243
3601
  */
3244
- readonly __type = "floor";
3602
+ readonly __type = "door";
3245
3603
  /**
3246
- * Checks if the provided instance is of type Floor.
3604
+ * Checks if the provided instance is of type Door.
3247
3605
  *
3248
3606
  * @param instance The instance to check.
3249
- * @returns {boolean} True if the instance is a Floor, false otherwise.
3607
+ * @returns {boolean} True if the instance is a Door, false otherwise.
3250
3608
  */
3251
- static is(instance: object): instance is Floor;
3609
+ static is(instance: object): instance is Door;
3252
3610
  /**
3253
3611
  * @internal
3254
3612
  */
3255
3613
  constructor(data: MapDataInternal, options: {
3256
- mvfData: MVFFloor;
3614
+ floorId: string;
3615
+ mvfData: EntranceCollection['features'][number];
3257
3616
  });
3258
3617
  /**
3259
- * Gets the name of the floor.
3618
+ * Gets the name of the door.
3260
3619
  *
3261
- * @returns {string} The name of the floor.
3620
+ * @returns {string} The name of the door.
3262
3621
  */
3263
3622
  get name(): string;
3264
3623
  /**
3265
- * Gets the external ID of the floor.
3624
+ * Gets the external ID of the door.
3266
3625
  *
3267
- * @returns {string} The external ID of the floor.
3626
+ * @returns {string} The external ID of the door.
3268
3627
  */
3269
3628
  get externalId(): string;
3629
+ get description(): string;
3630
+ get images(): Image[];
3270
3631
  /**
3271
- * Gets the elevation of the floor.
3632
+ * Gets the {@link Floor} object associated with the door.
3272
3633
  *
3273
- * @returns {number} The elevation of the floor.
3634
+ * @returns {Floor} The floor object.
3635
+ * @throws Will throw an error if the floor is not found.
3274
3636
  */
3275
- get elevation(): number;
3637
+ get floor(): Floor;
3638
+ /**
3639
+ * Calculates and gets the center {@link Coordinate} of the door.
3640
+ *
3641
+ * @returns {Coordinate} The center coordinate.
3642
+ */
3643
+ get center(): Coordinate;
3644
+ /**
3645
+ * Gets whether this door is an exterior door.
3646
+ */
3647
+ get isExterior(): boolean;
3648
+ /**
3649
+ * Converts the door information to a JSON object.
3650
+ *
3651
+ * @returns An object representing the door.
3652
+ */
3653
+ toJSON(): {
3654
+ id: string;
3655
+ name: string;
3656
+ floor: string;
3657
+ center: {
3658
+ latitude: number;
3659
+ longitude: number;
3660
+ floor: string | undefined;
3661
+ };
3662
+ };
3663
+ /**
3664
+ * Cleans up resources used by the instance.
3665
+ *
3666
+ * @internal
3667
+ */
3668
+ destroy(): void;
3669
+ }
3670
+ export default Door;
3671
+ }
3672
+
3673
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
3674
+ import type { Image, SpaceCollection } from '@mappedin/mvf';
3675
+ import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
3676
+ import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3677
+ import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
3678
+ import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
3679
+ import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
3680
+ /**
3681
+ * Represents the various types of spaces that can be defined within a map.
3682
+ * - 'room': A standard room or enclosed area.
3683
+ * - 'hallway': A passageway connecting rooms.
3684
+ * - 'exterior': An outdoor area.
3685
+ * - 'void': An undefined or non-specific space.
3686
+ * - 'connection.stairs': A stairway connecting different floors.
3687
+ * - 'connection.elevator': An elevator connecting different floors.
3688
+ * - 'poi': A point of interest within the map.
3689
+ */
3690
+ export type TSpaceType = 'room' | 'hallway' | 'exterior' | 'void' | 'connection.stairs' | 'connection.elevator' | 'poi';
3691
+ /**
3692
+ * A class representing space data within the map.
3693
+ *
3694
+ * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
3695
+ */
3696
+ class Space extends BaseMapData {
3697
+ #private;
3698
+ /**
3699
+ * @internal
3700
+ */
3701
+ static readonly __type = "space";
3702
+ /**
3703
+ * @internal
3704
+ */
3705
+ readonly __type = "space";
3706
+ /**
3707
+ * Checks if the provided instance is of type Space.
3708
+ *
3709
+ * @param instance The instance to check.
3710
+ * @returns {boolean} True if the instance is a Space, false otherwise.
3711
+ */
3712
+ static is(instance: object): instance is Space;
3713
+ /**
3714
+ * @internal
3715
+ */
3716
+ constructor(data: MapDataInternal, options: {
3717
+ floorId: string;
3718
+ mvfData: SpaceCollection['features'][number];
3719
+ });
3720
+ /**
3721
+ * Gets the name of the space.
3722
+ *
3723
+ * @returns {string} The name of the space.
3724
+ */
3725
+ get name(): string;
3726
+ /**
3727
+ * Gets the type/kind of the space.
3728
+ *
3729
+ * @returns {TSpaceType} The type of the space.
3730
+ */
3731
+ get type(): TSpaceType;
3732
+ /**
3733
+ * Gets the description of the space.
3734
+ *
3735
+ * @returns {string} The description of the space, or an empty string if no description exists.
3736
+ */
3737
+ get description(): string;
3738
+ /**
3739
+ * Gets the array of images associated with the space.
3740
+ *
3741
+ * @returns {Image[]} An array of Image objects, or an empty array if no images exist.
3742
+ */
3743
+ get images(): Image[];
3744
+ /**
3745
+ * Gets the external identifier of the space.
3746
+ *
3747
+ * @returns {string} The external ID of the space, or an empty string if no external ID exists.
3748
+ */
3749
+ get externalId(): string;
3750
+ /**
3751
+ * @internal
3752
+ */
3753
+ get locations(): EnterpriseLocation[];
3754
+ /**
3755
+ * Gets the {@link Floor} object associated with the space.
3756
+ *
3757
+ * @returns {Floor} The floor object.
3758
+ * @throws Will throw an error if the floor is not found.
3759
+ */
3760
+ get floor(): Floor;
3761
+ /**
3762
+ * Gets the array of {@link Door}s associated with the space.
3763
+ *
3764
+ * @returns {Door[]} The doors array.
3765
+ */
3766
+ get doors(): Door[];
3767
+ /**
3768
+ * Gets the center {@link Coordinate} of the space.
3769
+ *
3770
+ * @returns {Coordinate} The space's center coordinate.
3771
+ */
3772
+ get center(): Coordinate;
3773
+ /**
3774
+ * Serializes the space data to JSON.
3775
+ *
3776
+ * @returns An object representing the space.
3777
+ */
3778
+ toJSON(): {
3779
+ id: string;
3780
+ name: string;
3781
+ type: TSpaceType;
3782
+ floor: string;
3783
+ center: {
3784
+ latitude: number;
3785
+ longitude: number;
3786
+ floor: string | undefined;
3787
+ };
3788
+ };
3789
+ /**
3790
+ * Cleans up resources used by the instance.
3791
+ *
3792
+ * @internal
3793
+ */
3794
+ destroy(): void;
3795
+ }
3796
+ export const VALID_SPACE_TYPES: TSpaceType[];
3797
+ /**
3798
+ * validates space type and fallback to room
3799
+ */
3800
+ export function validateSpaceType(input: string | null | undefined): TSpaceType;
3801
+ export default Space;
3802
+ }
3803
+
3804
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
3805
+ import type { FloorProperties as MVFFloor } from '@mappedin/mvf';
3806
+ import type { Annotation, Connection, Door, MapDataInternal, PointOfInterest, Space, MapObject, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3807
+ import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
3808
+ /**
3809
+ * A class representing floor data within the map.
3810
+ *
3811
+ * Floors are used to represent different levels within a map, each containing various map elements.
3812
+ */
3813
+ class Floor extends BaseMapData {
3814
+ #private;
3815
+ /**
3816
+ * @internal
3817
+ */
3818
+ static readonly __type = "floor";
3819
+ /**
3820
+ * @internal
3821
+ */
3822
+ readonly __type = "floor";
3823
+ /**
3824
+ * Checks if the provided instance is of type Floor.
3825
+ *
3826
+ * @param instance The instance to check.
3827
+ * @returns {boolean} True if the instance is a Floor, false otherwise.
3828
+ */
3829
+ static is(instance: object): instance is Floor;
3830
+ /**
3831
+ * @internal
3832
+ */
3833
+ constructor(data: MapDataInternal, options: {
3834
+ mvfData: MVFFloor;
3835
+ });
3836
+ /**
3837
+ * Gets the name of the floor.
3838
+ *
3839
+ * @returns {string} The name of the floor.
3840
+ */
3841
+ get name(): string;
3842
+ /**
3843
+ * Gets the external ID of the floor.
3844
+ *
3845
+ * @returns {string} The external ID of the floor.
3846
+ */
3847
+ get externalId(): string;
3848
+ /**
3849
+ * Gets the elevation of the floor.
3850
+ *
3851
+ * @returns {number} The elevation of the floor.
3852
+ */
3853
+ get elevation(): number;
3276
3854
  /**
3277
3855
  * Gets the spaces ({@link Space}) located on this floor.
3278
3856
  *
@@ -3344,6 +3922,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
3344
3922
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connection' {
3345
3923
  import type { Feature, FeatureCollection, Image, Point, SpaceProperties, Connection as MVFConnection } from '@mappedin/mvf';
3346
3924
  import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
3925
+ import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
3347
3926
  import type { Floor, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3348
3927
  import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
3349
3928
  /**
@@ -3403,6 +3982,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connectio
3403
3982
  * @returns {Coordinate[]} An array of coordinates for the connection.
3404
3983
  */
3405
3984
  get coordinates(): Coordinate[];
3985
+ /**
3986
+ * Gets the nodes ({@link Node}) associated with the connection.
3987
+ */
3988
+ get nodes(): Node[];
3406
3989
  /**
3407
3990
  * Gets the floors ({@link Floor}) associated with the connection.
3408
3991
  *
@@ -4096,363 +4679,22 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types' {
4096
4679
  optimized: {
4097
4680
  locations: Record<string, LocationWithLocale> | undefined;
4098
4681
  categories: Record<string, CategoryWithLocale> | undefined;
4099
- };
4100
- } | {
4101
- type: 'initial';
4102
- optimized: {
4103
- locations: Record<string, MvfEnterpriseLocation>;
4104
- categories: Record<string, MvfEnterpriseCategory>;
4105
- };
4106
- };
4107
- export type TMapDataInternalOptions = {
4108
- env?: EnvControl;
4109
- enterprise?: boolean;
4110
- outdoorViewToken?: string;
4111
- localePacksUrls?: LocalePackUrls;
4112
- languagePacks?: LanguagePackHydrationItem[];
4113
- binaryBundle?: Uint8Array;
4114
- };
4115
- }
4116
-
4117
- declare module '@mappedin/mappedin-js/mappedin-js/src' {
4118
- import MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
4119
- import type { TEvents, TEventPayload, TClickPayload, THoverPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
4120
- import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/internal/mvf-utils';
4121
- import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
4122
- import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
4123
- import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, ParsedMVFLocalePack } from '@mappedin/mvf';
4124
- import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
4125
- import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
4126
- import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
4127
- export type { PubSub } from '@packages/internal/common/pubsub';
4128
- import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
4129
- import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
4130
- import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
4131
- import type { TBlueDotEvents, TBlueDotAction, TBlueDotState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
4132
- export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
4133
- /**
4134
- * Represents all the available antialiasing options.
4135
- */
4136
- type TAntialiasingOptions = {
4137
- /**
4138
- * Enable antialiasing. Only works when device supports WebGL2.
4139
- *
4140
- * @default true
4141
- */
4142
- enabled?: boolean;
4143
- /**
4144
- * Change the quality of antialiasing in the scene. Greater quality means less noise, but worse performance.
4145
- *
4146
- * @default 'medium'
4147
- */
4148
- quality?: 'low' | 'medium' | 'high' | 'ultra';
4149
- };
4150
- /**
4151
- * Represents all the available ambient occlusion options.
4152
- */
4153
- type TAmbientOcclusionOptions = {
4154
- /**
4155
- * Enable ambient occlusion. Only works in single buffer mode and when device supports WebGL2.
4156
- *
4157
- * @default false
4158
- */
4159
- enabled?: boolean;
4160
- /**
4161
- * Change the quality of ambient occlusion in the scene. Greater quality means less noise, but worse performance.
4162
- *
4163
- * The quality modes are as follows:
4164
-
4165
- *Temporal stability refers to how consistent the AO is from frame to frame - it's important for a smooth experience.*
4166
- | Quality Mode | AO Samples | Denoise Samples | Denoise Radius | Best For
4167
- |:---:|:---:|:---:|:---:|:---:|
4168
- | Performance (Less temporal stability, a bit noisy) | 8 | 4 | 12 | Mobile, Low-end iGPUs and laptops |
4169
- | Low (Temporally stable, but low-frequency noise) | 16 | 4 | 12 | High-End Mobile, iGPUs, laptops |
4170
- | Medium (Temporally stable and barely any noise) | 16 | 8 | 12 | High-End Mobile, laptops, desktops |
4171
- | High (Significantly sharper AO, barely any noise) | 64 | 8 | 6 | Desktops, dedicated GPUs |
4172
- | Ultra (Sharp AO, No visible noise whatsoever) | 64 | 16 | 6 | Desktops, dedicated GPUs|
4173
-
4174
- Generally, half-res mode at "Ultra" quality is slightly slower than full-res mode at "Performance" quality, but produces significantly better results.
4175
-
4176
- If you wish to make entirely custom quality setup, you can manually change `aoSamples`, `denoiseSamples` and `denoiseRadius`.
4177
- *
4178
- * @default 'medium'
4179
- */
4180
- quality?: 'performance' | 'low' | 'medium' | 'high' | 'ultra';
4181
- samples?: number;
4182
- /**
4183
- * Controls the radius/size of the ambient occlusion in world units. Should be set to how far you want the occlusion to extend from a given object.
4184
- * Set it too low, and AO becomes an edge detector. Too high, and the AO becomes "soft" and might not highlight the details you want.
4185
- */
4186
- radius?: number;
4187
- denoiseSamples?: number;
4188
- denoiseRadius?: number;
4189
- /**
4190
- * A purely artistic control for the intensity of the AO has the effect of darkening areas with more ambient occlusion.
4191
- * Useful to make the effect more pronounced. An intensity of 2 generally produces soft ambient occlusion that isn't too noticeable,
4192
- * whereas one of 5 produces heavily prominent ambient occlusion.
4193
- */
4194
- intensity?: number;
4195
- denoiseIterations?: number;
4196
- renderMode?: number;
4197
- /**
4198
- * The color of the ambient occlusion. By default, it is black, but it can be changed to any color to offer a crude approximation of global illumination.
4199
- * Recommended in scenes where bounced light has a uniform "color", for instance a scene that is predominantly lit by a blue sky.
4200
- * The color is expected to be in the sRGB color space, and is automatically converted to linear space for you. Keep the color pretty dark for sensible results.
4201
- *
4202
- * Color formats:\
4203
- * RGB String: `rgb(255, 0, 0)` or `rgb(100%, 0%, 0%)`\
4204
- * HSL String: `hsl(0, 100%, 50%)`\
4205
- * X11 color name - all 140 color names are supported. Note the lack of CamelCase in the name: `skyblue`
4206
- */
4207
- color?: string;
4208
- /**
4209
- * Should be automatically set to the correct value. If you are getting washed out colors, try setting `gammaCorrection` to false, and if you are getting dark colors, try setting it to true.
4210
- */
4211
- gammaCorrection?: boolean;
4212
- logarithmicDepthBuffer?: boolean;
4213
- /**
4214
- * When screenSpaceRadius is set to true, the `aoRadius` parameter represents the size of the ambient occlusion effect in pixels (recommended to be set between 16 and 64).
4215
- * The `distanceFalloff` parameter becomes a ratio, representing the percent of the screen space radius at which the AO should fade away - it should be set to 0.2 in most cases,
4216
- * but it accepts any value between 0 and 1 (technically even higher than 1, though that is not recommended).
4217
- */
4218
- screenSpaceRadius?: boolean;
4219
- /**
4220
- * Use half-resolution" mode for performance-critical applications. This will cause the AO to be calculated at half the resolution of the screen, and then upscaled to the full resolution.
4221
- * This is a great way to get a performance boost (generally 2x-4x) at the cost of some quality (the AO will lack fine details and temporal stability will be slightly reduced).
4222
- * @default 'full'
4223
- */
4224
- resolution?: 'half' | 'full';
4225
- /**
4226
- * The half `aoResolution` mode uses depth-aware upscaling by default.
4227
- * The AO effect looks bad without depth-aware upscaling, so it is not recommended to disable it.
4228
- * However, if performance is truly that critical, you can do so by setting `depthAwareUpsampling` to false.
4229
- */
4230
- depthAwareUpsampling?: boolean;
4231
- /**
4232
- * It is recommended to not change this value, otherwise rendering issues may occur.
4233
- */
4234
- autoRenderBeauty?: boolean;
4235
- };
4236
- /**
4237
- * @interface
4238
- * Options for the watermark.
4239
- */
4240
- export type TWatermarkOptions = Omit<WatermarkOptions, 'visible'>;
4241
- /**
4242
- * Options for showing a 3D map.
4243
- *
4244
- * @experimental
4245
- */
4246
- type TShow3DMapOptions = {
4247
- /**
4248
- * The outdoor view options.
4249
- */
4250
- outdoorView?: {
4251
- /**
4252
- * The token is used to fetch outdoor tiles, which will then be rendered.
4253
- */
4254
- token?: string;
4255
- /**
4256
- * A url to a style specification conforming to the [Maplibre Style Spec](https://maplibre.org/maplibre-style-spec/).
4257
- * Use the {@link Environment | `environment`} setting to switch environments.
4258
- */
4259
- style?: string;
4260
- /**
4261
- * Enable or disable the outdoor view.
4262
- */
4263
- enabled?: boolean;
4264
- /**
4265
- * Layers that should be hidden by geometry. This is useful when you want to hide certain layers when they are below the geometry.
4266
- * @default ['building', 'building-top']
4267
- */
4268
- layersHiddenByGeometry?: string[];
4269
- };
4270
- /**
4271
- * The initial bearing of the map, in degrees.
4272
- *
4273
- * @default 0
4274
- */
4275
- bearing?: number;
4276
- /**
4277
- * The initial pitch of the map, in degrees.
4278
- *
4279
- * @default 45
4280
- */
4281
- pitch?: number;
4282
- /**
4283
- * The initial zoom level of the map, in mercator zoom levels.
4284
- * If it is not specified, it will default to the level that fits the map bounds.
4285
- */
4286
- zoomLevel?: number;
4287
- /**
4288
- * Whether or not to automatically add labels and interactivity to the map. Set to
4289
- * false if you need finer control over what is labelled or interactive.
4290
- *
4291
- * @hidden
4292
- * @default true
4293
- */
4294
- auto?: boolean;
4295
- /**
4296
- * Antialiasing settings.
4297
- *
4298
- * TODO: Maybe we don't expose all of these settings.
4299
- * @hidden
4300
- * @default true
4301
- */
4302
- antialiasing?: boolean | TAntialiasingOptions;
4303
- /**
4304
- * @experimental
4305
- *
4306
- * Enable debug mode to check the visual representation of performance stats.
4307
- * @default false
4308
- */
4309
- debug?: boolean;
4310
- /**
4311
- * Options when showing the watermark.
4312
- *
4313
- * @hidden
4314
- */
4315
- watermark?: TWatermarkOptions;
4316
- /**
4317
- * Options for the attribution control.
4318
- *
4319
- * @hidden
4320
- */
4321
- attribution?: {
4322
- /**
4323
- * Custom attribution content.
4324
- */
4325
- custom?: string[];
4326
- /**
4327
- * Attribution position.
4328
- * @default 'bottom-right'
4329
- */
4330
- position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
4331
- };
4332
- /**
4333
- * First floor to be rendered.
4334
- * By default, floor with the elevation that's closest to 0 is rendered. All floors will be sorted by elevation in ascending order.
4335
- */
4336
- initialFloor?: Floor | string;
4337
- /**
4338
- * Enable shading of bottoms of geometry along with outlines to make geometry stand out.
4339
- * @default true
4340
- * @deprecated Use `style.shading`.
4341
- */
4342
- shadingAndOutlines?: boolean;
4343
- /**
4344
- * Specify a color for the top of wall geometry.
4345
- * @deprecated Use `style.wallTopColor`.
4346
- */
4347
- wallTopColor?: string;
4348
- /**
4349
- * Style options for the map.
4350
- * @experimental
4351
- */
4352
- style?: {
4353
- /**
4354
- * Background color. Only relevant if outdoor map is disabled.
4355
- */
4356
- backgroundColor?: string;
4357
- /**
4358
- * Background alpha value. Only relevant if outdoor map is disabled.
4359
- */
4360
- backgroundAlpha?: number;
4361
- /**
4362
- * Set the global shading for all elements. True will use default values, false will disable shading.
4363
- * @default true
4364
- */
4365
- shading?: boolean | Shading;
4366
- /**
4367
- * Set the global outlines for all elements. True will enable outlines, false will disable them.
4368
- * @default true
4369
- */
4370
- outlines?: boolean;
4371
- /**
4372
- * Specify a color for the top of wall geometry.
4373
- */
4374
- wallTopColor?: string;
4375
- };
4376
- };
4377
- /**
4378
- * @internal
4379
- * @deprecated Use {@link hydrateMapData} instead.
4380
- *
4381
- * Returns a {@link MapData} instance from a parsed MVF object.
4382
- */
4383
- export const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions & {
4384
- languagePacks?: LanguagePackHydrationItem[];
4385
- }) => Promise<MapData>;
4386
- /**
4387
- * @internal
4388
- * @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
4389
- */
4390
- export function setUseEnterpriseAPI(value: boolean): void;
4391
- export type THydrateMapDataBundle = {
4392
- type: 'binary';
4393
- options?: {
4394
- enterprise?: boolean;
4395
- };
4396
- languagePacks?: {
4397
- language: {
4398
- code: string;
4399
- name: string;
4400
- };
4401
- localePack: Uint8Array;
4402
- }[];
4403
- main: Uint8Array;
4404
- } | {
4405
- type: 'json';
4406
- options?: {
4407
- enterprise?: boolean;
4408
- };
4409
- languagePacks?: {
4410
- language: {
4411
- code: string;
4412
- name: string;
4413
- };
4414
- localePack: ParsedMVFLocalePack;
4415
- }[];
4416
- main: TMVF;
4417
- };
4418
- /**
4419
- * Load a MapData instance from a backup including language packs. Pass in userOptions to ensure outdoor view is available.
4420
- */
4421
- export const hydrateMapData: (backup: THydrateMapDataBundle | TMVF, userOptions?: TGetMapDataOptions) => Promise<MapData>;
4422
- /**
4423
- * Asynchronously retrieves map data ({@link MapData}) based on user-provided options.
4424
- *
4425
- * @experimental
4426
- * @param userOptions {TGetMapDataOptions} Options provided by the user to retrieve map data.
4427
- * @returns {Promise<MapData>} Promise resolving to the MapData.
4428
- * @example
4429
- * const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
4430
- */
4431
- export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
4432
- /**
4433
- * @internal
4434
- * @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
4435
- */
4436
- export const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
4437
- /**
4438
- * Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
4439
- * @experimental
4440
- */
4441
- export const createMapLibreOverlay: (mapData: MapData, showMapOptions?: TShow3DMapOptions) => MappedinMapLibreOverlay;
4442
- export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
4443
- export const show3dMap: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
4444
- export { parseMVF, unzipMVF, enableTestMode };
4445
- export type { MapView, MapData, MappedinMapLibreOverlay, TBlueDotEvents, TBlueDotAction, TBlueDotState, TEvents, TEventPayload, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, };
4446
- export type * from 'geojson';
4447
- export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, } from '@mappedin/mappedin-js/mappedin-js/src/types';
4448
- export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
4449
- export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
4450
- export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
4451
- export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
4452
- export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, Node, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
4453
- export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
4454
- export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
4455
- export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
4682
+ };
4683
+ } | {
4684
+ type: 'initial';
4685
+ optimized: {
4686
+ locations: Record<string, MvfEnterpriseLocation>;
4687
+ categories: Record<string, MvfEnterpriseCategory>;
4688
+ };
4689
+ };
4690
+ export type TMapDataInternalOptions = {
4691
+ env?: EnvControl;
4692
+ enterprise?: boolean;
4693
+ outdoorViewToken?: string;
4694
+ localePacksUrls?: LocalePackUrls;
4695
+ languagePacks?: LanguagePackHydrationItem[];
4696
+ binaryBundle?: Uint8Array;
4697
+ };
4456
4698
  }
4457
4699
 
4458
4700
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes' {
@@ -4571,30 +4813,30 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
4571
4813
  */
4572
4814
  rank?: CollisionRankingTier | number;
4573
4815
  /**
4574
- * Whether the Label should be clickable via the SDK's internal click event system.
4816
+ * Whether the Marker should be clickable via the SDK's internal click event system.
4575
4817
  *
4576
4818
  * @example
4577
4819
  * ```javascript
4578
- * renderer.on('click', ({ labels }) => {});
4820
+ * renderer.on('click', ({ markers }) => {});
4579
4821
  * ```
4580
4822
  */
4581
- interactive?: boolean;
4823
+ interactive?: boolean | 'pointer-events-auto';
4582
4824
  };
4583
4825
  };
4584
4826
  export const addMarkerOptionsSchema: z.ZodObject<{
4585
4827
  rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
4586
- interactive: z.ZodOptional<z.ZodBoolean>;
4828
+ interactive: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"pointer-events-auto">]>>;
4587
4829
  id: z.ZodOptional<z.ZodString>;
4588
4830
  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">]>>;
4589
4831
  dynamicResize: z.ZodOptional<z.ZodBoolean>;
4590
4832
  }, "strip", z.ZodTypeAny, {
4591
- interactive?: boolean | undefined;
4833
+ interactive?: boolean | "pointer-events-auto" | undefined;
4592
4834
  id?: string | undefined;
4593
4835
  anchor?: "center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
4594
4836
  rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
4595
4837
  dynamicResize?: boolean | undefined;
4596
4838
  }, {
4597
- interactive?: boolean | undefined;
4839
+ interactive?: boolean | "pointer-events-auto" | undefined;
4598
4840
  id?: string | undefined;
4599
4841
  anchor?: "center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
4600
4842
  rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
@@ -4615,9 +4857,11 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
4615
4857
  rank?: CollisionRankingTier;
4616
4858
  /**
4617
4859
  * Whether the Label should be clickable.
4860
+ * If `true` the marker will be registered in the SDK interaction events.
4861
+ * If `'pointer-events-auto'` the marker will receive browser pointer events.
4618
4862
  * @default false
4619
4863
  */
4620
- interactive?: boolean;
4864
+ interactive?: boolean | 'pointer-events-auto';
4621
4865
  /**
4622
4866
  * @internal
4623
4867
  */
@@ -4638,6 +4882,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
4638
4882
  rank: number;
4639
4883
  initialRank: number;
4640
4884
  activeAnchor: MarkerAnchor;
4885
+ pointerEvents: 'auto' | 'none';
4641
4886
  options: Required<AddMarkerOptions>;
4642
4887
  projection: Vector2;
4643
4888
  enabled: boolean;
@@ -4714,6 +4959,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
4714
4959
  * The position of the path in [lon, lat]
4715
4960
  */
4716
4961
  readonly position: Position;
4962
+ /**
4963
+ * The altitude of the geometry, in meters
4964
+ */
4965
+ altitude?: number;
4717
4966
  /**
4718
4967
  * Whether the path is visible.
4719
4968
  */
@@ -5564,6 +5813,7 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
5564
5813
  import type { ImageState } from '@mappedin/mappedin-js/geojson/src/components/image';
5565
5814
  import type { ShapeState } from '@mappedin/mappedin-js/geojson/src/components/custom';
5566
5815
  import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities';
5816
+ import type { Group as TweenGroup } from '@tweenjs/tween.js';
5567
5817
  /**
5568
5818
  * The state of an entity, which can be a geometry, geometry group, group container, path, model, label, or marker.
5569
5819
  */
@@ -5849,16 +6099,20 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
5849
6099
  pixelRatio: number;
5850
6100
  canvasWidth: number;
5851
6101
  canvasHeight: number;
6102
+ /** Global group for all tweens */
6103
+ tweenGroup: TweenGroup;
5852
6104
  };
5853
6105
  }
5854
6106
 
5855
6107
  declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
5856
- import type { Texture, BufferGeometry, LineSegments, Mesh } from 'three';
6108
+ import type { Texture, BufferGeometry, LineSegments, Mesh, Object3D } from 'three';
5857
6109
  import { BatchedMesh, Color, Vector3 } from 'three';
5858
6110
  import type { BatchedStandardMaterial } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material';
5859
6111
  import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
5860
- import type { Feature, LineString, MultiLineString, MultiPolygon, Polygon } from 'geojson';
6112
+ import type { Feature, LineString, MultiLineString, MultiPolygon, Polygon, Position as GeoJsonPosition } from 'geojson';
5861
6113
  import type { BBox } from '@turf/turf';
6114
+ import { type ImageProperties } from '@mappedin/mappedin-js/geojson/src/components/image';
6115
+ import { type BaseTextAreaProperties } from '@mappedin/mvf';
5862
6116
  export class EntityBatchedMesh extends BatchedMesh {
5863
6117
  userData: {
5864
6118
  entities: {
@@ -5867,6 +6121,15 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
5867
6121
  detached?: boolean;
5868
6122
  };
5869
6123
  }
6124
+ export type MeshComponentProperties = {
6125
+ image?: ImageProperties & {
6126
+ position: GeoJsonPosition;
6127
+ path: string;
6128
+ };
6129
+ textArea?: BaseTextAreaProperties & {
6130
+ position: GeoJsonPosition;
6131
+ };
6132
+ };
5870
6133
  /**
5871
6134
  * State representing a Geometry
5872
6135
  */
@@ -5945,15 +6208,16 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
5945
6208
  focusMesh?: Mesh;
5946
6209
  outline?: LineSegments;
5947
6210
  imageMesh?: Mesh;
6211
+ textAreaMesh?: Object3D;
5948
6212
  readonly type = "geometry";
5949
6213
  dirty: boolean;
5950
6214
  detached: boolean;
5951
6215
  instanceIndex: number;
5952
6216
  geometry?: BufferGeometry;
5953
6217
  material?: BatchedStandardMaterial;
5954
- feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>;
6218
+ feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString, MeshComponentProperties>;
5955
6219
  currentHeight: number;
5956
- constructor(feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>);
6220
+ constructor(feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString, MeshComponentProperties>);
5957
6221
  get visible(): boolean;
5958
6222
  set visible(visible: boolean);
5959
6223
  setOpacity(opacity: number): void;
@@ -6346,6 +6610,8 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
6346
6610
  import { MeshDetachmentSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-detachment/system';
6347
6611
  import { MeshModificationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/system';
6348
6612
  import { PreRenderSystem } from '@mappedin/mappedin-js/geojson/src/systems/pre-render/system';
6613
+ import { PolygonLabelSystem } from '@mappedin/mappedin-js/geojson/src/systems/polygon-label/system';
6614
+ import { Group as TweenGroup } from '@tweenjs/tween.js';
6349
6615
  export type * from '@mappedin/mappedin-js/geojson/src/types';
6350
6616
  export const raycaster: Raycaster;
6351
6617
  /**
@@ -6388,6 +6654,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
6388
6654
  meshDetachmentSystem: MeshDetachmentSystem;
6389
6655
  meshModificationSystem: MeshModificationSystem;
6390
6656
  preRenderSystem: PreRenderSystem;
6657
+ polygonLabelSystem: PolygonLabelSystem;
6391
6658
  };
6392
6659
  export type MapViewState = {
6393
6660
  readonly type: 'map-view';
@@ -6603,6 +6870,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
6603
6870
  * @internal for testing
6604
6871
  */
6605
6872
  getInternalState(): RendererState;
6873
+ getTweenGroup(): TweenGroup;
6606
6874
  /**
6607
6875
  * Subscribe a function to an event.
6608
6876
  *
@@ -6655,29 +6923,29 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
6655
6923
  import { type InsetPadding, type Position } from '@mappedin/mappedin-js/geojson/src/types';
6656
6924
  import type { InsetPaddingOption, RendererState, Systems } from '@mappedin/mappedin-js/geojson/src/renderer';
6657
6925
  export type EasingCurve = 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
6658
- export type FocusOnOptions = {
6926
+ export type AnimationOptions = {
6927
+ duration?: number;
6928
+ easing?: EasingCurve;
6929
+ };
6930
+ export type FocusOnOptions = AnimationOptions & {
6659
6931
  bearing?: number;
6660
6932
  pitch?: number;
6661
- duration?: number;
6662
6933
  padding?: InsetPaddingOption;
6663
6934
  minZoomLevel?: number;
6664
6935
  maxZoomLevel?: number;
6665
- easing?: EasingCurve;
6666
6936
  };
6667
- export type AnimateToOptions = {
6937
+ export type AnimateToOptions = AnimationOptions & {
6668
6938
  center?: Position;
6669
6939
  zoomLevel?: number;
6670
6940
  bearing?: number;
6671
6941
  pitch?: number;
6672
6942
  elevation?: number;
6673
- duration?: number;
6674
- easing?: EasingCurve;
6675
6943
  };
6676
6944
  export const ANIMATION_TWEENS: {
6677
- linear: any;
6678
- 'ease-in': any;
6679
- 'ease-out': any;
6680
- 'ease-in-out': any;
6945
+ linear: (amount: number) => number;
6946
+ 'ease-in': (amount: number) => number;
6947
+ 'ease-out': (amount: number) => number;
6948
+ 'ease-in-out': (amount: number) => number;
6681
6949
  };
6682
6950
  export class Camera {
6683
6951
  #private;
@@ -6701,6 +6969,14 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
6701
6969
  * Set the camera's zoom level in mercator zoom level units.
6702
6970
  */
6703
6971
  setZoomLevel(zoomLevel: number): void;
6972
+ /**
6973
+ * Whether the camera is animating.
6974
+ */
6975
+ get isAnimating(): boolean;
6976
+ /**
6977
+ * Cancel the last animation.
6978
+ */
6979
+ cancelAnimation(): void;
6704
6980
  /**
6705
6981
  * How far the camera can zoom in towards the ground
6706
6982
  */
@@ -6774,11 +7050,26 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
6774
7050
  * @param elevation The elevation in meters.
6775
7051
  */
6776
7052
  setElevation(elevation: number): void;
7053
+ /**
7054
+ * Animate the camera's elevation to a new value.
7055
+ * @param elevation The new elevation in meters.
7056
+ * @param options The animation options.
7057
+ */
7058
+ animateElevation(elevation: number, options?: AnimationOptions): Promise<void>;
6777
7059
  /**
6778
7060
  * The padding around the edges of the map when focusing on a set of coordinates.
6779
7061
  */
6780
7062
  get insetsPadding(): InsetPadding;
6781
7063
  /**
7064
+ * The camera's current pan mode.
7065
+ */
7066
+ get panMode(): "elevation" | "default";
7067
+ /**
7068
+ * Set the camera's pan mode. 'elevation' moves the camera up and down, while 'default' allows the camera to pan along the ground.
7069
+ */
7070
+ setPanMode(panMode: 'default' | 'elevation'): void;
7071
+ /**
7072
+ *
6782
7073
  * @param padding The padding around the edges of the map when focusing on a set of coordinates (in screen pixels).
6783
7074
  */
6784
7075
  setInsetPadding(padding: InsetPadding): void;
@@ -6844,33 +7135,33 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
6844
7135
  import type { Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
6845
7136
  import type { Camera } from '@mappedin/mappedin-js/geojson/src/camera';
6846
7137
  export function cartesianToGeographic(centerLat: number, centerLon: number, x: number, y: number): {
6847
- lat: number;
6848
- lon: number;
7138
+ lat: number;
7139
+ lon: number;
6849
7140
  };
6850
7141
  export function geographicToCartesian(centerLat: number, centerLon: number, targetLat: number, targetLon: number): {
6851
- x: number;
6852
- y: number;
7142
+ x: number;
7143
+ y: number;
6853
7144
  };
6854
7145
  export const populateGeometry3DIdsInScene: (tree: any, entities: RendererState["geometry3DIdsInScene"]) => Set<string | number>;
6855
7146
  export const populateGeometry2DIdsInScene: (tree: any, entities: Set<Geometry2D["id"]>) => Set<string | number>;
6856
7147
  export function convertMapLibreStylePaintProps(paint: any): {
6857
- color: any;
6858
- height: any;
6859
- altitude: any;
6860
- opacity: any;
6861
- outline: any;
7148
+ color: any;
7149
+ height: any;
7150
+ altitude: any;
7151
+ opacity: any;
7152
+ outline: any;
6862
7153
  };
6863
7154
  export function convertMapLibreLineStylePaintProps(paint: any): {
6864
- color: any;
6865
- join: any;
6866
- opacity: any;
6867
- width: any;
6868
- cap: any;
7155
+ color: any;
7156
+ join: any;
7157
+ opacity: any;
7158
+ width: any;
7159
+ cap: any;
6869
7160
  };
6870
7161
  export function mergeObjects<T extends Record<string, any>>(obj1: T, obj2: T): T;
6871
7162
  export function createCustomLayer(modelAsMercatorCoordinate: MercatorCoordinate, viewCamera: THREECamera, camera: Camera, onRender: () => void): CustomLayerInterface;
6872
7163
  export function getRequestHeaders(authURL: string): Promise<{
6873
- 'x-mappedin-tiles-key': string;
7164
+ 'x-mappedin-tiles-key': string;
6874
7165
  }>;
6875
7166
  export function cyrb53(str: string, seed?: number): number;
6876
7167
  export const linearEase: (t: number) => number;
@@ -6882,46 +7173,32 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
6882
7173
  /* getProjectionScaleFactor()
6883
7174
  /* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
6884
7175
  /*
6885
- * R
6886
- * /|
6887
- * C : Camera / |
6888
- * PQ : Projection Plane / |
6889
- * OR : Origin / |
6890
- * F : FOV / |
6891
- * Q / |
6892
- * /| |
6893
- * / | |
6894
- * / | |
6895
- * / | |
6896
- * / | |
6897
- * / F/2 | |
6898
- * C ------------P------------ O
6899
- *
6900
- *
6901
- * ProjectionScaleFactor = ( OR / PQ )
6902
- * PQ = canvasHeight / 2
6903
- * CQ = zoom
6904
- *
6905
- * OR / C0 = tan(F/2)
6906
- * so OR = CO * tan(F/2)
6907
- */
7176
+ * R
7177
+ * /|
7178
+ * C : Camera / |
7179
+ * PQ : Projection Plane / |
7180
+ * OR : Origin / |
7181
+ * F : FOV / |
7182
+ * Q / |
7183
+ * /| |
7184
+ * / | |
7185
+ * / | |
7186
+ * / | |
7187
+ * / | |
7188
+ * / F/2 | |
7189
+ * C ------------P------------ O
7190
+ *
7191
+ *
7192
+ * ProjectionScaleFactor = ( OR / PQ )
7193
+ * PQ = canvasHeight / 2
7194
+ * CQ = zoom
7195
+ *
7196
+ * OR / C0 = tan(F/2)
7197
+ * so OR = CO * tan(F/2)
7198
+ */
6908
7199
  export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
6909
7200
  export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3D | GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | undefined;
6910
7201
  export function getBoundingBoxCenter(bbox: Position[]): [number, number];
6911
- export function toRadians(degrees: number): number;
6912
- /**
6913
- * Calculates the approximate distance between two geographic coordinates on Earth's surface.
6914
- *
6915
- * This function uses the equirectangular approximation method to compute the distance, which simplifies
6916
- * the math and speeds up calculations, but is less accurate over long distances compared to other methods
6917
- * like the haversine formula.
6918
- *
6919
- * @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
6920
- * @param {Position} point1 - The second point's longitude and latitude as [longitude, latitude].
6921
- * @return
6922
- * @return {number} The approximate distance between the two points in meters.
6923
- */
6924
- export function haversineDistance(point1: Position, point2: Position): number;
6925
7202
  export { getCornersOfBoundingBox } from '@mappedin/mappedin-js/geojson/src/utils/bounding-box';
6926
7203
  export function isFiniteBox(box: Box2 | Box3): boolean;
6927
7204
  export { getPixelRatio } from '@mappedin/mappedin-js/geojson/src/utils/get-pixel-ratio';
@@ -6932,7 +7209,6 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
6932
7209
  }
6933
7210
 
6934
7211
  declare module '@mappedin/mappedin-js/geojson/src/utils/constants' {
6935
- export const EARTH_RADIUS_M = 6371008.8;
6936
7212
  export const MAPPEDIN_LAYER_ID = "mappedin";
6937
7213
  export enum ENTITY_3D_LAYERS {
6938
7214
  DEFAULT = 0,
@@ -7156,7 +7432,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7156
7432
  import { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
7157
7433
  import { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
7158
7434
  import Outdoor from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
7159
- import type { TShowStackOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
7160
7435
  export class GeoJsonApi {
7161
7436
  core: RendererCore;
7162
7437
  outdoors: GeojsonApiMapObject;
@@ -7165,6 +7440,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7165
7440
  mapDataExternal: {
7166
7441
  [key in string]: MapData;
7167
7442
  };
7443
+ mapData?: MapData;
7168
7444
  currentMap?: GeojsonApiMapObject;
7169
7445
  hiddenOutdoorGeometries: [Position, layer: string[]][];
7170
7446
  mapView: MapView;
@@ -7180,18 +7456,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7180
7456
  Shapes: Shapes;
7181
7457
  Style: Style;
7182
7458
  Images: Images;
7459
+ get StackedMaps(): import("..").StackedMaps;
7183
7460
  constructor(rendererCore: RendererCore, mapView: MapView);
7184
7461
  updateState<T extends Space | MapObject | Label | Shape | Marker | Door | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
7185
7462
  update: () => void;
7186
7463
  getMapDataInternal(): MapDataInternal | undefined;
7187
7464
  getMapData(): MapData | undefined;
7188
- expand(opts?: {
7189
- excludeFloors: Floor[];
7190
- }): Promise<void> | undefined;
7191
- collapse(): Promise<void> | undefined;
7192
- showStack(opts?: TShowStackOptions): Promise<void> | undefined;
7193
7465
  addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
7194
- setFloor(floor: Floor | string, reason?: TFloorChangeReason): Promise<void> | undefined;
7466
+ setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
7195
7467
  updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
7196
7468
  get currentFloor(): Floor;
7197
7469
  getState<T extends Space | MapObject | Label | Marker | Shape | Model | Image | string>(target: T): TGetState<T> | undefined;
@@ -7210,7 +7482,106 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7210
7482
  }
7211
7483
  }
7212
7484
 
7485
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
7486
+ import type { ParsedMVF } from '@mappedin/mvf';
7487
+ import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
7488
+ import { PubSub } from '@packages/internal/common';
7489
+ import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
7490
+ import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
7491
+ import type { Coordinate, Directions, Floor, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
7492
+ import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, TDirectionInstruction } from '@mappedin/mappedin-js/mappedin-js/src/types';
7493
+ import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
7494
+ import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
7495
+ import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
7496
+ import type { Path, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
7497
+ import type { Space, Door, PointOfInterest, MapObject, Node } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7498
+ import { type GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
7499
+ export class GeojsonApiMapObject extends PubSub<{
7500
+ 'floor-change': {
7501
+ reason?: TFloorChangeReason;
7502
+ floorId: string;
7503
+ };
7504
+ 'floor-change-start': {
7505
+ floorId: string;
7506
+ };
7507
+ 'navigation-connection-click': {
7508
+ fromFloor?: Floor;
7509
+ toFloor: Floor;
7510
+ instruction: TDirectionInstruction;
7511
+ };
7512
+ 'navigation-active-path-change': {
7513
+ directions: Directions;
7514
+ path: Path;
7515
+ };
7516
+ }> {
7517
+ /** Floors sorted in order of elevation */
7518
+ floors: FloorObject[];
7519
+ /** Map of floors by elevation. Floor elevation does not always match index or is not always contiguous. */
7520
+ floorsByElevation: Map<number, FloorObject>;
7521
+ currentFloorId: string;
7522
+ id: string;
7523
+ renderer: RendererCore;
7524
+ api: GeoJsonApi;
7525
+ mvf: ParsedMVF;
7526
+ styleMap: AggregatedStyleMap;
7527
+ StackedMaps: StackedMaps;
7528
+ get currentFloor(): FloorObject;
7529
+ setFloor(floorId: string, reason?: TFloorChangeReason): void;
7530
+ Models: {
7531
+ add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
7532
+ floorId?: string;
7533
+ }) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
7534
+ remove: (_id: string, _groupId: string) => void;
7535
+ };
7536
+ Images: {
7537
+ add: (target: Position, url: string, opts: TAddImageOptions & {
7538
+ floorId?: string;
7539
+ }) => EntityId<import("../../../geojson/src/components/image").ImageState> | undefined;
7540
+ remove: (id: string) => void;
7541
+ removeAll: () => void;
7542
+ };
7543
+ Markers: {
7544
+ add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions) => EntityId<MarkerState> | undefined;
7545
+ remove: (id: string) => void;
7546
+ getContentEl: (id: string) => HTMLElement | undefined;
7547
+ removeAll: () => void;
7548
+ setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
7549
+ animateTo: (id: string, coordinate: Position, targetFloorId: string, options?: TAnimationOptions) => Promise<void>;
7550
+ };
7551
+ Exporter: {
7552
+ getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
7553
+ };
7554
+ Shapes: {
7555
+ add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
7556
+ floorId?: string;
7557
+ }) => string;
7558
+ remove: (customGeometry: Shape) => string;
7559
+ };
7560
+ Labels: {
7561
+ all: ({ onCreate, }: {
7562
+ onCreate: (labelId: string | number, text: string, target: Space | Door | Coordinate | PointOfInterest | MapObject | Node) => void;
7563
+ }) => void;
7564
+ add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
7565
+ floorId?: string;
7566
+ }) => {
7567
+ id: string | number;
7568
+ };
7569
+ remove: (targetId: string) => void;
7570
+ removeAll: () => void;
7571
+ };
7572
+ Paths: {
7573
+ add: (coordinates: Coordinate[], options?: TAddPathOptions) => {
7574
+ paths: EntityId<PathState>[];
7575
+ animation: Promise<void>;
7576
+ };
7577
+ remove: (entityIds: string[]) => void;
7578
+ };
7579
+ constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, api: GeoJsonApi);
7580
+ }
7581
+ }
7582
+
7213
7583
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
7584
+ import type { Coordinate, Door, MapObject, Node, PointOfInterest, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7214
7585
  /**
7215
7586
  * Class representing a label on the {@link MapView}.
7216
7587
  *
@@ -7221,7 +7592,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
7221
7592
  * The label's id
7222
7593
  */
7223
7594
  readonly id: string;
7224
- readonly text: any;
7595
+ readonly text: string;
7596
+ readonly target: Space | Door | Coordinate | PointOfInterest | MapObject | Node;
7225
7597
  /**
7226
7598
  * @internal
7227
7599
  */
@@ -7240,11 +7612,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
7240
7612
  /**
7241
7613
  * @internal
7242
7614
  */
7243
- constructor(id: string, text: string);
7615
+ constructor(id: string, text: string, target: Space | Door | Coordinate | PointOfInterest | MapObject | Node);
7244
7616
  }
7245
7617
  }
7246
7618
 
7247
7619
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
7620
+ import type { Coordinate, Door, Node, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7248
7621
  /**
7249
7622
  * Class representing a marker on the {@link MapView}.
7250
7623
  *
@@ -7259,6 +7632,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
7259
7632
  * @internal
7260
7633
  */
7261
7634
  static readonly __type = "Marker";
7635
+ readonly target: Space | Door | Coordinate | Node;
7262
7636
  /**
7263
7637
  * @internal
7264
7638
  */
@@ -7277,16 +7651,21 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
7277
7651
  /**
7278
7652
  * @internal
7279
7653
  */
7280
- constructor(id: string, contentEl: HTMLElement);
7654
+ constructor(id: string, contentEl: HTMLElement, target: Space | Door | Coordinate | Node);
7281
7655
  }
7282
7656
  }
7283
7657
 
7284
7658
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/image' {
7659
+ import type { Coordinate, Door, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7285
7660
  /**
7286
7661
  * Class representing an Image on the {@link MapView}.
7287
7662
  */
7288
7663
  export class Image {
7289
7664
  #private;
7665
+ /**
7666
+ * The image's target
7667
+ */
7668
+ readonly target: Space | Door | Coordinate;
7290
7669
  /**
7291
7670
  * @internal
7292
7671
  */
@@ -7296,16 +7675,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/image' {
7296
7675
  */
7297
7676
  readonly __type = "Image";
7298
7677
  /**
7299
- * Checks if the provided instance is of type Marker"
7678
+ * Checks if the provided instance is of type Image"
7300
7679
  *
7301
7680
  * @param instance The instance to check.
7302
- * @returns {boolean} True if the instance is a Marker, false otherwise.
7681
+ * @returns {boolean} True if the instance is a Image, false otherwise.
7303
7682
  */
7304
7683
  static is(instance: object): instance is Image;
7305
7684
  /**
7306
7685
  * @internal
7307
7686
  */
7308
- constructor(id: string, url: string);
7687
+ constructor(id: string, url: string, target: Space | Door | Coordinate);
7309
7688
  /**
7310
7689
  * The image's id
7311
7690
  */
@@ -7353,6 +7732,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/model' {
7353
7732
  }
7354
7733
 
7355
7734
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
7735
+ import { type Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7356
7736
  /**
7357
7737
  * Class representing a path on the {@link MapView}.
7358
7738
  *
@@ -7368,131 +7748,49 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
7368
7748
  */
7369
7749
  animation: Promise<void>;
7370
7750
  /**
7371
- * @internal
7372
- */
7373
- readonly __type: 'Path';
7374
- /**
7375
- * @internal
7376
- */
7377
- constructor(id: string, drawAnimation: Promise<void>);
7378
- }
7379
- }
7380
-
7381
- declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape' {
7382
- /**
7383
- * Class representing GeoJSON shape on the {@link MapView}.
7384
- *
7385
- */
7386
- export class Shape {
7387
- /**
7388
- * id of Shape
7389
- */
7390
- readonly id: string;
7391
- /**
7392
- * @internal
7393
- */
7394
- static readonly __type = "Shape";
7395
- /**
7396
- * @internal
7397
- */
7398
- readonly __type = "Shape";
7399
- /**
7400
- * Checks if the provided instance is of type Shape.
7401
- *
7402
- * @param instance The instance to check.
7403
- * @returns {boolean} True if the instance is a Shape, false otherwise.
7751
+ * The coordinates of the path.
7404
7752
  */
7405
- static is(instance: object): instance is Shape;
7753
+ coordinates: Coordinate[];
7406
7754
  /**
7407
7755
  * @internal
7408
7756
  */
7409
- constructor(id: string);
7410
- }
7411
- }
7412
-
7413
- declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
7414
- import type { ParsedMVF } from '@mappedin/mvf';
7415
- import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
7416
- import { PubSub } from '@packages/internal/common';
7417
- import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
7418
- import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
7419
- import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
7420
- import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
7421
- import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
7422
- import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
7423
- import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
7424
- import type { Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
7425
- export class GeojsonApiMapObject extends PubSub<{
7426
- 'floor-change': {
7427
- reason?: TFloorChangeReason;
7428
- floorId: string;
7429
- };
7430
- 'floor-change-start': {
7431
- floorId: string;
7432
- };
7433
- }> {
7434
- /** Floors sorted in order of elevation */
7435
- floors: FloorObject[];
7436
- /** Map of floors by elevation. Floor elevation does not always match index or is not always contiguous. */
7437
- floorsByElevation: Map<number, FloorObject>;
7438
- currentFloorId: string;
7439
- id: string;
7440
- renderer: RendererCore;
7441
- mvf: ParsedMVF;
7442
- styleMap: AggregatedStyleMap;
7443
- StackedMaps: StackedMaps;
7444
- get currentFloor(): FloorObject;
7445
- setFloor(floorId: string, reason?: TFloorChangeReason): Promise<void> | undefined;
7446
- Models: {
7447
- add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
7448
- floorId?: string;
7449
- }) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
7450
- remove: (_id: string, _groupId: string) => void;
7451
- };
7452
- Images: {
7453
- add: (target: Position, url: string, opts: TAddImageOptions & {
7454
- floorId?: string;
7455
- }) => EntityId<import("@mappedin/core-sdk/src/components/image").ImageState> | undefined;
7456
- remove: (id: string) => void;
7457
- removeAll: () => void;
7458
- };
7459
- Markers: {
7460
- add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions) => EntityId<MarkerState> | undefined;
7461
- remove: (id: string) => void;
7462
- getContentEl: (id: string) => HTMLElement | undefined;
7463
- removeAll: () => void;
7464
- setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
7465
- animateTo: (id: string, coordinate: Position, targetFloorId: string, options?: TAnimationOptions) => Promise<void>;
7466
- };
7467
- Exporter: {
7468
- getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
7469
- };
7470
- Shapes: {
7471
- add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
7472
- floorId?: string;
7473
- }) => string;
7474
- remove: (customGeometry: Shape) => string;
7475
- };
7476
- Labels: {
7477
- all: ({ onCreate }: {
7478
- onCreate: (labelId: string | number, text: string) => void;
7479
- }) => void;
7480
- add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
7481
- floorId?: string;
7482
- }) => {
7483
- id: string | number;
7484
- };
7485
- remove: (targetId: string) => void;
7486
- removeAll: () => void;
7487
- };
7488
- Paths: {
7489
- add: (coordinates: Coordinate[], options?: TAddPathOptions) => {
7490
- paths: EntityId<PathState>[];
7491
- animation: Promise<void>;
7492
- };
7493
- remove: (entityIds: string[]) => void;
7494
- };
7495
- constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, renderer: RendererCore);
7757
+ readonly __type: 'Path';
7758
+ /**
7759
+ * @internal
7760
+ */
7761
+ constructor(id: string, drawAnimation: Promise<void>, coordinates: Coordinate[]);
7762
+ }
7763
+ }
7764
+
7765
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape' {
7766
+ /**
7767
+ * Class representing GeoJSON shape on the {@link MapView}.
7768
+ *
7769
+ */
7770
+ export class Shape {
7771
+ /**
7772
+ * id of Shape
7773
+ */
7774
+ readonly id: string;
7775
+ /**
7776
+ * @internal
7777
+ */
7778
+ static readonly __type = "Shape";
7779
+ /**
7780
+ * @internal
7781
+ */
7782
+ readonly __type = "Shape";
7783
+ /**
7784
+ * Checks if the provided instance is of type Shape.
7785
+ *
7786
+ * @param instance The instance to check.
7787
+ * @returns {boolean} True if the instance is a Shape, false otherwise.
7788
+ */
7789
+ static is(instance: object): instance is Shape;
7790
+ /**
7791
+ * @internal
7792
+ */
7793
+ constructor(id: string);
7496
7794
  }
7497
7795
  }
7498
7796
 
@@ -7508,6 +7806,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
7508
7806
  constructor(rendererCore: RendererCore);
7509
7807
  setScreenOffsets(padding: InsetPadding): void;
7510
7808
  get screenOffsets(): InsetPadding;
7809
+ /**
7810
+ * The camera's current pan mode.
7811
+ */
7812
+ get panMode(): "default" | "elevation";
7813
+ /**
7814
+ * Set the camera's pan mode. 'elevation' moves the camera up and down, while 'default' allows the camera to pan along the ground.
7815
+ * @experimental
7816
+ * @param panMode The new pan mode.
7817
+ */
7818
+ setPanMode(panMode: 'default' | 'elevation'): void;
7511
7819
  /**
7512
7820
  * Focuses the camera on a specific target or array of targets.
7513
7821
  *
@@ -7605,6 +7913,23 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
7605
7913
  * @default 12
7606
7914
  */
7607
7915
  setMaxZoomLevel: (zoomLevel: number) => void;
7916
+ /**
7917
+ * Set the camera's elevation in meters.
7918
+ * @experimental
7919
+ * @param elevation The new elevation in meters.
7920
+ */
7921
+ setElevation(elevation: number): void;
7922
+ /**
7923
+ * The current elevation of the camera in meters.
7924
+ */
7925
+ get elevation(): number;
7926
+ /**
7927
+ * Animate the camera's elevation to a specified elevation.
7928
+ * @experimental
7929
+ * @param elevation The target elevation in meters.
7930
+ * @param options Optional settings for the camera animation.
7931
+ */
7932
+ animateElevation(elevation: number, options?: TCameraAnimationOptions): Promise<void>;
7608
7933
  }
7609
7934
  }
7610
7935
 
@@ -7858,6 +8183,216 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths' {
7858
8183
  export {};
7859
8184
  }
7860
8185
 
8186
+ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
8187
+ import { type TDirectionInstruction } from '@mappedin/mappedin-js/mappedin-js/src';
8188
+ import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
8189
+ import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
8190
+ import { Path, Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
8191
+ import type { RendererCore } from '@mappedin/core-sdk';
8192
+ /**
8193
+ * Options for navigation.
8194
+ */
8195
+ export type TNavigationOptions = {
8196
+ /**
8197
+ * Controls whether the map should be set to the floor of the connection point when a connection point is clicked.
8198
+ * @default true
8199
+ */
8200
+ setMapOnConnectionClick?: boolean;
8201
+ /**
8202
+ * Controls whether markers are created for the departure, destination, and connection points.
8203
+ */
8204
+ createMarkers?: {
8205
+ /**
8206
+ * Controls whether a marker is created for the departure point and allows a custom marker to be created.
8207
+ * @default true
8208
+ */
8209
+ departure?: boolean | ((instruction: TDirectionInstruction) => Marker);
8210
+ /**
8211
+ * Controls whether a marker is created for the destination point and allows a custom marker to be created.
8212
+ * @default true
8213
+ */
8214
+ destination?: boolean | ((instruction: TDirectionInstruction) => Marker);
8215
+ /**
8216
+ * Controls whether markers are created for connection points and allows a custom marker to be created.
8217
+ * @default true
8218
+ */
8219
+ connection?: boolean | ((instruction: TDirectionInstruction) => Marker);
8220
+ };
8221
+ /**
8222
+ * Path Options for the non-current path in multi-destination mode.
8223
+ */
8224
+ inactivePathOptions?: {
8225
+ /**
8226
+ * Duration in milliseconds for the path to be drawn.
8227
+ * @default 1000
8228
+ */
8229
+ drawDuration?: number;
8230
+ /**
8231
+ * The color of the path.
8232
+ * @default '#40A9FF'
8233
+ */
8234
+ color?: string;
8235
+ /**
8236
+ * Whether the path should be clickable.
8237
+ *
8238
+ * @defaultValue false
8239
+ */
8240
+ interactive?: boolean;
8241
+ /**
8242
+ * The accent color of the path. This is applied to arrows if they are displayed
8243
+ * @default 'blue'
8244
+ */
8245
+ accentColor?: string;
8246
+ /**
8247
+ * The radius of the path near the markers.
8248
+ * @default 0.25
8249
+ */
8250
+ nearRadius?: number;
8251
+ /**
8252
+ * The radius of the path far from the markers.
8253
+ * @default 1
8254
+ */
8255
+ farRadius?: number;
8256
+ /**
8257
+ * Controls whether arrows are displayed on the path.
8258
+ * @default false
8259
+ */
8260
+ displayArrowsOnPath?: boolean;
8261
+ /**
8262
+ * Controls whether arrows are animated.
8263
+ * @default false
8264
+ */
8265
+ animateArrowsOnPath?: boolean;
8266
+ };
8267
+ /**
8268
+ * Options for the path.
8269
+ */
8270
+ pathOptions?: {
8271
+ /**
8272
+ * Duration in milliseconds for the path to be drawn.
8273
+ * @default 1000
8274
+ */
8275
+ drawDuration?: number;
8276
+ /**
8277
+ * The color of the path.
8278
+ * @default '#40A9FF'
8279
+ */
8280
+ color?: string;
8281
+ /**
8282
+ * Whether the path should be clickable.
8283
+ *
8284
+ * @defaultValue false
8285
+ */
8286
+ interactive?: boolean;
8287
+ /**
8288
+ * The accent color of the path. This is applied to arrows if they are displayed
8289
+ * @default 'blue'
8290
+ */
8291
+ accentColor?: string;
8292
+ /**
8293
+ * The radius of the path near the markers.
8294
+ * @default 0.25
8295
+ */
8296
+ nearRadius?: number;
8297
+ /**
8298
+ * The radius of the path far from the markers.
8299
+ * @default 1
8300
+ */
8301
+ farRadius?: number;
8302
+ /**
8303
+ * Controls whether arrows are displayed on the path.
8304
+ * @default false
8305
+ */
8306
+ displayArrowsOnPath?: boolean;
8307
+ /**
8308
+ * Controls whether arrows are animated.
8309
+ * @default false
8310
+ */
8311
+ animateArrowsOnPath?: boolean;
8312
+ };
8313
+ /**
8314
+ * Options for the markers at the departure and destination.
8315
+ */
8316
+ markerOptions?: {
8317
+ /**
8318
+ * The color of the departure marker.
8319
+ * @default '#1890FF'
8320
+ */
8321
+ departureColor?: string;
8322
+ /**
8323
+ * The color of the destination marker.
8324
+ * @default '#722ED1'
8325
+ */
8326
+ destinationColor?: string;
8327
+ };
8328
+ };
8329
+ export class Navigation {
8330
+ #private;
8331
+ /**
8332
+ * @internal
8333
+ */
8334
+ get currentMap(): GeojsonApiMapObject;
8335
+ /**
8336
+ * Returns true if the navigation is for a multi-floor path.
8337
+ */
8338
+ get isMultiFloor(): boolean;
8339
+ /**
8340
+ * @internal
8341
+ */
8342
+ constructor(core: RendererCore, currentMapGetter: CurrentMapGetter);
8343
+ /**
8344
+ * @internal
8345
+ */
8346
+ getPathById(id: string): {
8347
+ path: Path;
8348
+ entityIds: string[];
8349
+ } | undefined;
8350
+ /**
8351
+ * @internal
8352
+ */
8353
+ getMarkerById(id: string): {
8354
+ instruction: TDirectionInstruction;
8355
+ marker: Marker;
8356
+ } | undefined;
8357
+ /**
8358
+ * @internal
8359
+ */
8360
+ get paths(): Path[];
8361
+ /**
8362
+ * The currently active directions.
8363
+ */
8364
+ get activeDirections(): Directions | undefined;
8365
+ /**
8366
+ * The currently active path.
8367
+ */
8368
+ get activePath(): Path | undefined;
8369
+ /**
8370
+ * Sets the active path by index.
8371
+ */
8372
+ setActivePathByIndex(target: number): void;
8373
+ /**
8374
+ * Sets the active path.
8375
+ */
8376
+ setActivePath(target: Path): void;
8377
+ /**
8378
+ * Sets the active path by directions.
8379
+ */
8380
+ setActivePathByDirections(target: Directions): void;
8381
+ /**
8382
+ * Draws the specified directions on the map.
8383
+ * @param directions The directions to be drawn.
8384
+ * @param options Optional additional options for the navigation.
8385
+ */
8386
+ draw(directions: Directions | Directions[], options?: TNavigationOptions): Promise<unknown>;
8387
+ /**
8388
+ * Clears any drawn navigation paths or directions from the map.
8389
+ */
8390
+ clear(): void;
8391
+ }
8392
+ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
8393
+ export {};
8394
+ }
8395
+
7861
8396
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter' {
7862
8397
  import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
7863
8398
  import type { GLTFExportOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
@@ -8289,7 +8824,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/search/internal' {
8289
8824
  enabled?: boolean | undefined;
8290
8825
  } | undefined;
8291
8826
  }>;
8827
+ /**
8828
+ * @interface
8829
+ */
8292
8830
  export type SearchOptions = z.infer<typeof searchOptionsSchema>;
8831
+ /**
8832
+ * @interface
8833
+ */
8293
8834
  export type SuggestOptions = z.infer<typeof suggestOptionsSchema>;
8294
8835
  export { Suggestion, MatchInfo };
8295
8836
  }
@@ -8305,6 +8846,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/search/external' {
8305
8846
  * @default false
8306
8847
  */
8307
8848
  enabled: boolean;
8849
+ /**
8850
+ * @internal
8851
+ */
8308
8852
  constructor(mapData: MapData, mapDataInternal: MapDataInternal, { enabled }?: {
8309
8853
  enabled?: boolean;
8310
8854
  });
@@ -9115,6 +9659,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
9115
9659
  import type { BufferGeometry } from 'three';
9116
9660
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
9117
9661
  import { Geometry3D, Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
9662
+ import { type MeshComponentProperties } from '@mappedin/mappedin-js/geojson/src/components/mesh';
9118
9663
  import type { Feature, LineString, MultiPolygon, Point, Polygon } from 'geojson';
9119
9664
  import type { LineStyle, ModelProperties, ModelStyle, PaintStyle } from '@mappedin/mappedin-js/geojson/src/types';
9120
9665
  import type { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
@@ -9127,7 +9672,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
9127
9672
  loader?: GLTFLoader;
9128
9673
  constructor(state: RendererState, convertTo3DMapPosition: any);
9129
9674
  getGLTFLoader(): Promise<void>;
9130
- createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon>, style?: LineStyle | PaintStyle): Geometry3D;
9675
+ createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon, MeshComponentProperties>, style?: LineStyle | PaintStyle): Geometry3D;
9131
9676
  createModelFromFeature(id: string | number, feature: Feature<Point, ModelProperties>, style?: ModelStyle): Geometry3D;
9132
9677
  populateEntityMesh(entity: Geometry3D, geometry: BufferGeometry): void;
9133
9678
  populateModelGroup(entities: Set<string | number>, url: string, tree: any): Promise<Geometry3DObject3D>;
@@ -9622,6 +10167,16 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/pre-render/system' {
9622
10167
  }
9623
10168
  }
9624
10169
 
10170
+ declare module '@mappedin/mappedin-js/geojson/src/systems/polygon-label/system' {
10171
+ import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
10172
+ import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
10173
+ export const DEFAULT_VERTICAL_OFFSET = 0.01;
10174
+ export class PolygonLabelSystem {
10175
+ constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
10176
+ update(cameraRotationRadians: number): void;
10177
+ }
10178
+ }
10179
+
9625
10180
  declare module '@mappedin/mappedin-js/packages/geojson-navigator/src' {
9626
10181
  export { Navigator } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator';
9627
10182
  export type { SimplifyDirectionsOptions } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator/navigator';
@@ -9770,7 +10325,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
9770
10325
  import type { TDoorsState, TMarkerState, TWallsState } from '@mappedin/mappedin-js/mappedin-js/src/types';
9771
10326
  import type { Image, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
9772
10327
  import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
9773
- import type TWEEN from '@tweenjs/tween.js';
10328
+ import type { Tween } from '@tweenjs/tween.js';
9774
10329
  export function convertCoordinateToPosition(coord: Coordinate): Position;
9775
10330
  export function convertPositionToCoordinate(coord: Position): Coordinate;
9776
10331
  export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => {
@@ -9798,7 +10353,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
9798
10353
  export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon, WithPolygonImage<SpaceProperties> | WithPolygonImage<ObstructionProperties>>[]>;
9799
10354
  export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
9800
10355
  export const getTargetID: <T extends Space | Shape | MapObject | Label | Marker | Model | Image | string>(target: T, api: GeoJsonApi) => string | undefined;
9801
- export function tweenToPromise(tween: TWEEN.Tween): Promise<void>;
10356
+ export function tweenToPromise(tween: Tween): Promise<void>;
9802
10357
  }
9803
10358
 
9804
10359
  declare module '@mappedin/mappedin-js/geojson/src/components/style' {
@@ -9819,7 +10374,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/style' {
9819
10374
  topTexture?: string;
9820
10375
  outline: boolean;
9821
10376
  showImage: boolean;
10377
+ showTextLabel: boolean;
9822
10378
  flipImageToFaceCamera: boolean;
10379
+ flipTextToFaceCamera: boolean;
9823
10380
  url?: string;
9824
10381
  };
9825
10382
  export class StyleComponent implements Style {
@@ -9840,7 +10397,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/style' {
9840
10397
  cap: LineStyle['cap'];
9841
10398
  outline: boolean;
9842
10399
  showImage: boolean;
10400
+ showTextLabel: boolean;
9843
10401
  flipImageToFaceCamera: boolean;
10402
+ flipTextToFaceCamera: boolean;
9844
10403
  url?: string;
9845
10404
  constructor(style?: Partial<Style>);
9846
10405
  }
@@ -10254,7 +10813,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
10254
10813
  * Returns true if the camera is currently animating.
10255
10814
  * @return {Boolean} True if the camera is animating, false otherwise.
10256
10815
  */
10257
- isAnimating: () => boolean;
10816
+ get isAnimating(): boolean;
10258
10817
  /**
10259
10818
  * Returns true if the camera is currently moving (it's animating, the user is manipulating it).
10260
10819
  *
@@ -10458,7 +11017,6 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/types' {
10458
11017
  import type { Vector2, Vector3 } from 'three';
10459
11018
  import type { TouchAnchor, InputSet } from '@mappedin/mappedin-js/geojson/src/systems/camera/helpers';
10460
11019
  import type { InsetPadding, RendererCore } from '@mappedin/mappedin-js/geojson/src';
10461
- import type { Easing } from '@tweenjs/tween.js';
10462
11020
  type AnimateCameraTarget = {
10463
11021
  position?: {
10464
11022
  x?: number;
@@ -10565,7 +11123,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/types' {
10565
11123
  /**
10566
11124
  * The animation curve to use for zooming in. Uses the animateCamera one by default.
10567
11125
  */
10568
- curve?: typeof Easing;
11126
+ curve?: (n: number) => number;
10569
11127
  /**
10570
11128
  * Camera tilt between 0 (top-down) to 1 (from the side)
10571
11129
  */
@@ -10594,7 +11152,6 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/types' {
10594
11152
 
10595
11153
  declare module '@mappedin/mappedin-js/geojson/src/systems/camera/constants' {
10596
11154
  export const MAPLIBRE_TILE_SIZE = 512;
10597
- export const EARTH_RADIUS_M = 6371008.8;
10598
11155
  export const MIN_LAT = -85.051129;
10599
11156
  export const MAX_LAT = 85.051129;
10600
11157
  export const CLIPPING_RADIUS = 10000;