@mappedin/mappedin-js 6.0.1-alpha.11 → 6.0.1-alpha.13

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.
@@ -240,6 +240,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
240
240
  import MapData from '@mappedin/mappedin-js/maker/src/map-data';
241
241
  import { ICamera, ILabels, IMapView, IMarkers, IPaths, TUpdateState, TNavigationTarget, TGetDirectionsOptions, INavigation } from '@mappedin/mappedin-js/maker/src/map-view-interface';
242
242
  import { Directions, Label } from '@mappedin/mappedin-js/maker/src/map-view-objects';
243
+ import { Exporter } from '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Exporter';
243
244
  /**
244
245
  * Represents a map with all the interactive features, controls, and actions.
245
246
  */
@@ -270,6 +271,10 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
270
271
  * @type {INavigation}
271
272
  */
272
273
  Navigation: INavigation;
274
+ /**
275
+ * Export controller for the map.
276
+ */
277
+ Exporter: Exporter;
273
278
  /**
274
279
  * Constructs a {@link MapView} instance
275
280
  *
@@ -285,7 +290,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
285
290
  /**
286
291
  * @internal - unused until we use GeoJSON API underneath
287
292
  */
288
- addMap(mapData: MapData): Promise<MapData>;
293
+ addMap: (mapData: MapData) => Promise<MapData>;
289
294
  /**
290
295
  * Updates the state {@link TUpdateState} of a given target on the map.
291
296
  *
@@ -491,7 +496,7 @@ declare module '@mappedin/mappedin-js/maker/src/events' {
491
496
  }
492
497
 
493
498
  declare module '@mappedin/mappedin-js/packages/get-venue' {
494
- import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
499
+ import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata, ThingsOption } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
495
500
  import { Mappedin } from '@mappedin/mappedin-js/packages/get-venue/Mappedin';
496
501
  import { defaultThings } from '@mappedin/mappedin-js/packages/get-venue/default-things';
497
502
  import { GET_VENUE_EVENT } from '@mappedin/mappedin-js/packages/get-venue/internal';
@@ -529,6 +534,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue' {
529
534
  export type { TOperationHoursMap } from '@mappedin/mappedin-js/packages/get-venue/MappedinLocation';
530
535
  export type { TMappedinCoordinateOptions } from '@mappedin/mappedin-js/packages/get-venue/MappedinCoordinate';
531
536
  export type { TDirectionToOptions, TTHINGS, TAccessors } from '@mappedin/mappedin-js/packages/get-venue/internal';
537
+ export type { ThingsOption };
532
538
  export { OfflineSearch } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.OfflineSearch';
533
539
  export type { TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions, } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.OfflineSearch';
534
540
  export { defaultThings };
@@ -954,7 +960,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
954
960
  #private;
955
961
  static ENABLED: boolean;
956
962
  static OPTIONS: Required<TShowWatermarkOptions>;
957
- object: Sprite;
963
+ object?: Sprite;
958
964
  constructor(core: ICore);
959
965
  show: () => void;
960
966
  hide: () => void;
@@ -1116,15 +1122,15 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1116
1122
  */
1117
1123
  export type TGeometryState = {
1118
1124
  /**
1119
- * Color of the geometry element.
1125
+ * Color of the geometry element. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1120
1126
  */
1121
1127
  color: string | 'initial';
1122
1128
  /**
1123
- * Color of the geometry element when hovered over.
1129
+ * Color of the geometry element when hovered over. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1124
1130
  */
1125
1131
  hoverColor: string | 'initial';
1126
1132
  /**
1127
- * Indicates if the geometry element is interactive.
1133
+ * Indicates if the geometry element is interactive. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1128
1134
  */
1129
1135
  interactive: boolean;
1130
1136
  };
@@ -1365,73 +1371,73 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1365
1371
  */
