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

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,9 +8,7 @@
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
@@ -22,6 +20,7 @@
22
20
  // ../mappedin-js/three/addons/loaders/GLTFLoader.js
23
21
  // ../mappedin-js/@mapbox/point-geometry
24
22
  // ../mappedin-js/@maplibre/maplibre-gl-style-spec
23
+ // ../mappedin-js/@tweenjs/tween.js
25
24
  // ../mappedin-js/gl-matrix
26
25
  // ../mappedin-js/@mapbox/vector-tile
27
26
  // ../mappedin-js/potpack
@@ -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 POSITION_ANIMATION_DURATION
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,66 +3576,283 @@ 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;
3276
3638
  /**
3277
- * Gets the spaces ({@link Space}) located on this floor.
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;
3854
+ /**
3855
+ * Gets the spaces ({@link Space}) located on this floor.
3278
3856
  *
3279
3857
  * @returns {Space[]} An array of Space objects on this floor.
3280
3858
  */
@@ -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
  */
@@ -5853,12 +6102,14 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
5853
6102
  }
5854
6103
 
5855
6104
  declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
5856
- import type { Texture, BufferGeometry, LineSegments, Mesh } from 'three';
6105
+ import type { Texture, BufferGeometry, LineSegments, Mesh, Object3D } from 'three';
5857
6106
  import { BatchedMesh, Color, Vector3 } from 'three';
5858
6107
  import type { BatchedStandardMaterial } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material';
5859
6108
  import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
5860
- import type { Feature, LineString, MultiLineString, MultiPolygon, Polygon } from 'geojson';
6109
+ import type { Feature, LineString, MultiLineString, MultiPolygon, Polygon, Position as GeoJsonPosition } from 'geojson';
5861
6110
  import type { BBox } from '@turf/turf';
