@mappedin/mappedin-js 6.0.1-beta.12 → 6.0.1-beta.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.
- package/THIRD_PARTY_LICENSES.txt +227 -1
- package/lib/esm/{GLTFExporter-HSPBCS24.js → GLTFExporter-GMBZKZG6.js} +1 -1
- package/lib/esm/{GLTFLoader-55WKPMRN.js → GLTFLoader-4SSZFWXF.js} +1 -1
- package/lib/esm/{browser-2NJLGV4C.js → browser-ENXYWC6X.js} +1 -1
- package/lib/esm/chunk-DHWBLLY2.js +1 -0
- package/lib/esm/{chunk-GZ7LZ5UP.js → chunk-MG6EK6W7.js} +1 -1
- package/lib/esm/{chunk-SQXYZZBW.js → chunk-TZI6DH4C.js} +1 -1
- package/lib/esm/{chunk-QKN6JD4F.js → chunk-VDJHTKPS.js} +1 -1
- package/lib/esm/{chunk-G7WXEQJ3.js → chunk-XIJRG3TO.js} +1 -1
- package/lib/esm/index.d.ts +443 -131
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-OZDC5DPH.css → inspector-OBUMFTII.css} +1 -1
- package/lib/esm/inspector-VOY276VO.js +1 -0
- package/lib/esm/internal-KQ6MN3GS.js +1 -0
- package/lib/esm/internal-NBBO7CQY.css +1 -0
- package/lib/esm/{outdoor-context-v4-W7UZ2JSB.js → outdoor-context-v4-YJILSBMT.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-G4N5XJZG.js +0 -1
- package/lib/esm/chunk-NLGPMWPZ.js +0 -1
- package/lib/esm/inspector-JU5BF2M5.js +0 -1
- package/lib/esm/internal-OAZHYFPJ.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
// ../mappedin-js/@packages/internal/common
|
|
9
9
|
// ../mappedin-js/@mappedin/core-sdk
|
|
10
10
|
// ../mappedin-js/@mappedin/core-sdk/src/camera
|
|
11
|
+
// ../mappedin-js/@packages/internal/geojson-navigator
|
|
11
12
|
// ../mappedin-js/@tweenjs/tween.js
|
|
12
13
|
// ../mappedin-js/@mappedin/mvf/dist/locale
|
|
13
|
-
// ../mappedin-js/three
|
|
14
14
|
// ../mappedin-js/zod
|
|
15
|
+
// ../mappedin-js/three
|
|
15
16
|
// ../mappedin-js/@packages/internal/shave-text/shave-text
|
|
16
17
|
// ../mappedin-js/@turf/turf
|
|
17
18
|
// ../mappedin-js/@packages/internal/quad-tree
|
|
18
19
|
// ../mappedin-js/@packages/internal/outdoor-context-v4
|
|
19
|
-
// ../mappedin-js/@packages/internal/geojson-navigator
|
|
20
20
|
// ../mappedin-js/minisearch
|
|
21
21
|
// ../mappedin-js/three/addons/loaders/GLTFLoader.js
|
|
22
22
|
// ../mappedin-js/@mapbox/point-geometry
|
|
@@ -35,7 +35,7 @@ declare module '@mappedin/mappedin-js' {
|
|
|
35
35
|
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/internal/mvf-utils';
|
|
36
36
|
import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
|
|
37
37
|
import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
38
|
-
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle } 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 } from '@mappedin/mvf';
|
|
39
39
|
import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
40
40
|
import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
|
|
41
41
|
import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
|
|
@@ -288,6 +288,7 @@ declare module '@mappedin/mappedin-js' {
|
|
|
288
288
|
};
|
|
289
289
|
/**
|
|
290
290
|
* @internal
|
|
291
|
+
* @deprecated Use {@link hydrateMapData} instead.
|
|
291
292
|
*
|
|
292
293
|
* Returns a {@link MapData} instance from a parsed MVF object.
|
|
293
294
|
*/
|
|
@@ -299,6 +300,37 @@ declare module '@mappedin/mappedin-js' {
|
|
|
299
300
|
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
300
301
|
*/
|
|
301
302
|
export function setUseEnterpriseAPI(value: boolean): void;
|
|
303
|
+
export type THydrateMapDataBundle = {
|
|
304
|
+
type: 'binary';
|
|
305
|
+
options?: {
|
|
306
|
+
enterprise?: boolean;
|
|
307
|
+
};
|
|
308
|
+
languagePacks?: {
|
|
309
|
+
language: {
|
|
310
|
+
code: string;
|
|
311
|
+
name: string;
|
|
312
|
+
};
|
|
313
|
+
localePack: Uint8Array;
|
|
314
|
+
}[];
|
|
315
|
+
main: Uint8Array;
|
|
316
|
+
} | {
|
|
317
|
+
type: 'json';
|
|
318
|
+
options?: {
|
|
319
|
+
enterprise?: boolean;
|
|
320
|
+
};
|
|
321
|
+
languagePacks?: {
|
|
322
|
+
language: {
|
|
323
|
+
code: string;
|
|
324
|
+
name: string;
|
|
325
|
+
};
|
|
326
|
+
localePack: ParsedMVFLocalePack;
|
|
327
|
+
}[];
|
|
328
|
+
main: TMVF;
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* Load a MapData instance from a backup including language packs. Pass in userOptions to ensure outdoor view is available.
|
|
332
|
+
*/
|
|
333
|
+
export const hydrateMapData: (backup: THydrateMapDataBundle | TMVF, userOptions?: TGetMapDataOptions) => Promise<MapData>;
|
|
302
334
|
/**
|
|
303
335
|
* Asynchronously retrieves map data ({@link MapData}) based on user-provided options.
|
|
304
336
|
*
|
|
@@ -329,8 +361,8 @@ declare module '@mappedin/mappedin-js' {
|
|
|
329
361
|
export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
330
362
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
331
363
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
332
|
-
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
333
|
-
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
364
|
+
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';
|
|
365
|
+
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
334
366
|
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
335
367
|
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
336
368
|
}
|
|
@@ -339,11 +371,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
339
371
|
import { Analytics } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
340
372
|
import { PubSub } from '@packages/internal/common';
|
|
341
373
|
import type { TSearchOptions } from '@packages/internal/mvf-utils';
|
|
342
|
-
import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
374
|
+
import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate, FloorStack, Node } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
343
375
|
import type EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
|
|
344
376
|
import type EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
|
|
345
377
|
import type EnterpriseVenue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
|
|
346
378
|
import { Search } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
379
|
+
import type { TNavigationTarget, TGetDirectionsOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
380
|
+
import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions';
|
|
347
381
|
/**
|
|
348
382
|
* A WeakMap to associate {@link MapData} instances with their internal representation.
|
|
349
383
|
* We need a way to get the internal data object from the API
|
|
@@ -470,6 +504,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
470
504
|
* const annotations = mapData.getByType('annotation');
|
|
471
505
|
*/
|
|
472
506
|
getByType(type: 'annotation'): Annotation[];
|
|
507
|
+
/**
|
|
508
|
+
* @returns The nodes ({@link Node}) on the map.
|
|
509
|
+
* @example
|
|
510
|
+
* const nodes = mapData.getByType('node');
|
|
511
|
+
*/
|
|
512
|
+
getByType(type: 'node'): Node[];
|
|
473
513
|
/**
|
|
474
514
|
* @returns The enterprise locations ({@link EnterpriseLocation}) on the map.
|
|
475
515
|
* @example
|
|
@@ -487,7 +527,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
487
527
|
* @example
|
|
488
528
|
* const enterpriseVenue = mapData.getByType('enterprise-venue');
|
|
489
529
|
*/
|
|
490
|
-
getByType(type: 'enterprise-venue'): EnterpriseVenue;
|
|
530
|
+
getByType(type: 'enterprise-venue'): EnterpriseVenue | undefined;
|
|
491
531
|
/**
|
|
492
532
|
* Retrieves a specific map feature by its type and ID.
|
|
493
533
|
*
|
|
@@ -497,16 +537,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
497
537
|
* @example
|
|
498
538
|
* const space = mapData.getById('space', 'space-id');
|
|
499
539
|
*/
|
|
500
|
-
getById(type:
|
|
501
|
-
getById(type: 'door', id: string): Door | undefined;
|
|
502
|
-
getById(type: 'floor', id: string): Floor | undefined;
|
|
503
|
-
getById(type: 'floor-stack', id: string): FloorStack | undefined;
|
|
504
|
-
getById(type: 'connection', id: string): Connection | undefined;
|
|
505
|
-
getById(type: 'object', id: string): MapObject | undefined;
|
|
506
|
-
getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
|
|
507
|
-
getById(type: 'annotation', id: string): Annotation | undefined;
|
|
508
|
-
getById(type: 'enterprise-location', id: string): EnterpriseLocation | undefined;
|
|
509
|
-
getById(type: 'enterprise-category', id: string): EnterpriseCategory | undefined;
|
|
540
|
+
getById<T extends string>(type: T, id: string): T extends 'node' ? Node | undefined : T extends 'space' ? Space | undefined : T extends 'door' ? Door | undefined : T extends 'floor' ? Floor | undefined : T extends 'floor-stack' ? FloorStack | undefined : T extends 'connection' ? Connection | undefined : T extends 'object' ? MapObject | undefined : T extends 'point-of-interest' ? PointOfInterest | undefined : T extends 'annotation' ? Annotation | undefined : T extends 'enterprise-location' ? EnterpriseLocation | undefined : T extends 'enterprise-category' ? EnterpriseCategory | undefined : undefined;
|
|
510
541
|
getById(type: string, id: string): object | undefined;
|
|
511
542
|
/**
|
|
512
543
|
* Changes the language of the map data.
|
|
@@ -527,6 +558,35 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
527
558
|
* @internal
|
|
528
559
|
*/
|
|
529
560
|
get currentLanguage(): import("@mappedin/mvf").Language | undefined;
|
|
561
|
+
/**
|
|
562
|
+
* Retrieves directions ({@link Directions}) from one navigable point ({@link TNavigationTarget}) to another on the map.
|
|
563
|
+
*
|
|
564
|
+
* @param from The starting point for navigation.
|
|
565
|
+
* @param to The destination point.
|
|
566
|
+
* @param options Optional parameters for getting directions.
|
|
567
|
+
* @returns Directions from the start to the destination point.
|
|
568
|
+
* @example
|
|
569
|
+
* const directions = await map.getDirections(space1, space2);
|
|
570
|
+
*/
|
|
571
|
+
getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | (TNavigationTarget | TNavigationTarget[])[], options?: TGetDirectionsOptions) => Directions | Directions[] | undefined;
|
|
572
|
+
/**
|
|
573
|
+
* Retrieves the distance between two navigable points ({@link TNavigationTarget}) on the map.
|
|
574
|
+
*
|
|
575
|
+
* @param from The starting point.
|
|
576
|
+
* @param to The destination point.
|
|
577
|
+
* @returns The distance between the start and destination points in meters.
|
|
578
|
+
*/
|
|
579
|
+
getDistance(from: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node | EnterpriseLocation, to: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node | EnterpriseLocation): number;
|
|
580
|
+
/**
|
|
581
|
+
* Creates a backup of the map data including language packs.
|
|
582
|
+
* @internal
|
|
583
|
+
*/
|
|
584
|
+
toBinaryBundle({ downloadLanguagePacks }?: {
|
|
585
|
+
downloadLanguagePacks?: boolean;
|
|
586
|
+
}): Promise<void | import(".").THydrateMapDataBundle>;
|
|
587
|
+
toJSONBundle({ downloadLanguagePacks }?: {
|
|
588
|
+
downloadLanguagePacks?: boolean;
|
|
589
|
+
}): Promise<import(".").THydrateMapDataBundle>;
|
|
530
590
|
}
|
|
531
591
|
export default MapData;
|
|
532
592
|
/**
|
|
@@ -645,7 +705,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
|
|
|
645
705
|
}
|
|
646
706
|
|
|
647
707
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
648
|
-
import
|
|
708
|
+
import Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
649
709
|
import Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
|
|
650
710
|
import Space from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space';
|
|
651
711
|
import Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
@@ -664,9 +724,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
664
724
|
import EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
|
|
665
725
|
import EnterpriseVenue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
|
|
666
726
|
import { PubSub } from '@packages/internal/common';
|
|
667
|
-
import type { LanguagePack, Places } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
727
|
+
import type { LanguagePack, Places, TMapDataInternalOptions } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
668
728
|
import { type LocalePackUrls } from '@packages/internal/mvf-utils';
|
|
669
|
-
import type {
|
|
729
|
+
import type { TGetDirectionsOptions, TNavigationTarget } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
730
|
+
import { type Directions, DirectionsInternal } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions';
|
|
731
|
+
import { type THydrateMapDataBundle } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
670
732
|
/**
|
|
671
733
|
* Internal class representing detailed map data.
|
|
672
734
|
*
|
|
@@ -701,6 +763,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
701
763
|
*/
|
|
702
764
|
readonly obstructionIdByEntranceId: Record<string, string>;
|
|
703
765
|
readonly venue?: EnterpriseVenue;
|
|
766
|
+
directions: DirectionsInternal;
|
|
704
767
|
enterpriseMode: boolean;
|
|
705
768
|
nodesById: MapDataRecords['nodesById'];
|
|
706
769
|
spacesById: MapDataRecords['spacesById'];
|
|
@@ -715,6 +778,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
715
778
|
categoriesById: MapDataRecords['categoriesById'];
|
|
716
779
|
doorsByNodeId: MapDataRecords['doorsByNodeId'];
|
|
717
780
|
locationsBySpaceId: MapDataRecords['mvfLocationsBySpaceId'];
|
|
781
|
+
locationIdsByNodeId: MapDataRecords['locationIdsByNodeId'];
|
|
718
782
|
mvfAnnotationsById: MapDataRecords['mvfAnnotationsById'];
|
|
719
783
|
mvfConnectionsById: MapDataRecords['mvfConnectionsById'];
|
|
720
784
|
mvfConnectionsByNodeId: MapDataRecords['mvfConnectionsByNodeId'];
|
|
@@ -732,15 +796,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
732
796
|
languagePacks: {
|
|
733
797
|
[languageCode: string]: LanguagePack;
|
|
734
798
|
};
|
|
799
|
+
binaryBundle?: Uint8Array;
|
|
735
800
|
/**
|
|
736
801
|
* @internal
|
|
737
802
|
*/
|
|
738
|
-
constructor(mvf: ParsedMVF,
|
|
739
|
-
enterprise?: boolean;
|
|
740
|
-
outdoorViewToken?: string;
|
|
741
|
-
localePacksUrls?: LocalePackUrls;
|
|
742
|
-
languagePacks?: LanguagePackHydrationItem[];
|
|
743
|
-
});
|
|
803
|
+
constructor(mvf: ParsedMVF, options: TMapDataInternalOptions);
|
|
744
804
|
/**
|
|
745
805
|
* Retrieves the map name.
|
|
746
806
|
*
|
|
@@ -842,6 +902,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
842
902
|
* change the langauge of the data objects in mapdata
|
|
843
903
|
*/
|
|
844
904
|
changeLanguage(languageCode: string): Promise<void>;
|
|
905
|
+
getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | (TNavigationTarget | TNavigationTarget[])[], opt?: TGetDirectionsOptions) => Directions | Directions[] | undefined;
|
|
906
|
+
getDistance(from: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node | EnterpriseLocation, to: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node | EnterpriseLocation): number;
|
|
907
|
+
toJSONBundle({ downloadLanguagePacks, }?: {
|
|
908
|
+
downloadLanguagePacks?: boolean;
|
|
909
|
+
}): Promise<THydrateMapDataBundle>;
|
|
910
|
+
toBinaryBundle({ downloadLanguagePacks, }?: {
|
|
911
|
+
downloadLanguagePacks?: boolean;
|
|
912
|
+
}): Promise<THydrateMapDataBundle | void>;
|
|
845
913
|
/**
|
|
846
914
|
* Cleans up resources used by the instance.
|
|
847
915
|
*
|
|
@@ -849,7 +917,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
849
917
|
*/
|
|
850
918
|
destroy(): void;
|
|
851
919
|
}
|
|
852
|
-
export { MapDataInternal, Space, Floor, FloorStack, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, };
|
|
920
|
+
export { Node, MapDataInternal, Space, Floor, FloorStack, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, };
|
|
853
921
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space';
|
|
854
922
|
export type { Places };
|
|
855
923
|
}
|
|
@@ -862,7 +930,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
862
930
|
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
863
931
|
import type { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
864
932
|
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
865
|
-
import type { Door, Floor, MapObject, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
933
|
+
import type { Annotation, Coordinate, Door, Floor, MapObject, PointOfInterest, Space, Node, EnterpriseLocation } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
866
934
|
import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
867
935
|
import type { Label, Marker, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
868
936
|
import type { TEventPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
@@ -994,6 +1062,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
994
1062
|
getState<T extends Space | MapObject | Label | Marker | Image | string>(target: T): TGetState<T> | undefined;
|
|
995
1063
|
setHoverColor(c: string): void;
|
|
996
1064
|
getHoverColor(): string | undefined;
|
|
1065
|
+
/**
|
|
1066
|
+
* @internal
|
|
1067
|
+
*/
|
|
1068
|
+
convertAltitudeToMercatorZoomLevel(altitude: number): number;
|
|
1069
|
+
/**
|
|
1070
|
+
* @internal
|
|
1071
|
+
*/
|
|
1072
|
+
convertMercatorZoomLevelToAltitude(zoomLevel: number): number;
|
|
997
1073
|
/**
|
|
998
1074
|
* Determines if a given target is within the viewport.
|
|
999
1075
|
*
|
|
@@ -1015,7 +1091,15 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1015
1091
|
* @example
|
|
1016
1092
|
* const directions = await map.getDirections(space1, space2);
|
|
1017
1093
|
*/
|
|
1018
|
-
getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], options?: TGetDirectionsOptions) => Directions | undefined;
|
|
1094
|
+
getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | (TNavigationTarget | TNavigationTarget[])[], options?: TGetDirectionsOptions) => Directions | Directions[] | undefined;
|
|
1095
|
+
/**
|
|
1096
|
+
* Retrieves the distance between two navigable points ({@link TNavigationTarget}) on the map.
|
|
1097
|
+
*
|
|
1098
|
+
* @param from The starting point.
|
|
1099
|
+
* @param to The destination point.
|
|
1100
|
+
* @returns The distance between the start and destination points in meters.
|
|
1101
|
+
*/
|
|
1102
|
+
getDistance(from: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node | EnterpriseLocation, to: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node | EnterpriseLocation): number | undefined;
|
|
1019
1103
|
/**
|
|
1020
1104
|
* Creates a {@link Coordinate} on the map.
|
|
1021
1105
|
*
|
|
@@ -1027,8 +1111,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
1027
1111
|
* // Create a coordinate at the CN Tower.
|
|
1028
1112
|
* const coord = map.createCoordinate(43.642567, -79.387054);
|
|
1029
1113
|
*/
|
|
1030
|
-
createCoordinate(latitude: number, longitude: number, floor?: Floor):
|
|
1031
|
-
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor):
|
|
1114
|
+
createCoordinate(latitude: number, longitude: number, floor?: Floor): Coordinate;
|
|
1115
|
+
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor): Coordinate | undefined;
|
|
1032
1116
|
/**
|
|
1033
1117
|
* @hidden
|
|
1034
1118
|
* @experimental
|
|
@@ -1156,7 +1240,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay' {
|
|
|
1156
1240
|
|
|
1157
1241
|
declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
1158
1242
|
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1159
|
-
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation, EnterpriseLocation } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
1243
|
+
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation, EnterpriseLocation, Node } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
1160
1244
|
import type { Label, Marker, Model, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
1161
1245
|
import type { EasingCurve } from '@mappedin/core-sdk/src/camera';
|
|
1162
1246
|
import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
@@ -1228,6 +1312,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1228
1312
|
* The {@link Coordinate} at which this instruction applies.
|
|
1229
1313
|
*/
|
|
1230
1314
|
coordinate: Coordinate;
|
|
1315
|
+
/**
|
|
1316
|
+
* @internal
|
|
1317
|
+
*/
|
|
1318
|
+
node: Node;
|
|
1231
1319
|
};
|
|
1232
1320
|
/**
|
|
1233
1321
|
* Defines the state for a label when its appearance is updated.
|
|
@@ -1488,7 +1576,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1488
1576
|
/**
|
|
1489
1577
|
* Defines the target for the {@link Camera} focus operation.
|
|
1490
1578
|
*/
|
|
1491
|
-
export type TCameraFocusOnTarget = Floor | Space | Coordinate | MapObject | Connection | PointOfInterest | Door | Annotation | (Floor | Space | Coordinate | MapObject | Connection | PointOfInterest | Door)[];
|
|
1579
|
+
export type TCameraFocusOnTarget = Floor | Space | Coordinate | MapObject | Connection | PointOfInterest | Door | Annotation | Node | (Floor | Space | Coordinate | MapObject | Connection | PointOfInterest | Door | Node)[];
|
|
1492
1580
|
/**
|
|
1493
1581
|
* Defines the target for camera operations.
|
|
1494
1582
|
*/
|
|
@@ -1515,7 +1603,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1515
1603
|
/**
|
|
1516
1604
|
* Defines the target for navigation operations.
|
|
1517
1605
|
*/
|
|
1518
|
-
export type TNavigationTarget = Space | MapObject | Coordinate | Door | PointOfInterest | Connection | EnterpriseLocation;
|
|
1606
|
+
export type TNavigationTarget = Space | MapObject | Coordinate | Door | PointOfInterest | Connection | EnterpriseLocation | Node;
|
|
1519
1607
|
/**
|
|
1520
1608
|
* Defines the special zone for navigation operations.
|
|
1521
1609
|
*/
|
|
@@ -1779,6 +1867,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1779
1867
|
* Options for controlling the behavior of the {@link Directions}.
|
|
1780
1868
|
*/
|
|
1781
1869
|
export type TGetDirectionsOptions = {
|
|
1870
|
+
/**
|
|
1871
|
+
* If true directions will be shown as a multisegment route
|
|
1872
|
+
*
|
|
1873
|
+
* @default false
|
|
1874
|
+
*/
|
|
1875
|
+
multiSegment?: boolean;
|
|
1782
1876
|
/**
|
|
1783
1877
|
* If true directions will only take accessible routes
|
|
1784
1878
|
*
|
|
@@ -1973,26 +2067,62 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1973
2067
|
id?: string;
|
|
1974
2068
|
};
|
|
1975
2069
|
export type TBlueDotOptions = {
|
|
1976
|
-
/**
|
|
2070
|
+
/**
|
|
2071
|
+
* The radius of the BlueDot in pixels. The BlueDot will maintain this size clamped to a minimum of 0.35 metres.
|
|
2072
|
+
* @default 10
|
|
2073
|
+
*/
|
|
1977
2074
|
radius?: number;
|
|
1978
|
-
/**
|
|
2075
|
+
/**
|
|
2076
|
+
* The color of the BlueDot core element.
|
|
2077
|
+
* @default #2266ff
|
|
2078
|
+
*/
|
|
1979
2079
|
color?: string;
|
|
1980
|
-
/**
|
|
2080
|
+
/**
|
|
2081
|
+
* The color of the BlueDot when it has timed out and gone inactive.
|
|
2082
|
+
* @default #808080
|
|
2083
|
+
*/
|
|
2084
|
+
inactiveColor?: string;
|
|
2085
|
+
/**
|
|
2086
|
+
* Options for the accuracy ring around the BlueDot.
|
|
2087
|
+
*/
|
|
1981
2088
|
accuracyRing?: {
|
|
1982
|
-
/**
|
|
2089
|
+
/**
|
|
2090
|
+
* The color of the accuracy ring.
|
|
2091
|
+
* @default #2266ff
|
|
2092
|
+
*/
|
|
1983
2093
|
color?: string;
|
|
1984
|
-
/**
|
|
2094
|
+
/**
|
|
2095
|
+
* The opacity of the accuracy ring.
|
|
2096
|
+
* @default 0.3
|
|
2097
|
+
*/
|
|
1985
2098
|
opacity?: number;
|
|
1986
2099
|
};
|
|
1987
2100
|
/**
|
|
1988
2101
|
* Options for the bearing directional indicator.
|
|
1989
2102
|
*/
|
|
1990
2103
|
bearing?: {
|
|
1991
|
-
/**
|
|
2104
|
+
/**
|
|
2105
|
+
* The color of the bearing cone.
|
|
2106
|
+
* @default #2266ff
|
|
2107
|
+
*/
|
|
1992
2108
|
color?: string;
|
|
1993
|
-
/**
|
|
2109
|
+
/**
|
|
2110
|
+
* The opacity of the bearing cone.
|
|
2111
|
+
* @default 0.7
|
|
2112
|
+
*/
|
|
1994
2113
|
opacity?: number;
|
|
1995
2114
|
};
|
|
2115
|
+
/**
|
|
2116
|
+
* The duration of the timeout in milliseconds.
|
|
2117
|
+
* If the BlueDot does not receive a position update within this time, it will grey out until a position is received.
|
|
2118
|
+
* @default 30000
|
|
2119
|
+
*/
|
|
2120
|
+
timeout?: number;
|
|
2121
|
+
/**
|
|
2122
|
+
* Whether to log debug messages.
|
|
2123
|
+
* @default false
|
|
2124
|
+
*/
|
|
2125
|
+
debug?: boolean;
|
|
1996
2126
|
};
|
|
1997
2127
|
export type LanguagePackHydrationItem = {
|
|
1998
2128
|
language: Language;
|
|
@@ -2095,6 +2225,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
|
2095
2225
|
* @internal
|
|
2096
2226
|
*/
|
|
2097
2227
|
get currentMap(): GeojsonApiMapObject;
|
|
2228
|
+
/**
|
|
2229
|
+
* Returns true if the navigation is for a multi-floor path.
|
|
2230
|
+
*/
|
|
2231
|
+
get isMultiFloor(): boolean;
|
|
2098
2232
|
/**
|
|
2099
2233
|
* @internal
|
|
2100
2234
|
*/
|
|
@@ -2104,7 +2238,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
|
2104
2238
|
* @param directions The directions to be drawn.
|
|
2105
2239
|
* @param options Optional additional options for the navigation.
|
|
2106
2240
|
*/
|
|
2107
|
-
draw: (directions: Directions, options?: TNavigationOptions) => Promise<unknown>;
|
|
2241
|
+
draw: (directions: Directions | Directions[], options?: TNavigationOptions) => Promise<unknown>;
|
|
2108
2242
|
/**
|
|
2109
2243
|
* Clears any drawn navigation paths or directions from the map.
|
|
2110
2244
|
*/
|
|
@@ -2116,6 +2250,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
|
2116
2250
|
|
|
2117
2251
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
|
|
2118
2252
|
export { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
2253
|
+
export { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot';
|
|
2119
2254
|
export { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera';
|
|
2120
2255
|
export { Labels } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels';
|
|
2121
2256
|
export { Markers } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers';
|
|
@@ -2201,7 +2336,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category'
|
|
|
2201
2336
|
|
|
2202
2337
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location' {
|
|
2203
2338
|
import type { EnterpriseLocation as MVFEnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
|
|
2204
|
-
import type { Coordinate, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2339
|
+
import type { Coordinate, EnterpriseCategory, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2205
2340
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
2206
2341
|
import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
2207
2342
|
/**
|
|
@@ -2262,7 +2397,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location'
|
|
|
2262
2397
|
*/
|
|
2263
2398
|
constructor(data: MapDataInternal, options: {
|
|
2264
2399
|
mvfData: MVFEnterpriseLocation;
|
|
2400
|
+
categoryIds: string[];
|
|
2265
2401
|
});
|
|
2402
|
+
get categories(): EnterpriseCategory[];
|
|
2266
2403
|
get coordinates(): Coordinate[];
|
|
2267
2404
|
get nodes(): Node[];
|
|
2268
2405
|
get spaces(): Space[];
|
|
@@ -2353,6 +2490,77 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
|
|
|
2353
2490
|
export default EnterpriseVenue;
|
|
2354
2491
|
}
|
|
2355
2492
|
|
|
2493
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions' {
|
|
2494
|
+
import type { ParsedMVF } from '@mappedin/mvf';
|
|
2495
|
+
import type { DirectionsCollection } from '@packages/internal/geojson-navigator';
|
|
2496
|
+
import { Coordinate, Node, type MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2497
|
+
import type { TDirectionInstruction, TDirectionZone, TNavigationTarget } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
2498
|
+
/**
|
|
2499
|
+
* Represents a set of directions between two points.
|
|
2500
|
+
*
|
|
2501
|
+
* Directions are used to represent the path between two points on the map,
|
|
2502
|
+
* as well as the instructions to follow the path.
|
|
2503
|
+
*/
|
|
2504
|
+
export class Directions {
|
|
2505
|
+
#private;
|
|
2506
|
+
/**
|
|
2507
|
+
* @internal
|
|
2508
|
+
*/
|
|
2509
|
+
constructor(directions: DirectionsCollection, mapData: MapDataInternal);
|
|
2510
|
+
/**
|
|
2511
|
+
* @internal
|
|
2512
|
+
*/
|
|
2513
|
+
get path(): Node[];
|
|
2514
|
+
/**
|
|
2515
|
+
* All the coordinates ({@link Coordinate}) of the directions.
|
|
2516
|
+
*/
|
|
2517
|
+
get coordinates(): Coordinate[];
|
|
2518
|
+
/**
|
|
2519
|
+
* The total distance of the path in meters.
|
|
2520
|
+
*/
|
|
2521
|
+
get distance(): number;
|
|
2522
|
+
/**
|
|
2523
|
+
* The array of instructions ({@link TDirectionInstruction}).
|
|
2524
|
+
*/
|
|
2525
|
+
get instructions(): TDirectionInstruction[];
|
|
2526
|
+
}
|
|
2527
|
+
export class DirectionsInternal {
|
|
2528
|
+
/**
|
|
2529
|
+
* @hidden
|
|
2530
|
+
*/
|
|
2531
|
+
constructor({ nodes, geojsonCollection, connections, groupBy, }: {
|
|
2532
|
+
nodes: ParsedMVF['node.geojson'];
|
|
2533
|
+
geojsonCollection: ParsedMVF['obstruction'] | ParsedMVF['space'];
|
|
2534
|
+
connections: ParsedMVF['connection.json'];
|
|
2535
|
+
groupBy?: string;
|
|
2536
|
+
});
|
|
2537
|
+
/**
|
|
2538
|
+
* Get directions between two navigation targets.
|
|
2539
|
+
*
|
|
2540
|
+
* @hidden
|
|
2541
|
+
* @param from
|
|
2542
|
+
* @param to
|
|
2543
|
+
* @param options
|
|
2544
|
+
* @param mapData
|
|
2545
|
+
*/
|
|
2546
|
+
getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
|
|
2547
|
+
accessible: boolean;
|
|
2548
|
+
smoothing: {
|
|
2549
|
+
enabled: boolean;
|
|
2550
|
+
radius: number;
|
|
2551
|
+
};
|
|
2552
|
+
zones: TDirectionZone[];
|
|
2553
|
+
}, mapData: MapDataInternal) => Directions | undefined;
|
|
2554
|
+
/**
|
|
2555
|
+
* Get the node IDs that should be excluded from the navigation graph.
|
|
2556
|
+
*
|
|
2557
|
+
* @hidden
|
|
2558
|
+
* @param accessible {boolean}
|
|
2559
|
+
*/
|
|
2560
|
+
getExcludedNodeIds: (accessible: boolean) => string[];
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2356
2564
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
|
|
2357
2565
|
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
2358
2566
|
import type { RendererCore } from '@mappedin/core-sdk';
|
|
@@ -2433,7 +2641,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-tr
|
|
|
2433
2641
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
|
|
2434
2642
|
import type { NodeCollection } from '@mappedin/mvf';
|
|
2435
2643
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
2436
|
-
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2644
|
+
import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2437
2645
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
2438
2646
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
2439
2647
|
/**
|
|
@@ -2467,6 +2675,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
|
|
|
2467
2675
|
floorId: string;
|
|
2468
2676
|
mvfData: NodeCollection['features'][number];
|
|
2469
2677
|
});
|
|
2678
|
+
get locations(): EnterpriseLocation[];
|
|
2470
2679
|
/**
|
|
2471
2680
|
* Gets the {@link Floor} associated with the node.
|
|
2472
2681
|
*
|
|
@@ -2480,6 +2689,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
|
|
|
2480
2689
|
* @returns {Coordinate} The node's coordinate.
|
|
2481
2690
|
*/
|
|
2482
2691
|
get coordinate(): Coordinate;
|
|
2692
|
+
/**
|
|
2693
|
+
* Gets the external ID of the node.
|
|
2694
|
+
*
|
|
2695
|
+
* @returns {string} The external ID of the node.
|
|
2696
|
+
*/
|
|
2697
|
+
get externalId(): string;
|
|
2483
2698
|
/**
|
|
2484
2699
|
* Gets the neighboring nodes of this node.
|
|
2485
2700
|
*
|
|
@@ -2552,6 +2767,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
|
|
|
2552
2767
|
* @returns {string} The name of the door.
|
|
2553
2768
|
*/
|
|
2554
2769
|
get name(): string;
|
|
2770
|
+
/**
|
|
2771
|
+
* Gets the external ID of the door.
|
|
2772
|
+
*
|
|
2773
|
+
* @returns {string} The external ID of the door.
|
|
2774
|
+
*/
|
|
2775
|
+
get externalId(): string;
|
|
2555
2776
|
get description(): string;
|
|
2556
2777
|
get images(): Image[];
|
|
2557
2778
|
/**
|
|
@@ -2655,8 +2876,24 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
|
2655
2876
|
* @returns {TSpaceType} The type of the space.
|
|
2656
2877
|
*/
|
|
2657
2878
|
get type(): TSpaceType;
|
|
2879
|
+
/**
|
|
2880
|
+
* Gets the description of the space.
|
|
2881
|
+
*
|
|
2882
|
+
* @returns {string} The description of the space, or an empty string if no description exists.
|
|
2883
|
+
*/
|
|
2658
2884
|
get description(): string;
|
|
2885
|
+
/**
|
|
2886
|
+
* Gets the array of images associated with the space.
|
|
2887
|
+
*
|
|
2888
|
+
* @returns {Image[]} An array of Image objects, or an empty array if no images exist.
|
|
2889
|
+
*/
|
|
2659
2890
|
get images(): Image[];
|
|
2891
|
+
/**
|
|
2892
|
+
* Gets the external identifier of the space.
|
|
2893
|
+
*
|
|
2894
|
+
* @returns {string} The external ID of the space, or an empty string if no external ID exists.
|
|
2895
|
+
*/
|
|
2896
|
+
get externalId(): string;
|
|
2660
2897
|
/**
|
|
2661
2898
|
* @internal
|
|
2662
2899
|
*/
|
|
@@ -2749,6 +2986,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
|
|
|
2749
2986
|
* @returns {string} The name of the floor.
|
|
2750
2987
|
*/
|
|
2751
2988
|
get name(): string;
|
|
2989
|
+
/**
|
|
2990
|
+
* Gets the external ID of the floor.
|
|
2991
|
+
*
|
|
2992
|
+
* @returns {string} The external ID of the floor.
|
|
2993
|
+
*/
|
|
2994
|
+
get externalId(): string;
|
|
2752
2995
|
/**
|
|
2753
2996
|
* Gets the elevation of the floor.
|
|
2754
2997
|
*
|
|
@@ -2864,6 +3107,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connectio
|
|
|
2864
3107
|
get name(): string;
|
|
2865
3108
|
get description(): string;
|
|
2866
3109
|
get images(): Image[];
|
|
3110
|
+
/**
|
|
3111
|
+
* Gets the external ID of the connection.
|
|
3112
|
+
*
|
|
3113
|
+
* @returns {string} The external ID of the connection.
|
|
3114
|
+
*/
|
|
2867
3115
|
get externalId(): string;
|
|
2868
3116
|
/**
|
|
2869
3117
|
/**
|
|
@@ -2952,6 +3200,17 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/object' {
|
|
|
2952
3200
|
* @returns {string} The name of the object.
|
|
2953
3201
|
*/
|
|
2954
3202
|
get name(): string;
|
|
3203
|
+
/**
|
|
3204
|
+
* Gets the external ID of the MapObject.
|
|
3205
|
+
*
|
|
3206
|
+
* @returns {string} The external ID of the object.
|
|
3207
|
+
*/
|
|
3208
|
+
get externalId(): string;
|
|
3209
|
+
/**
|
|
3210
|
+
* Gets the description of the MapObject.
|
|
3211
|
+
*
|
|
3212
|
+
* @returns {string} The description of the object.
|
|
3213
|
+
*/
|
|
2955
3214
|
get description(): string;
|
|
2956
3215
|
get images(): Image[];
|
|
2957
3216
|
/**
|
|
@@ -3137,6 +3396,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/poi' {
|
|
|
3137
3396
|
* @returns {Coordinate} The POI's coordinate.
|
|
3138
3397
|
*/
|
|
3139
3398
|
get coordinate(): Coordinate;
|
|
3399
|
+
/**
|
|
3400
|
+
* Gets the external ID of the POI.
|
|
3401
|
+
*
|
|
3402
|
+
* @returns {string} The external ID of the POI.
|
|
3403
|
+
*/
|
|
3404
|
+
get externalId(): string;
|
|
3140
3405
|
/**
|
|
3141
3406
|
* Serializes the POI data to JSON.
|
|
3142
3407
|
*
|
|
@@ -3209,6 +3474,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/annotatio
|
|
|
3209
3474
|
* @returns {string} The annotation type.
|
|
3210
3475
|
*/
|
|
3211
3476
|
get type(): string;
|
|
3477
|
+
/**
|
|
3478
|
+
* Gets the external ID of the annotation.
|
|
3479
|
+
*
|
|
3480
|
+
* @returns {string} The external ID of the annotation.
|
|
3481
|
+
*/
|
|
3482
|
+
get externalId(): string;
|
|
3212
3483
|
/**
|
|
3213
3484
|
* Gets the center {@link Coordinate} of the annotation.
|
|
3214
3485
|
*
|
|
@@ -3341,6 +3612,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image' {
|
|
|
3341
3612
|
* @returns {string | undefined } The name of the image.
|
|
3342
3613
|
*/
|
|
3343
3614
|
get name(): string | undefined;
|
|
3615
|
+
/**
|
|
3344
3616
|
/**
|
|
3345
3617
|
* Serializes the image data to JSON.
|
|
3346
3618
|
*
|
|
@@ -3403,6 +3675,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor-sta
|
|
|
3403
3675
|
* @returns {string} The name of the FloorStack.
|
|
3404
3676
|
*/
|
|
3405
3677
|
get name(): string;
|
|
3678
|
+
/**
|
|
3679
|
+
* Gets the externalId of FloorStack
|
|
3680
|
+
*/
|
|
3681
|
+
get externalId(): string;
|
|
3406
3682
|
/**
|
|
3407
3683
|
* Gets the floors ({@link Floor}) included in this FloorStack.
|
|
3408
3684
|
*
|
|
@@ -3451,6 +3727,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/utils/data-creation' {
|
|
|
3451
3727
|
annotationsById: Record<string, Annotation>;
|
|
3452
3728
|
locationsById: Record<MVFEnterpriseLocationId, EnterpriseLocation>;
|
|
3453
3729
|
categoriesById: Record<MVFEnterpriseCategoryId, EnterpriseCategory>;
|
|
3730
|
+
locationIdsByNodeId: Record<string, MVFEnterpriseLocationId[]>;
|
|
3454
3731
|
venue: MVFEnterpriseVenue;
|
|
3455
3732
|
spaceIdsByDestinationNodeId: Record<string, string[]>;
|
|
3456
3733
|
objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
|
|
@@ -3475,6 +3752,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/utils/data-creation' {
|
|
|
3475
3752
|
* @internal
|
|
3476
3753
|
*/
|
|
3477
3754
|
export const createEnterpriseDataFromMVF: (mvf: ParsedMVF, data: MapDataInternal) => {
|
|
3755
|
+
locationIdsByNodeId: Record<string, string[]>;
|
|
3478
3756
|
locationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
|
|
3479
3757
|
mvfLocationsById: Record<string, MVFEnterpriseLocation>;
|
|
3480
3758
|
mvfCategoriesById: Record<string, MVFEnterpriseCategory>;
|
|
@@ -3526,6 +3804,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types' {
|
|
|
3526
3804
|
import type MapObject from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/object';
|
|
3527
3805
|
import type { EnterpriseLocation as MvfEnterpriseLocation, EnterpriseCategory as MvfEnterpriseCategory, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
3528
3806
|
import type { PartialExcept } from '@mappedin/mvf/dist/locale';
|
|
3807
|
+
import { LocalePackUrls } from '@packages/internal/mvf-utils';
|
|
3808
|
+
import { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3529
3809
|
/**
|
|
3530
3810
|
* Places are the main objects that can be searched for.
|
|
3531
3811
|
*/
|
|
@@ -3546,6 +3826,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types' {
|
|
|
3546
3826
|
categories: Record<string, MvfEnterpriseCategory>;
|
|
3547
3827
|
};
|
|
3548
3828
|
};
|
|
3829
|
+
export type TMapDataInternalOptions = {
|
|
3830
|
+
enterprise?: boolean;
|
|
3831
|
+
outdoorViewToken?: string;
|
|
3832
|
+
localePacksUrls?: LocalePackUrls;
|
|
3833
|
+
languagePacks?: LanguagePackHydrationItem[];
|
|
3834
|
+
binaryBundle?: Uint8Array;
|
|
3835
|
+
};
|
|
3549
3836
|
}
|
|
3550
3837
|
|
|
3551
3838
|
declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
@@ -3554,7 +3841,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3554
3841
|
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/internal/mvf-utils';
|
|
3555
3842
|
import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
|
|
3556
3843
|
import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3557
|
-
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle } from '@mappedin/mvf';
|
|
3844
|
+
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
3558
3845
|
import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
3559
3846
|
import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
|
|
3560
3847
|
import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
|
|
@@ -3807,6 +4094,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3807
4094
|
};
|
|
3808
4095
|
/**
|
|
3809
4096
|
* @internal
|
|
4097
|
+
* @deprecated Use {@link hydrateMapData} instead.
|
|
3810
4098
|
*
|
|
3811
4099
|
* Returns a {@link MapData} instance from a parsed MVF object.
|
|
3812
4100
|
*/
|
|
@@ -3818,6 +4106,37 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3818
4106
|
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
3819
4107
|
*/
|
|
3820
4108
|
export function setUseEnterpriseAPI(value: boolean): void;
|
|
4109
|
+
export type THydrateMapDataBundle = {
|
|
4110
|
+
type: 'binary';
|
|
4111
|
+
options?: {
|
|
4112
|
+
enterprise?: boolean;
|
|
4113
|
+
};
|
|
4114
|
+
languagePacks?: {
|
|
4115
|
+
language: {
|
|
4116
|
+
code: string;
|
|
4117
|
+
name: string;
|
|
4118
|
+
};
|
|
4119
|
+
localePack: Uint8Array;
|
|
4120
|
+
}[];
|
|
4121
|
+
main: Uint8Array;
|
|
4122
|
+
} | {
|
|
4123
|
+
type: 'json';
|
|
4124
|
+
options?: {
|
|
4125
|
+
enterprise?: boolean;
|
|
4126
|
+
};
|
|
4127
|
+
languagePacks?: {
|
|
4128
|
+
language: {
|
|
4129
|
+
code: string;
|
|
4130
|
+
name: string;
|
|
4131
|
+
};
|
|
4132
|
+
localePack: ParsedMVFLocalePack;
|
|
4133
|
+
}[];
|
|
4134
|
+
main: TMVF;
|
|
4135
|
+
};
|
|
4136
|
+
/**
|
|
4137
|
+
* Load a MapData instance from a backup including language packs. Pass in userOptions to ensure outdoor view is available.
|
|
4138
|
+
*/
|
|
4139
|
+
export const hydrateMapData: (backup: THydrateMapDataBundle | TMVF, userOptions?: TGetMapDataOptions) => Promise<MapData>;
|
|
3821
4140
|
/**
|
|
3822
4141
|
* Asynchronously retrieves map data ({@link MapData}) based on user-provided options.
|
|
3823
4142
|
*
|
|
@@ -3848,8 +4167,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3848
4167
|
export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3849
4168
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
3850
4169
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3851
|
-
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3852
|
-
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
4170
|
+
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';
|
|
4171
|
+
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
3853
4172
|
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
3854
4173
|
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
3855
4174
|
}
|
|
@@ -3859,18 +4178,66 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-
|
|
|
3859
4178
|
import { PubSub } from '@packages/internal/common';
|
|
3860
4179
|
import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
3861
4180
|
import type { TBlueDotOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
4181
|
+
import { z } from 'zod';
|
|
3862
4182
|
export type TBlueDotEvents = {
|
|
3863
4183
|
'floor-change': {
|
|
3864
4184
|
reason: 'blue-dot-floor-change';
|
|
3865
4185
|
floorId: string;
|
|
3866
4186
|
};
|
|
3867
4187
|
};
|
|
4188
|
+
export type TBlueDotState = 'hidden' | 'active' | 'inactive' | 'disabled';
|
|
4189
|
+
export type TBlueDotAction = 'timeout' | 'error' | 'position-received' | 'enable' | 'disable';
|
|
3868
4190
|
export class BlueDot extends PubSub<TBlueDotEvents> {
|
|
3869
4191
|
#private;
|
|
4192
|
+
/**
|
|
4193
|
+
* @internal
|
|
4194
|
+
*/
|
|
3870
4195
|
constructor(core: RendererCore, geoJSONApi: GeoJsonApi);
|
|
3871
4196
|
enable(options?: TBlueDotOptions): void;
|
|
3872
4197
|
disable(): void;
|
|
3873
4198
|
}
|
|
4199
|
+
type TStateTransitions = {
|
|
4200
|
+
[Action in TBlueDotAction]?: TBlueDotState;
|
|
4201
|
+
};
|
|
4202
|
+
type TStateMachine = {
|
|
4203
|
+
[State in TBlueDotState]: {
|
|
4204
|
+
actions: TStateTransitions;
|
|
4205
|
+
};
|
|
4206
|
+
};
|
|
4207
|
+
export const stateMachine: TStateMachine;
|
|
4208
|
+
export const positionSchema: z.ZodObject<{
|
|
4209
|
+
coords: z.ZodObject<{
|
|
4210
|
+
latitude: z.ZodNumber;
|
|
4211
|
+
longitude: z.ZodNumber;
|
|
4212
|
+
floorLevel: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
4213
|
+
accuracy: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
4214
|
+
}, "strip", z.ZodTypeAny, {
|
|
4215
|
+
latitude: number;
|
|
4216
|
+
longitude: number;
|
|
4217
|
+
floorLevel?: number | null | undefined;
|
|
4218
|
+
accuracy?: number | null | undefined;
|
|
4219
|
+
}, {
|
|
4220
|
+
latitude: number;
|
|
4221
|
+
longitude: number;
|
|
4222
|
+
floorLevel?: number | null | undefined;
|
|
4223
|
+
accuracy?: number | null | undefined;
|
|
4224
|
+
}>;
|
|
4225
|
+
}, "strip", z.ZodTypeAny, {
|
|
4226
|
+
coords: {
|
|
4227
|
+
latitude: number;
|
|
4228
|
+
longitude: number;
|
|
4229
|
+
floorLevel?: number | null | undefined;
|
|
4230
|
+
accuracy?: number | null | undefined;
|
|
4231
|
+
};
|
|
4232
|
+
}, {
|
|
4233
|
+
coords: {
|
|
4234
|
+
latitude: number;
|
|
4235
|
+
longitude: number;
|
|
4236
|
+
floorLevel?: number | null | undefined;
|
|
4237
|
+
accuracy?: number | null | undefined;
|
|
4238
|
+
};
|
|
4239
|
+
}>;
|
|
4240
|
+
export {};
|
|
3874
4241
|
}
|
|
3875
4242
|
|
|
3876
4243
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes' {
|
|
@@ -5120,6 +5487,9 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
5120
5487
|
center?: Position;
|
|
5121
5488
|
insetsPadding: InsetPadding;
|
|
5122
5489
|
shouldMeasureCanvas: boolean;
|
|
5490
|
+
/**
|
|
5491
|
+
* Current clamped pixel ratio of the renderer, based on maplibre's clamping logic (when in interleaved mode)
|
|
5492
|
+
*/
|
|
5123
5493
|
pixelRatio: number;
|
|
5124
5494
|
canvasWidth: number;
|
|
5125
5495
|
canvasHeight: number;
|
|
@@ -5753,7 +6123,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
5753
6123
|
getState(): MapViewState;
|
|
5754
6124
|
getState<T extends EntityId<EntityState>>(geometryOrGeometryId: T): T extends EntityId<LabelState> ? LabelState : T extends EntityId<GeometryState> ? GeometryState : T extends EntityId<MarkerState> ? MarkerState : T extends EntityId<GeometryGroupState> ? GeometryGroupState : T extends EntityId<GroupContainerState> ? GroupContainerState : T extends EntityId<ModelState> ? ModelState : T extends EntityId<PathState> ? ShapeState : T extends EntityId<ShapeState> ? ShapeState : T extends EntityId<ImageState> ? ImageState : EntityState;
|
|
5755
6125
|
getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
|
|
5756
|
-
getState<T extends EntityState>(geometryOrGeometryId: T['id']): T extends LabelState ? LabelState : T extends GeometryState ? GeometryState : T extends MarkerState ? MarkerState : T extends GeometryGroupState ? GeometryGroupState : T extends GroupContainerState ? GroupContainerState : T extends ModelState ? ModelState : T extends PathState ?
|
|
6126
|
+
getState<T extends EntityState>(geometryOrGeometryId: T['id']): T extends LabelState ? LabelState : T extends GeometryState ? GeometryState : T extends MarkerState ? MarkerState : T extends GeometryGroupState ? GeometryGroupState : T extends GroupContainerState ? GroupContainerState : T extends ModelState ? ModelState : T extends PathState ? PathState : T extends ShapeState ? ShapeState : T extends ImageState ? ImageState : EntityState;
|
|
5757
6127
|
/**
|
|
5758
6128
|
* Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
|
|
5759
6129
|
*/
|
|
@@ -6680,9 +7050,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
6680
7050
|
import type { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
6681
7051
|
import { Label, Marker, type Model, type Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
6682
7052
|
import { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
6683
|
-
import type {
|
|
7053
|
+
import type { TGetState, TUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
6684
7054
|
import { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera';
|
|
6685
|
-
import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions';
|
|
6686
7055
|
import { Exporter } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter';
|
|
6687
7056
|
import { Labels } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels';
|
|
6688
7057
|
import { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
@@ -6736,7 +7105,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
6736
7105
|
getState<T extends Space | MapObject | Label | Marker | Model | Image | string>(target: T): TGetState<T> | undefined;
|
|
6737
7106
|
setHoverColor(c: string): void;
|
|
6738
7107
|
getHoverColor(): string | undefined;
|
|
6739
|
-
getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], opt?: TGetDirectionsOptions) => Directions | undefined;
|
|
6740
7108
|
createCoordinate(latitude: number, longitude: number, floor?: Floor): Coordinate;
|
|
6741
7109
|
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor): Coordinate | undefined;
|
|
6742
7110
|
isInView(target: Space | MapObject | Label | Marker | string): boolean;
|
|
@@ -6750,6 +7118,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
6750
7118
|
}
|
|
6751
7119
|
}
|
|
6752
7120
|
|
|
7121
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot' {
|
|
7122
|
+
export { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
7123
|
+
export type { TBlueDotEvents } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
7124
|
+
}
|
|
7125
|
+
|
|
6753
7126
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
|
|
6754
7127
|
import type { TCameraAnimationOptions, TCameraFocusOnTarget, TCameraTarget, TFocusOnOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
6755
7128
|
import type { InsetPadding, RendererCore } from '@mappedin/core-sdk';
|
|
@@ -6761,6 +7134,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
|
|
|
6761
7134
|
*/
|
|
6762
7135
|
constructor(rendererCore: RendererCore);
|
|
6763
7136
|
setScreenOffsets(padding: InsetPadding): void;
|
|
7137
|
+
get screenOffsets(): InsetPadding;
|
|
6764
7138
|
/**
|
|
6765
7139
|
* Focuses the camera on a specific target or array of targets.
|
|
6766
7140
|
*
|
|
@@ -6866,7 +7240,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels' {
|
|
|
6866
7240
|
import { Label } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
6867
7241
|
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
6868
7242
|
import type { PointOfInterest, MapObject } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
6869
|
-
import type { Space, Door, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
7243
|
+
import type { Space, Door, Coordinate, Node } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
6870
7244
|
export class Labels {
|
|
6871
7245
|
#private;
|
|
6872
7246
|
/**
|
|
@@ -6897,7 +7271,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels' {
|
|
|
6897
7271
|
*
|
|
6898
7272
|
* map.Labels.add(space, 'Welcome', { appearance: { color: 'blue' } });
|
|
6899
7273
|
*/
|
|
6900
|
-
add(target: Space | Door | Coordinate | PointOfInterest | MapObject, text: string, options?: TAddLabelOptions | undefined): Label;
|
|
7274
|
+
add(target: Space | Door | Coordinate | PointOfInterest | MapObject | Node, text: string, options?: TAddLabelOptions | undefined): Label;
|
|
6901
7275
|
/**
|
|
6902
7276
|
* Automatically adds all the labels ({@link Label}) to the map.
|
|
6903
7277
|
*
|
|
@@ -6932,7 +7306,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
|
|
|
6932
7306
|
import type { TAddMarkerOptions, TAnimationOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
6933
7307
|
import { Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
6934
7308
|
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
6935
|
-
import type { Space, Door, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
7309
|
+
import type { Space, Door, Coordinate, Node } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
6936
7310
|
export class Markers {
|
|
6937
7311
|
#private;
|
|
6938
7312
|
/**
|
|
@@ -6963,7 +7337,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
|
|
|
6963
7337
|
* // Add an interactive {@link Marker} to the map with custom HTML content.
|
|
6964
7338
|
* map.Markers.add(coordinate, '<div>Marker Content</div>', { interactive: true });
|
|
6965
7339
|
*/
|
|
6966
|
-
add(target: Space | Door | Coordinate, html: string, options?: TAddMarkerOptions): Marker;
|
|
7340
|
+
add(target: Space | Door | Coordinate | Node, html: string, options?: TAddMarkerOptions): Marker;
|
|
6967
7341
|
/**
|
|
6968
7342
|
* Removes a marker from the map.
|
|
6969
7343
|
*
|
|
@@ -6987,7 +7361,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
|
|
|
6987
7361
|
* const marker = map.Markers.add(coordinate, '<div>Marker Content</div>');
|
|
6988
7362
|
* mapView.Markers.setPosition(marker, newCoordinate);
|
|
6989
7363
|
*/
|
|
6990
|
-
setPosition(marker: Marker, target: Space | Door | Coordinate): void;
|
|
7364
|
+
setPosition(marker: Marker, target: Space | Door | Coordinate | Node): void;
|
|
6991
7365
|
/**
|
|
6992
7366
|
* Update the position of a marker with an animation.
|
|
6993
7367
|
* @param marker The {@link Marker} which should be updated.
|
|
@@ -6998,7 +7372,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
|
|
|
6998
7372
|
* const marker = map.Markers.add(coordinate, '<div>Marker Content</div>');
|
|
6999
7373
|
* mapView.Markers.animateTo(marker, newCoordinate, { duration: 1000 });
|
|
7000
7374
|
*/
|
|
7001
|
-
animateTo(marker: Marker, target: Space | Door | Coordinate, options?: TAnimationOptions): Promise<void>;
|
|
7375
|
+
animateTo(marker: Marker, target: Space | Door | Coordinate | Node, options?: TAnimationOptions): Promise<void>;
|
|
7002
7376
|
}
|
|
7003
7377
|
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
7004
7378
|
export {};
|
|
@@ -7142,76 +7516,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter' {
|
|
|
7142
7516
|
export {};
|
|
7143
7517
|
}
|
|
7144
7518
|
|
|
7145
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions' {
|
|
7146
|
-
import type { ParsedMVF } from '@mappedin/mvf';
|
|
7147
|
-
import type { DirectionsCollection } from '@packages/internal/geojson-navigator';
|
|
7148
|
-
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
7149
|
-
import { Connection, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
7150
|
-
import type { TDirectionInstruction, TDirectionZone, TNavigationTarget } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
7151
|
-
/**
|
|
7152
|
-
* Represents a set of directions between two points.
|
|
7153
|
-
*
|
|
7154
|
-
* Directions are used to represent the path between two points on the map,
|
|
7155
|
-
* as well as the instructions to follow the path.
|
|
7156
|
-
*/
|
|
7157
|
-
export class Directions {
|
|
7158
|
-
#private;
|
|
7159
|
-
/**
|
|
7160
|
-
* @internal
|
|
7161
|
-
*/
|
|
7162
|
-
constructor(directions: DirectionsCollection, mapData: MapDataInternal);
|
|
7163
|
-
/**
|
|
7164
|
-
* All the coordinates ({@link Coordinate}) of the directions.
|
|
7165
|
-
*/
|
|
7166
|
-
get coordinates(): Coordinate[];
|
|
7167
|
-
/**
|
|
7168
|
-
* The total distance of the path in meters.
|
|
7169
|
-
*/
|
|
7170
|
-
get distance(): number;
|
|
7171
|
-
/**
|
|
7172
|
-
* The array of instructions ({@link TDirectionInstruction}).
|
|
7173
|
-
*/
|
|
7174
|
-
get instructions(): TDirectionInstruction[];
|
|
7175
|
-
lastConnectionAction?: 'take' | 'exit';
|
|
7176
|
-
lastConnection?: Connection;
|
|
7177
|
-
}
|
|
7178
|
-
export class DirectionsInternal {
|
|
7179
|
-
/**
|
|
7180
|
-
* @hidden
|
|
7181
|
-
*/
|
|
7182
|
-
constructor({ nodes, geojsonCollection, connections, groupBy, }: {
|
|
7183
|
-
nodes: ParsedMVF['node.geojson'];
|
|
7184
|
-
geojsonCollection: ParsedMVF['obstruction'] | ParsedMVF['space'];
|
|
7185
|
-
connections: ParsedMVF['connection.json'];
|
|
7186
|
-
groupBy?: string;
|
|
7187
|
-
});
|
|
7188
|
-
/**
|
|
7189
|
-
* Get directions between two navigation targets.
|
|
7190
|
-
*
|
|
7191
|
-
* @hidden
|
|
7192
|
-
* @param from
|
|
7193
|
-
* @param to
|
|
7194
|
-
* @param options
|
|
7195
|
-
* @param mapData
|
|
7196
|
-
*/
|
|
7197
|
-
getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
|
|
7198
|
-
accessible: boolean;
|
|
7199
|
-
smoothing: {
|
|
7200
|
-
enabled: boolean;
|
|
7201
|
-
radius: number;
|
|
7202
|
-
};
|
|
7203
|
-
zones: TDirectionZone[];
|
|
7204
|
-
}, mapData: MapDataInternal) => Directions | undefined;
|
|
7205
|
-
/**
|
|
7206
|
-
* Get the node IDs that should be excluded from the navigation graph.
|
|
7207
|
-
*
|
|
7208
|
-
* @hidden
|
|
7209
|
-
* @param accessible {boolean}
|
|
7210
|
-
*/
|
|
7211
|
-
getExcludedNodeIds: (accessible: boolean) => string[];
|
|
7212
|
-
}
|
|
7213
|
-
}
|
|
7214
|
-
|
|
7215
7519
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style' {
|
|
7216
7520
|
import type { StyleCollection } from '@mappedin/mvf';
|
|
7217
7521
|
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
@@ -7266,9 +7570,15 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor' {
|
|
|
7266
7570
|
show(): void;
|
|
7267
7571
|
/**
|
|
7268
7572
|
* Hide the outdoor view.
|
|
7269
|
-
* @param excludedStyleLayerIds {string[]}
|
|
7573
|
+
* @param excludedStyleLayerIds {string[]}
|
|
7270
7574
|
*/
|
|
7271
7575
|
hide(excludedStyleLayerIds?: string[]): void;
|
|
7576
|
+
/**
|
|
7577
|
+
* Set outdoor view opacity
|
|
7578
|
+
* @param targetOpacity {number | 'initial'}
|
|
7579
|
+
* @param excludedStyleLayerIds {string[]}
|
|
7580
|
+
*/
|
|
7581
|
+
setOpacity(targetOpacity: number | 'initial', excludedStyleLayerIds?: string[]): void;
|
|
7272
7582
|
}
|
|
7273
7583
|
}
|
|
7274
7584
|
|
|
@@ -7330,7 +7640,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images' {
|
|
|
7330
7640
|
|
|
7331
7641
|
declare module '@mappedin/mappedin-js/mappedin-js/src/search/internal' {
|
|
7332
7642
|
import type { SearchResult as MiniSearchResult, Suggestion, MatchInfo } from 'minisearch';
|
|
7333
|
-
import
|
|
7643
|
+
import { EnterpriseLocation, EnterpriseCategory, Places } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
7334
7644
|
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
7335
7645
|
import { z } from 'zod';
|
|
7336
7646
|
export class InternalSearch {
|
|
@@ -8716,13 +9026,14 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/pan-bounds/system' {
|
|
|
8716
9026
|
}
|
|
8717
9027
|
|
|
8718
9028
|
declare module '@mappedin/mappedin-js/geojson/src/systems/custom-geometry/system' {
|
|
9029
|
+
import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
8719
9030
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
8720
9031
|
/**
|
|
8721
9032
|
* System that renders and updates custom geometry entities. For every custom geometry entity, this calls the builder's
|
|
8722
9033
|
* setup method once (when it is visible) and then the update method every frame.
|
|
8723
9034
|
*/
|
|
8724
9035
|
export class CustomGeometrySystem {
|
|
8725
|
-
constructor(state: RendererState);
|
|
9036
|
+
constructor(state: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
|
|
8726
9037
|
update(): void;
|
|
8727
9038
|
}
|
|
8728
9039
|
}
|
|
@@ -9204,7 +9515,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
|
|
|
9204
9515
|
|
|
9205
9516
|
declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
|
|
9206
9517
|
import type { PerspectiveCamera, Scene, WebGLRenderer } from 'three';
|
|
9207
|
-
import { Vector2, Vector3 } from 'three';
|
|
9518
|
+
import { Object3D, Vector2, Vector3 } from 'three';
|
|
9208
9519
|
import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
|
|
9209
9520
|
import * as CAMERA_CONSTANTS from '@mappedin/mappedin-js/geojson/src/systems/camera/constants';
|
|
9210
9521
|
import type { AnimateCameraTarget, CameraControlsOptions, CameraFocusOnOptions } from '@mappedin/mappedin-js/geojson/src/systems/camera/types';
|
|
@@ -9650,6 +9961,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
|
|
|
9650
9961
|
position: Vector3;
|
|
9651
9962
|
zoom: number;
|
|
9652
9963
|
};
|
|
9964
|
+
debugContainer: Object3D<import("three").Object3DEventMap>;
|
|
9653
9965
|
focusOn(pointCloud: Vector3[], { insetsPadding }: any, options?: CameraFocusOnOptions): void;
|
|
9654
9966
|
resize(canvasWidth: number, canvasHeight: number): void;
|
|
9655
9967
|
}
|