1366
1372
  export type TAddPathOptions = {
1367
1373
  /**
1368
- * Path Colour
1374
+ * Path Colour. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1369
1375
  *
1370
1376
  * @defaultValue #4b90e2
1371
1377
  */
1372
1378
  color?: string;
1373
1379
  /**
1374
- * Colour of path pulse
1380
+ * Colour of path pulse. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1375
1381
  *
1376
1382
  * @defaultValue '#ffffff'
1377
1383
  */
1378
1384
  pulseColor?: string;
1379
1385
  /**
1380
- * Number of iterations to pulse to indicate direction
1386
+ * Number of iterations to pulse to indicate direction.
1381
1387
  *
1382
1388
  * @defaultValue 1
1383
1389
  */
1384
1390
  pulseIterations?: number;
1385
1391
  /**
1386
- * How many milliseconds to wait before starting the next pulse after the current pulse travels the entirety of the path
1392
+ * How many milliseconds to wait before starting the next pulse after the current pulse travels the entirety of the path.
1387
1393
  *
1388
1394
  * @defaultValue 750
1389
1395
  */
1390
1396
  pulsePauseDuration?: number;
1391
1397
  /**
1392
- * Radius of path at nearest zoom, in metres
1398
+ * Radius of path at nearest zoom, in metres.
1393
1399
  *
1394
1400
  * @defaultValue 1.8
1395
1401
  */
1396
1402
  nearRadius?: number;
1397
1403
  /**
1398
- * Radius of path at furthest zoom, in metres
1404
+ * Radius of path at furthest zoom, in metres.
1399
1405
  *
1400
1406
  * @defaultValue 2.3 times nearRadius
1401
1407
  */
1402
1408
  farRadius?: number;
1403
1409
  /**
1404
- * Zoom level in meters where the path size is `nearRadius`
1410
+ * Zoom level in meters where the path size is `nearRadius`.
1405
1411
  *
1406
1412
  * @defaultValue 375
1407
1413
  */
1408
1414
  nearZoom?: number;
1409
1415
  /**
1410
- * Zoom level in meters where the path size is `farRadius`tions.nearRadius
1416
+ * Zoom level in meters where the path size is `farRadius`.
1411
1417
  *
1412
1418
  * @defaultValue 10000
1413
1419
  */
1414
1420
  farZoom?: number;
1415
1421
  /**
1416
- * Duration of path drawing
1422
+ * Duration of path drawing in milliseconds.
1417
1423
  *
1418
1424
  * @defaultValue 1500
1419
1425
  */
1420
1426
  drawDuration?: number;
1421
1427
  /**
1422
- * Show arrows on path
1428
+ * Show arrows on path.
1423
1429
  *
1424
1430
  * @defaultValue false
1425
1431
  */
1426
1432
  displayArrowsOnPath?: boolean;
1427
1433
  /**
1428
- * Animate arrows on path
1434
+ * Animate arrows on path.
1429
1435
  *
1430
1436
  * @defaultValue true
1431
1437
  */
1432
1438
  animateArrowsOnPath?: boolean;
1433
1439
  /**
1434
- * Flatten the path to a 2D line
1440
+ * Flatten the path to a 2D line.
1435
1441
  *
1436
1442
  * @defaultValue false
1437
1443
  */
@@ -1455,21 +1461,21 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1455
1461
  */
1456
1462
  interactive?: boolean;
1457
1463
  /**
1458
- * The path will be adjusted vertically to the tallest polygon altitude.
1464
+ * The path will be adjusted vertically to the tallest altitude along the path.
1459
1465
  * The altitude is in meters.
1460
1466
  *
1461
1467
  * @defaultValue false
1462
1468
  */
1463
1469
  adjustedAltitude?: boolean;
1464
1470
  /**
1465
- * The maximum altitude of the path in meters
1471
+ * The maximum altitude of the path in meters.
1466
1472
  * The altitude is in meters.
1467
1473
  *
1468
1474
  * @defaultValue Infinite
1469
1475
  */
1470
1476
  maxAdjustedAltitude?: number;
1471
1477
  /**
1472
- * The minimum altitude of the path in meters
1478
+ * The minimum altitude of the path in meters.
1473
1479
  * The altitude is in meters.
1474
1480
  *
1475
1481
  * @defaultValue -Infinite
@@ -1487,7 +1493,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1487
1493
  margin?: number;
1488
1494
  text?: {
1489
1495
  /**
1490
- * Number of lines to display when text spans multiple lines
1496
+ * Number of lines to display when text spans multiple lines.
1491
1497
  */
1492
1498
  numLines?: number;
1493
1499
  /**
@@ -1495,21 +1501,21 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1495
1501
  */
1496
1502
  size?: number;
1497
1503
  /**
1498
- * Maxiumum width of text in pixels
1504
+ * Maxiumum width of text in pixels.
1499
1505
  */
1500
1506
  maxWidth?: number;
1501
1507
  /**
1502
- * Line height sets the height of a line box. It's commonly used to set the distance between lines of text
1508
+ * Line height sets the height of a line box. It's commonly used to set the distance between lines of text.
1503
1509
  *
1504
1510
  * @default 1.2
1505
1511
  */
1506
1512
  lineHeight?: number;
1507
1513
  /**
1508
- * Text foreground color in hex
1514
+ * Text foreground color. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1509
1515
  */
1510
1516
  foregroundColor?: string;
1511
1517
  /**
1512
- * Text background color in hex
1518
+ * Text background color. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1513
1519
  */
1514
1520
  backgroundColor?: string;
1515
1521
  };
@@ -1521,21 +1527,21 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1521
1527
  size?: number;
1522
1528
  foregroundColor?: {
1523
1529
  /**
1524
- * Foreground color of the marker in hex when it is active
1530
+ * Foreground color of the marker when it is active. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1525
1531
  */
1526
1532
  active?: string;
1527
1533
  /**
1528
- * Foreground color of the marker in hex when it is inactive (grayed out due to being outranked by other labels around)
1534
+ * Foreground color of the marker when it is inactive (grayed out due to being outranked by other labels around). Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1529
1535
  */
1530
1536
  inactive?: string;
1531
1537
  };
1532
1538
  backgroundColor?: {
1533
1539
  /**
1534
- * Background color of the marker in hex when it is active
1540
+ * Background color of the marker when it is active. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1535
1541
  */
1536
1542
  active?: string;
1537
1543
  /**
1538
- * Background color of the marker in hex when it is inactive (grayed out due to being outranked by other labels around)
1544
+ * Background color of the marker when it is inactive (grayed out due to being outranked by other labels around). Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1539
1545
  */
1540
1546
  inactive?: string;
1541
1547
  };