6111
+ import { type ImageProperties } from '@mappedin/mappedin-js/geojson/src/components/image';
6112
+ import { type BaseTextAreaProperties } from '@mappedin/mvf';
5862
6113
  export class EntityBatchedMesh extends BatchedMesh {
5863
6114
  userData: {
5864
6115
  entities: {
@@ -5867,6 +6118,15 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
5867
6118
  detached?: boolean;
5868
6119
  };
5869
6120
  }
6121
+ export type MeshComponentProperties = {
6122
+ image?: ImageProperties & {
6123
+ position: GeoJsonPosition;
6124
+ path: string;
6125
+ };
6126
+ textArea?: BaseTextAreaProperties & {
6127
+ position: GeoJsonPosition;
6128
+ };
6129
+ };
5870
6130
  /**
5871
6131
  * State representing a Geometry
5872
6132
  */
@@ -5945,15 +6205,16 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
5945
6205
  focusMesh?: Mesh;
5946
6206
  outline?: LineSegments;
5947
6207
  imageMesh?: Mesh;
6208
+ textAreaMesh?: Object3D;
5948
6209
  readonly type = "geometry";
5949
6210
  dirty: boolean;
5950
6211
  detached: boolean;
5951
6212
  instanceIndex: number;
5952
6213
  geometry?: BufferGeometry;
5953
6214
  material?: BatchedStandardMaterial;
5954
- feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>;
6215
+ feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString, MeshComponentProperties>;
5955
6216
  currentHeight: number;
5956
- constructor(feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>);
6217
+ constructor(feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString, MeshComponentProperties>);
5957
6218
  get visible(): boolean;
5958
6219
  set visible(visible: boolean);
5959
6220
  setOpacity(opacity: number): void;
@@ -6346,6 +6607,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
6346
6607
  import { MeshDetachmentSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-detachment/system';
6347
6608
  import { MeshModificationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/system';
6348
6609
  import { PreRenderSystem } from '@mappedin/mappedin-js/geojson/src/systems/pre-render/system';
6610
+ import { PolygonLabelSystem } from '@mappedin/mappedin-js/geojson/src/systems/polygon-label/system';
6349
6611
  export type * from '@mappedin/mappedin-js/geojson/src/types';
6350
6612
  export const raycaster: Raycaster;
6351
6613
  /**
@@ -6388,6 +6650,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
6388
6650
  meshDetachmentSystem: MeshDetachmentSystem;
6389
6651
  meshModificationSystem: MeshModificationSystem;
6390
6652
  preRenderSystem: PreRenderSystem;
6653
+ polygonLabelSystem: PolygonLabelSystem;
6391
6654
  };
6392
6655
  export type MapViewState = {
6393
6656
  readonly type: 'map-view';
@@ -6655,23 +6918,23 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
6655
6918
  import { type InsetPadding, type Position } from '@mappedin/mappedin-js/geojson/src/types';
6656
6919
  import type { InsetPaddingOption, RendererState, Systems } from '@mappedin/mappedin-js/geojson/src/renderer';
6657
6920
  export type EasingCurve = 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
6658
- export type FocusOnOptions = {
6921
+ export type AnimationOptions = {
6922
+ duration?: number;
6923
+ easing?: EasingCurve;
6924
+ };
6925
+ export type FocusOnOptions = AnimationOptions & {
6659
6926
  bearing?: number;
6660
6927
  pitch?: number;
6661
- duration?: number;
6662
6928
  padding?: InsetPaddingOption;
6663
6929
  minZoomLevel?: number;
6664
6930
  maxZoomLevel?: number;
6665
- easing?: EasingCurve;
6666
6931
  };
6667
- export type AnimateToOptions = {
6932
+ export type AnimateToOptions = AnimationOptions & {
6668
6933
  center?: Position;
6669
6934
  zoomLevel?: number;
6670
6935
  bearing?: number;
6671
6936
  pitch?: number;
6672
6937
  elevation?: number;
6673
- duration?: number;
6674
- easing?: EasingCurve;
6675
6938
  };
6676
6939
  export const ANIMATION_TWEENS: {
6677
6940
  linear: any;
@@ -6701,6 +6964,14 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
6701
6964
  * Set the camera's zoom level in mercator zoom level units.
6702
6965
  */
6703
6966
  setZoomLevel(zoomLevel: number): void;
6967
+ /**
6968
+ * Whether the camera is animating.
6969
+ */
6970
+ get isAnimating(): any;
6971
+ /**
6972
+ * Cancel the last animation.
6973
+ */
6974
+ cancelAnimation(): void;
6704
6975
  /**
6705
6976
  * How far the camera can zoom in towards the ground
6706
6977
  */
@@ -6774,11 +7045,26 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
6774
7045
  * @param elevation The elevation in meters.
6775
7046
  */
6776
7047
  setElevation(elevation: number): void;
7048
+ /**
7049
+ * Animate the camera's elevation to a new value.
7050
+ * @param elevation The new elevation in meters.
7051
+ * @param options The animation options.
7052
+ */
7053
+ animateElevation(elevation: number, options?: AnimationOptions): Promise<void>;
6777
7054
  /**
6778
7055
  * The padding around the edges of the map when focusing on a set of coordinates.
6779
7056
  */
6780
7057
  get insetsPadding(): InsetPadding;
6781
7058
  /**
7059
+ * The camera's current pan mode.
7060
+ */
7061
+ get panMode(): "elevation" | "default";
7062
+ /**
7063
+ * Set the camera's pan mode. 'elevation' moves the camera up and down, while 'default' allows the camera to pan along the ground.
7064
+ */
7065
+ setPanMode(panMode: 'default' | 'elevation'): void;
7066
+ /**
7067
+ *
6782
7068
  * @param padding The padding around the edges of the map when focusing on a set of coordinates (in screen pixels).
6783
7069
  */
6784
7070
  setInsetPadding(padding: InsetPadding): void;
@@ -6844,33 +7130,33 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
6844
7130
  import type { Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
6845
7131
  import type { Camera } from '@mappedin/mappedin-js/geojson/src/camera';
6846
7132
  export function cartesianToGeographic(centerLat: number, centerLon: number, x: number, y: number): {
6847
- lat: number;
6848
- lon: number;
7133
+ lat: number;
7134
+ lon: number;
6849
7135
  };
6850
7136
  export function geographicToCartesian(centerLat: number, centerLon: number, targetLat: number, targetLon: number): {
6851
- x: number;
6852
- y: number;
7137
+ x: number;
7138
+ y: number;
6853
7139
  };
6854
7140
  export const populateGeometry3DIdsInScene: (tree: any, entities: RendererState["geometry3DIdsInScene"]) => Set<string | number>;
6855
7141
  export const populateGeometry2DIdsInScene: (tree: any, entities: Set<Geometry2D["id"]>) => Set<string | number>;
6856
7142
  export function convertMapLibreStylePaintProps(paint: any): {
6857
- color: any;
6858
- height: any;
6859
- altitude: any;
6860
- opacity: any;
6861
- outline: any;
7143
+ color: any;
7144
+ height: any;
7145
+ altitude: any;
7146
+ opacity: any;
7147
+ outline: any;
6862
7148
  };
6863
7149
  export function convertMapLibreLineStylePaintProps(paint: any): {
6864
- color: any;
6865
- join: any;
6866
- opacity: any;
6867
- width: any;
6868
- cap: any;
7150
+ color: any;
7151
+ join: any;
7152
+ opacity: any;
7153
+ width: any;
7154
+ cap: any;
6869
7155
  };
6870
7156
  export function mergeObjects<T extends Record<string, any>>(obj1: T, obj2: T): T;
6871
7157
  export function createCustomLayer(modelAsMercatorCoordinate: MercatorCoordinate, viewCamera: THREECamera, camera: Camera, onRender: () => void): CustomLayerInterface;
6872
7158
  export function getRequestHeaders(authURL: string): Promise<{
6873
- 'x-mappedin-tiles-key': string;
7159
+ 'x-mappedin-tiles-key': string;
6874
7160
  }>;
6875
7161
  export function cyrb53(str: string, seed?: number): number;
6876
7162
  export const linearEase: (t: number) => number;
@@ -6882,46 +7168,32 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
6882
7168
  /* getProjectionScaleFactor()
6883
7169
  /* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
6884
7170
  /*
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
- */
7171
+ * R
7172
+ * /|
7173
+ * C : Camera / |
7174
+ * PQ : Projection Plane / |
7175
+ * OR : Origin / |
7176
+ * F : FOV / |
7177
+ * Q / |
7178
+ * /| |
7179
+ * / | |
7180
+ * / | |
7181
+ * / | |
7182
+ * / | |
7183
+ * / F/2 | |
7184
+ * C ------------P------------ O
7185
+ *
7186
+ *
7187
+ * ProjectionScaleFactor = ( OR / PQ )
7188
+ * PQ = canvasHeight / 2
7189
+ * CQ = zoom
7190
+ *
7191
+ * OR / C0 = tan(F/2)
7192
+ * so OR = CO * tan(F/2)
7193
+ */
6908
7194
  export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
6909
7195
  export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3D | GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | undefined;
6910
7196
  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
7197
  export { getCornersOfBoundingBox } from '@mappedin/mappedin-js/geojson/src/utils/bounding-box';
6926
7198
  export function isFiniteBox(box: Box2 | Box3): boolean;
6927
7199
  export { getPixelRatio } from '@mappedin/mappedin-js/geojson/src/utils/get-pixel-ratio';
@@ -6932,7 +7204,6 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
6932
7204
  }
6933
7205
 
6934
7206
  declare module '@mappedin/mappedin-js/geojson/src/utils/constants' {
6935
- export const EARTH_RADIUS_M = 6371008.8;
6936
7207
  export const MAPPEDIN_LAYER_ID = "mappedin";
6937
7208
  export enum ENTITY_3D_LAYERS {
6938
7209
  DEFAULT = 0,
@@ -7156,7 +7427,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7156
7427
  import { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
7157
7428
  import { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
7158
7429
  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
7430
  export class GeoJsonApi {
7161
7431
  core: RendererCore;
7162
7432
  outdoors: GeojsonApiMapObject;
@@ -7165,6 +7435,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7165
7435
  mapDataExternal: {
7166
7436
  [key in string]: MapData;
7167
7437
  };
7438
+ mapData?: MapData;
7168
7439
  currentMap?: GeojsonApiMapObject;
7169
7440
  hiddenOutdoorGeometries: [Position, layer: string[]][];
7170
7441
  mapView: MapView;
@@ -7180,18 +7451,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7180
7451
  Shapes: Shapes;
7181
7452
  Style: Style;
7182
7453
  Images: Images;
7454
+ get StackedMaps(): import("..").StackedMaps;
7183
7455
  constructor(rendererCore: RendererCore, mapView: MapView);
7184
7456
  updateState<T extends Space | MapObject | Label | Shape | Marker | Door | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
7185
7457
  update: () => void;
7186
7458
  getMapDataInternal(): MapDataInternal | undefined;
7187
7459
  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
7460
  addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
7194
- setFloor(floor: Floor | string, reason?: TFloorChangeReason): Promise<void> | undefined;
7461
+ setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
7195
7462
  updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
7196
7463
  get currentFloor(): Floor;
7197
7464
  getState<T extends Space | MapObject | Label | Marker | Shape | Model | Image | string>(target: T): TGetState<T> | undefined;
@@ -7210,7 +7477,106 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7210
7477
  }
7211
7478
  }
7212
7479
 
7480
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
7481
+ import type { ParsedMVF } from '@mappedin/mvf';
7482
+ import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
7483
+ import { PubSub } from '@packages/internal/common';
7484
+ import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
7485
+ import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
7486
+ import type { Coordinate, Directions, Floor, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
7487
+ import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, TDirectionInstruction } from '@mappedin/mappedin-js/mappedin-js/src/types';
7488
+ import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
7489
+ import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
7490
+ import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
7491
+ import type { Path, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
7492
+ import type { Space, Door, PointOfInterest, MapObject, Node } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7493
+ import { type GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
7494
+ export class GeojsonApiMapObject extends PubSub<{
7495
+ 'floor-change': {
7496
+ reason?: TFloorChangeReason;
7497
+ floorId: string;
7498
+ };
7499
+ 'floor-change-start': {
7500
+ floorId: string;
7501
+ };
7502
+ 'navigation-connection-click': {
7503
+ fromFloor?: Floor;
7504
+ toFloor: Floor;
7505
+ instruction: TDirectionInstruction;
7506
+ };
7507
+ 'navigation-active-path-change': {
7508
+ directions: Directions;
7509
+ path: Path;
7510
+ };
7511
+ }> {
7512
+ /** Floors sorted in order of elevation */
7513
+ floors: FloorObject[];
7514
+ /** Map of floors by elevation. Floor elevation does not always match index or is not always contiguous. */
7515
+ floorsByElevation: Map<number, FloorObject>;
7516
+ currentFloorId: string;
7517
+ id: string;
7518
+ renderer: RendererCore;
7519
+ api: GeoJsonApi;
7520
+ mvf: ParsedMVF;
7521
+ styleMap: AggregatedStyleMap;
7522
+ StackedMaps: StackedMaps;
7523
+ get currentFloor(): FloorObject;
7524
+ setFloor(floorId: string, reason?: TFloorChangeReason): void;
7525
+ Models: {
7526
+ add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
7527
+ floorId?: string;
7528
+ }) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
7529
+ remove: (_id: string, _groupId: string) => void;
7530
+ };
7531
+ Images: {
7532
+ add: (target: Position, url: string, opts: TAddImageOptions & {
7533
+ floorId?: string;
7534
+ }) => EntityId<import("../../../geojson/src/components/image").ImageState> | undefined;
7535
+ remove: (id: string) => void;
7536
+ removeAll: () => void;
7537
+ };
7538
+ Markers: {
7539
+ add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions) => EntityId<MarkerState> | undefined;
7540
+ remove: (id: string) => void;
7541
+ getContentEl: (id: string) => HTMLElement | undefined;
7542
+ removeAll: () => void;
7543
+ setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
7544
+ animateTo: (id: string, coordinate: Position, targetFloorId: string, options?: TAnimationOptions) => Promise<void>;
7545
+ };
7546
+ Exporter: {
7547
+ getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
7548
+ };
7549
+ Shapes: {
7550
+ add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
7551
+ floorId?: string;
7552
+ }) => string;
7553
+ remove: (customGeometry: Shape) => string;
7554
+ };
7555
+ Labels: {
7556
+ all: ({ onCreate, }: {
7557
+ onCreate: (labelId: string | number, text: string, target: Space | Door | Coordinate | PointOfInterest | MapObject | Node) => void;
7558
+ }) => void;
7559
+ add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
7560
+ floorId?: string;
7561
+ }) => {
7562
+ id: string | number;
7563
+ };
7564
+ remove: (targetId: string) => void;
7565
+ removeAll: () => void;
7566
+ };
7567
+ Paths: {
7568
+ add: (coordinates: Coordinate[], options?: TAddPathOptions) => {
7569
+ paths: EntityId<PathState>[];
7570
+ animation: Promise<void>;
7571
+ };
7572
+ remove: (entityIds: string[]) => void;
7573
+ };
7574
+ constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, api: GeoJsonApi);
7575
+ }
7576
+ }
7577
+
7213
7578
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
7579
+ import type { Coordinate, Door, MapObject, Node, PointOfInterest, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7214
7580
  /**
7215
7581
  * Class representing a label on the {@link MapView}.
7216
7582
  *
@@ -7221,7 +7587,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
7221
7587
  * The label's id
7222
7588
  */
7223
7589
  readonly id: string;
7224
- readonly text: any;
7590
+ readonly text: string;
7591
+ readonly target: Space | Door | Coordinate | PointOfInterest | MapObject | Node;
7225
7592
  /**
7226
7593
  * @internal
7227
7594
  */
@@ -7240,11 +7607,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
7240
7607
  /**
7241
7608
  * @internal
7242
7609
  */
7243
- constructor(id: string, text: string);
7610
+ constructor(id: string, text: string, target: Space | Door | Coordinate | PointOfInterest | MapObject | Node);
7244
7611
  }
7245
7612
  }
7246
7613
 
7247
7614
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
7615
+ import type { Coordinate, Door, Node, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7248
7616
  /**
7249
7617
  * Class representing a marker on the {@link MapView}.
7250
7618
  *
@@ -7259,6 +7627,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
7259
7627
  * @internal
7260
7628
  */
7261
7629
  static readonly __type = "Marker";
7630
+ readonly target: Space | Door | Coordinate | Node;
7262
7631
  /**
7263
7632
  * @internal
7264
7633
  */
@@ -7277,16 +7646,21 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
7277
7646
  /**
7278
7647
  * @internal
7279
7648
  */
7280
- constructor(id: string, contentEl: HTMLElement);
7649
+ constructor(id: string, contentEl: HTMLElement, target: Space | Door | Coordinate | Node);
7281
7650
  }
7282
7651
  }
7283
7652
 
7284
7653
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/image' {
7654
+ import type { Coordinate, Door, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7285
7655
  /**
7286
7656
  * Class representing an Image on the {@link MapView}.
7287
7657
  */
7288
7658
  export class Image {
7289
7659
  #private;
7660
+ /**
7661
+ * The image's target
7662
+ */
7663
+ readonly target: Space | Door | Coordinate;
7290
7664
  /**
7291
7665
  * @internal
7292
7666
  */
@@ -7296,16 +7670,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/image' {
7296
7670
  */
7297
7671
  readonly __type = "Image";
7298
7672
  /**
7299
- * Checks if the provided instance is of type Marker"
7673
+ * Checks if the provided instance is of type Image"
7300
7674
  *
7301
7675
  * @param instance The instance to check.
7302
- * @returns {boolean} True if the instance is a Marker, false otherwise.
7676
+ * @returns {boolean} True if the instance is a Image, false otherwise.
7303
7677
  */
7304
7678
  static is(instance: object): instance is Image;
7305
7679
  /**
7306
7680
  * @internal
7307
7681
  */
7308
- constructor(id: string, url: string);
7682
+ constructor(id: string, url: string, target: Space | Door | Coordinate);
7309
7683
  /**
7310
7684
  * The image's id
7311
7685
  */
@@ -7353,6 +7727,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/model' {
7353
7727
  }
7354
7728
 
7355
7729
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
7730
+ import { type Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7356
7731
  /**
7357
7732
  * Class representing a path on the {@link MapView}.
7358
7733
  *
@@ -7368,131 +7743,49 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
7368
7743
  */
7369
7744
  animation: Promise<void>;
7370
7745
  /**
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.
7746
+ * The coordinates of the path.
7404
7747
  */
7405
- static is(instance: object): instance is Shape;
7748
+ coordinates: Coordinate[];
7406
7749
  /**
7407
7750
  * @internal
7408
7751
  */
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);
7752
+ readonly __type: 'Path';
7753
+ /**
7754
+ * @internal
7755
+ */
7756
+ constructor(id: string, drawAnimation: Promise<void>, coordinates: Coordinate[]);
7757
+ }
7758
+ }
7759
+
7760
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape' {
7761
+ /**
7762
+ * Class representing GeoJSON shape on the {@link MapView}.
7763
+ *
7764
+ */
7765
+ export class Shape {
7766
+ /**
7767
+ * id of Shape
7768
+ */
7769
+ readonly id: string;
7770
+ /**
7771
+ * @internal
7772
+ */
7773
+ static readonly __type = "Shape";
7774
+ /**
7775
+ * @internal
7776
+ */
7777
+ readonly __type = "Shape";
7778
+ /**
7779
+ * Checks if the provided instance is of type Shape.
7780
+ *
7781
+ * @param instance The instance to check.
7782
+ * @returns {boolean} True if the instance is a Shape, false otherwise.
7783
+ */
7784
+ static is(instance: object): instance is Shape;
7785
+ /**
7786
+ * @internal
7787
+ */
7788
+ constructor(id: string);
7496
7789
  }