@@ -1705,8 +1711,8 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1705
1711
  */
1706
1712
  export type TDrawNavigationOptions = {
1707
1713
  /**
1708
- * What color to highlight departure and destination polygons
1709
- * Pass false to disable
1714
+ * Color to highlight departure and destination spaces. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1715
+ * Pass false to disable.
1710
1716
  * @default '#7babc8'
1711
1717
  */
1712
1718
  polygonHighlightColor?: string | false;
@@ -2214,6 +2220,37 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal' {
2214
2220
  export { setAssetManager };
2215
2221
  }
2216
2222
 
2223
+ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Exporter' {
2224
+ import { ExportController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
2225
+ /**
2226
+ * @hidden
2227
+ */
2228
+ export type TGLTFExportOptions = {
2229
+ onlyVisible?: boolean;
2230
+ binary?: boolean;
2231
+ scale?: number;
2232
+ };
2233
+ /**
2234
+ * API to export the scene.
2235
+ *
2236
+ * @hidden
2237
+ */
2238
+ export class Exporter {
2239
+ #private;
2240
+ /**
2241
+ * @hidden
2242
+ * @internal
2243
+ */
2244
+ constructor(controller: ExportController);
2245
+ /**
2246
+ * Exports the current scene as a GLTF file.
2247
+ *
2248
+ * @hidden
2249
+ */
2250
+ getCurrentSceneGLTF(userOptions: TGLTFExportOptions): Promise<Blob>;
2251
+ }
2252
+ }
2253
+
2217
2254
  declare module '@mappedin/mappedin-js/maker/src/map-data-interace' {
2218
2255
  import type { Annotation, Connection, Coordinate, Door, Floor, MapObject, PointOfInterest, Space } from '@mappedin/mappedin-js/maker/src/map-data-objects';
2219
2256
  /**
@@ -2337,6 +2374,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.types' {
2337
2374
  clientId: string;
2338
2375
  clientSecret: string;
2339
2376
  venue: string;
2377
+ accessToken: string;
2340
2378
  };
2341
2379
  export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & {
2342
2380
  perspective?: string;
@@ -3787,6 +3825,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.utils' {
3787
3825
  export const STATIC_MVF_FILES: readonly ["connection.json", "manifest.geojson", "map.geojson", "node.geojson", "styles.json", "mapstack.geojson"];
3788
3826
  export type TStaticMVFFiles = (typeof STATIC_MVF_FILES)[number];
3789
3827
  export function processObstructions(obstructionCollection: ObstructionCollection, entrances: EntranceCollection): ObstructionCollection;
3828
+ export function splitObstructionByAllEntrances(wall: ObstructionWallFeature, entrances: EntranceFeature[]): ObstructionWallFeature[];
3790
3829
  export function isPolygonStyle(style: PolygonStyle | LineStringStyle | undefined): style is PolygonStyle & LineStringStyle;
3791
3830
  export function getStylesMap(styles: StyleCollection): WithIDs<MVFStyle>;
3792
3831
  }
@@ -4929,7 +4968,10 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core.inte
4929
4968
  * An object containing all outlined polygons.
4930
4969
  */
4931
4970
  outlinedPolygons: Map<string, MappedinPolygon>;
4932
- cameraPlane: any;
4971
+ /**
4972
+ * A plane that is parallel to the ground and is used for raycasting.
4973
+ */
4974
+ worldPlane: Mesh;
4933
4975
  getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string | null): Vector3;
4934
4976
  currentScale: number;
4935
4977
  getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
@@ -5400,7 +5442,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums' {
5400
5442
  }
5401
5443
 
5402
5444
  declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
5403
- import type { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon } from '@mappedin/mappedin-js/packages/get-venue';
5445
+ import type { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon, ThingsOption } from '@mappedin/mappedin-js/packages/get-venue';
5404
5446
  import type { TFloatingLabelAppearance } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.FloatingLabel';
5405
5447
  import type { TEnableBlueDotOptions, TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
5406
5448
  import type { Euler, Object3D, Vector3 } from 'three';
@@ -5408,7 +5450,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
5408
5450
  import { TOOLTIP_ANCHOR } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.SmartTooltip';
5409
5451
  import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE, CAMERA_EASING_MODE, E_MAP_CHANGED_REASON } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums';