7497
7790
  }
7498
7791
 
@@ -7508,6 +7801,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
7508
7801
  constructor(rendererCore: RendererCore);
7509
7802
  setScreenOffsets(padding: InsetPadding): void;
7510
7803
  get screenOffsets(): InsetPadding;
7804
+ /**
7805
+ * The camera's current pan mode.
7806
+ */
7807
+ get panMode(): "default" | "elevation";
7808
+ /**
7809
+ * Set the camera's pan mode. 'elevation' moves the camera up and down, while 'default' allows the camera to pan along the ground.
7810
+ * @experimental
7811
+ * @param panMode The new pan mode.
7812
+ */
7813
+ setPanMode(panMode: 'default' | 'elevation'): void;
7511
7814
  /**
7512
7815
  * Focuses the camera on a specific target or array of targets.
7513
7816
  *
@@ -7605,6 +7908,23 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
7605
7908
  * @default 12
7606
7909
  */
7607
7910
  setMaxZoomLevel: (zoomLevel: number) => void;
7911
+ /**
7912
+ * Set the camera's elevation in meters.
7913
+ * @experimental
7914
+ * @param elevation The new elevation in meters.
7915
+ */
7916
+ setElevation(elevation: number): void;
7917
+ /**
7918
+ * The current elevation of the camera in meters.
7919
+ */
7920
+ get elevation(): number;
7921
+ /**
7922
+ * Animate the camera's elevation to a specified elevation.
7923
+ * @experimental
7924
+ * @param elevation The target elevation in meters.
7925
+ * @param options Optional settings for the camera animation.
7926
+ */
7927
+ animateElevation(elevation: number, options?: TCameraAnimationOptions): Promise<void>;
7608
7928
  }
7609
7929
  }
7610
7930
 
@@ -7858,6 +8178,216 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths' {
7858
8178
  export {};
7859
8179
  }
7860
8180
 
8181
+ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
8182
+ import { type TDirectionInstruction } from '@mappedin/mappedin-js/mappedin-js/src';
8183
+ import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
8184
+ import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
8185
+ import { Path, Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
8186
+ import type { RendererCore } from '@mappedin/core-sdk';
8187
+ /**
8188
+ * Options for navigation.
8189
+ */
8190
+ export type TNavigationOptions = {
8191
+ /**
8192
+ * Controls whether the map should be set to the floor of the connection point when a connection point is clicked.
8193
+ * @default true
8194
+ */
8195
+ setMapOnConnectionClick?: boolean;
8196
+ /**
8197
+ * Controls whether markers are created for the departure, destination, and connection points.
8198
+ */
8199
+ createMarkers?: {
8200
+ /**
8201
+ * Controls whether a marker is created for the departure point and allows a custom marker to be created.
8202
+ * @default true
8203
+ */
8204
+ departure?: boolean | ((instruction: TDirectionInstruction) => Marker);
8205
+ /**
8206
+ * Controls whether a marker is created for the destination point and allows a custom marker to be created.
8207
+ * @default true
8208
+ */
8209
+ destination?: boolean | ((instruction: TDirectionInstruction) => Marker);
8210
+ /**
8211
+ * Controls whether markers are created for connection points and allows a custom marker to be created.
8212
+ * @default true
8213
+ */
8214
+ connection?: boolean | ((instruction: TDirectionInstruction) => Marker);
8215
+ };
8216
+ /**
8217
+ * Path Options for the non-current path in multi-destination mode.
8218
+ */
8219
+ inactivePathOptions?: {
8220
+ /**
8221
+ * Duration in milliseconds for the path to be drawn.
8222
+ * @default 1000
8223
+ */
8224
+ drawDuration?: number;
8225
+ /**
8226
+ * The color of the path.
8227
+ * @default '#40A9FF'
8228
+ */
8229
+ color?: string;
8230
+ /**
8231
+ * Whether the path should be clickable.
8232
+ *
8233
+ * @defaultValue false
8234
+ */
8235
+ interactive?: boolean;
8236
+ /**
8237
+ * The accent color of the path. This is applied to arrows if they are displayed
8238
+ * @default 'blue'
8239
+ */
8240
+ accentColor?: string;
8241
+ /**
8242
+ * The radius of the path near the markers.
8243
+ * @default 0.25
8244
+ */
8245
+ nearRadius?: number;
8246
+ /**
8247
+ * The radius of the path far from the markers.
8248
+ * @default 1
8249
+ */
8250
+ farRadius?: number;
8251
+ /**
8252
+ * Controls whether arrows are displayed on the path.
8253
+ * @default false
8254
+ */
8255
+ displayArrowsOnPath?: boolean;
8256
+ /**
8257
+ * Controls whether arrows are animated.
8258
+ * @default false
8259
+ */
8260
+ animateArrowsOnPath?: boolean;
8261
+ };
8262
+ /**
8263
+ * Options for the path.
8264
+ */
8265
+ pathOptions?: {
8266
+ /**
8267
+ * Duration in milliseconds for the path to be drawn.
8268
+ * @default 1000
8269
+ */
8270
+ drawDuration?: number;
8271
+ /**
8272
+ * The color of the path.
8273
+ * @default '#40A9FF'
8274
+ */
8275
+ color?: string;
8276
+ /**
8277
+ * Whether the path should be clickable.
8278
+ *
8279
+ * @defaultValue false
8280
+ */
8281
+ interactive?: boolean;
8282
+ /**
8283
+ * The accent color of the path. This is applied to arrows if they are displayed
8284
+ * @default 'blue'
8285
+ */
8286
+ accentColor?: string;
8287
+ /**
8288
+ * The radius of the path near the markers.
8289
+ * @default 0.25
8290
+ */
8291
+ nearRadius?: number;
8292
+ /**
8293
+ * The radius of the path far from the markers.
8294
+ * @default 1
8295
+ */
8296
+ farRadius?: number;
8297
+ /**
8298
+ * Controls whether arrows are displayed on the path.
8299
+ * @default false
8300
+ */
8301
+ displayArrowsOnPath?: boolean;
8302
+ /**
8303
+ * Controls whether arrows are animated.
8304
+ * @default false
8305
+ */
8306
+ animateArrowsOnPath?: boolean;
8307
+ };
8308
+ /**
8309
+ * Options for the markers at the departure and destination.
8310
+ */
8311
+ markerOptions?: {
8312
+ /**
8313
+ * The color of the departure marker.
8314
+ * @default '#1890FF'
8315
+ */
8316
+ departureColor?: string;
8317
+ /**
8318
+ * The color of the destination marker.
8319
+ * @default '#722ED1'
8320
+ */
8321
+ destinationColor?: string;
8322
+ };
8323
+ };
8324
+ export class Navigation {
8325
+ #private;
8326
+ /**
8327
+ * @internal
8328
+ */
8329
+ get currentMap(): GeojsonApiMapObject;
8330
+ /**
8331
+ * Returns true if the navigation is for a multi-floor path.
8332
+ */
8333
+ get isMultiFloor(): boolean;
8334
+ /**
8335
+ * @internal
8336
+ */
8337
+ constructor(core: RendererCore, currentMapGetter: CurrentMapGetter);
8338
+ /**
8339
+ * @internal
8340
+ */
8341
+ getPathById(id: string): {
8342
+ path: Path;
8343
+ entityIds: string[];
8344
+ } | undefined;
8345
+ /**
8346
+ * @internal
8347
+ */
8348
+ getMarkerById(id: string): {
8349
+ instruction: TDirectionInstruction;
8350
+ marker: Marker;
8351
+ } | undefined;
8352
+ /**
8353
+ * @internal
8354
+ */
8355
+ get paths(): Path[];
8356
+ /**
8357
+ * The currently active directions.
8358
+ */
8359
+ get activeDirections(): Directions | undefined;
8360
+ /**
8361
+ * The currently active path.
8362
+ */
8363
+ get activePath(): Path | undefined;
8364
+ /**
8365
+ * Sets the active path by index.
8366
+ */
8367
+ setActivePathByIndex(target: number): void;
8368
+ /**
8369
+ * Sets the active path.
8370
+ */
8371
+ setActivePath(target: Path): void;
8372
+ /**
8373
+ * Sets the active path by directions.
8374
+ */
8375
+ setActivePathByDirections(target: Directions): void;
8376
+ /**
8377
+ * Draws the specified directions on the map.
8378
+ * @param directions The directions to be drawn.
8379
+ * @param options Optional additional options for the navigation.
8380
+ */
8381
+ draw(directions: Directions | Directions[], options?: TNavigationOptions): Promise<unknown>;
8382
+ /**
8383
+ * Clears any drawn navigation paths or directions from the map.
8384
+ */
8385
+ clear(): void;
8386
+ }
8387
+ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
8388
+ export {};
8389
+ }
8390
+
7861
8391
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter' {
7862
8392
  import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