5410
5452
  import { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/OutdoorViewController';
5411
- export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
5453
+ export type { TEnableBlueDotOptions, TFloatingLabelAppearance, ThingsOption };
5412
5454
  /** @internal */
5413
5455
  export type Without<T, U> = {
5414
5456
  [P in Exclude<keyof T, keyof U>]?: never;
@@ -7278,7 +7320,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/pub-sub.typed' {
7278
7320
  * @template EVENT_PAYLOAD - The type of the event payload.
7279
7321
  * @template EVENT - The type of the event.
7280
7322
  */
7281
- export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD> {
7323
+ export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
7282
7324
  /**
7283
7325
  * @private
7284
7326
  * @internal
@@ -9148,73 +9190,76 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9148
9190
  import type { ICore, MappedinPolygon, Collider } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
9149
9191
  import { BlueDotManager, Path } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
9150
9192
  class EventSystem {
9151
- core: ICore;
9152
- blueDotManager?: BlueDotManager;
9153
- rendererDomElement: any;
9154
- currentHover: string | null;
9155
- hoverLabel: any;
9156
- hoverColor: Color;
9157
- options: {
9158
- disableHover: boolean;
9159
- };
9160
- constructor(core: ICore);
9161
- setBlueDotManager: (blueDotManager: any) => void;
9162
- touchCount: number;
9163
- zoomOut(): void;
9164
- zoomIn(event: any): void;
9165
- onPointerMove: (event: any) => void;
9166
- onPointerUp: (event: any) => void;
9167
- /**
9168
- * We've confirmed that a map click has occured, so handle that here
9169
- */
9170
- handleMapClick(event: any): void;
9171
- onPointerDown: (event: any) => void;
9172
- incrementTouches: (event: any) => void;
9173
- decrementTouches: (event: any) => void;
9174
- clearMouse: () => void;
9175
- getMousePos: (event: any) => {
9176
- x: any;
9177
- y: any;
9178
- };
9179
- getScaledMousePos: (event: any) => {
9180
- x: number;
9181
- y: number;
9182
- };
9183
- cursorPos: {
9184
- x: number;
9185
- y: number;
9186
- };
9187
- mouse: {
9188
- x: number;
9189
- y: number;
9190
- };
9191
- mouseDownStart: {
9192
- time: number;
9193
- clientX: number;
9194
- clientY: number;
9195
- };
9196
- scaledCursorPos: {
9197
- x: number;
9198
- y: number;
9199
- };
9200
- hasTouched: boolean;
9201
- calculateMouseCoordinates: (event: any) => void;
9202
- getMouseRayIntersects: (objects: Object3D | Object3D[]) => import("three").Intersection<Object3D<import("three").Object3DEventMap>>[];
9203
- detectCollidersUnderMouse: () => Collider[];
9204
- detectPolygonsUnderMouse: () => string[];
9205
- detectPathsUnderMouse: () => Path[];
9206
- detectWatermarkUnderMouse: () => boolean;
9207
- detectMapsUnderMouse: () => (import("../../internal").MappedinMap | null)[];
9208
- getMouseMapPosition: () => {
9209
- x: number;
9210
- y: number;
9211
- };
9212
- checkMouseIntersectsBlueDot: () => boolean;
9213
- doHoverEffect: () => void;
9214
- onPolygonHoverOut: (polygonId: string) => false | undefined;
9215
- onPolygonHoverOver: (polygon: MappedinPolygon | string) => false | undefined;
9216
- setHoverColor: (color: string) => void;
9217
- destroy(): void;
9193
+ core: ICore;
9194
+ blueDotManager?: BlueDotManager;
9195
+ rendererDomElement: any;
9196
+ currentHover: string | null;
9197
+ hoverLabel: any;
9198
+ hoverColor: Color;
9199
+ options: {
9200
+ disableHover: boolean;
9201
+ };
9202
+ constructor(core: ICore);
9203
+ setBlueDotManager: (blueDotManager: any) => void;
9204
+ touchCount: number;
9205
+ zoomOut(): void;
9206
+ zoomIn(event: any): void;
9207
+ onPointerMove: (event: any) => void;
9208
+ onPointerUp: (event: any) => void;
9209
+ /**
9210
+ * We've confirmed that a map click has occured, so handle that here
9211
+ */
9212
+ handleMapClick(event: any): void;
9213
+ onPointerDown: (event: any) => void;
9214
+ incrementTouches: (event: any) => void;
9215
+ decrementTouches: (event: any) => void;
9216
+ clearMouse: () => void;
9217
+ getMousePos: (event: any) => {
9218
+ x: any;
9219
+ y: any;
9220
+ };
9221
+ getScaledMousePos: (event: any) => {
9222
+ x: number;
9223
+ y: number;
9224
+ };
9225
+ cursorPos: {
9226
+ x: number;
9227
+ y: number;
9228
+ };
9229
+ mouse: {
9230
+ x: number;
9231
+ y: number;
9232
+ };
9233
+ mouseDownStart: {
9234
+ time: number;
9235
+ clientX: number;
9236
+ clientY: number;
9237
+ };
9238
+ scaledCursorPos: {
9239
+ x: number;
9240
+ y: number;
9241
+ };
9242
+ hasTouched: boolean;
9243
+ calculateMouseCoordinates: (event: any) => void;
9244
+ getMouseRayIntersects: (objects: Object3D | Object3D[]) => import("three").Intersection<Object3D<import("three").Object3DEventMap>>[];
9245
+ detectCollidersUnderMouse: () => Collider[];
9246
+ detectPolygonsUnderMouse: () => string[];
9247
+ detectPathsUnderMouse: () => Path[];
9248
+ detectWatermarkUnderMouse: () => boolean;
9249
+ detectMapsUnderMouse: () => (import("../../internal").MappedinMap | null)[];
9250
+ /**
9251
+ * Gets mouse click position in x y map coordinates
9252
+ */
9253
+ getMouseMapPosition: () => {
9254
+ x: number;
9255
+ y: number;
9256
+ };
9257
+ checkMouseIntersectsBlueDot: () => boolean;
9258
+ doHoverEffect: () => void;
9259
+ onPolygonHoverOut: (polygonId: string) => false | undefined;
9260
+ onPolygonHoverOver: (polygon: MappedinPolygon | string) => false | undefined;
9261
+ setHoverColor: (color: string) => void;
9262
+ destroy(): void;
9218
9263
  }
9219
9264
  export default EventSystem;
9220
9265
  }
@@ -9355,115 +9400,141 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9355
9400
  import { STACKED_MAPS_STATE, MapViewScene, MapViewStackScene, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
9356
9401
  import type { ICore, TCameraTransform } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
9357
9402
  enum ACTION {
9358
- enable = "enable",
9359
- disable = "disable",
9360
- showOverview = "showOverview",
9361
- zoomInToMap = "zoomInToMap",
9362
- scrollToMap = "scrollToMap"
9403
+ enable = "enable",
9404
+ disable = "disable",
9405
+ showOverview = "showOverview",
9406
+ zoomInToMap = "zoomInToMap",
9407
+ scrollToMap = "scrollToMap",
9408
+ restack = "restack"
9363
9409
  }
9364
9410
  type TTargetTransitionFunction = ((options: TParams) => () => Promise<void>) | ((options: TParams) => void);
9365
9411
  type TParams = {
9366
- map: MappedinMap;
9412
+ map: MappedinMap;
9367
9413
  } | {
9368
- directions: MappedinDirections | MappedinDirections[];
9414
+ directions: MappedinDirections | MappedinDirections[];
9369
9415
  } | {
9370
- stackScene: MapViewStackScene;
9371
- directions: MappedinDirections | MappedinDirections[];
9372
- verticalDistanceBetweenMaps?: number;
9416
+ stackScene: MapViewStackScene;
9417
+ directions: MappedinDirections | MappedinDirections[];
9418
+ verticalDistanceBetweenMaps?: number;
9373
9419
  } | {
9374
- stackScene: MapViewStackScene;
9375
- verticalDistanceBetweenMaps?: number;
9376
- map: MappedinMap;
9377
- nodes: MappedinNode[];
9420
+ stackScene: MapViewStackScene;
9421
+ verticalDistanceBetweenMaps?: number;
9422
+ map: MappedinMap;
9423
+ nodes: MappedinNode[];
9378
9424
  } | {
9379
- stackScene: MapViewStackScene;
9380
- map: MappedinMap;
9381
- nodes: MappedinNode[];
9382
- rotation: number;
9383
- cameraTransform?: TCameraTransform;
9384
- verticalDistanceBetweenMaps?: number;
9425
+ stackScene: MapViewStackScene;
9426
+ map: MappedinMap;
9427
+ nodes: MappedinNode[];
9428
+ rotation: number;
9429
+ cameraTransform?: TCameraTransform;
9430
+ verticalDistanceBetweenMaps?: number;
9385
9431
  };
9386
9432
  type TActionFn = [STACKED_MAPS_STATE, TTargetTransitionFunction[]];
9387
9433
  type TState = {
9388
- [stateName in STACKED_MAPS_STATE]?: {
9389
- actions: {
9390
- [actionName in ACTION]?: TActionFn;
9434
+ [stateName in STACKED_MAPS_STATE]?: {
9435
+ actions: {
9436
+ [actionName in ACTION]?: TActionFn;
9437
+ };
9391
9438
  };
9392
- };
9393
9439
  };
9394
9440
  export type TInternalTransitionOptions = {
9395
- animate?: boolean;
9441
+ animate?: boolean;
9396
9442
  };
9397
9443
  export type TStackedMapsOptions = {
9398
- verticalDistanceBetweenMaps?: number;
9399
- mapLabels?: boolean;
9444
+ /**
9445
+ * The vertical distance between maps in overview, in metres.
9446
+ * @default 50
9447
+ */
9448
+ verticalDistanceBetweenMaps?: number;
9449
+ /**
9450
+ * Whether to show map level labels in overview.
9451
+ * @default true
9452
+ */
9453
+ mapLabels?: boolean;
9454
+ /**
9455
+ * Whether to show only Journey maps in the stack if a Journey is active and the current map is part of the Journey.
9456
+ * @default true
9457
+ */
9458
+ prioritizeJourneyMaps?: boolean;
9400
9459
  };
9401
9460
  class StackedMapsController {
9402
- #private;
9403
- options: TStackedMapsOptions;
9404
- enabled: boolean;
9405
- stackScene: MapViewStackScene;
9406
- directions: MappedinDirections | MappedinDirections[];
9407
- constructor(core: ICore);
9408
- needsUpdate: boolean;
9409
- currentState: STACKED_MAPS_STATE;
9410
- mapsInJourney: MappedinMap[];
9411
- getZoomIntoMapOptions: (params: TParams) => (MapViewScene | {
9412
- activeMap: MappedinMap;
9413
- focusOn: {
9414
- targets: {
9415
- nodes: MappedinNode[];
9416
- };
9417
- options: {
9418
- zoom?: number | undefined;
9419
- tilt: number;
9420
- rotation: number;
9421
- position?: MappedinNode | import("../../internal").MappedinCoordinate | undefined;
9422
- easing: CAMERA_EASING_MODE;
9423
- };
9424
- };
9425
- })[] | undefined;
9426
- getDisableOptions: (params: TParams) => (MapViewScene | {
9427
- activeMap: MappedinMap;
9428
- })[] | undefined;
9429
- getShowOverviewOptions: (params: TParams) => (MapViewStackScene | {
9430
- activeMap: MappedinMap;
9431
- focusOn: {
9432
- options: {
9433
- tilt: number;
9434
- duration: number;
9435
- };
9436
- };
9437
- verticalDistanceBetweenMaps: number | undefined;
9438
- })[] | undefined;
9439
- getScrollToMapOptions: (params: TParams) => (MapViewStackScene | {
9440
- focusOn: {
9441
- targets: {
9442
- nodes: MappedinNode[];
9443
- };
9444
- options: {
9445
- tilt: number;
9446
- easing: CAMERA_EASING_MODE;
9447
- };
9448
- };
9449
- activeMap: MappedinMap;
9450
- })[] | undefined;
9451
- getEnableOptions: (params: TParams) => void;
9452
- getShowOverviewTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9453
- getZoomInToMapTransition: (options: any) => () => Promise<void>;
9454
- getScrollToMapTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9455
- getDisableTransition: (options: any) => () => Promise<void>;
9456
- getEnableTransition: () => () => void;
9457
- states: TState;
9458
- transition(currentState: STACKED_MAPS_STATE, actionName: ACTION): TTargetTransitionFunction[] | void;
9459
- exec(transitions: TTargetTransitionFunction[] | void, params: TParams): Promise<void>;
9460
- disable: () => Promise<void>;
9461
- enable: (opts?: TStackedMapsOptions) => Promise<void>;
9462
- get nodesInJourney(): MappedinNode[];
9463
- showOverview: () => Promise<void>;
9464
- scrollToMap: (map: MappedinMap) => Promise<void>;
9465
- zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
9466
- get currentMap(): MappedinMap;
9461
+ #private;
9462
+ options: TStackedMapsOptions;
9463
+ enabled: boolean;
9464
+ stackScene: MapViewStackScene;
9465
+ constructor(core: ICore);
9466
+ needsUpdate: boolean;
9467
+ currentState: STACKED_MAPS_STATE;
9468
+ mapsInStack: MappedinMap[];
9469
+ getZoomIntoMapOptions: (params: TParams) => (MapViewScene | {
9470
+ activeMap: MappedinMap;
9471
+ focusOn: {
9472
+ targets: {
9473
+ nodes: MappedinNode[];
9474
+ };
9475
+ options: {
9476
+ zoom?: number | undefined;
9477
+ tilt: number;
9478
+ rotation: number;
9479
+ position?: MappedinNode | import("../../internal").MappedinCoordinate | undefined;
9480
+ easing: CAMERA_EASING_MODE;
9481
+ };
9482
+ };
9483
+ })[] | undefined;
9484
+ getDisableOptions: (params: TParams) => (MapViewScene | {
9485
+ activeMap: MappedinMap;
9486
+ })[] | undefined;
9487
+ getShowOverviewOptions: (params: TParams) => (MapViewStackScene | {
9488
+ activeMap: MappedinMap;
9489
+ focusOn: {
9490
+ options: {
9491
+ tilt: number;
9492
+ duration: number;
9493
+ };
9494
+ };
9495
+ verticalDistanceBetweenMaps: number | undefined;
9496
+ })[] | undefined;
9497
+ getScrollToMapOptions: (params: TParams) => (MapViewStackScene | {
9498
+ focusOn: {
9499
+ targets: {
9500
+ nodes: MappedinNode[];
9501
+ };
9502
+ options: {
9503
+ tilt: number;
9504
+ easing: CAMERA_EASING_MODE;
9505
+ };
9506
+ };
9507
+ activeMap: MappedinMap;
9508
+ })[] | undefined;
9509
+ getRestackOptions: (params: TParams) => (MapViewStackScene | {
9510
+ activeMap: MappedinMap;
9511
+ focusOn: {
9512
+ options: {
9513
+ tilt: number;
9514
+ duration: number;
9515
+ };
9516
+ };
9517
+ verticalDistanceBetweenMaps: number | undefined;
9518
+ })[] | undefined;
9519
+ getEnableOptions: () => void;
9520
+ getShowOverviewTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9521
+ getZoomInToMapTransition: (options: any) => () => Promise<void>;
9522
+ getScrollToMapTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9523
+ getRestackTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9524
+ getDisableTransition: (options: any) => () => Promise<void>;
9525
+ getEnableTransition: () => () => void;
9526
+ states: TState;
9527
+ get determineMapStack(): MappedinMap[];
9528
+ transition(currentState: STACKED_MAPS_STATE, actionName: ACTION): TTargetTransitionFunction[] | void;
9529
+ exec(transitions: TTargetTransitionFunction[] | void, params: TParams): Promise<void>;
9530
+ disable: () => Promise<void>;
9531
+ enable: (opts?: TStackedMapsOptions) => Promise<void>;
9532
+ get nodesInJourneyOrMap(): any[];
9533
+ showOverview: () => Promise<void>;
9534
+ scrollToMap: (map: MappedinMap) => Promise<void>;
9535
+ restack: (options?: TStackedMapsOptions) => Promise<void>;
9536
+ zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
9537
+ get currentMap(): MappedinMap;
9467
9538
  }
9468
9539
  export default StackedMapsController;
9469
9540
  }
@@ -9953,7 +10024,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9953
10024
  /**
9954
10025
  * Exports the current scene as a GLTF file.
9955
10026
  */
9956
- getCurrentSceneGLTF(userOptions: TGLTFExportOptions): Promise<Blob>;
10027
+ getCurrentSceneGLTF: (userOptions: TGLTFExportOptions) => Promise<Blob>;
9957
10028
  }
9958
10029
  }