7863
8393
  import type { GLTFExportOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
@@ -8289,7 +8819,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/search/internal' {
8289
8819
  enabled?: boolean | undefined;
8290
8820
  } | undefined;
8291
8821
  }>;
8822
+ /**
8823
+ * @interface
8824
+ */
8292
8825
  export type SearchOptions = z.infer<typeof searchOptionsSchema>;
8826
+ /**
8827
+ * @interface
8828
+ */
8293
8829
  export type SuggestOptions = z.infer<typeof suggestOptionsSchema>;
8294
8830
  export { Suggestion, MatchInfo };
8295
8831
  }
@@ -8305,6 +8841,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/search/external' {
8305
8841
  * @default false
8306
8842
  */
8307
8843
  enabled: boolean;
8844
+ /**
8845
+ * @internal
8846
+ */
8308
8847
  constructor(mapData: MapData, mapDataInternal: MapDataInternal, { enabled }?: {
8309
8848
  enabled?: boolean;
8310
8849
  });
@@ -9115,6 +9654,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
9115
9654
  import type { BufferGeometry } from 'three';
9116
9655
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
9117
9656
  import { Geometry3D, Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
9657
+ import { type MeshComponentProperties } from '@mappedin/mappedin-js/geojson/src/components/mesh';
9118
9658
  import type { Feature, LineString, MultiPolygon, Point, Polygon } from 'geojson';
9119
9659
  import type { LineStyle, ModelProperties, ModelStyle, PaintStyle } from '@mappedin/mappedin-js/geojson/src/types';
9120
9660
  import type { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
@@ -9127,7 +9667,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
9127
9667
  loader?: GLTFLoader;
9128
9668
  constructor(state: RendererState, convertTo3DMapPosition: any);
9129
9669
  getGLTFLoader(): Promise<void>;
9130
- createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon>, style?: LineStyle | PaintStyle): Geometry3D;
9670
+ createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon, MeshComponentProperties>, style?: LineStyle | PaintStyle): Geometry3D;
9131
9671
  createModelFromFeature(id: string | number, feature: Feature<Point, ModelProperties>, style?: ModelStyle): Geometry3D;
9132
9672
  populateEntityMesh(entity: Geometry3D, geometry: BufferGeometry): void;
9133
9673
  populateModelGroup(entities: Set<string | number>, url: string, tree: any): Promise<Geometry3DObject3D>;
@@ -9622,6 +10162,16 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/pre-render/system' {
9622
10162
  }
9623
10163
  }
9624
10164
 
10165
+ declare module '@mappedin/mappedin-js/geojson/src/systems/polygon-label/system' {
10166
+ import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
10167
+ import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
10168
+ export const DEFAULT_VERTICAL_OFFSET = 0.01;
10169
+ export class PolygonLabelSystem {
10170
+ constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
10171
+ update(cameraRotationRadians: number): void;
10172
+ }
10173
+ }
10174
+
9625
10175
  declare module '@mappedin/mappedin-js/packages/geojson-navigator/src' {
9626
10176
  export { Navigator } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator';
9627
10177
  export type { SimplifyDirectionsOptions } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator/navigator';
@@ -9819,7 +10369,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/style' {
9819
10369
  topTexture?: string;
9820
10370
  outline: boolean;
9821
10371
  showImage: boolean;
10372
+ showTextLabel: boolean;
9822
10373
  flipImageToFaceCamera: boolean;
10374
+ flipTextToFaceCamera: boolean;
9823
10375
  url?: string;
9824
10376
  };