9959
10030
 
@@ -9977,6 +10048,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9977
10048
  */
9978
10049
  getVisibleLayersForLoadedMap(map: MappedinMap): string[] | undefined;
9979
10050
  addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void>;
10051
+ removeGeoJSONLayer(layerName: string): Promise<void>;
9980
10052
  }
9981
10053
  export default LayerController;
9982
10054
  }
@@ -11457,7 +11529,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core' {
11457
11529
  resolution: Vector2;
11458
11530
  cameraParameters: any;
11459
11531
  controls: typeof Mappedin.CameraControls;
11460
- cameraPlane: Mesh;
11532
+ worldPlane: Mesh;
11461
11533
  canvasWidth: number;
11462
11534
  canvasHeight: number;
11463
11535
  cachedPadding: TPadding;
@@ -11938,60 +12010,73 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinVenue' {
11938
12010
  import type { Mappedin } from '@mappedin/mappedin-js/packages/get-venue/internal';
11939
12011
  import type { TLogo, TOpeningHours } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.API.types';
11940
12012
  /**
11941
- * A {@link MappedinVenue} is a specific place (like a mall) with one or more Maps (typically representing different floors) and Locations (stores, washrooms, elevators, etc).
11942
- *
11943
- * A Venue can have more properties such as 'name' and 'slug'. The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Venues. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
11944
- *
11945
- * See below for an example a 'things' object with available Venue properties specified:
11946
- *
11947
- * things: {
11948
- * venue: ['slug', 'name', 'language', 'address', 'city', 'state', 'postal', 'telephone', 'latitude', 'longitude', 'website', 'operationHours'],
11949
- * locations: [],
11950
- * categories: [],
11951
- * maps: []
11952
- * }
11953
- *
11954
- *
11955
- * @class MappedinVenue
11956
- */
12013
+ * A {@link MappedinVenue} is a specific place (like a mall) with one or more Maps (typically representing different floors) and Locations (stores, washrooms, elevators, etc).
12014
+ *
12015
+ * A Venue can have more properties such as 'name' and 'slug'. The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Venues. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
12016
+ *
12017
+ * See below for an example a 'things' object with available Venue properties specified:
12018
+ *
12019
+ * things: {
12020
+ * venue: ['slug', 'name', 'language', 'address', 'city', 'state', 'postal', 'telephone', 'latitude', 'longitude', 'website', 'operationHours'],
12021
+ * locations: [],
12022
+ * categories: [],
12023
+ * maps: []
12024
+ * }
12025
+ *
12026
+ *
12027
+ * @class MappedinVenue
12028
+ */
11957
12029
  export class MappedinVenue {
11958
- #private;
11959
- defaultMap: string;
11960
- address: string;
11961
- city: string;
11962
- countrycode: string;
11963
- externalId: string;
11964
- id: string;
11965
- latitude?: number;
11966
- logo?: TLogo;
11967
- longitude?: number;
11968
- name: string;
11969
- operationHours?: TOpeningHours[];
11970
- postal: string;
11971
- slug: string;
11972
- state: string;
11973
- telephone: string;
11974
- tzid: string;
11975
- tzidOverride: string;
11976
- utcOffset: string;
11977
- website: string;
11978
- secureContentStorage: boolean;
11979
- defaultLanguage: {
11980
- code: string;
11981
- name: string;
11982
- };
11983
- languages: {
12030
+ #private;
12031
+ defaultMap: string;
12032
+ address: string;
12033
+ city: string;
12034
+ countrycode: string;
12035
+ externalId: string;
12036
+ id: string;
12037
+ latitude?: number;
12038
+ logo?: TLogo;
12039
+ longitude?: number;
11984
12040
  name: string;
11985
- code: string;
11986
- }[];
11987
- topLocations?: string[];
11988
- constructor(mappedin: Mappedin, data: any);
11989
- get metadata(): any;
11990
- set metadata(value: any);
11991
- static hydrate(data: any, mappedin: Mappedin): MappedinVenue;
11992
- static fetch(mappedin: Mappedin): Promise<MappedinVenue>;
11993
- get isMultiBuilding(): any;
11994
- toJSON(): any;
12041
+ operationHours?: TOpeningHours[];
12042
+ postal: string;
12043
+ slug: string;
12044
+ state: string;
12045
+ telephone: string;
12046
+ tzid: string;
12047
+ tzidOverride: string;
12048
+ utcOffset: string;
12049
+ website: string;
12050
+ secureContentStorage: boolean;
12051
+ defaultLanguage: {
12052
+ code: string;
12053
+ name: string;
12054
+ };
12055
+ languages: {
12056
+ name: string;
12057
+ code: string;
12058
+ }[];
12059
+ topLocations?: string[];
12060
+ /**
12061
+ * Venue render options provided by the server.
12062
+ */
12063
+ renderOptions: {
12064
+ /**
12065
+ * Whether the venue should use perspectives to render the map or {@link Mappedin.polygons}.
12066
+ */
12067
+ useLivePolygons: boolean;
12068
+ /**
12069
+ * Whether the venue should automatically apply {@link TDirectionToOptions} `simplify: { enabled: true }` to all directions.
12070
+ */
12071
+ simplifyDirections: boolean;
12072
+ };
12073
+ constructor(mappedin: Mappedin, data: any);
12074
+ get metadata(): any;
12075
+ set metadata(value: any);
12076
+ static hydrate(data: any, mappedin: Mappedin): MappedinVenue;
12077
+ static fetch(mappedin: Mappedin): Promise<MappedinVenue>;
12078
+ get isMultiBuilding(): any;
12079
+ toJSON(): any;
11995
12080
  }