9825
10377
  export class StyleComponent implements Style {
@@ -9840,7 +10392,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/style' {
9840
10392
  cap: LineStyle['cap'];
9841
10393
  outline: boolean;
9842
10394
  showImage: boolean;
10395
+ showTextLabel: boolean;
9843
10396
  flipImageToFaceCamera: boolean;
10397
+ flipTextToFaceCamera: boolean;
9844
10398
  url?: string;
9845
10399
  constructor(style?: Partial<Style>);
9846
10400
  }
@@ -10254,7 +10808,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
10254
10808
  * Returns true if the camera is currently animating.
10255
10809
  * @return {Boolean} True if the camera is animating, false otherwise.
10256
10810
  */
10257
- isAnimating: () => boolean;
10811
+ get isAnimating(): any;
10258
10812
  /**
10259
10813
  * Returns true if the camera is currently moving (it's animating, the user is manipulating it).
10260
10814
  *
@@ -10594,7 +11148,6 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/types' {
10594
11148
 
10595
11149
  declare module '@mappedin/mappedin-js/geojson/src/systems/camera/constants' {
10596
11150
  export const MAPLIBRE_TILE_SIZE = 512;
10597
- export const EARTH_RADIUS_M = 6371008.8;
10598
11151
  export const MIN_LAT = -85.051129;
10599
11152
  export const MAX_LAT = 85.051129;
10600
11153
  export const CLIPPING_RADIUS = 10000;