11996
12081
  }
11997
12082
 
@@ -12614,7 +12699,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-cms/api-cms' {
12614
12699
  import { MapData, TShow3DMapOptions } from '@mappedin/mappedin-js/maker/src';
12615
12700
  import { IDirectionsResult, MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
12616
12701
  import { FloatingLabel, Marker as LegacyMarker } from '@mappedin/mappedin-js/cms/src';
12617
- import { JourneyController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
12702
+ import { ExportController, JourneyController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
12618
12703
  import Core from '@mappedin/mappedin-js/packages/legacy-renderer/private/Core';
12619
12704
  import { Coordinate, Door, Floor, MapDataInternal, MapObject, PointOfInterest, Space } from '@mappedin/mappedin-js/maker/src/map-data-objects';
12620
12705
  import { MapView } from '@mappedin/mappedin-js/maker/src/map-view';
@@ -12639,6 +12724,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-cms/api-cms' {
12639
12724
  journey?: JourneyController;
12640
12725
  Navigation: Navigation;
12641
12726
  auto: DefaultTheme['auto'];
12727
+ exportController?: ExportController;
12642
12728
  constructor(el: HTMLElement, mapView: MapView, optionsWithDefaults: TShow3DMapOptions);
12643
12729
  get currentFloor(): Floor;
12644
12730
  setFloor(floor: Floor | string): void;
@@ -14070,37 +14156,6 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Camera
14070
14156
  }
14071
14157
  }
14072
14158
 
14073
- declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Exporter' {
14074
- import { ExportController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
14075
- /**
14076
- * @hidden
14077
- */
14078
- export type TGLTFExportOptions = {
14079
- onlyVisible?: boolean;
14080
- binary?: boolean;
14081
- scale?: number;
14082
- };
14083
- /**
14084
- * API to export the scene.
14085
- *
14086
- * @hidden
14087
- */
14088
- export class Exporter {
14089
- #private;
14090
- /**
14091
- * @hidden
14092
- * @internal
14093
- */
14094
- constructor(controller: ExportController);
14095
- /**
14096
- * Exports the current scene as a GLTF file.
14097
- *
14098
- * @hidden
14099
- */
14100
- getCurrentSceneGLTF(userOptions: TGLTFExportOptions): Promise<Blob>;
14101
- }
14102
- }
14103
-
14104
14159
  declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/StackedMaps' {
14105
14160
  import { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
14106
14161
  import { STACKED_MAPS_STATE, StackedMapsController, TCameraTransform } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
@@ -14206,6 +14261,26 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
14206
14261
  * @returns Promise when all animations are complete.
14207
14262
  */
14208
14263
  zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
14264
+ /**
14265
+ * @experimental
14266
+ *
14267
+ * Used when in {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW} state to replace the maps in the
14268
+ * current stack if there is a new Journey or Journey is cleared.
14269
+ *
14270
+ * @param options - Options to adjust the overview. Each option defaults to the setting passed in {@link enable}, unless provided.
14271
+ *
14272
+ * @example
14273
+ * ```ts
14274
+ * mapView.Journey.draw(...);
14275
+ * mapView.StackedMaps.enable();
14276
+ * mapView.StackedMaps.showOverview();
14277
+ * mapView.Journey.clear();
14278
+ * mapView.StackedMaps.restack();
14279
+ * ```
14280
+ *
14281
+ * @returns Promise when all animations are complete.
14282
+ */
14283
+ restack: (options?: TStackedMapsOptions) => Promise<void>;
14209
14284
  /**
14210
14285
  * @experimental
14211
14286
  *
@@ -14297,6 +14372,12 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Layers
14297
14372
  * Adds a GeoJSON Feature or FeatureCollection to the map as a layer. The layer name must be unique
14298
14373
  */
14299
14374
  addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void> | undefined;
14375
+ /**
14376
+ * @experimental
14377
+ * Hides a GeoJSON layer from the map and removes it from the list of layers.
14378
+ * It will not appear in {@link getAllLayersForMap} afterwards and can be overwritten by a new layer with the same name.
14379
+ */
14380
+ removeGeoJSONLayer(layerName: string): Promise<void> | undefined;
14300
14381
  }
14301
14382
  export default LayerController;
14302
14383
  }