@mappedin/react-sdk 6.0.1-beta.3 → 6.0.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES.txt +1 -1
- package/lib/esm/GLTFExporter-7Y4D6ZCC.js +1 -0
- package/lib/esm/{GLTFLoader-EMLQBTUW.js → GLTFLoader-ZJM7FISZ.js} +1 -1
- package/lib/esm/{browser-VJJYXKCR.js → browser-B7ZG64S7.js} +1 -1
- package/lib/esm/chunk-FO75RVA4.js +1 -0
- package/lib/esm/chunk-HE7T442G.js +1 -0
- package/lib/esm/{chunk-BCE6HB4T.js → chunk-OPKWNXJZ.js} +1 -1
- package/lib/esm/{chunk-5TYPWFBI.js → chunk-TQW6Y4JF.js} +1 -1
- package/lib/esm/chunk-WJRLWIOO.js +1 -0
- package/lib/esm/index.css +1 -1
- package/lib/esm/index.d.ts +1807 -526
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-CS6JK5K3.js +1 -0
- package/lib/esm/{inspector-XYNFPRUR.css → inspector-OZDC5DPH.css} +1 -1
- package/lib/esm/{outdoor-context-v4-DXPG5QBY.js → outdoor-context-v4-R6AN2YQ4.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/GLTFExporter-DJTLMZRS.js +0 -18
- package/lib/esm/chunk-AIZ6PN4T.js +0 -577
- package/lib/esm/chunk-S5NKJVCP.js +0 -950
- package/lib/esm/chunk-YPHGW2KF.js +0 -3799
- package/lib/esm/inspector-QDN2FWBH.js +0 -425
package/lib/esm/index.d.ts
CHANGED
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
// ../react/@packages/internal/common/pubsub
|
|
7
7
|
// ../react/@packages/internal/common/Mappedin.Logger
|
|
8
8
|
// ../react/geojson
|
|
9
|
-
// ../react/@mappedin/core-sdk
|
|
10
9
|
// ../react/@packages/internal/common
|
|
11
|
-
// ../react/@
|
|
10
|
+
// ../react/@mappedin/core-sdk
|
|
12
11
|
// ../react/@mappedin/core-sdk/src/camera
|
|
13
12
|
// ../react/three
|
|
13
|
+
// ../react/zod
|
|
14
14
|
// ../react/@packages/internal/shave-text/shave-text
|
|
15
15
|
// ../react/@turf/turf
|
|
16
16
|
// ../react/@packages/internal/quad-tree
|
|
17
|
+
// ../react/@packages/internal/outdoor-context-v4
|
|
17
18
|
// ../react/@packages/internal/geojson-navigator
|
|
18
19
|
// ../react/three/addons/loaders/GLTFLoader.js
|
|
19
20
|
// ../react/@mapbox/point-geometry
|
|
@@ -244,11 +245,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
244
245
|
import type { Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
245
246
|
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle } from '@mappedin/mvf';
|
|
246
247
|
import { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
247
|
-
import type { Shading, PaintStyle, LineStyle, WatermarkOptions
|
|
248
|
+
import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/react-sdk/geojson/src';
|
|
248
249
|
import { enableTestMode } from '@mappedin/react-sdk/geojson/src';
|
|
249
250
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
250
|
-
import {
|
|
251
|
-
import { analytics } from '@mappedin/react-sdk/mappedin-js/src/analytics';
|
|
251
|
+
import { MappedinMapLibreOverlay } from '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay';
|
|
252
252
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
253
253
|
/**
|
|
254
254
|
* Represents all the available antialiasing options.
|
|
@@ -460,6 +460,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
460
460
|
* @experimental
|
|
461
461
|
*/
|
|
462
462
|
style?: {
|
|
463
|
+
/**
|
|
464
|
+
* Background color. Only relevant if outdoor map is disabled.
|
|
465
|
+
*/
|
|
466
|
+
backgroundColor?: string;
|
|
467
|
+
/**
|
|
468
|
+
* Background alpha value. Only relevant if outdoor map is disabled.
|
|
469
|
+
*/
|
|
470
|
+
backgroundAlpha?: number;
|
|
463
471
|
/**
|
|
464
472
|
* Set the global shading for all elements. True will use default values, false will disable shading.
|
|
465
473
|
* @default true
|
|
@@ -497,26 +505,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
497
505
|
* const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
|
|
498
506
|
*/
|
|
499
507
|
export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
500
|
-
class MappedinMapLibreOverlay extends MapLibreOverlay<{
|
|
501
|
-
/**
|
|
502
|
-
* Event emitted when the MappedinMap is loaded
|
|
503
|
-
*/
|
|
504
|
-
loaded: {
|
|
505
|
-
/**
|
|
506
|
-
* MapView instance
|
|
507
|
-
*/
|
|
508
|
-
mapView: MapView;
|
|
509
|
-
/**
|
|
510
|
-
* MapData instance
|
|
511
|
-
*/
|
|
512
|
-
mapData: MapData;
|
|
513
|
-
};
|
|
514
|
-
}> {
|
|
515
|
-
#private;
|
|
516
|
-
static instance: MappedinMapLibreOverlay;
|
|
517
|
-
constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
|
|
518
|
-
onAdd(map: any): HTMLDivElement;
|
|
519
|
-
}
|
|
520
508
|
/**
|
|
521
509
|
* Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
|
|
522
510
|
* @experimental
|
|
@@ -527,13 +515,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
527
515
|
export { parseMVF, unzipMVF, enableTestMode };
|
|
528
516
|
export type { MapView, MapData, MappedinMapLibreOverlay, TEvents, TEventPayload, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, };
|
|
529
517
|
export type * from 'geojson';
|
|
530
|
-
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
518
|
+
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
519
|
+
export { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
531
520
|
export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
532
521
|
export type { Navigation, TNavigationOptions } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
533
522
|
export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
534
523
|
export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
535
524
|
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
|
|
536
|
-
export { analytics };
|
|
537
525
|
}
|
|
538
526
|
|
|
539
527
|
declare module '@mappedin/react-sdk/react-sdk/src/type-utils' {
|
|
@@ -562,7 +550,12 @@ declare module '@mappedin/react-sdk/react-sdk/src' {
|
|
|
562
550
|
}
|
|
563
551
|
|
|
564
552
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
553
|
+
import { PubSub } from '@packages/internal/common';
|
|
554
|
+
import { Analytics } from '@mappedin/react-sdk/mappedin-js/src/analytics';
|
|
565
555
|
import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
556
|
+
import type Category from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category';
|
|
557
|
+
import type Location from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location';
|
|
558
|
+
import type Venue from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue';
|
|
566
559
|
/**
|
|
567
560
|
* A WeakMap to associate {@link MapData} instances with their internal representation.
|
|
568
561
|
* We need a way to get the internal data object from the API
|
|
@@ -574,8 +567,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
|
574
567
|
* Represents the data for a map, providing access to map elements
|
|
575
568
|
* like spaces, floors, and points of interest.
|
|
576
569
|
*/
|
|
577
|
-
class MapData {
|
|
570
|
+
class MapData extends PubSub<{
|
|
571
|
+
'language-change': {
|
|
572
|
+
code: string;
|
|
573
|
+
name: string;
|
|
574
|
+
};
|
|
575
|
+
}> {
|
|
578
576
|
#private;
|
|
577
|
+
Analytics: Analytics;
|
|
579
578
|
/**
|
|
580
579
|
* Constructs a new instance of {@link MapData}.
|
|
581
580
|
*
|
|
@@ -600,6 +599,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
|
600
599
|
* @returns {string} The organization ID of the map.
|
|
601
600
|
*/
|
|
602
601
|
get organizationId(): string;
|
|
602
|
+
/**
|
|
603
|
+
* @internal
|
|
604
|
+
*/
|
|
605
|
+
get venue(): Venue | undefined;
|
|
603
606
|
/**
|
|
604
607
|
* The token is used to fetch outdoor tiles.
|
|
605
608
|
*
|
|
@@ -657,6 +660,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
|
657
660
|
* const annotations = mapData.getByType('annotation');
|
|
658
661
|
*/
|
|
659
662
|
getByType(type: 'annotation'): Annotation[];
|
|
663
|
+
/**
|
|
664
|
+
* @internal
|
|
665
|
+
*/
|
|
666
|
+
getByType(type: 'location'): Location[];
|
|
667
|
+
/**
|
|
668
|
+
* @internal
|
|
669
|
+
*/
|
|
670
|
+
getByType(type: 'category'): Category[];
|
|
660
671
|
/**
|
|
661
672
|
* Retrieves a specific map feature by its type and ID.
|
|
662
673
|
*
|
|
@@ -673,9 +684,26 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
|
673
684
|
getById(type: 'object', id: string): MapObject | undefined;
|
|
674
685
|
getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
|
|
675
686
|
getById(type: 'annotation', id: string): Annotation | undefined;
|
|
687
|
+
getById(type: 'location', id: string): Location | undefined;
|
|
688
|
+
getById(type: 'category', id: string): Category | undefined;
|
|
676
689
|
getById(type: string, id: string): object | undefined;
|
|
690
|
+
/**
|
|
691
|
+
* @internal
|
|
692
|
+
*/
|
|
693
|
+
changeLanguage(languageCode: string): Promise<void>;
|
|
694
|
+
/**
|
|
695
|
+
* @internal
|
|
696
|
+
*/
|
|
697
|
+
get currentLanguage(): {
|
|
698
|
+
code: string;
|
|
699
|
+
name: string;
|
|
700
|
+
};
|
|
677
701
|
}
|
|
678
702
|
export default MapData;
|
|
703
|
+
/**
|
|
704
|
+
* @internal
|
|
705
|
+
*/
|
|
706
|
+
export function getMapDataInternal(mapData: MapData): MapDataInternal;
|
|
679
707
|
}
|
|
680
708
|
|
|
681
709
|
declare module '@mappedin/react-sdk/mappedin-js/src/events' {
|
|
@@ -799,15 +827,26 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
799
827
|
import Annotation from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/annotation';
|
|
800
828
|
import Hyperlink from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink';
|
|
801
829
|
import Image from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
|
|
802
|
-
import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap } from '@mappedin/mvf';
|
|
830
|
+
import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap, EnterpriseLocation, EnterpriseCategory } from '@mappedin/mvf';
|
|
803
831
|
import type { MapDataObjects } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
|
|
832
|
+
import type Location from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location';
|
|
833
|
+
import type Category from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category';
|
|
834
|
+
import Venue from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue';
|
|
835
|
+
import { PubSub } from '@packages/internal/common';
|
|
836
|
+
import { AnalyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics';
|
|
804
837
|
/**
|
|
805
838
|
* Internal class representing detailed map data.
|
|
806
839
|
*
|
|
807
840
|
* @internal
|
|
808
841
|
*/
|
|
809
|
-
class MapDataInternal {
|
|
842
|
+
class MapDataInternal extends PubSub<{
|
|
843
|
+
'language-change': {
|
|
844
|
+
code: string;
|
|
845
|
+
name: string;
|
|
846
|
+
};
|
|
847
|
+
}> {
|
|
810
848
|
#private;
|
|
849
|
+
Analytics: AnalyticsInternal;
|
|
811
850
|
/**
|
|
812
851
|
* Represents the parsed Mappedin Venue Format (MVF) data.
|
|
813
852
|
*/
|
|
@@ -828,7 +867,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
828
867
|
* Represents a map of entrance IDs to obstruction IDs.
|
|
829
868
|
*/
|
|
830
869
|
readonly obstructionIdByEntranceId: Record<string, string>;
|
|
870
|
+
readonly venue?: Venue;
|
|
831
871
|
doorsByNodeId: Record<string, Door>;
|
|
872
|
+
locationsBySpaceId: Record<string, EnterpriseLocation[]>;
|
|
832
873
|
/**
|
|
833
874
|
* @internal
|
|
834
875
|
*/
|
|
@@ -891,6 +932,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
891
932
|
* @returns {Annotation[]} An array of Annotation objects.
|
|
892
933
|
*/
|
|
893
934
|
get nodes(): Node[];
|
|
935
|
+
get locations(): Location[];
|
|
936
|
+
get categories(): Category[];
|
|
894
937
|
/**
|
|
895
938
|
* Retrieves an object by its type and ID.
|
|
896
939
|
*
|
|
@@ -906,6 +949,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
906
949
|
getById(type: 'object', id: string): MapObject | undefined;
|
|
907
950
|
getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
|
|
908
951
|
getById(type: 'annotation', id: string): Annotation | undefined;
|
|
952
|
+
getById(type: 'location', id: string): Location | undefined;
|
|
953
|
+
getById(type: 'category', id: string): Category | undefined;
|
|
909
954
|
getMapDataById(id: string): MapDataObjects | undefined;
|
|
910
955
|
/**
|
|
911
956
|
* Retrieves a feature by its type and ID from the Mappedin Venue Format (MVF) data.
|
|
@@ -923,6 +968,25 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
923
968
|
getMVFFeatureById(type: 'annotation', id: string): AnnotationCollection['features'][number] | undefined;
|
|
924
969
|
getMVFFeatureById(type: string, id: string): object | undefined;
|
|
925
970
|
getMVFFeatureByNodeId(type: 'connection', id: string): MVFConnection | undefined;
|
|
971
|
+
currentLanguage: {
|
|
972
|
+
code: string;
|
|
973
|
+
name: string;
|
|
974
|
+
};
|
|
975
|
+
/**
|
|
976
|
+
* These represent maps of diffed objects that are used to store the translated values
|
|
977
|
+
*/
|
|
978
|
+
languagePacks: {
|
|
979
|
+
[key: string]: {
|
|
980
|
+
location: {
|
|
981
|
+
[key: string]: Partial<EnterpriseLocation>;
|
|
982
|
+
};
|
|
983
|
+
category: {
|
|
984
|
+
[key: string]: Partial<EnterpriseCategory>;
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
};
|
|
988
|
+
getPropTranslation(type: 'location' | 'category', prop: string, id: string, fallback: EnterpriseLocation[keyof EnterpriseLocation] | EnterpriseCategory[keyof EnterpriseCategory]): unknown;
|
|
989
|
+
changeLanguage(languageCode: string): Promise<void>;
|
|
926
990
|
/**
|
|
927
991
|
* Cleans up resources used by the instance.
|
|
928
992
|
*
|
|
@@ -930,7 +994,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
930
994
|
*/
|
|
931
995
|
destroy(): void;
|
|
932
996
|
}
|
|
933
|
-
export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, };
|
|
997
|
+
export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, Location, };
|
|
934
998
|
export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space';
|
|
935
999
|
export type { MapDataObjects };
|
|
936
1000
|
}
|
|
@@ -940,12 +1004,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
940
1004
|
import { PubSub } from '@packages/internal/common';
|
|
941
1005
|
import { type TEvents, type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
942
1006
|
import type { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
943
|
-
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
|
|
1007
|
+
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
|
|
944
1008
|
import type { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
945
1009
|
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
946
|
-
import type { Floor, MapObject, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
947
|
-
import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
948
|
-
import type { Label, Marker } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1010
|
+
import type { Door, Floor, MapObject, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
1011
|
+
import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
1012
|
+
import type { Label, Marker, Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
949
1013
|
import type { TEventPayload } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
950
1014
|
import type { Shapes } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes';
|
|
951
1015
|
export class MapView extends PubSub<TEvents> {
|
|
@@ -962,6 +1026,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
962
1026
|
* Controls for the map's markers.
|
|
963
1027
|
*/
|
|
964
1028
|
Markers: Markers;
|
|
1029
|
+
/**
|
|
1030
|
+
* Controls for the map's markers.
|
|
1031
|
+
*/
|
|
1032
|
+
Images: Images;
|
|
965
1033
|
/**
|
|
966
1034
|
* Controls for the map's models.
|
|
967
1035
|
*/
|
|
@@ -1017,8 +1085,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1017
1085
|
* // Update the color of a space to red.
|
|
1018
1086
|
* map.updateState(space, { color: 'red' });
|
|
1019
1087
|
*/
|
|
1020
|
-
updateState<T extends Space | MapObject | Label | Marker>(target: T
|
|
1021
|
-
updateState<T extends
|
|
1088
|
+
updateState<T extends Space | MapObject | Label | Marker | Door | WALLS | DOORS>(target: T, state: TUpdateState<T>): any;
|
|
1089
|
+
updateState<T extends string & NonNullable<unknown>>(target: T, state: TUpdateStates): any;
|
|
1022
1090
|
update: () => void;
|
|
1023
1091
|
getMapData(): {
|
|
1024
1092
|
[x: string]: MapData;
|
|
@@ -1066,7 +1134,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1066
1134
|
* @hidden
|
|
1067
1135
|
*/
|
|
1068
1136
|
updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
|
|
1069
|
-
getState<T extends Space | MapObject | Label | Marker | string>(target: T): TGetState<T> | undefined;
|
|
1137
|
+
getState<T extends Space | MapObject | Label | Marker | Image | string>(target: T): TGetState<T> | undefined;
|
|
1070
1138
|
setHoverColor(c: string): void;
|
|
1071
1139
|
getHoverColor(): string | undefined;
|
|
1072
1140
|
/**
|
|
@@ -1147,14 +1215,17 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1147
1215
|
* @internal
|
|
1148
1216
|
*/
|
|
1149
1217
|
get __core(): RendererCore;
|
|
1218
|
+
/**
|
|
1219
|
+
* Clears all added elements from the map.
|
|
1220
|
+
*/
|
|
1221
|
+
clear(): void;
|
|
1150
1222
|
/**
|
|
1151
1223
|
* Destroys the MapView.
|
|
1152
1224
|
*/
|
|
1153
1225
|
destroy(): void;
|
|
1154
1226
|
/**
|
|
1155
|
-
* @internal
|
|
1156
1227
|
* @experimental
|
|
1157
|
-
*
|
|
1228
|
+
* Enable debug interface
|
|
1158
1229
|
*/
|
|
1159
1230
|
enableDebug(): Promise<void>;
|
|
1160
1231
|
}
|
|
@@ -1164,8 +1235,8 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
1164
1235
|
import type { MarkerState, AddMarkerOptions } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
1165
1236
|
import type { PathState, AddPathOptions } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
1166
1237
|
import type { AddLabelOptions, LabelAppearance, LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
1167
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
1168
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
1238
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
1239
|
+
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
1169
1240
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types/geometry';
|
|
1170
1241
|
import type { InsetPadding, RendererCoreOptions, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload } from '@mappedin/react-sdk/geojson/src/types';
|
|
1171
1242
|
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
@@ -1197,31 +1268,43 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
1197
1268
|
}): Promise<RendererCore>;
|
|
1198
1269
|
}
|
|
1199
1270
|
|
|
1200
|
-
declare module '@mappedin/react-sdk/
|
|
1201
|
-
import
|
|
1202
|
-
import type
|
|
1203
|
-
import
|
|
1204
|
-
import {
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1271
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay' {
|
|
1272
|
+
import { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
1273
|
+
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
1274
|
+
import type { TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
1275
|
+
import { MapLibreOverlay } from '@mappedin/react-sdk/geojson/src/maplibre-overlay';
|
|
1276
|
+
import type { Position } from '@mappedin/core-sdk';
|
|
1277
|
+
export class MappedinMapLibreOverlay extends MapLibreOverlay<{
|
|
1278
|
+
/**
|
|
1279
|
+
* Event emitted when the MappedinMap is loaded
|
|
1280
|
+
*/
|
|
1281
|
+
loaded: {
|
|
1282
|
+
/**
|
|
1283
|
+
* MapView instance
|
|
1284
|
+
*/
|
|
1285
|
+
mapView: MapView;
|
|
1286
|
+
/**
|
|
1287
|
+
* MapData instance
|
|
1288
|
+
*/
|
|
1289
|
+
mapData: MapData;
|
|
1290
|
+
};
|
|
1291
|
+
}> {
|
|
1292
|
+
#private;
|
|
1293
|
+
static instance: MappedinMapLibreOverlay;
|
|
1294
|
+
constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
|
|
1295
|
+
onAdd(map: any): HTMLDivElement;
|
|
1296
|
+
onRemove(): void;
|
|
1212
1297
|
}
|
|
1213
1298
|
}
|
|
1214
1299
|
|
|
1215
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/analytics' {
|
|
1216
|
-
export { analytics, analyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
|
|
1217
|
-
export type { CustomerAnalytics, AnalyticsOptions } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
1300
|
declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
1221
|
-
import { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1301
|
+
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1222
1302
|
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
1223
|
-
import type { Label, Marker, Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1303
|
+
import type { Label, Marker, Model, Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1224
1304
|
import type { EasingCurve } from '@mappedin/core-sdk/src/camera';
|
|
1305
|
+
export type DeepRequired<T> = Required<{
|
|
1306
|
+
[K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
|
|
1307
|
+
}>;
|
|
1225
1308
|
/**
|
|
1226
1309
|
* @hidden
|
|
1227
1310
|
*/
|
|
@@ -1283,6 +1366,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1283
1366
|
* Defines the state for a label when its appearance is updated.
|
|
1284
1367
|
*/
|
|
1285
1368
|
export type TLabelState = {
|
|
1369
|
+
text: string;
|
|
1286
1370
|
type: 'label';
|
|
1287
1371
|
/**
|
|
1288
1372
|
* Appearance settings for the label.
|
|
@@ -1307,6 +1391,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1307
1391
|
export type TModelState = {
|
|
1308
1392
|
type: 'model';
|
|
1309
1393
|
};
|
|
1394
|
+
/**
|
|
1395
|
+
* Defines the state for an image when its appearance is updated.
|
|
1396
|
+
*/
|
|
1397
|
+
export type TImageState = {
|
|
1398
|
+
type: 'image';
|
|
1399
|
+
};
|
|
1310
1400
|
export type TWallsState = {
|
|
1311
1401
|
/**
|
|
1312
1402
|
* Color of the walls.
|
|
@@ -1316,6 +1406,31 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1316
1406
|
* Color of the top of walls, if not set, defaults to the color.
|
|
1317
1407
|
*/
|
|
1318
1408
|
topColor?: string | 'initial';
|
|
1409
|
+
/**
|
|
1410
|
+
* Texture to apply to the geometry element.
|
|
1411
|
+
*/
|
|
1412
|
+
texture?: {
|
|
1413
|
+
url?: string;
|
|
1414
|
+
};
|
|
1415
|
+
/**
|
|
1416
|
+
* Top texture to apply to the geometry element.
|
|
1417
|
+
*/
|
|
1418
|
+
topTexture?: {
|
|
1419
|
+
url?: string;
|
|
1420
|
+
};
|
|
1421
|
+
/**
|
|
1422
|
+
* Visibility of the walls.
|
|
1423
|
+
*/
|
|
1424
|
+
visible: boolean;
|
|
1425
|
+
};
|
|
1426
|
+
/**
|
|
1427
|
+
* @interface
|
|
1428
|
+
*/
|
|
1429
|
+
export type TDoorsState = TWallsState & {
|
|
1430
|
+
/**
|
|
1431
|
+
* Opacity of the doors.
|
|
1432
|
+
*/
|
|
1433
|
+
opacity: number;
|
|
1319
1434
|
};
|
|
1320
1435
|
export type TMarkerState = {
|
|
1321
1436
|
type: 'marker';
|
|
@@ -1365,13 +1480,41 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1365
1480
|
* 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)`.
|
|
1366
1481
|
*/
|
|
1367
1482
|
interactive: boolean;
|
|
1483
|
+
/**
|
|
1484
|
+
* Opacity of the geometry element.
|
|
1485
|
+
*/
|
|
1486
|
+
opacity: number;
|
|
1487
|
+
/**
|
|
1488
|
+
* Height of the geometry element in meters.
|
|
1489
|
+
*/
|
|
1490
|
+
height: number;
|
|
1491
|
+
/**
|
|
1492
|
+
* Texture to apply to the geometry element.
|
|
1493
|
+
*/
|
|
1494
|
+
texture?: {
|
|
1495
|
+
url: string;
|
|
1496
|
+
};
|
|
1497
|
+
/**
|
|
1498
|
+
* Top texture to apply to the geometry element.
|
|
1499
|
+
*/
|
|
1500
|
+
topTexture?: {
|
|
1501
|
+
url: string;
|
|
1502
|
+
};
|
|
1368
1503
|
};
|
|
1504
|
+
export enum WALLS {
|
|
1505
|
+
Exterior = "exterior-walls",
|
|
1506
|
+
Interior = "interior-walls"
|
|
1507
|
+
}
|
|
1508
|
+
export enum DOORS {
|
|
1509
|
+
Interior = "interior-doors",
|
|
1510
|
+
Exterior = "exterior-doors"
|
|
1511
|
+
}
|
|
1369
1512
|
/**
|
|
1370
1513
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
1371
1514
|
*/
|
|
1372
|
-
export type TUpdateState<T> = T extends
|
|
1515
|
+
export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS ? Partial<TDoorsState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Door ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
|
|
1373
1516
|
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
|
|
1374
|
-
export type TGetEntityState<T> = T extends Marker ? TMarkerState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
|
|
1517
|
+
export type TGetEntityState<T> = T extends Marker ? TMarkerState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Image ? TImageState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
|
|
1375
1518
|
export type TGetState<T> = TGetEntityState<T> | undefined;
|
|
1376
1519
|
/**
|
|
1377
1520
|
* Options for {@link Camera} animations on the map.
|
|
@@ -1833,6 +1976,42 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1833
1976
|
*/
|
|
1834
1977
|
url: string;
|
|
1835
1978
|
};
|
|
1979
|
+
/**
|
|
1980
|
+
* Options for controlling the behavior of a {@link Marker}.
|
|
1981
|
+
* @interface
|
|
1982
|
+
*/
|
|
1983
|
+
export type TAddImageOptions = {
|
|
1984
|
+
/**
|
|
1985
|
+
* @internal
|
|
1986
|
+
*/
|
|
1987
|
+
id?: string;
|
|
1988
|
+
/**
|
|
1989
|
+
* Width of the image in meters.
|
|
1990
|
+
*/
|
|
1991
|
+
width: number;
|
|
1992
|
+
/**
|
|
1993
|
+
* Height of the image in meters.
|
|
1994
|
+
*/
|
|
1995
|
+
height: number;
|
|
1996
|
+
/**
|
|
1997
|
+
* Rotation of the image in degrees.
|
|
1998
|
+
*
|
|
1999
|
+
* @default 0
|
|
2000
|
+
*/
|
|
2001
|
+
rotation?: number;
|
|
2002
|
+
/**
|
|
2003
|
+
* Vertical offset of the image in meters.
|
|
2004
|
+
*
|
|
2005
|
+
* @default 0
|
|
2006
|
+
*/
|
|
2007
|
+
verticalOffset?: number;
|
|
2008
|
+
/**
|
|
2009
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
2010
|
+
*
|
|
2011
|
+
* @default false
|
|
2012
|
+
*/
|
|
2013
|
+
flipImageToFaceCamera?: boolean;
|
|
2014
|
+
};
|
|
1836
2015
|
/**
|
|
1837
2016
|
* Options for controlling the behavior of a {@link Marker}.
|
|
1838
2017
|
* @interface
|
|
@@ -1900,11 +2079,34 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1900
2079
|
*/
|
|
1901
2080
|
id?: string;
|
|
1902
2081
|
};
|
|
2082
|
+
export type TBlueDotOptions = {
|
|
2083
|
+
/** The radius of the BlueDot in pixels. The BlueDot will maintain this size clamped to a minimum of 0.35 metres. */
|
|
2084
|
+
radius?: number;
|
|
2085
|
+
/** The color of the BlueDot core element. */
|
|
2086
|
+
color?: string;
|
|
2087
|
+
/** Options for the accuracy ring around the BlueDot. */
|
|
2088
|
+
accuracyRing?: {
|
|
2089
|
+
/** The color of the accuracy ring. */
|
|
2090
|
+
color?: string;
|
|
2091
|
+
/** The opacity of the accuracy ring. */
|
|
2092
|
+
opacity?: number;
|
|
2093
|
+
};
|
|
2094
|
+
/**
|
|
2095
|
+
* Options for the bearing directional indicator.
|
|
2096
|
+
*/
|
|
2097
|
+
bearing?: {
|
|
2098
|
+
/** The color of the bearing cone. */
|
|
2099
|
+
color?: string;
|
|
2100
|
+
/** The opacity of the bearing cone. */
|
|
2101
|
+
opacity?: number;
|
|
2102
|
+
};
|
|
2103
|
+
};
|
|
1903
2104
|
}
|
|
1904
2105
|
|
|
1905
2106
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects' {
|
|
1906
2107
|
export { Label } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/label';
|
|
1907
2108
|
export { Marker } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/marker';
|
|
2109
|
+
export { Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/image';
|
|
1908
2110
|
export { Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/model';
|
|
1909
2111
|
export { Path } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path';
|
|
1910
2112
|
export { CameraTransform } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/camera-transform';
|
|
@@ -2015,80 +2217,302 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson' {
|
|
|
2015
2217
|
export { Directions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions';
|
|
2016
2218
|
export { Style } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/style';
|
|
2017
2219
|
export { default as Outdoor } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor';
|
|
2220
|
+
export { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
|
|
2018
2221
|
}
|
|
2019
2222
|
|
|
2020
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
import type { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
|
|
2024
|
-
import { PubSub } from '@packages/internal/common';
|
|
2025
|
-
export const GAP_BELOW_FLOORS = 30;
|
|
2026
|
-
export const DURATION = 1000;
|
|
2027
|
-
export type TStackedMapsEvents = {
|
|
2028
|
-
expanded: void;
|
|
2029
|
-
collapsed: void;
|
|
2030
|
-
};
|
|
2031
|
-
export class StackedMaps extends PubSub<TStackedMapsEvents> {
|
|
2032
|
-
#private;
|
|
2033
|
-
constructor(api: GeojsonApiMapObject, core: RendererCore);
|
|
2034
|
-
includedFloors: FloorObject[];
|
|
2035
|
-
get percentExpanded(): number;
|
|
2036
|
-
set percentExpanded(value: number);
|
|
2037
|
-
animateToCurrentFloor(): void;
|
|
2038
|
-
expanded: boolean;
|
|
2039
|
-
expand(opts?: {
|
|
2040
|
-
excludeFloorIds: string[];
|
|
2041
|
-
}): Promise<void>;
|
|
2042
|
-
collapse(): Promise<void>;
|
|
2043
|
-
animate(direction: 'expand' | 'collapse'): Promise<void>;
|
|
2044
|
-
}
|
|
2223
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/analytics' {
|
|
2224
|
+
export { Analytics, AnalyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
|
|
2225
|
+
export type { AnalyticsUpdateOptions } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
|
|
2045
2226
|
}
|
|
2046
2227
|
|
|
2047
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/map-
|
|
2048
|
-
import type {
|
|
2228
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category' {
|
|
2229
|
+
import type { EnterpriseCategory } from '@mappedin/mvf';
|
|
2230
|
+
import type { MapDataInternal, Location } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
2231
|
+
import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
|
|
2049
2232
|
/**
|
|
2050
|
-
*
|
|
2233
|
+
* A class representing space data within the map.
|
|
2234
|
+
*
|
|
2235
|
+
* Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
|
|
2051
2236
|
*/
|
|
2052
|
-
|
|
2237
|
+
class Category extends BaseMapData implements Omit<EnterpriseCategory, 'children' | 'locations'> {
|
|
2053
2238
|
#private;
|
|
2054
2239
|
/**
|
|
2055
2240
|
* @internal
|
|
2056
2241
|
*/
|
|
2057
|
-
|
|
2242
|
+
static readonly __type = "category";
|
|
2058
2243
|
/**
|
|
2059
|
-
*
|
|
2060
|
-
*
|
|
2061
|
-
* @returns Center Coordinate.
|
|
2244
|
+
* @internal
|
|
2062
2245
|
*/
|
|
2063
|
-
|
|
2246
|
+
readonly __type = "category";
|
|
2247
|
+
name: string;
|
|
2248
|
+
color?: string | undefined;
|
|
2249
|
+
externalId: string;
|
|
2250
|
+
extra?: Record<string, unknown> | undefined;
|
|
2251
|
+
icon?: string | undefined;
|
|
2252
|
+
iconFromDefaultList?: string | null | undefined;
|
|
2253
|
+
sortOrder: number;
|
|
2064
2254
|
/**
|
|
2065
|
-
*
|
|
2255
|
+
* Checks if the provided instance is of type Category.
|
|
2066
2256
|
*
|
|
2067
|
-
* @
|
|
2257
|
+
* @param instance The instance to check.
|
|
2258
|
+
* @returns {boolean} True if the instance is a Category, false otherwise.
|
|
2068
2259
|
*/
|
|
2069
|
-
|
|
2260
|
+
static is(instance: object): instance is Category;
|
|
2070
2261
|
/**
|
|
2071
|
-
*
|
|
2072
|
-
*
|
|
2073
|
-
* @returns Camera pitch in degrees.
|
|
2262
|
+
* @internal
|
|
2074
2263
|
*/
|
|
2075
|
-
|
|
2264
|
+
constructor(data: MapDataInternal, options: {
|
|
2265
|
+
mvfData: EnterpriseCategory;
|
|
2266
|
+
});
|
|
2267
|
+
get children(): Category[];
|
|
2268
|
+
get locations(): Location[];
|
|
2076
2269
|
/**
|
|
2077
|
-
*
|
|
2270
|
+
* Serializes the space data to JSON.
|
|
2078
2271
|
*
|
|
2079
|
-
* @
|
|
2272
|
+
* @returns An object representing the space.
|
|
2273
|
+
*/
|
|
2274
|
+
toJSON(): {
|
|
2275
|
+
id: string;
|
|
2276
|
+
name: string;
|
|
2277
|
+
};
|
|
2278
|
+
/**
|
|
2279
|
+
* Cleans up resources used by the instance.
|
|
2080
2280
|
*
|
|
2081
|
-
* @
|
|
2281
|
+
* @internal
|
|
2082
2282
|
*/
|
|
2083
|
-
|
|
2283
|
+
destroy(): void;
|
|
2084
2284
|
}
|
|
2285
|
+
export default Category;
|
|
2085
2286
|
}
|
|
2086
2287
|
|
|
2087
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/
|
|
2088
|
-
import type {
|
|
2089
|
-
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects
|
|
2090
|
-
import
|
|
2091
|
-
import type
|
|
2288
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
|
|
2289
|
+
import type { EnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
|
|
2290
|
+
import type { Coordinate, MapDataInternal, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
2291
|
+
import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
|
|
2292
|
+
import type Node from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node';
|
|
2293
|
+
/**
|
|
2294
|
+
* A class representing space data within the map.
|
|
2295
|
+
*
|
|
2296
|
+
* Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
|
|
2297
|
+
*/
|
|
2298
|
+
class Location extends BaseMapData implements Omit<EnterpriseLocation, 'polygons' | 'nodes' | 'links'> {
|
|
2299
|
+
#private;
|
|
2300
|
+
/**
|
|
2301
|
+
* @internal
|
|
2302
|
+
*/
|
|
2303
|
+
static readonly __type = "location";
|
|
2304
|
+
/**
|
|
2305
|
+
* @internal
|
|
2306
|
+
*/
|
|
2307
|
+
readonly __type = "location";
|
|
2308
|
+
description?: string | undefined;
|
|
2309
|
+
name: string;
|
|
2310
|
+
amenity?: string | undefined;
|
|
2311
|
+
externalId: string;
|
|
2312
|
+
extra?: Record<string, unknown> | undefined;
|
|
2313
|
+
gallery?: {
|
|
2314
|
+
caption?: string | null;
|
|
2315
|
+
image: string;
|
|
2316
|
+
embeddedUrl?: string | null;
|
|
2317
|
+
}[] | undefined;
|
|
2318
|
+
logo?: string | undefined;
|
|
2319
|
+
operationHours?: OperationHours[] | undefined;
|
|
2320
|
+
phone?: {
|
|
2321
|
+
number: string;
|
|
2322
|
+
extension?: string;
|
|
2323
|
+
} | undefined;
|
|
2324
|
+
picture?: string | undefined;
|
|
2325
|
+
shortName?: string | undefined;
|
|
2326
|
+
showFloatingLabelWhenImagePresent?: boolean | undefined;
|
|
2327
|
+
showLogo?: boolean | undefined;
|
|
2328
|
+
siblingGroups?: SiblingGroup[] | undefined;
|
|
2329
|
+
social?: {
|
|
2330
|
+
facebook?: string;
|
|
2331
|
+
instagram?: string;
|
|
2332
|
+
twitter?: string;
|
|
2333
|
+
website?: string;
|
|
2334
|
+
} | undefined;
|
|
2335
|
+
sortOrder: number;
|
|
2336
|
+
states?: LocationState[] | undefined;
|
|
2337
|
+
tags?: string[] | undefined;
|
|
2338
|
+
type: string;
|
|
2339
|
+
/**
|
|
2340
|
+
* Checks if the provided instance is of type Location.
|
|
2341
|
+
*
|
|
2342
|
+
* @param instance The instance to check.
|
|
2343
|
+
* @returns {boolean} True if the instance is a Location, false otherwise.
|
|
2344
|
+
*/
|
|
2345
|
+
static is(instance: object): instance is Location;
|
|
2346
|
+
/**
|
|
2347
|
+
* @internal
|
|
2348
|
+
*/
|
|
2349
|
+
constructor(data: MapDataInternal, options: {
|
|
2350
|
+
mvfData: EnterpriseLocation;
|
|
2351
|
+
});
|
|
2352
|
+
get coordinates(): Coordinate[];
|
|
2353
|
+
get nodes(): Node[];
|
|
2354
|
+
get spaces(): Space[];
|
|
2355
|
+
/**
|
|
2356
|
+
* Serializes the space data to JSON.
|
|
2357
|
+
*
|
|
2358
|
+
* @returns An object representing the space.
|
|
2359
|
+
*/
|
|
2360
|
+
toJSON(): {
|
|
2361
|
+
id: string;
|
|
2362
|
+
name: string;
|
|
2363
|
+
};
|
|
2364
|
+
/**
|
|
2365
|
+
* Cleans up resources used by the instance.
|
|
2366
|
+
*
|
|
2367
|
+
* @internal
|
|
2368
|
+
*/
|
|
2369
|
+
destroy(): void;
|
|
2370
|
+
}
|
|
2371
|
+
export default Location;
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue' {
|
|
2375
|
+
import type { EnterpriseVenue, Language } from '@mappedin/mvf';
|
|
2376
|
+
import type { Hyperlink, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
2377
|
+
import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
|
|
2378
|
+
/**
|
|
2379
|
+
* A class representing space data within the map.
|
|
2380
|
+
*
|
|
2381
|
+
* Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
|
|
2382
|
+
*/
|
|
2383
|
+
class Venue extends BaseMapData implements EnterpriseVenue {
|
|
2384
|
+
#private;
|
|
2385
|
+
/**
|
|
2386
|
+
* @internal
|
|
2387
|
+
*/
|
|
2388
|
+
static readonly __type = "venue";
|
|
2389
|
+
/**
|
|
2390
|
+
* @internal
|
|
2391
|
+
*/
|
|
2392
|
+
readonly __type = "venue";
|
|
2393
|
+
countrycode?: string | undefined;
|
|
2394
|
+
externalId: string;
|
|
2395
|
+
defaultLanguage: Language;
|
|
2396
|
+
defaultMap?: string | undefined;
|
|
2397
|
+
extra?: Record<string, unknown> | undefined;
|
|
2398
|
+
icon?: string | undefined;
|
|
2399
|
+
languages: Language[];
|
|
2400
|
+
links: Hyperlink[];
|
|
2401
|
+
logo?: string | undefined;
|
|
2402
|
+
mappedinWebUrl?: string | undefined;
|
|
2403
|
+
slug: string;
|
|
2404
|
+
topLocations?: string[] | undefined;
|
|
2405
|
+
tzid?: string | undefined;
|
|
2406
|
+
/**
|
|
2407
|
+
* Checks if the provided instance is of type Category.
|
|
2408
|
+
*
|
|
2409
|
+
* @param instance The instance to check.
|
|
2410
|
+
* @returns {boolean} True if the instance is a Category, false otherwise.
|
|
2411
|
+
*/
|
|
2412
|
+
static is(instance: object): instance is Venue;
|
|
2413
|
+
/**
|
|
2414
|
+
* @internal
|
|
2415
|
+
*/
|
|
2416
|
+
constructor(_data: MapDataInternal, options: {
|
|
2417
|
+
mvfData: EnterpriseVenue;
|
|
2418
|
+
});
|
|
2419
|
+
/**
|
|
2420
|
+
* Gets the name of the space.
|
|
2421
|
+
*
|
|
2422
|
+
* @returns {string} The name of the space.
|
|
2423
|
+
*/
|
|
2424
|
+
get name(): string;
|
|
2425
|
+
/**
|
|
2426
|
+
* Serializes the space data to JSON.
|
|
2427
|
+
*
|
|
2428
|
+
* @returns An object representing the space.
|
|
2429
|
+
*/
|
|
2430
|
+
toJSON(): {
|
|
2431
|
+
id: string;
|
|
2432
|
+
name: string;
|
|
2433
|
+
};
|
|
2434
|
+
/**
|
|
2435
|
+
* Cleans up resources used by the instance.
|
|
2436
|
+
*
|
|
2437
|
+
* @internal
|
|
2438
|
+
*/
|
|
2439
|
+
destroy(): void;
|
|
2440
|
+
}
|
|
2441
|
+
export default Venue;
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
|
|
2445
|
+
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
2446
|
+
import type { RendererCore } from '@mappedin/core-sdk';
|
|
2447
|
+
import type { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
|
|
2448
|
+
import { PubSub } from '@packages/internal/common';
|
|
2449
|
+
export const GAP_BELOW_FLOORS = 30;
|
|
2450
|
+
export const DURATION = 1000;
|
|
2451
|
+
export type TStackedMapsEvents = {
|
|
2452
|
+
expanded: void;
|
|
2453
|
+
collapsed: void;
|
|
2454
|
+
};
|
|
2455
|
+
export class StackedMaps extends PubSub<TStackedMapsEvents> {
|
|
2456
|
+
#private;
|
|
2457
|
+
constructor(api: GeojsonApiMapObject, core: RendererCore);
|
|
2458
|
+
includedFloors: FloorObject[];
|
|
2459
|
+
get percentExpanded(): number;
|
|
2460
|
+
set percentExpanded(value: number);
|
|
2461
|
+
animateToCurrentFloor(): void;
|
|
2462
|
+
expanded: boolean;
|
|
2463
|
+
expand(opts?: {
|
|
2464
|
+
excludeFloorIds: string[];
|
|
2465
|
+
}): Promise<void>;
|
|
2466
|
+
collapse(): Promise<void>;
|
|
2467
|
+
animate(direction: 'expand' | 'collapse'): Promise<void>;
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2471
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/camera-transform' {
|
|
2472
|
+
import type { Camera } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
|
|
2473
|
+
/**
|
|
2474
|
+
* Class representing camera transformation data.
|
|
2475
|
+
*/
|
|
2476
|
+
export class CameraTransform {
|
|
2477
|
+
#private;
|
|
2478
|
+
/**
|
|
2479
|
+
* @internal
|
|
2480
|
+
*/
|
|
2481
|
+
constructor(camera: Camera);
|
|
2482
|
+
/**
|
|
2483
|
+
* Getter for the center coordinate of the camera.
|
|
2484
|
+
*
|
|
2485
|
+
* @returns Center Coordinate.
|
|
2486
|
+
*/
|
|
2487
|
+
get center(): import("..").Coordinate;
|
|
2488
|
+
/**
|
|
2489
|
+
* Getter for the camera's bearing in degrees.
|
|
2490
|
+
*
|
|
2491
|
+
* @returns Camera bearing in degrees.
|
|
2492
|
+
*/
|
|
2493
|
+
get bearing(): number;
|
|
2494
|
+
/**
|
|
2495
|
+
* Getter for the camera's pitch in degrees.
|
|
2496
|
+
*
|
|
2497
|
+
* @returns Camera pitch in degrees.
|
|
2498
|
+
*/
|
|
2499
|
+
get pitch(): number;
|
|
2500
|
+
/**
|
|
2501
|
+
* Getter for the camera's zoom level in mercator zoom levels.
|
|
2502
|
+
*
|
|
2503
|
+
* @see https://wiki.openstreetmap.org/wiki/Zoom_levels
|
|
2504
|
+
*
|
|
2505
|
+
* @returns Zoom level in mercator zoom levels.
|
|
2506
|
+
*/
|
|
2507
|
+
get zoomLevel(): number;
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node' {
|
|
2512
|
+
import type { NodeCollection } from '@mappedin/mvf';
|
|
2513
|
+
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
2514
|
+
import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
2515
|
+
import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
|
|
2092
2516
|
import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
|
|
2093
2517
|
/**
|
|
2094
2518
|
* A class representing {@link Path} node data within the map.
|
|
@@ -2253,7 +2677,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door' {
|
|
|
2253
2677
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
|
|
2254
2678
|
import type { Image, SpaceCollection } from '@mappedin/mvf';
|
|
2255
2679
|
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
2256
|
-
import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
2680
|
+
import type { Location, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
2257
2681
|
import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
|
|
2258
2682
|
import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
|
|
2259
2683
|
import Door from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door';
|
|
@@ -2311,6 +2735,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
|
|
|
2311
2735
|
get type(): TSpaceType;
|
|
2312
2736
|
get description(): string;
|
|
2313
2737
|
get images(): Image[];
|
|
2738
|
+
/**
|
|
2739
|
+
* @internal
|
|
2740
|
+
*/
|
|
2741
|
+
get locations(): Location[];
|
|
2314
2742
|
/**
|
|
2315
2743
|
* Gets the {@link Floor} object associated with the space.
|
|
2316
2744
|
*
|
|
@@ -3018,25 +3446,17 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-do
|
|
|
3018
3446
|
import type { RendererCore } from '@mappedin/core-sdk';
|
|
3019
3447
|
import { PubSub } from '@packages/internal/common';
|
|
3020
3448
|
import type { GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
3449
|
+
import type { TBlueDotOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
3021
3450
|
export type TBlueDotEvents = {
|
|
3022
3451
|
'floor-change': {
|
|
3023
3452
|
reason: 'blue-dot-floor-change';
|
|
3024
3453
|
floorId: string;
|
|
3025
3454
|
};
|
|
3026
3455
|
};
|
|
3027
|
-
export const POSITION_ANIMATION_DURATION = 500;
|
|
3028
|
-
export const SCALE_ANIMATION_DURATION = 150;
|
|
3029
|
-
export const ROTATION_ANIMATION_DURATION = 150;
|
|
3030
|
-
export const MIN_AURA_RADIUS = 0;
|
|
3031
|
-
export const MAX_AURA_RADIUS = 5;
|
|
3032
|
-
export const MIN_ACCURACY = 5;
|
|
3033
|
-
export const MAX_ACCURACY = 30;
|
|
3034
|
-
export const CONE_START_RADIUS = 0.4;
|
|
3035
|
-
export const CONE_DISTANCE = 1.25;
|
|
3036
|
-
export const BLUE_DOT_RADIUS = 0.35;
|
|
3037
3456
|
export class BlueDot extends PubSub<TBlueDotEvents> {
|
|
3457
|
+
#private;
|
|
3038
3458
|
constructor(core: RendererCore, geoJSONApi: GeoJsonApi);
|
|
3039
|
-
enable(): void;
|
|
3459
|
+
enable(options?: TBlueDotOptions): void;
|
|
3040
3460
|
disable(): void;
|
|
3041
3461
|
}
|
|
3042
3462
|
}
|
|
@@ -3076,12 +3496,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes' {
|
|
|
3076
3496
|
*/
|
|
3077
3497
|
add<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, floor?: Floor): Shape;
|
|
3078
3498
|
/**
|
|
3079
|
-
* Removes a specific
|
|
3080
|
-
* @param
|
|
3499
|
+
* Removes a specific shape ({@link Shape}) from the map.
|
|
3500
|
+
* @param shape The shape to be removed.
|
|
3081
3501
|
* @example
|
|
3082
3502
|
* map.Shapes.remove(geo);
|
|
3083
3503
|
*/
|
|
3084
|
-
remove(
|
|
3504
|
+
remove(shape: Shape): void;
|
|
3085
3505
|
/**
|
|
3086
3506
|
* Removes all Shapes ({@link Shape}) from the map.
|
|
3087
3507
|
*
|
|
@@ -3098,8 +3518,9 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
3098
3518
|
import './marker.scss';
|
|
3099
3519
|
import { Vector2 } from 'three';
|
|
3100
3520
|
import type { Entity2DHTMLDivElement, EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
3101
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3521
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
3102
3522
|
import type { CollisionRankingTier } from '@mappedin/react-sdk/geojson/src/utils/collision-ranking-tier';
|
|
3523
|
+
import { z } from 'zod';
|
|
3103
3524
|
/**
|
|
3104
3525
|
* State reprsenting a Marker
|
|
3105
3526
|
*/
|
|
@@ -3146,6 +3567,26 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
3146
3567
|
interactive?: boolean;
|
|
3147
3568
|
};
|
|
3148
3569
|
};
|
|
3570
|
+
export const addMarkerOptionsSchema: z.ZodObject<{
|
|
3571
|
+
rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
|
|
3572
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
3573
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3574
|
+
anchor: z.ZodOptional<z.ZodEnum<["top", "bottom", "left", "right", "center"]>>;
|
|
3575
|
+
dynamicResize: z.ZodOptional<z.ZodBoolean>;
|
|
3576
|
+
}, "strip", z.ZodTypeAny, {
|
|
3577
|
+
interactive?: boolean | undefined;
|
|
3578
|
+
id?: string | undefined;
|
|
3579
|
+
anchor?: "center" | "left" | "right" | "bottom" | "top" | undefined;
|
|
3580
|
+
rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
|
|
3581
|
+
dynamicResize?: boolean | undefined;
|
|
3582
|
+
}, {
|
|
3583
|
+
interactive?: boolean | undefined;
|
|
3584
|
+
id?: string | undefined;
|
|
3585
|
+
anchor?: "center" | "left" | "right" | "bottom" | "top" | undefined;
|
|
3586
|
+
rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
|
|
3587
|
+
dynamicResize?: boolean | undefined;
|
|
3588
|
+
}>;
|
|
3589
|
+
export function validateMarker(coordinate: Position, contentHTML: string, options: AddMarkerOptions): void;
|
|
3149
3590
|
/**
|
|
3150
3591
|
* Options for creating a new Marker
|
|
3151
3592
|
*/
|
|
@@ -3231,7 +3672,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
3231
3672
|
declare module '@mappedin/react-sdk/geojson/src/components/path' {
|
|
3232
3673
|
import { type Mesh, type ShaderMaterial, type BufferGeometry, Vector3 } from 'three';
|
|
3233
3674
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
3234
|
-
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3675
|
+
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
3235
3676
|
import type { FeatureCollection, Point } from 'geojson';
|
|
3236
3677
|
/**
|
|
3237
3678
|
* State representing a Path
|
|
@@ -3332,9 +3773,175 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
3332
3773
|
import { Vector2 } from 'three';
|
|
3333
3774
|
import type { TDrawFn } from '@packages/internal/shave-text/shave-text';
|
|
3334
3775
|
import type { EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
3335
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3776
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
3336
3777
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
3337
3778
|
import type { CollisionRankingTier } from '@mappedin/react-sdk/geojson/src';
|
|
3779
|
+
import { z } from 'zod';
|
|
3780
|
+
export const addLabelOptionsSchema: z.ZodObject<{
|
|
3781
|
+
rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
|
|
3782
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
3783
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
3784
|
+
margin: z.ZodOptional<z.ZodNumber>;
|
|
3785
|
+
text: z.ZodOptional<z.ZodObject<{
|
|
3786
|
+
numLines: z.ZodOptional<z.ZodNumber>;
|
|
3787
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
3788
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
3789
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
3790
|
+
foregroundColor: z.ZodOptional<z.ZodString>;
|
|
3791
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
3792
|
+
}, "strip", z.ZodTypeAny, {
|
|
3793
|
+
size?: number | undefined;
|
|
3794
|
+
maxWidth?: number | undefined;
|
|
3795
|
+
lineHeight?: number | undefined;
|
|
3796
|
+
numLines?: number | undefined;
|
|
3797
|
+
foregroundColor?: string | undefined;
|
|
3798
|
+
backgroundColor?: string | undefined;
|
|
3799
|
+
}, {
|
|
3800
|
+
size?: number | undefined;
|
|
3801
|
+
maxWidth?: number | undefined;
|
|
3802
|
+
lineHeight?: number | undefined;
|
|
3803
|
+
numLines?: number | undefined;
|
|
3804
|
+
foregroundColor?: string | undefined;
|
|
3805
|
+
backgroundColor?: string | undefined;
|
|
3806
|
+
}>>;
|
|
3807
|
+
marker: z.ZodOptional<z.ZodObject<{
|
|
3808
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
3809
|
+
foregroundColor: z.ZodOptional<z.ZodObject<{
|
|
3810
|
+
active: z.ZodOptional<z.ZodString>;
|
|
3811
|
+
inactive: z.ZodOptional<z.ZodString>;
|
|
3812
|
+
}, "strip", z.ZodTypeAny, {
|
|
3813
|
+
active?: string | undefined;
|
|
3814
|
+
inactive?: string | undefined;
|
|
3815
|
+
}, {
|
|
3816
|
+
active?: string | undefined;
|
|
3817
|
+
inactive?: string | undefined;
|
|
3818
|
+
}>>;
|
|
3819
|
+
backgroundColor: z.ZodOptional<z.ZodObject<{
|
|
3820
|
+
active: z.ZodOptional<z.ZodString>;
|
|
3821
|
+
inactive: z.ZodOptional<z.ZodString>;
|
|
3822
|
+
}, "strip", z.ZodTypeAny, {
|
|
3823
|
+
active?: string | undefined;
|
|
3824
|
+
inactive?: string | undefined;
|
|
3825
|
+
}, {
|
|
3826
|
+
active?: string | undefined;
|
|
3827
|
+
inactive?: string | undefined;
|
|
3828
|
+
}>>;
|
|
3829
|
+
}, "strip", z.ZodTypeAny, {
|
|
3830
|
+
size?: number | undefined;
|
|
3831
|
+
foregroundColor?: {
|
|
3832
|
+
active?: string | undefined;
|
|
3833
|
+
inactive?: string | undefined;
|
|
3834
|
+
} | undefined;
|
|
3835
|
+
backgroundColor?: {
|
|
3836
|
+
active?: string | undefined;
|
|
3837
|
+
inactive?: string | undefined;
|
|
3838
|
+
} | undefined;
|
|
3839
|
+
}, {
|
|
3840
|
+
size?: number | undefined;
|
|
3841
|
+
foregroundColor?: {
|
|
3842
|
+
active?: string | undefined;
|
|
3843
|
+
inactive?: string | undefined;
|
|
3844
|
+
} | undefined;
|
|
3845
|
+
backgroundColor?: {
|
|
3846
|
+
active?: string | undefined;
|
|
3847
|
+
inactive?: string | undefined;
|
|
3848
|
+
} | undefined;
|
|
3849
|
+
}>>;
|
|
3850
|
+
}, "strip", z.ZodTypeAny, {
|
|
3851
|
+
text?: {
|
|
3852
|
+
size?: number | undefined;
|
|
3853
|
+
maxWidth?: number | undefined;
|
|
3854
|
+
lineHeight?: number | undefined;
|
|
3855
|
+
numLines?: number | undefined;
|
|
3856
|
+
foregroundColor?: string | undefined;
|
|
3857
|
+
backgroundColor?: string | undefined;
|
|
3858
|
+
} | undefined;
|
|
3859
|
+
marker?: {
|
|
3860
|
+
size?: number | undefined;
|
|
3861
|
+
foregroundColor?: {
|
|
3862
|
+
active?: string | undefined;
|
|
3863
|
+
inactive?: string | undefined;
|
|
3864
|
+
} | undefined;
|
|
3865
|
+
backgroundColor?: {
|
|
3866
|
+
active?: string | undefined;
|
|
3867
|
+
inactive?: string | undefined;
|
|
3868
|
+
} | undefined;
|
|
3869
|
+
} | undefined;
|
|
3870
|
+
margin?: number | undefined;
|
|
3871
|
+
}, {
|
|
3872
|
+
text?: {
|
|
3873
|
+
size?: number | undefined;
|
|
3874
|
+
maxWidth?: number | undefined;
|
|
3875
|
+
lineHeight?: number | undefined;
|
|
3876
|
+
numLines?: number | undefined;
|
|
3877
|
+
foregroundColor?: string | undefined;
|
|
3878
|
+
backgroundColor?: string | undefined;
|
|
3879
|
+
} | undefined;
|
|
3880
|
+
marker?: {
|
|
3881
|
+
size?: number | undefined;
|
|
3882
|
+
foregroundColor?: {
|
|
3883
|
+
active?: string | undefined;
|
|
3884
|
+
inactive?: string | undefined;
|
|
3885
|
+
} | undefined;
|
|
3886
|
+
backgroundColor?: {
|
|
3887
|
+
active?: string | undefined;
|
|
3888
|
+
inactive?: string | undefined;
|
|
3889
|
+
} | undefined;
|
|
3890
|
+
} | undefined;
|
|
3891
|
+
margin?: number | undefined;
|
|
3892
|
+
}>>;
|
|
3893
|
+
}, "strip", z.ZodTypeAny, {
|
|
3894
|
+
interactive?: boolean | undefined;
|
|
3895
|
+
rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
|
|
3896
|
+
appearance?: {
|
|
3897
|
+
text?: {
|
|
3898
|
+
size?: number | undefined;
|
|
3899
|
+
maxWidth?: number | undefined;
|
|
3900
|
+
lineHeight?: number | undefined;
|
|
3901
|
+
numLines?: number | undefined;
|
|
3902
|
+
foregroundColor?: string | undefined;
|
|
3903
|
+
backgroundColor?: string | undefined;
|
|
3904
|
+
} | undefined;
|
|
3905
|
+
marker?: {
|
|
3906
|
+
size?: number | undefined;
|
|
3907
|
+
foregroundColor?: {
|
|
3908
|
+
active?: string | undefined;
|
|
3909
|
+
inactive?: string | undefined;
|
|
3910
|
+
} | undefined;
|
|
3911
|
+
backgroundColor?: {
|
|
3912
|
+
active?: string | undefined;
|
|
3913
|
+
inactive?: string | undefined;
|
|
3914
|
+
} | undefined;
|
|
3915
|
+
} | undefined;
|
|
3916
|
+
margin?: number | undefined;
|
|
3917
|
+
} | undefined;
|
|
3918
|
+
}, {
|
|
3919
|
+
interactive?: boolean | undefined;
|
|
3920
|
+
rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
|
|
3921
|
+
appearance?: {
|
|
3922
|
+
text?: {
|
|
3923
|
+
size?: number | undefined;
|
|
3924
|
+
maxWidth?: number | undefined;
|
|
3925
|
+
lineHeight?: number | undefined;
|
|
3926
|
+
numLines?: number | undefined;
|
|
3927
|
+
foregroundColor?: string | undefined;
|
|
3928
|
+
backgroundColor?: string | undefined;
|
|
3929
|
+
} | undefined;
|
|
3930
|
+
marker?: {
|
|
3931
|
+
size?: number | undefined;
|
|
3932
|
+
foregroundColor?: {
|
|
3933
|
+
active?: string | undefined;
|
|
3934
|
+
inactive?: string | undefined;
|
|
3935
|
+
} | undefined;
|
|
3936
|
+
backgroundColor?: {
|
|
3937
|
+
active?: string | undefined;
|
|
3938
|
+
inactive?: string | undefined;
|
|
3939
|
+
} | undefined;
|
|
3940
|
+
} | undefined;
|
|
3941
|
+
margin?: number | undefined;
|
|
3942
|
+
} | undefined;
|
|
3943
|
+
}>;
|
|
3944
|
+
export function validateLabel(coordinate: Position, text: string, options: AddLabelOptions): void;
|
|
3338
3945
|
export const labelThemes: {
|
|
3339
3946
|
lightOnDark: {
|
|
3340
3947
|
text: {
|
|
@@ -3670,18 +4277,18 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
3670
4277
|
export default LabelComponent;
|
|
3671
4278
|
}
|
|
3672
4279
|
|
|
3673
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
4280
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/group-container' {
|
|
3674
4281
|
import { Object3D } from 'three';
|
|
3675
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3676
|
-
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3677
|
-
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4282
|
+
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
4283
|
+
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
4284
|
+
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
3678
4285
|
import type { StackComponent } from '@mappedin/react-sdk/geojson/src/components/stack';
|
|
3679
4286
|
import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
3680
4287
|
import type { LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
3681
|
-
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4288
|
+
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
3682
4289
|
import type { PathState } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
3683
|
-
import { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
3684
|
-
export enum
|
|
4290
|
+
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
4291
|
+
export enum GroupContainerComponents {
|
|
3685
4292
|
Stack = 0,
|
|
3686
4293
|
Interaction = 1
|
|
3687
4294
|
}
|
|
@@ -3723,13 +4330,13 @@ declare module '@mappedin/react-sdk/geojson/src/entities/entity-group-container'
|
|
|
3723
4330
|
}
|
|
3724
4331
|
}
|
|
3725
4332
|
|
|
3726
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
4333
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/geometry-group' {
|
|
3727
4334
|
import type { LineStyle, PaintStyle, Shading } from '@mappedin/react-sdk/geojson/src/types';
|
|
3728
4335
|
import { Object3D } from 'three';
|
|
3729
|
-
import type
|
|
4336
|
+
import { type GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
3730
4337
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
3731
4338
|
import { GeometryGroupStyleComponent } from '@mappedin/react-sdk/geojson/src/components/geometry-group-style';
|
|
3732
|
-
export enum
|
|
4339
|
+
export enum GeometryGroupComponents {
|
|
3733
4340
|
GeometryGroupStyle = 0
|
|
3734
4341
|
}
|
|
3735
4342
|
/**
|
|
@@ -3776,6 +4383,14 @@ declare module '@mappedin/react-sdk/geojson/src/entities/entity-group' {
|
|
|
3776
4383
|
* Whether the geometry and its children are outlined. This will affect all children of the geometry group and override their outline state.
|
|
3777
4384
|
*/
|
|
3778
4385
|
outline?: boolean;
|
|
4386
|
+
/**
|
|
4387
|
+
* The texture URL of the geometry
|
|
4388
|
+
*/
|
|
4389
|
+
texture?: string;
|
|
4390
|
+
/**
|
|
4391
|
+
* The top texture URL of the geometry
|
|
4392
|
+
*/
|
|
4393
|
+
topTexture?: string;
|
|
3779
4394
|
};
|
|
3780
4395
|
export type ChildUpdatable<T> = T extends LineStyle ? Partial<Pick<LineStyle, 'color' | 'opacity' | 'visible'>> : Partial<Pick<PaintStyle, 'color' | 'opacity' | 'visible'>>;
|
|
3781
4396
|
export class GeometryGroupObject3D extends Object3D {
|
|
@@ -3796,6 +4411,11 @@ declare module '@mappedin/react-sdk/geojson/src/entities/entity-group' {
|
|
|
3796
4411
|
setOpacity(opacity: number): void;
|
|
3797
4412
|
removeEntity(): void;
|
|
3798
4413
|
constructor(id: string, style?: GeometryGroupStyleComponent);
|
|
4414
|
+
/**
|
|
4415
|
+
* Get first child entity of a group if it's a batched mesh
|
|
4416
|
+
* We use this logic a lot for getting the material of the group. since group does not have material and batched mesh does
|
|
4417
|
+
*/
|
|
4418
|
+
getfirstChildEntityId(): string | number | undefined;
|
|
3799
4419
|
}
|
|
3800
4420
|
}
|
|
3801
4421
|
|
|
@@ -3805,20 +4425,22 @@ declare module '@mappedin/react-sdk/geojson/src/types/geometry' {
|
|
|
3805
4425
|
|
|
3806
4426
|
declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
3807
4427
|
import { Mesh, Object3D, InstancedMesh } from 'three';
|
|
3808
|
-
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4428
|
+
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
3809
4429
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types/geometry';
|
|
3810
4430
|
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
3811
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3812
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4431
|
+
import type { GeometryGroupObject3D, GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
4432
|
+
import type { GroupContainerObject3D, GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
3813
4433
|
import type { PathState } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
3814
4434
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
3815
4435
|
import type { LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
3816
4436
|
import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
4437
|
+
import type { ImageState } from '@mappedin/react-sdk/geojson/src/components/image';
|
|
3817
4438
|
import type { ShapeState } from '@mappedin/react-sdk/geojson/src/components/custom';
|
|
4439
|
+
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities';
|
|
3818
4440
|
/**
|
|
3819
4441
|
* The state of an entity, which can be a geometry, geometry group, group container, path, model, label, or marker.
|
|
3820
4442
|
*/
|
|
3821
|
-
export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ShapeState;
|
|
4443
|
+
export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ImageState | ShapeState;
|
|
3822
4444
|
/**
|
|
3823
4445
|
* A wrapper object that contains the ID and type of an entity. This is returned when adding entities to the scene, and can be used
|
|
3824
4446
|
* to `getState` and `setState` of the entity.
|
|
@@ -3867,9 +4489,9 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
3867
4489
|
texture?: string;
|
|
3868
4490
|
shading?: Shading;
|
|
3869
4491
|
outline?: boolean;
|
|
4492
|
+
showImage?: boolean;
|
|
4493
|
+
flipImageToFaceCamera?: boolean;
|
|
3870
4494
|
};
|
|
3871
|
-
export type Cap = 'round' | 'square' | 'butt';
|
|
3872
|
-
export type Join = 'round' | 'bevel' | 'miter';
|
|
3873
4495
|
export type Shading = {
|
|
3874
4496
|
start?: number;
|
|
3875
4497
|
end?: number;
|
|
@@ -3883,8 +4505,8 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
3883
4505
|
height?: number;
|
|
3884
4506
|
altitude?: number;
|
|
3885
4507
|
visible?: boolean;
|
|
3886
|
-
cap?:
|
|
3887
|
-
join?:
|
|
4508
|
+
cap?: 'round' | 'square' | 'butt';
|
|
4509
|
+
join?: 'round' | 'bevel' | 'miter';
|
|
3888
4510
|
shading?: Shading;
|
|
3889
4511
|
outline?: boolean;
|
|
3890
4512
|
};
|
|
@@ -3900,6 +4522,12 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
3900
4522
|
};
|
|
3901
4523
|
source: string;
|
|
3902
4524
|
};
|
|
4525
|
+
export type PolygonImage = {
|
|
4526
|
+
width: number;
|
|
4527
|
+
height: number;
|
|
4528
|
+
verticalOffset?: number;
|
|
4529
|
+
rotation?: number;
|
|
4530
|
+
};
|
|
3903
4531
|
export type PolygonSource = {
|
|
3904
4532
|
features: {
|
|
3905
4533
|
type: 'Feature';
|
|
@@ -4053,6 +4681,21 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
4053
4681
|
export type MapEventPayload<EventName extends keyof MapEvent> = MapEvent[EventName] extends {
|
|
4054
4682
|
data: null;
|
|
4055
4683
|
} ? MapEvent[EventName]['data'] : MapEvent[EventName];
|
|
4684
|
+
export type Geometry3DTypes = Geometry3D | GeometryGroupObject3D | GroupContainerObject3D;
|
|
4685
|
+
export type RendererState = {
|
|
4686
|
+
geometry3DMap: Map<string | number, Geometry3DTypes>;
|
|
4687
|
+
geometry2DMap: Map<string | number, Geometry2D>;
|
|
4688
|
+
geometry2DIdsInScene: Set<Geometry2D['id']>;
|
|
4689
|
+
geometry3DIdsInScene: Set<Geometry3DTypes['id']>;
|
|
4690
|
+
entityScene: GroupContainerObject3D;
|
|
4691
|
+
hoverColor: string;
|
|
4692
|
+
center?: Position;
|
|
4693
|
+
insetsPadding: InsetPadding;
|
|
4694
|
+
shouldMeasureCanvas: boolean;
|
|
4695
|
+
pixelRatio: number;
|
|
4696
|
+
canvasWidth: number;
|
|
4697
|
+
canvasHeight: number;
|
|
4698
|
+
};
|
|
4056
4699
|
}
|
|
4057
4700
|
|
|
4058
4701
|
declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
@@ -4067,6 +4710,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
4067
4710
|
entities: {
|
|
4068
4711
|
[key: number]: string | number;
|
|
4069
4712
|
};
|
|
4713
|
+
detached?: boolean;
|
|
4070
4714
|
};
|
|
4071
4715
|
}
|
|
4072
4716
|
/**
|
|
@@ -4112,21 +4756,49 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
4112
4756
|
* Whether the geometry is outlined with a 30% darkened color. This effect adds lines around the geometry to make it stand out.
|
|
4113
4757
|
*/
|
|
4114
4758
|
outline: boolean;
|
|
4759
|
+
/**
|
|
4760
|
+
* Show geometry image if present
|
|
4761
|
+
*/
|
|
4762
|
+
showImage: boolean;
|
|
4763
|
+
/**
|
|
4764
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
4765
|
+
*/
|
|
4766
|
+
flipImageToFaceCamera: boolean;
|
|
4115
4767
|
/**
|
|
4116
4768
|
* Whether the geometry should emit an event when focused on by the center of the camera
|
|
4117
4769
|
*/
|
|
4118
4770
|
focusable: boolean;
|
|
4771
|
+
/**
|
|
4772
|
+
* The opacity of the geometry
|
|
4773
|
+
*/
|
|
4774
|
+
opacity: number;
|
|
4775
|
+
/**
|
|
4776
|
+
* The height of the geometry
|
|
4777
|
+
*/
|
|
4778
|
+
height: number;
|
|
4779
|
+
/**
|
|
4780
|
+
* The texture URL of the geometry
|
|
4781
|
+
*/
|
|
4782
|
+
texture?: string;
|
|
4783
|
+
/**
|
|
4784
|
+
* The top texture URL of the geometry
|
|
4785
|
+
*/
|
|
4786
|
+
topTexture?: string;
|
|
4119
4787
|
};
|
|
4120
4788
|
export class MeshComponent {
|
|
4121
4789
|
#private;
|
|
4122
4790
|
mesh?: EntityBatchedMesh;
|
|
4123
4791
|
focusMesh?: Mesh;
|
|
4124
4792
|
outline?: LineSegments;
|
|
4793
|
+
imageMesh?: Mesh;
|
|
4125
4794
|
readonly type = "geometry";
|
|
4795
|
+
dirty: boolean;
|
|
4796
|
+
detached: boolean;
|
|
4126
4797
|
instanceIndex: number;
|
|
4127
4798
|
geometry?: BufferGeometry;
|
|
4128
4799
|
material?: BatchedStandardMaterial;
|
|
4129
4800
|
feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>;
|
|
4801
|
+
currentHeight: number;
|
|
4130
4802
|
constructor(feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>);
|
|
4131
4803
|
get visible(): boolean;
|
|
4132
4804
|
set visible(visible: boolean);
|
|
@@ -4135,6 +4807,10 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
4135
4807
|
color: Color;
|
|
4136
4808
|
topColor: Color;
|
|
4137
4809
|
setColor(color: string, topColor: string): void;
|
|
4810
|
+
getColor(): {
|
|
4811
|
+
color: Color;
|
|
4812
|
+
topColor: Color;
|
|
4813
|
+
} | undefined;
|
|
4138
4814
|
position: Vector3;
|
|
4139
4815
|
get altitude(): number;
|
|
4140
4816
|
set altitude(value: number);
|
|
@@ -4142,12 +4818,16 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
4142
4818
|
set opacity(value: number);
|
|
4143
4819
|
get texture(): string;
|
|
4144
4820
|
set texture(texture: Texture);
|
|
4821
|
+
get textureInstance(): Texture | undefined;
|
|
4145
4822
|
set topTexture(texture: Texture);
|
|
4146
4823
|
get topTexture(): string;
|
|
4824
|
+
get topTextureInstance(): Texture | undefined;
|
|
4147
4825
|
get featureBbox(): BBox;
|
|
4148
4826
|
texturesVisible: boolean;
|
|
4149
4827
|
showTextures(): void;
|
|
4150
4828
|
hideTextures(): void;
|
|
4829
|
+
removeSideTexture(): void;
|
|
4830
|
+
removeTopTexture(): void;
|
|
4151
4831
|
}
|
|
4152
4832
|
}
|
|
4153
4833
|
|
|
@@ -4155,8 +4835,8 @@ declare module '@mappedin/react-sdk/geojson/src/components/custom' {
|
|
|
4155
4835
|
import { Color, type Object3D, type LineSegments } from 'three';
|
|
4156
4836
|
import type { EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
4157
4837
|
import type { Feature, Point } from 'geojson';
|
|
4158
|
-
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4159
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4838
|
+
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
4839
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
4160
4840
|
/**
|
|
4161
4841
|
* State representing a Custom Geometry
|
|
4162
4842
|
*/
|
|
@@ -4211,10 +4891,11 @@ declare module '@mappedin/react-sdk/geojson/src/components/model' {
|
|
|
4211
4891
|
import type { LineSegments, Object3D } from 'three';
|
|
4212
4892
|
import { Color, Vector3 } from 'three';
|
|
4213
4893
|
import type { BatchedStandardMaterial } from '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/batched-material';
|
|
4214
|
-
import type { Position, EntityId } from '@mappedin/react-sdk/geojson/src/types';
|
|
4215
|
-
import type { Feature, Point } from 'geojson';
|
|
4216
|
-
import type { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4217
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4894
|
+
import type { Position, EntityId, ModelProperties, ModelStyle } from '@mappedin/react-sdk/geojson/src/types';
|
|
4895
|
+
import type { Feature, FeatureCollection, Point } from 'geojson';
|
|
4896
|
+
import type { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
4897
|
+
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
4898
|
+
import { z } from 'zod';
|
|
4218
4899
|
/**
|
|
4219
4900
|
* State representing a Model, typically loaded via a URL
|
|
4220
4901
|
*/
|
|
@@ -4239,53 +4920,233 @@ declare module '@mappedin/react-sdk/geojson/src/components/model' {
|
|
|
4239
4920
|
*/
|
|
4240
4921
|
interactive: boolean;
|
|
4241
4922
|
};
|
|
4242
|
-
export
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4923
|
+
export const modelPropertiesSchema: z.ZodObject<{
|
|
4924
|
+
rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
4925
|
+
altitude: z.ZodOptional<z.ZodNumber>;
|
|
4926
|
+
scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
4927
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
4928
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
4929
|
+
}, "strip", z.ZodTypeAny, {
|
|
4930
|
+
rotation?: number[] | undefined;
|
|
4931
|
+
altitude?: number | undefined;
|
|
4932
|
+
scale?: number[] | undefined;
|
|
4933
|
+
interactive?: boolean | undefined;
|
|
4934
|
+
id?: string | number | undefined;
|
|
4935
|
+
}, {
|
|
4936
|
+
rotation?: number[] | undefined;
|
|
4937
|
+
altitude?: number | undefined;
|
|
4938
|
+
scale?: number[] | undefined;
|
|
4939
|
+
interactive?: boolean | undefined;
|
|
4940
|
+
id?: string | number | undefined;
|
|
4941
|
+
}>;
|
|
4942
|
+
export const featureSchema: z.ZodObject<{
|
|
4943
|
+
type: z.ZodEnum<["Feature"]>;
|
|
4944
|
+
geometry: z.ZodObject<{
|
|
4945
|
+
type: z.ZodEnum<["Point"]>;
|
|
4946
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
4947
|
+
}, "strip", z.ZodTypeAny, {
|
|
4948
|
+
type: "Point";
|
|
4949
|
+
coordinates: number[];
|
|
4950
|
+
}, {
|
|
4951
|
+
type: "Point";
|
|
4952
|
+
coordinates: number[];
|
|
4953
|
+
}>;
|
|
4954
|
+
properties: z.ZodObject<{
|
|
4955
|
+
rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
4956
|
+
altitude: z.ZodOptional<z.ZodNumber>;
|
|
4957
|
+
scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
4958
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
4959
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
4960
|
+
}, "strip", z.ZodTypeAny, {
|
|
4961
|
+
rotation?: number[] | undefined;
|
|
4962
|
+
altitude?: number | undefined;
|
|
4963
|
+
scale?: number[] | undefined;
|
|
4964
|
+
interactive?: boolean | undefined;
|
|
4965
|
+
id?: string | number | undefined;
|
|
4966
|
+
}, {
|
|
4967
|
+
rotation?: number[] | undefined;
|
|
4968
|
+
altitude?: number | undefined;
|
|
4969
|
+
scale?: number[] | undefined;
|
|
4970
|
+
interactive?: boolean | undefined;
|
|
4971
|
+
id?: string | number | undefined;
|
|
4972
|
+
}>;
|
|
4973
|
+
}, "strip", z.ZodTypeAny, {
|
|
4974
|
+
type: "Feature";
|
|
4975
|
+
geometry: {
|
|
4976
|
+
type: "Point";
|
|
4977
|
+
coordinates: number[];
|
|
4978
|
+
};
|
|
4979
|
+
properties: {
|
|
4980
|
+
rotation?: number[] | undefined;
|
|
4981
|
+
altitude?: number | undefined;
|
|
4982
|
+
scale?: number[] | undefined;
|
|
4983
|
+
interactive?: boolean | undefined;
|
|
4984
|
+
id?: string | number | undefined;
|
|
4985
|
+
};
|
|
4986
|
+
}, {
|
|
4987
|
+
type: "Feature";
|
|
4988
|
+
geometry: {
|
|
4989
|
+
type: "Point";
|
|
4990
|
+
coordinates: number[];
|
|
4991
|
+
};
|
|
4992
|
+
properties: {
|
|
4993
|
+
rotation?: number[] | undefined;
|
|
4994
|
+
altitude?: number | undefined;
|
|
4995
|
+
scale?: number[] | undefined;
|
|
4996
|
+
interactive?: boolean | undefined;
|
|
4997
|
+
id?: string | number | undefined;
|
|
4998
|
+
};
|
|
4999
|
+
}>;
|
|
5000
|
+
export const addModelFeatureSchema: z.ZodObject<{
|
|
5001
|
+
type: z.ZodEnum<["FeatureCollection"]>;
|
|
5002
|
+
features: z.ZodArray<z.ZodObject<{
|
|
5003
|
+
type: z.ZodEnum<["Feature"]>;
|
|
5004
|
+
geometry: z.ZodObject<{
|
|
5005
|
+
type: z.ZodEnum<["Point"]>;
|
|
5006
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
5007
|
+
}, "strip", z.ZodTypeAny, {
|
|
5008
|
+
type: "Point";
|
|
5009
|
+
coordinates: number[];
|
|
5010
|
+
}, {
|
|
5011
|
+
type: "Point";
|
|
5012
|
+
coordinates: number[];
|
|
5013
|
+
}>;
|
|
5014
|
+
properties: z.ZodObject<{
|
|
5015
|
+
rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
5016
|
+
altitude: z.ZodOptional<z.ZodNumber>;
|
|
5017
|
+
scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
5018
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
5019
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
5020
|
+
}, "strip", z.ZodTypeAny, {
|
|
5021
|
+
rotation?: number[] | undefined;
|
|
5022
|
+
altitude?: number | undefined;
|
|
5023
|
+
scale?: number[] | undefined;
|
|
5024
|
+
interactive?: boolean | undefined;
|
|
5025
|
+
id?: string | number | undefined;
|
|
5026
|
+
}, {
|
|
5027
|
+
rotation?: number[] | undefined;
|
|
5028
|
+
altitude?: number | undefined;
|
|
5029
|
+
scale?: number[] | undefined;
|
|
5030
|
+
interactive?: boolean | undefined;
|
|
5031
|
+
id?: string | number | undefined;
|
|
5032
|
+
}>;
|
|
5033
|
+
}, "strip", z.ZodTypeAny, {
|
|
5034
|
+
type: "Feature";
|
|
5035
|
+
geometry: {
|
|
5036
|
+
type: "Point";
|
|
5037
|
+
coordinates: number[];
|
|
5038
|
+
};
|
|
5039
|
+
properties: {
|
|
5040
|
+
rotation?: number[] | undefined;
|
|
5041
|
+
altitude?: number | undefined;
|
|
5042
|
+
scale?: number[] | undefined;
|
|
5043
|
+
interactive?: boolean | undefined;
|
|
5044
|
+
id?: string | number | undefined;
|
|
5045
|
+
};
|
|
5046
|
+
}, {
|
|
5047
|
+
type: "Feature";
|
|
5048
|
+
geometry: {
|
|
5049
|
+
type: "Point";
|
|
5050
|
+
coordinates: number[];
|
|
5051
|
+
};
|
|
5052
|
+
properties: {
|
|
5053
|
+
rotation?: number[] | undefined;
|
|
5054
|
+
altitude?: number | undefined;
|
|
5055
|
+
scale?: number[] | undefined;
|
|
5056
|
+
interactive?: boolean | undefined;
|
|
5057
|
+
id?: string | number | undefined;
|
|
5058
|
+
};
|
|
5059
|
+
}>, "many">;
|
|
5060
|
+
}, "strip", z.ZodTypeAny, {
|
|
5061
|
+
type: "FeatureCollection";
|
|
5062
|
+
features: {
|
|
5063
|
+
type: "Feature";
|
|
5064
|
+
geometry: {
|
|
5065
|
+
type: "Point";
|
|
5066
|
+
coordinates: number[];
|
|
5067
|
+
};
|
|
5068
|
+
properties: {
|
|
5069
|
+
rotation?: number[] | undefined;
|
|
5070
|
+
altitude?: number | undefined;
|
|
5071
|
+
scale?: number[] | undefined;
|
|
5072
|
+
interactive?: boolean | undefined;
|
|
5073
|
+
id?: string | number | undefined;
|
|
5074
|
+
};
|
|
5075
|
+
}[];
|
|
5076
|
+
}, {
|
|
5077
|
+
type: "FeatureCollection";
|
|
5078
|
+
features: {
|
|
5079
|
+
type: "Feature";
|
|
5080
|
+
geometry: {
|
|
5081
|
+
type: "Point";
|
|
5082
|
+
coordinates: number[];
|
|
5083
|
+
};
|
|
5084
|
+
properties: {
|
|
5085
|
+
rotation?: number[] | undefined;
|
|
5086
|
+
altitude?: number | undefined;
|
|
5087
|
+
scale?: number[] | undefined;
|
|
5088
|
+
interactive?: boolean | undefined;
|
|
5089
|
+
id?: string | number | undefined;
|
|
5090
|
+
};
|
|
5091
|
+
}[];
|
|
5092
|
+
}>;
|
|
5093
|
+
export const modelStyleSchema: z.ZodObject<{
|
|
5094
|
+
url: z.ZodString;
|
|
5095
|
+
color: z.ZodOptional<z.ZodString>;
|
|
5096
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
5097
|
+
}, "strip", z.ZodTypeAny, {
|
|
5098
|
+
url: string;
|
|
5099
|
+
color?: string | undefined;
|
|
5100
|
+
opacity?: number | undefined;
|
|
5101
|
+
}, {
|
|
5102
|
+
url: string;
|
|
5103
|
+
color?: string | undefined;
|
|
5104
|
+
opacity?: number | undefined;
|
|
5105
|
+
}>;
|
|
5106
|
+
export function validateModelGroup(id: string | number, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle): void;
|
|
5107
|
+
export class ModelComponent {
|
|
5108
|
+
#private;
|
|
5109
|
+
mesh?: Geometry3DObject3D;
|
|
5110
|
+
readonly type = "model";
|
|
5111
|
+
outline?: LineSegments;
|
|
5112
|
+
geometry?: Object3D;
|
|
5113
|
+
material?: BatchedStandardMaterial;
|
|
5114
|
+
feature: Feature<Point>;
|
|
5115
|
+
instanceIndex?: number;
|
|
5116
|
+
constructor(feature: Feature<Point>);
|
|
5117
|
+
visible: boolean;
|
|
5118
|
+
setOpacity(): void;
|
|
5119
|
+
color: Color;
|
|
5120
|
+
setColor(): void;
|
|
5121
|
+
position: Vector3;
|
|
5122
|
+
get altitude(): number;
|
|
5123
|
+
set altitude(value: number);
|
|
5124
|
+
get opacity(): number;
|
|
5125
|
+
set opacity(value: number);
|
|
5126
|
+
}
|
|
5127
|
+
}
|
|
5128
|
+
|
|
5129
|
+
declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
5130
|
+
import './utils/object-this-polyfill';
|
|
5131
|
+
import { Vector3, Raycaster, Camera as ThreeCamera } from 'three';
|
|
5132
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
5133
|
+
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
5134
|
+
import { CollisionSystem } from '@mappedin/react-sdk/geojson/src/systems/collisions/system';
|
|
5135
|
+
import { InteractionSystem } from '@mappedin/react-sdk/geojson/src/systems/interactions';
|
|
5136
|
+
import { ZoomInterpolationSystem } from '@mappedin/react-sdk/geojson/src/systems/zoom-interpolation/zoom-interpolation';
|
|
5137
|
+
import type { AddMarkerOptions, MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
5138
|
+
import type { GLTFExportOptions } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
5139
|
+
import { ExporterSystem } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
5140
|
+
import type { AddLabelOptions, LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
5141
|
+
import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, ModelStyle, EntityState, EntityId, MapEvent, MapEventPayload, RendererState } from '@mappedin/react-sdk/geojson/src/types';
|
|
5142
|
+
import { MeshCreationAndOptimizationSystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/system';
|
|
5143
|
+
import { DOMVisibilitySystem } from '@mappedin/react-sdk/geojson/src/systems/dom-visiblity/system';
|
|
4283
5144
|
import { TwoDProjectionSystem } from '@mappedin/react-sdk/geojson/src/systems/2d-projection/system';
|
|
4284
5145
|
import { TwoDDrawSystem } from '@mappedin/react-sdk/geojson/src/systems/2d-draw/system';
|
|
4285
5146
|
import { DrawSystem } from '@mappedin/react-sdk/geojson/src/systems/draw/system';
|
|
4286
5147
|
import { TwoDVisibilitySystem } from '@mappedin/react-sdk/geojson/src/systems/2d-visibility/system';
|
|
4287
5148
|
import { RenderSystem } from '@mappedin/react-sdk/geojson/src/systems/render/system';
|
|
4288
|
-
import type { FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
|
|
5149
|
+
import type { Position as GeoJsonPosition, FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
|
|
4289
5150
|
import type { AddPathOptions, PathState } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
4290
5151
|
import { StackSystem } from '@mappedin/react-sdk/geojson/src/systems/stack/system';
|
|
4291
5152
|
import { CameraSystem } from '@mappedin/react-sdk/geojson/src/systems/camera';
|
|
@@ -4293,8 +5154,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4293
5154
|
import { type Map as MapLibreMap } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
4294
5155
|
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
4295
5156
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
4296
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4297
|
-
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/entity-group';
|
|
5157
|
+
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
4298
5158
|
import { DOMResizeSystem } from '@mappedin/react-sdk/geojson/src/systems/dom-resize/system';
|
|
4299
5159
|
import { Camera } from '@mappedin/react-sdk/geojson/src/camera';
|
|
4300
5160
|
import { type WatermarkOptions, WatermarkSystem } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
@@ -4303,9 +5163,13 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4303
5163
|
import { type CustomGeometryBuilder, type ShapeState } from '@mappedin/react-sdk/geojson/src/components/custom';
|
|
4304
5164
|
import { CustomGeometrySystem } from '@mappedin/react-sdk/geojson/src/systems/custom-geometry/system';
|
|
4305
5165
|
import { OutlineInterpolationSystem } from '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/system';
|
|
5166
|
+
import { ImageSystem } from '@mappedin/react-sdk/geojson/src/systems/image/system';
|
|
4306
5167
|
import { GeometryInFocusSystem } from '@mappedin/react-sdk/geojson/src/systems/geometry-in-focus/system';
|
|
4307
5168
|
import { OutdoorLayers } from '@mappedin/react-sdk/geojson/src/systems/outdoor-layers/system';
|
|
4308
5169
|
import { PathSystem } from '@mappedin/react-sdk/geojson/src/systems/path';
|
|
5170
|
+
import { type ImageProperties, type ImageState, type ImageStyle } from '@mappedin/react-sdk/geojson/src/components/image';
|
|
5171
|
+
import { MeshDetachmentSystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-detachment/system';
|
|
5172
|
+
import { MeshModificationSystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-modification/system';
|
|
4309
5173
|
export type * from '@mappedin/react-sdk/geojson/src/types';
|
|
4310
5174
|
export const raycaster: Raycaster;
|
|
4311
5175
|
export const DEFAULT_ZOOM_LEVEL = 18;
|
|
@@ -4324,21 +5188,6 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4324
5188
|
AFTER_RENDER: number;
|
|
4325
5189
|
AFTER_ALL_UPDATES: number;
|
|
4326
5190
|
};
|
|
4327
|
-
export type Entity3DTypes = Geometry3D | GeometryGroupObject3D | GroupContainerObject3D;
|
|
4328
|
-
export type RendererState = {
|
|
4329
|
-
entity3DMap: Map<string | number, Entity3DTypes>;
|
|
4330
|
-
entity2DMap: Map<string | number, Geometry2D>;
|
|
4331
|
-
entity2DIds: Set<Geometry2D['id']>;
|
|
4332
|
-
threeDEntities: (string | number)[];
|
|
4333
|
-
entityScene: GroupContainerObject3D;
|
|
4334
|
-
hoverColor: string;
|
|
4335
|
-
center?: Position;
|
|
4336
|
-
insetsPadding: InsetPadding;
|
|
4337
|
-
shouldMeasureCanvas: boolean;
|
|
4338
|
-
pixelRatio: number;
|
|
4339
|
-
canvasWidth: number;
|
|
4340
|
-
canvasHeight: number;
|
|
4341
|
-
};
|
|
4342
5191
|
export type Systems = {
|
|
4343
5192
|
cameraSystem: CameraSystem;
|
|
4344
5193
|
panBoundsSystem: PanBoundsSystem;
|
|
@@ -4362,7 +5211,10 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4362
5211
|
outlineInterpolationSystem: OutlineInterpolationSystem;
|
|
4363
5212
|
outdoorLayersSystem: OutdoorLayers;
|
|
4364
5213
|
pathSystem: PathSystem;
|
|
5214
|
+
imageSystem: ImageSystem;
|
|
4365
5215
|
geometryInFocusSystem: GeometryInFocusSystem;
|
|
5216
|
+
meshDetachmentSystem: MeshDetachmentSystem;
|
|
5217
|
+
meshModificationSystem: MeshModificationSystem;
|
|
4366
5218
|
};
|
|
4367
5219
|
export type MapViewState = {
|
|
4368
5220
|
readonly type: 'map-view';
|
|
@@ -4420,18 +5272,19 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4420
5272
|
* Add a geometry group from GeoJSON data
|
|
4421
5273
|
*/
|
|
4422
5274
|
addGeometryGroup<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(id: string, geometry: T, style?: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GeometryGroupState>;
|
|
5275
|
+
addImage(id: string, geometry: Feature<Point, ImageProperties>, style: ImageStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<ImageState> | undefined;
|
|
4423
5276
|
/**
|
|
4424
5277
|
* Add a group of models from GeoJSON data. These will be instanced automatically for better performance.
|
|
4425
5278
|
*/
|
|
4426
|
-
addModelGroup(id: string, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<GeometryGroupState
|
|
5279
|
+
addModelGroup(id: string, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<GeometryGroupState> | undefined;
|
|
4427
5280
|
/**
|
|
4428
5281
|
* Add an HTML Marker at a GeoJSON coordinate.
|
|
4429
5282
|
*/
|
|
4430
|
-
addMarker2D(coordinate: Position, contentHTML: string, options?: AddMarkerOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<MarkerState
|
|
5283
|
+
addMarker2D(coordinate: Position, contentHTML: string, options?: AddMarkerOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<MarkerState> | undefined;
|
|
4431
5284
|
/**
|
|
4432
5285
|
* Add a 2D label at a GeoJSON coordinate.
|
|
4433
5286
|
*/
|
|
4434
|
-
addLabel2D(coordinate: Position, text: string, options?: AddLabelOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<LabelState
|
|
5287
|
+
addLabel2D(coordinate: Position, text: string, options?: AddLabelOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<LabelState> | undefined;
|
|
4435
5288
|
/**
|
|
4436
5289
|
* Add a Path along a set of GeoJSON coordinates that can be animated.
|
|
4437
5290
|
*/
|
|
@@ -4478,9 +5331,9 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4478
5331
|
* Get the current state of the map view, or any entity that was added, regardless of whether it is visible in the scene
|
|
4479
5332
|
*/
|
|
4480
5333
|
getState(): MapViewState;
|
|
4481
|
-
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 : EntityState;
|
|
5334
|
+
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;
|
|
4482
5335
|
getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
|
|
4483
|
-
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 ? ShapeState : T extends ShapeState ? PathState : EntityState;
|
|
5336
|
+
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 ? ShapeState : T extends ShapeState ? PathState : T extends ImageState ? ImageState : EntityState;
|
|
4484
5337
|
/**
|
|
4485
5338
|
* Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
|
|
4486
5339
|
*/
|
|
@@ -4493,6 +5346,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4493
5346
|
setState<T extends EntityId<ShapeState>>(object: T | T['id'], state: Partial<ShapeState>): void;
|
|
4494
5347
|
setState<T extends EntityId<PathState>>(object: T | T['id'], state: Partial<PathState>): void;
|
|
4495
5348
|
setState<T extends EntityId<ModelState>>(object: T | T['id'], state: Partial<ModelState>): void;
|
|
5349
|
+
setState<T extends EntityId<ImageState>>(object: T | T['id'], state: Partial<ImageState>): void;
|
|
4496
5350
|
setState<T extends EntityState>(object: T | T['id'], state: Partial<T>): void;
|
|
4497
5351
|
/**
|
|
4498
5352
|
* Project a screen coordinate to a geographic coordinate
|
|
@@ -4531,6 +5385,10 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4531
5385
|
* Sets the background color of the renderer. Only applies to "standalone mode"
|
|
4532
5386
|
*/
|
|
4533
5387
|
setBackgroundColor: (color: any, alpha: any) => void;
|
|
5388
|
+
/**
|
|
5389
|
+
* Returns the current scale of the map in metres per pixel.
|
|
5390
|
+
*/
|
|
5391
|
+
getMetresPerPixel: () => number | undefined;
|
|
4534
5392
|
/**
|
|
4535
5393
|
* @internal
|
|
4536
5394
|
* Filters out layers at a certain point on the outdoor map. This can be used to hide the outdoor building footprint underneath the 3D geometry.
|
|
@@ -4800,40 +5658,40 @@ declare module '@mappedin/react-sdk/geojson/src/utils' {
|
|
|
4800
5658
|
import { Box2 } from 'three';
|
|
4801
5659
|
import { MercatorCoordinate } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
4802
5660
|
import type { CustomLayerInterface } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
4803
|
-
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4804
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4805
|
-
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4806
|
-
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
5661
|
+
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
5662
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
5663
|
+
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
5664
|
+
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
4807
5665
|
import type { Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
4808
5666
|
import type { Camera } from '@mappedin/react-sdk/geojson/src/camera';
|
|
4809
5667
|
export function cartesianToGeographic(centerLat: number, centerLon: number, x: number, y: number): {
|
|
4810
|
-
|
|
4811
|
-
|
|
5668
|
+
lat: number;
|
|
5669
|
+
lon: number;
|
|
4812
5670
|
};
|
|
4813
5671
|
export function geographicToCartesian(centerLat: number, centerLon: number, targetLat: number, targetLon: number): {
|
|
4814
|
-
|
|
4815
|
-
|
|
5672
|
+
x: number;
|
|
5673
|
+
y: number;
|
|
4816
5674
|
};
|
|
4817
|
-
export const
|
|
4818
|
-
export const
|
|
5675
|
+
export const populateGeometry3DIdsInScene: (tree: any, entities: RendererState["geometry3DIdsInScene"]) => Set<string | number>;
|
|
5676
|
+
export const populateGeometry2DIdsInScene: (tree: any, entities: Set<Geometry2D["id"]>) => Set<string | number>;
|
|
4819
5677
|
export function convertMapLibreStylePaintProps(paint: any): {
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
5678
|
+
color: any;
|
|
5679
|
+
height: any;
|
|
5680
|
+
altitude: any;
|
|
5681
|
+
opacity: any;
|
|
5682
|
+
outline: any;
|
|
4825
5683
|
};
|
|
4826
5684
|
export function convertMapLibreLineStylePaintProps(paint: any): {
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
5685
|
+
color: any;
|
|
5686
|
+
join: any;
|
|
5687
|
+
opacity: any;
|
|
5688
|
+
width: any;
|
|
5689
|
+
cap: any;
|
|
4832
5690
|
};
|
|
4833
5691
|
export function mergeObjects<T extends Record<string, any>>(obj1: T, obj2: T): T;
|
|
4834
5692
|
export function createCustomLayer(modelAsMercatorCoordinate: MercatorCoordinate, viewCamera: THREECamera, camera: Camera, onRender: () => void): CustomLayerInterface;
|
|
4835
5693
|
export function getRequestHeaders(authURL: string): Promise<{
|
|
4836
|
-
|
|
5694
|
+
'x-mappedin-tiles-key': string;
|
|
4837
5695
|
}>;
|
|
4838
5696
|
export function cyrb53(str: string, seed?: number): number;
|
|
4839
5697
|
export const linearEase: (t: number) => number;
|
|
@@ -4845,38 +5703,53 @@ declare module '@mappedin/react-sdk/geojson/src/utils' {
|
|
|
4845
5703
|
/* getProjectionScaleFactor()
|
|
4846
5704
|
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
4847
5705
|
/*
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
5706
|
+
* R
|
|
5707
|
+
* /|
|
|
5708
|
+
* C : Camera / |
|
|
5709
|
+
* PQ : Projection Plane / |
|
|
5710
|
+
* OR : Origin / |
|
|
5711
|
+
* F : FOV / |
|
|
5712
|
+
* Q / |
|
|
5713
|
+
* /| |
|
|
5714
|
+
* / | |
|
|
5715
|
+
* / | |
|
|
5716
|
+
* / | |
|
|
5717
|
+
* / | |
|
|
5718
|
+
* / F/2 | |
|
|
5719
|
+
* C ------------P------------ O
|
|
5720
|
+
*
|
|
5721
|
+
*
|
|
5722
|
+
* ProjectionScaleFactor = ( OR / PQ )
|
|
5723
|
+
* PQ = canvasHeight / 2
|
|
5724
|
+
* CQ = zoom
|
|
5725
|
+
*
|
|
5726
|
+
* OR / C0 = tan(F/2)
|
|
5727
|
+
* so OR = CO * tan(F/2)
|
|
5728
|
+
*/
|
|
4871
5729
|
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
4872
5730
|
export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3D | GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | undefined;
|
|
4873
5731
|
export function getBoundingBoxCenter(bbox: Position[]): [number, number];
|
|
5732
|
+
export function toRadians(degrees: number): number;
|
|
5733
|
+
/**
|
|
5734
|
+
* Calculates the approximate distance between two geographic coordinates on Earth's surface.
|
|
5735
|
+
*
|
|
5736
|
+
* This function uses the equirectangular approximation method to compute the distance, which simplifies
|
|
5737
|
+
* the math and speeds up calculations, but is less accurate over long distances compared to other methods
|
|
5738
|
+
* like the haversine formula.
|
|
5739
|
+
*
|
|
5740
|
+
* @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
|
|
5741
|
+
* @param {Position} point1 - The second point's longitude and latitude as [longitude, latitude].
|
|
5742
|
+
* @return
|
|
5743
|
+
* @return {number} The approximate distance between the two points in meters.
|
|
5744
|
+
*/
|
|
5745
|
+
export function haversineDistance(point1: Position, point2: Position): number;
|
|
4874
5746
|
export { getCornersOfBoundingBox } from '@mappedin/react-sdk/geojson/src/utils/bounding-box';
|
|
4875
5747
|
export function isFiniteBox(box: Box2 | Box3): boolean;
|
|
4876
5748
|
export { getPixelRatio } from '@mappedin/react-sdk/geojson/src/utils/get-pixel-ratio';
|
|
4877
5749
|
export { debounce } from '@mappedin/react-sdk/geojson/src/utils/async';
|
|
4878
5750
|
export { shouldDisableOffscreenCanvas } from '@mappedin/react-sdk/geojson/src/utils/browser';
|
|
4879
5751
|
export { noop } from '@mappedin/react-sdk/geojson/src/utils/fp';
|
|
5752
|
+
export { transformRequest } from '@mappedin/react-sdk/geojson/src/utils/tranform-request';
|
|
4880
5753
|
}
|
|
4881
5754
|
|
|
4882
5755
|
declare module '@mappedin/react-sdk/geojson/src/utils/constants' {
|
|
@@ -5052,124 +5925,21 @@ declare module '@mappedin/react-sdk/geojson/src/systems/html-controls/system' {
|
|
|
5052
5925
|
}
|
|
5053
5926
|
}
|
|
5054
5927
|
|
|
5055
|
-
declare module '@mappedin/react-sdk/
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
export
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
* Reset state and options
|
|
5070
|
-
*/
|
|
5071
|
-
reset(): void;
|
|
5072
|
-
updateState(update: UpdateStateParam): void;
|
|
5073
|
-
get authReady(): boolean;
|
|
5074
|
-
getState(): AnalyticState;
|
|
5075
|
-
capture<T extends keyof CaptureEventsPayloadMap>(eventName: T, query: CaptureEventsPayloadMap[T]): Promise<Response> | Promise<void>;
|
|
5076
|
-
capture<T extends keyof CaptureEventsPayloadMap | (string & NonNullable<unknown>)>(target: T, query: T extends keyof CaptureEventsPayloadMap ? CaptureEventsPayloadMap[T] : Record<string, any>): Promise<Response> | Promise<void>;
|
|
5077
|
-
/**
|
|
5078
|
-
* @internal
|
|
5079
|
-
*/
|
|
5080
|
-
sendGetMapDataEvent(payload: {
|
|
5081
|
-
parseDuration: string;
|
|
5082
|
-
downloadDuration: string;
|
|
5083
|
-
viewId?: string;
|
|
5084
|
-
}): Promise<void> | Promise<Response>;
|
|
5085
|
-
sendWatchPositionDenied(): Promise<void> | Promise<Response>;
|
|
5086
|
-
/**
|
|
5087
|
-
* @internal
|
|
5088
|
-
*/
|
|
5089
|
-
sendMapViewLoadedEvent({ firstRenderDuration, dimension, }: {
|
|
5090
|
-
firstRenderDuration: string;
|
|
5091
|
-
dimension: {
|
|
5092
|
-
height: number;
|
|
5093
|
-
width: number;
|
|
5094
|
-
};
|
|
5095
|
-
}): Promise<void> | Promise<Response>;
|
|
5096
|
-
/**
|
|
5097
|
-
* @internal
|
|
5098
|
-
*/
|
|
5099
|
-
sendGetDirectionsEvent: (start: string, end: string) => void;
|
|
5928
|
+
declare module '@mappedin/react-sdk/geojson/src/maplibre-overlay' {
|
|
5929
|
+
import type { IControl, Map as MapLibreMap, CustomLayerInterface } from '@packages/internal/outdoor-context-v4';
|
|
5930
|
+
import type { Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
5931
|
+
import RendererCore from '@mappedin/react-sdk/geojson/src/renderer';
|
|
5932
|
+
import { PubSub } from '@packages/internal/common';
|
|
5933
|
+
export class MapLibreOverlay<T> extends PubSub<T> implements IControl {
|
|
5934
|
+
el: HTMLDivElement;
|
|
5935
|
+
core: RendererCore;
|
|
5936
|
+
origin?: Position;
|
|
5937
|
+
map?: MapLibreMap;
|
|
5938
|
+
layer?: CustomLayerInterface;
|
|
5939
|
+
constructor(origin: Position | undefined);
|
|
5940
|
+
onAdd(map: MapLibreMap): HTMLDivElement;
|
|
5941
|
+
onRemove(): void;
|
|
5100
5942
|
}
|
|
5101
|
-
type AnalyticsUserPosition = {
|
|
5102
|
-
bluedotTimestamp: number;
|
|
5103
|
-
latitude: number;
|
|
5104
|
-
longitude: number;
|
|
5105
|
-
floorLevel?: number;
|
|
5106
|
-
accuracy: number;
|
|
5107
|
-
};
|
|
5108
|
-
export type AnalyticsOptions = {
|
|
5109
|
-
key?: string;
|
|
5110
|
-
secret?: string;
|
|
5111
|
-
accessToken?: string;
|
|
5112
|
-
noAuth?: boolean;
|
|
5113
|
-
mapId?: string;
|
|
5114
|
-
logEvents?: boolean;
|
|
5115
|
-
sendEvents?: boolean;
|
|
5116
|
-
context?: string;
|
|
5117
|
-
platformString?: string;
|
|
5118
|
-
};
|
|
5119
|
-
export type AnalyticState = {
|
|
5120
|
-
accessToken?: string | undefined;
|
|
5121
|
-
version: string;
|
|
5122
|
-
platformString: string;
|
|
5123
|
-
baseUrl: string;
|
|
5124
|
-
noAuth: boolean;
|
|
5125
|
-
geolocationMode: boolean;
|
|
5126
|
-
mi_uuid: string;
|
|
5127
|
-
mi_session: string;
|
|
5128
|
-
context: ValidContext;
|
|
5129
|
-
userPosition?: AnalyticsUserPosition;
|
|
5130
|
-
mapId?: string;
|
|
5131
|
-
key?: string;
|
|
5132
|
-
secret?: string;
|
|
5133
|
-
logEvents: boolean;
|
|
5134
|
-
sendEvents: boolean;
|
|
5135
|
-
};
|
|
5136
|
-
type UpdateStateParam = Partial<Pick<AnalyticState, 'geolocationMode' | 'context' | 'logEvents' | 'userPosition' | 'mapId' | 'sendEvents' | 'logEvents' | 'accessToken'>>;
|
|
5137
|
-
type CaptureEventsPayloadMap = {
|
|
5138
|
-
'$select-location': {
|
|
5139
|
-
id: string;
|
|
5140
|
-
};
|
|
5141
|
-
'$select-category': {
|
|
5142
|
-
id: string;
|
|
5143
|
-
};
|
|
5144
|
-
'$query-suggest': Record<string, any>;
|
|
5145
|
-
'$query-search': Record<string, any>;
|
|
5146
|
-
};
|
|
5147
|
-
export const analyticsInternal: CustomerAnalytics;
|
|
5148
|
-
export const analytics: {
|
|
5149
|
-
/**
|
|
5150
|
-
* Initializes the analytics with the provided options.
|
|
5151
|
-
* @param args - The options to initialize the analytics.
|
|
5152
|
-
*/
|
|
5153
|
-
init(options?: AnalyticsOptions | undefined): void;
|
|
5154
|
-
/**
|
|
5155
|
-
* Captures an analytic event with a custom target and query payload.
|
|
5156
|
-
*
|
|
5157
|
-
* @param target - The event name or target can be .
|
|
5158
|
-
* @param query - The payload associated with the event.
|
|
5159
|
-
* @returns A promise that resolves to the server response or void.
|
|
5160
|
-
*/
|
|
5161
|
-
capture(target: keyof CaptureEventsPayloadMap | (string & {}), query: Record<string, any> | {
|
|
5162
|
-
id: string;
|
|
5163
|
-
} | {
|
|
5164
|
-
id: string;
|
|
5165
|
-
}): Promise<void> | Promise<Response>;
|
|
5166
|
-
/**
|
|
5167
|
-
* Updates the analytics state with the provided parameters.
|
|
5168
|
-
* @param update - The state parameters to update.
|
|
5169
|
-
*/
|
|
5170
|
-
updateState(update: Partial<Pick<AnalyticState, "logEvents" | "sendEvents" | "logEvents" | "accessToken">>): void;
|
|
5171
|
-
};
|
|
5172
|
-
export {};
|
|
5173
5943
|
}
|
|
5174
5944
|
|
|
5175
5945
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/label' {
|
|
@@ -5243,6 +6013,42 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/marker' {
|
|
|
5243
6013
|
}
|
|
5244
6014
|
}
|
|
5245
6015
|
|
|
6016
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/image' {
|
|
6017
|
+
/**
|
|
6018
|
+
* Class representing an Image on the {@link MapView}.
|
|
6019
|
+
*/
|
|
6020
|
+
export class Image {
|
|
6021
|
+
#private;
|
|
6022
|
+
/**
|
|
6023
|
+
* @internal
|
|
6024
|
+
*/
|
|
6025
|
+
static readonly __type = "Image";
|
|
6026
|
+
/**
|
|
6027
|
+
* @internal
|
|
6028
|
+
*/
|
|
6029
|
+
readonly __type = "Image";
|
|
6030
|
+
/**
|
|
6031
|
+
* Checks if the provided instance is of type Marker"
|
|
6032
|
+
*
|
|
6033
|
+
* @param instance The instance to check.
|
|
6034
|
+
* @returns {boolean} True if the instance is a Marker, false otherwise.
|
|
6035
|
+
*/
|
|
6036
|
+
static is(instance: object): instance is Image;
|
|
6037
|
+
/**
|
|
6038
|
+
* @internal
|
|
6039
|
+
*/
|
|
6040
|
+
constructor(id: string, url: string);
|
|
6041
|
+
/**
|
|
6042
|
+
* The image's id
|
|
6043
|
+
*/
|
|
6044
|
+
get id(): string;
|
|
6045
|
+
/**
|
|
6046
|
+
* The image's url
|
|
6047
|
+
*/
|
|
6048
|
+
get url(): string;
|
|
6049
|
+
}
|
|
6050
|
+
}
|
|
6051
|
+
|
|
5246
6052
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/model' {
|
|
5247
6053
|
/**
|
|
5248
6054
|
* Class representing a 3D model on the {@link MapView}.
|
|
@@ -5335,11 +6141,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/shape' {
|
|
|
5335
6141
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
5336
6142
|
import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
|
|
5337
6143
|
import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
6144
|
+
import { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
5338
6145
|
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
5339
|
-
import { Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
5340
|
-
import { Coordinate, MapObject, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
6146
|
+
import { Coordinate, MapObject, Space, Floor, type MapDataInternal, Door } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
5341
6147
|
import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
5342
|
-
import { Label, Marker, type Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
6148
|
+
import { Label, Marker, type Model, type Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
5343
6149
|
import { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
5344
6150
|
import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
5345
6151
|
import { Camera } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera';
|
|
@@ -5348,6 +6154,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5348
6154
|
import { Labels } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/labels';
|
|
5349
6155
|
import { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
5350
6156
|
import { Markers } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/markers';
|
|
6157
|
+
import { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
|
|
5351
6158
|
import { Models } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/models';
|
|
5352
6159
|
import { Paths } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/paths';
|
|
5353
6160
|
import { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
@@ -5377,10 +6184,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5377
6184
|
BlueDot: BlueDot;
|
|
5378
6185
|
Shapes: Shapes;
|
|
5379
6186
|
Style: Style;
|
|
6187
|
+
Images: Images;
|
|
5380
6188
|
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
5381
|
-
updateState<T extends Space | MapObject | Label | Marker |
|
|
6189
|
+
updateState<T extends Space | MapObject | Label | Marker | Door | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
5382
6190
|
update: () => void;
|
|
5383
|
-
getMapDataInternal():
|
|
6191
|
+
getMapDataInternal(): MapDataInternal | undefined;
|
|
5384
6192
|
getMapData(): MapData | undefined;
|
|
5385
6193
|
expand(opts?: {
|
|
5386
6194
|
excludeFloors: Floor[];
|
|
@@ -5390,7 +6198,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5390
6198
|
setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
|
|
5391
6199
|
updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
|
|
5392
6200
|
get currentFloor(): Floor;
|
|
5393
|
-
getState<T extends Space | MapObject | Label | Marker | Model | string>(target: T): TGetState<T> | undefined;
|
|
6201
|
+
getState<T extends Space | MapObject | Label | Marker | Model | Image | string>(target: T): TGetState<T> | undefined;
|
|
5394
6202
|
setHoverColor(c: string): void;
|
|
5395
6203
|
getHoverColor(): string | undefined;
|
|
5396
6204
|
getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], opt?: TGetDirectionsOptions) => Directions | undefined;
|
|
@@ -5402,6 +6210,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5402
6210
|
* @internal
|
|
5403
6211
|
*/
|
|
5404
6212
|
get __core(): RendererCore;
|
|
6213
|
+
clear(): void;
|
|
5405
6214
|
destroy(): void;
|
|
5406
6215
|
}
|
|
5407
6216
|
}
|
|
@@ -5830,90 +6639,322 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions' {
|
|
|
5830
6639
|
groupBy?: string;
|
|
5831
6640
|
});
|
|
5832
6641
|
/**
|
|
5833
|
-
* Get directions between two navigation targets.
|
|
5834
|
-
*
|
|
5835
|
-
* @hidden
|
|
5836
|
-
* @param from
|
|
5837
|
-
* @param to
|
|
5838
|
-
* @param options
|
|
5839
|
-
* @param mapData
|
|
6642
|
+
* Get directions between two navigation targets.
|
|
6643
|
+
*
|
|
6644
|
+
* @hidden
|
|
6645
|
+
* @param from
|
|
6646
|
+
* @param to
|
|
6647
|
+
* @param options
|
|
6648
|
+
* @param mapData
|
|
6649
|
+
*/
|
|
6650
|
+
getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
|
|
6651
|
+
accessible: boolean;
|
|
6652
|
+
smoothing: {
|
|
6653
|
+
enabled: boolean;
|
|
6654
|
+
radius: number;
|
|
6655
|
+
};
|
|
6656
|
+
zones: TDirectionZone[];
|
|
6657
|
+
}, mapData: MapDataInternal) => Directions | undefined;
|
|
6658
|
+
/**
|
|
6659
|
+
* Get the node IDs that should be excluded from the navigation graph.
|
|
6660
|
+
*
|
|
6661
|
+
* @hidden
|
|
6662
|
+
* @param accessible {boolean}
|
|
6663
|
+
*/
|
|
6664
|
+
getExcludedNodeIds: (accessible: boolean) => string[];
|
|
6665
|
+
}
|
|
6666
|
+
}
|
|
6667
|
+
|
|
6668
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/style' {
|
|
6669
|
+
import type { StyleCollection } from '@mappedin/mvf';
|
|
6670
|
+
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
6671
|
+
export class Style {
|
|
6672
|
+
#private;
|
|
6673
|
+
/**
|
|
6674
|
+
* @internal
|
|
6675
|
+
*/
|
|
6676
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
6677
|
+
/**
|
|
6678
|
+
* @internal
|
|
6679
|
+
*/
|
|
6680
|
+
constructor({ currentMapGetter }: {
|
|
6681
|
+
currentMapGetter: CurrentMapGetter;
|
|
6682
|
+
});
|
|
6683
|
+
setFromStyleCollection(styleCollection: StyleCollection): void;
|
|
6684
|
+
}
|
|
6685
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
6686
|
+
export {};
|
|
6687
|
+
}
|
|
6688
|
+
|
|
6689
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor' {
|
|
6690
|
+
import { type RendererCore, type Position } from '@mappedin/core-sdk';
|
|
6691
|
+
export default class Outdoor {
|
|
6692
|
+
#private;
|
|
6693
|
+
/**
|
|
6694
|
+
* @internal
|
|
6695
|
+
*/
|
|
6696
|
+
constructor(core: RendererCore, hiddenOutdoorGeometry?: [Position, string[]][]);
|
|
6697
|
+
setStyle(style: any): void;
|
|
6698
|
+
/**
|
|
6699
|
+
* Returns a Maplibre map for advanced usage.
|
|
6700
|
+
*
|
|
6701
|
+
* @returns {object} Maplibre map instance
|
|
6702
|
+
*
|
|
6703
|
+
* Limitations:
|
|
6704
|
+
* - Maplibre interaction events are not supported; use SDK interaction events.
|
|
6705
|
+
* - Maplibre markers and labels may overlap as they are not integrated with the SDK collision engine.
|
|
6706
|
+
*/
|
|
6707
|
+
get map(): import("@packages/internal/outdoor-context-v4").Map | undefined;
|
|
6708
|
+
/**
|
|
6709
|
+
* Whether the outdoorView is enabled.
|
|
6710
|
+
*/
|
|
6711
|
+
get enabled(): boolean;
|
|
6712
|
+
}
|
|
6713
|
+
}
|
|
6714
|
+
|
|
6715
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/images' {
|
|
6716
|
+
import type { TAddImageOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
6717
|
+
import { Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
6718
|
+
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
6719
|
+
import type { Space, Door, Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
6720
|
+
export class Images {
|
|
6721
|
+
#private;
|
|
6722
|
+
/**
|
|
6723
|
+
* @internal
|
|
6724
|
+
*/
|
|
6725
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
6726
|
+
/**
|
|
6727
|
+
* @internal
|
|
6728
|
+
*/
|
|
6729
|
+
constructor({ currentMapGetter }: {
|
|
6730
|
+
currentMapGetter: CurrentMapGetter;
|
|
6731
|
+
});
|
|
6732
|
+
/**
|
|
6733
|
+
* @internal
|
|
6734
|
+
*/
|
|
6735
|
+
getById(id: string): {
|
|
6736
|
+
image: Image;
|
|
6737
|
+
entityId: string;
|
|
6738
|
+
} | undefined;
|
|
6739
|
+
/**
|
|
6740
|
+
* Adds an image to the map.
|
|
6741
|
+
*
|
|
6742
|
+
* @param target The target object ({@link Space}, {@link Door}, or {@link Coordinate}) for the image.
|
|
6743
|
+
* @param url The URL of the image.
|
|
6744
|
+
* @param options Optional additional options for the {@link Image}.
|
|
6745
|
+
* @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
|
|
6746
|
+
* @example
|
|
6747
|
+
* // Add an interactive {@link Image} to the map with custom HTML content.
|
|
6748
|
+
* map.Images.add(coordinate, '<div>Image Content</div>', { interactive: true });
|
|
6749
|
+
*/
|
|
6750
|
+
add(target: Space | Door | Coordinate, url: string, options: TAddImageOptions): Image;
|
|
6751
|
+
/**
|
|
6752
|
+
* Removes a image from the map.
|
|
6753
|
+
*
|
|
6754
|
+
* @param image {Image} The {@link Image} which should be removed.
|
|
6755
|
+
* @example
|
|
6756
|
+
* mapView.Images.remove(image);
|
|
6757
|
+
*/
|
|
6758
|
+
remove(image: Image): void;
|
|
6759
|
+
/**
|
|
6760
|
+
* Remove all the images from the map.
|
|
6761
|
+
*
|
|
6762
|
+
* @example
|
|
6763
|
+
* map.Images.removeAll();
|
|
6764
|
+
*/
|
|
6765
|
+
removeAll(): Image[];
|
|
6766
|
+
}
|
|
6767
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
6768
|
+
export {};
|
|
6769
|
+
}
|
|
6770
|
+
|
|
6771
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
|
|
6772
|
+
/**
|
|
6773
|
+
* Valid track-analytics API contexts. These should match the expected values of that endpoint or the requests will fail.
|
|
6774
|
+
* If a set context is not in this list, it will default to the first VALID_CONTEXTS value.
|
|
6775
|
+
*/
|
|
6776
|
+
export const VALID_CONTEXTS: readonly ["websdk", "web", "webv2", "kiosk-v2", "mobile", "iossdk", "androidsdk", "reactnativesdk"];
|
|
6777
|
+
type ValidContext = (typeof VALID_CONTEXTS)[number];
|
|
6778
|
+
export const DEFAULT_CONTEXT: "websdk";
|
|
6779
|
+
export const ANALYTICS_URL = "https://api-gateway.mappedin.com/track-analytics/a/";
|
|
6780
|
+
export const FOUND_POSITION = "found-position";
|
|
6781
|
+
export const FOUND_FLOOR = "found-floor";
|
|
6782
|
+
type BlueDotEvents = typeof FOUND_FLOOR | typeof FOUND_POSITION;
|
|
6783
|
+
export class AnalyticsInternal {
|
|
6784
|
+
#private;
|
|
6785
|
+
constructor();
|
|
6786
|
+
init(options: AnalyticsUpdateOptions): void;
|
|
6787
|
+
/**
|
|
6788
|
+
* Reset state and options
|
|
6789
|
+
*/
|
|
6790
|
+
reset(): void;
|
|
6791
|
+
updateState(update: UpdateStateParam): void;
|
|
6792
|
+
get authReady(): boolean;
|
|
6793
|
+
getState(): AnalyticState;
|
|
6794
|
+
capture<T extends keyof CaptureEventsPayloadMap>(eventName: T, query: CaptureEventsPayloadMap[T]): Promise<Response> | Promise<void>;
|
|
6795
|
+
capture<T extends keyof CaptureEventsPayloadMap | (string & NonNullable<unknown>)>(target: T, query: T extends keyof CaptureEventsPayloadMap ? CaptureEventsPayloadMap[T] : Record<string, any>): Promise<Response> | Promise<void>;
|
|
6796
|
+
/**
|
|
6797
|
+
* @internal
|
|
6798
|
+
*/
|
|
6799
|
+
sendGetMapDataEvent(payload: {
|
|
6800
|
+
parseDuration: number;
|
|
6801
|
+
downloadDuration: number;
|
|
6802
|
+
viewId?: string;
|
|
6803
|
+
}): void | Promise<Response> | Promise<void>;
|
|
6804
|
+
sendWatchPositionDenied(): void | Promise<Response> | Promise<void>;
|
|
6805
|
+
/**
|
|
6806
|
+
* @internal
|
|
6807
|
+
*/
|
|
6808
|
+
sendMapViewLoadedEvent({ firstRenderDuration, dimension, }: {
|
|
6809
|
+
firstRenderDuration: number;
|
|
6810
|
+
dimension: {
|
|
6811
|
+
height: number;
|
|
6812
|
+
width: number;
|
|
6813
|
+
};
|
|
6814
|
+
}): void | Promise<Response> | Promise<void>;
|
|
6815
|
+
/**
|
|
6816
|
+
* @internal
|
|
6817
|
+
*/
|
|
6818
|
+
sendGetDirectionsEvent: (start: string, end: string) => void;
|
|
6819
|
+
sendBlueDotEvents(event: BlueDotEvents): void | Promise<Response> | Promise<void>;
|
|
6820
|
+
}
|
|
6821
|
+
type AnalyticsUserPosition = {
|
|
6822
|
+
bluedotTimestamp: number;
|
|
6823
|
+
latitude: number;
|
|
6824
|
+
longitude: number;
|
|
6825
|
+
floorLevel?: number;
|
|
6826
|
+
accuracy: number;
|
|
6827
|
+
};
|
|
6828
|
+
type AnalyticsOptions = {
|
|
6829
|
+
/** The ID of the map to be used for analytics. */
|
|
6830
|
+
mapId?: string;
|
|
6831
|
+
/** The API key for authentication. */
|
|
6832
|
+
key?: string;
|
|
6833
|
+
/** The API secret for authentication. */
|
|
6834
|
+
secret?: string;
|
|
6835
|
+
/** The access token for authentication. */
|
|
6836
|
+
accessToken?: string;
|
|
6837
|
+
/** Flag to disable authentication. */
|
|
6838
|
+
noAuth?: boolean;
|
|
6839
|
+
/** Flag to enable logging of events. */
|
|
6840
|
+
logEvents?: boolean;
|
|
6841
|
+
/** Flag to enable sending of events. */
|
|
6842
|
+
sendEvents?: boolean;
|
|
6843
|
+
/** The context in which the analytics are being used. */
|
|
6844
|
+
context?: string;
|
|
6845
|
+
/** The platform string to be included in analytics. */
|
|
6846
|
+
platformString?: string;
|
|
6847
|
+
/** The base URI for the analytics endpoint. */
|
|
6848
|
+
baseUri?: string;
|
|
6849
|
+
};
|
|
6850
|
+
export type AnalyticsUpdateOptions = Omit<AnalyticsOptions, 'mapId' | 'key' | 'secret' | 'accessToken'> & {
|
|
6851
|
+
/** The ID of the map to be used for analytics. */
|
|
6852
|
+
mapId: string;
|
|
6853
|
+
} & ({
|
|
6854
|
+
/** The API key for authentication. */
|
|
6855
|
+
key: string;
|
|
6856
|
+
/** The API secret for authentication. */
|
|
6857
|
+
secret: string;
|
|
6858
|
+
} | {
|
|
6859
|
+
/** The access token for authentication. */
|
|
6860
|
+
accessToken: string;
|
|
6861
|
+
});
|
|
6862
|
+
export type AnalyticState = {
|
|
6863
|
+
accessToken?: string | undefined;
|
|
6864
|
+
version: string;
|
|
6865
|
+
platformString: string;
|
|
6866
|
+
baseUri: string;
|
|
6867
|
+
analyticsBaseUrl: string;
|
|
6868
|
+
noAuth: boolean;
|
|
6869
|
+
geolocationMode: boolean;
|
|
6870
|
+
mi_uuid: string;
|
|
6871
|
+
mi_session: string;
|
|
6872
|
+
context: ValidContext;
|
|
6873
|
+
userPosition?: AnalyticsUserPosition;
|
|
6874
|
+
mapId?: string;
|
|
6875
|
+
key?: string;
|
|
6876
|
+
secret?: string;
|
|
6877
|
+
logEvents: boolean;
|
|
6878
|
+
sendEvents: boolean;
|
|
6879
|
+
};
|
|
6880
|
+
type UpdateStateParam = Partial<Pick<AnalyticState, 'geolocationMode' | 'context' | 'logEvents' | 'userPosition' | 'mapId' | 'sendEvents' | 'logEvents' | 'accessToken'>>;
|
|
6881
|
+
type CaptureEventsPayloadMap = {
|
|
6882
|
+
'$select-location': {
|
|
6883
|
+
id: string;
|
|
6884
|
+
};
|
|
6885
|
+
'$select-category': {
|
|
6886
|
+
id: string;
|
|
6887
|
+
};
|
|
6888
|
+
'$query-suggest': {
|
|
6889
|
+
query: string;
|
|
6890
|
+
suggestions?: string[];
|
|
6891
|
+
};
|
|
6892
|
+
'$query-search': {
|
|
6893
|
+
query: string;
|
|
6894
|
+
hits?: string[];
|
|
6895
|
+
};
|
|
6896
|
+
};
|
|
6897
|
+
export const analyticsInternal: AnalyticsInternal;
|
|
6898
|
+
export class Analytics {
|
|
6899
|
+
#private;
|
|
6900
|
+
constructor(internalAnalytics: AnalyticsInternal);
|
|
6901
|
+
/**
|
|
6902
|
+
* Initializes the analytics with the provided options.
|
|
6903
|
+
* @param args - The options to initialize the analytics.
|
|
5840
6904
|
*/
|
|
5841
|
-
|
|
5842
|
-
accessible: boolean;
|
|
5843
|
-
smoothing: {
|
|
5844
|
-
enabled: boolean;
|
|
5845
|
-
radius: number;
|
|
5846
|
-
};
|
|
5847
|
-
zones: TDirectionZone[];
|
|
5848
|
-
}, mapData: MapDataInternal) => Directions | undefined;
|
|
6905
|
+
init(options: AnalyticsUpdateOptions): void;
|
|
5849
6906
|
/**
|
|
5850
|
-
*
|
|
6907
|
+
* Captures an analytic event with a custom target and query payload.
|
|
5851
6908
|
*
|
|
5852
|
-
* @
|
|
5853
|
-
* @param
|
|
6909
|
+
* @param target - The event name or target can be .
|
|
6910
|
+
* @param query - The payload associated with the event.
|
|
6911
|
+
* @returns A promise that resolves to the server response or void.
|
|
5854
6912
|
*/
|
|
5855
|
-
|
|
5856
|
-
}
|
|
5857
|
-
}
|
|
5858
|
-
|
|
5859
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/style' {
|
|
5860
|
-
import type { StyleCollection } from '@mappedin/mvf';
|
|
5861
|
-
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
5862
|
-
export class Style {
|
|
5863
|
-
#private;
|
|
6913
|
+
capture: typeof AnalyticsInternal.prototype.capture;
|
|
5864
6914
|
/**
|
|
5865
|
-
*
|
|
6915
|
+
* Updates the analytics state with the provided parameters.
|
|
6916
|
+
* @param update - The state parameters to update.
|
|
5866
6917
|
*/
|
|
5867
|
-
|
|
6918
|
+
updateState: (update: Partial<Pick<AnalyticState, 'logEvents' | 'sendEvents' | 'logEvents' | 'baseUri' | 'accessToken'>>) => void;
|
|
5868
6919
|
/**
|
|
6920
|
+
* Returns the current analytics state.
|
|
5869
6921
|
* @internal
|
|
6922
|
+
* @returns the current analytics state
|
|
5870
6923
|
*/
|
|
5871
|
-
|
|
5872
|
-
currentMapGetter: CurrentMapGetter;
|
|
5873
|
-
});
|
|
5874
|
-
setFromStyleCollection(styleCollection: StyleCollection): void;
|
|
6924
|
+
getState(): AnalyticState;
|
|
5875
6925
|
}
|
|
5876
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
5877
6926
|
export {};
|
|
5878
6927
|
}
|
|
5879
6928
|
|
|
5880
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/
|
|
5881
|
-
import
|
|
5882
|
-
|
|
5883
|
-
|
|
6929
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object' {
|
|
6930
|
+
import Hyperlink from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink';
|
|
6931
|
+
import type { Details } from '@mappedin/mvf';
|
|
6932
|
+
export default abstract class BaseMapData {
|
|
5884
6933
|
/**
|
|
5885
|
-
*
|
|
6934
|
+
* identity of the map object
|
|
5886
6935
|
*/
|
|
5887
|
-
|
|
5888
|
-
|
|
6936
|
+
readonly id: string;
|
|
6937
|
+
constructor(id: string, details?: Details);
|
|
5889
6938
|
/**
|
|
5890
|
-
*
|
|
5891
|
-
*
|
|
5892
|
-
* @returns {object} Maplibre map instance
|
|
6939
|
+
* Gets the links associated with this data type.
|
|
5893
6940
|
*
|
|
5894
|
-
*
|
|
5895
|
-
* - Maplibre interaction events are not supported; use SDK interaction events.
|
|
5896
|
-
* - Maplibre markers and labels may overlap as they are not integrated with the SDK collision engine.
|
|
5897
|
-
*/
|
|
5898
|
-
get map(): import("@packages/internal/outdoor-context-v4").Map | undefined;
|
|
5899
|
-
/**
|
|
5900
|
-
* Whether the outdoorView is enabled.
|
|
6941
|
+
* @returns {Hyperlink[]} The links associated with this data type
|
|
5901
6942
|
*/
|
|
5902
|
-
|
|
6943
|
+
links: Hyperlink[];
|
|
5903
6944
|
}
|
|
5904
6945
|
}
|
|
5905
6946
|
|
|
5906
6947
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
5907
6948
|
import type { ParsedMVF } from '@mappedin/mvf';
|
|
5908
|
-
import {
|
|
6949
|
+
import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
|
|
6950
|
+
import { PubSub } from '@packages/internal/common';
|
|
5909
6951
|
import type { Position, AddLabelOptions, RendererCore, MarkerState, LineStyle, PaintStyle } from '@mappedin/core-sdk';
|
|
6952
|
+
import { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
|
|
5910
6953
|
import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
5911
|
-
import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
6954
|
+
import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
5912
6955
|
import { type AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
|
|
5913
|
-
import { PubSub } from '@packages/internal/common';
|
|
5914
6956
|
import { StackedMaps } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
5915
6957
|
import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
5916
|
-
import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
|
|
5917
6958
|
import type { Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
5918
6959
|
export class GeojsonApiMapObject extends PubSub<{
|
|
5919
6960
|
'floor-change': {
|
|
@@ -5939,11 +6980,18 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
5939
6980
|
}) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
|
|
5940
6981
|
remove: (_id: string, _groupId: string) => void;
|
|
5941
6982
|
};
|
|
6983
|
+
Images: {
|
|
6984
|
+
add: (target: Position, url: string, opts: TAddImageOptions & {
|
|
6985
|
+
floorId?: string;
|
|
6986
|
+
}) => import("@mappedin/core-sdk").EntityId<import("@mappedin/core-sdk/src/components/image").ImageState> | undefined;
|
|
6987
|
+
remove: (id: string) => void;
|
|
6988
|
+
removeAll: () => void;
|
|
6989
|
+
};
|
|
5942
6990
|
Markers: {
|
|
5943
6991
|
add: (coordinate: Position, html: string, opts?: TAddMarkerOptions & {
|
|
5944
6992
|
floorId?: string;
|
|
5945
|
-
}) => import("@mappedin/core-sdk").EntityId<MarkerState
|
|
5946
|
-
remove: (
|
|
6993
|
+
}) => import("@mappedin/core-sdk").EntityId<MarkerState> | undefined;
|
|
6994
|
+
remove: (id: string) => void;
|
|
5947
6995
|
getContentEl: (id: string) => HTMLElement | undefined;
|
|
5948
6996
|
removeAll: () => void;
|
|
5949
6997
|
setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
|
|
@@ -5991,29 +7039,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
|
|
|
5991
7039
|
elevation: number;
|
|
5992
7040
|
containerId: string;
|
|
5993
7041
|
layers: Map<string, string>;
|
|
5994
|
-
constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf
|
|
7042
|
+
constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf: ParsedMVF, styleMap?: AggregatedStyleMap);
|
|
5995
7043
|
load: () => this;
|
|
5996
7044
|
}
|
|
5997
7045
|
}
|
|
5998
7046
|
|
|
5999
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object' {
|
|
6000
|
-
import Hyperlink from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink';
|
|
6001
|
-
import type { Details } from '@mappedin/mvf';
|
|
6002
|
-
export default abstract class BaseMapData {
|
|
6003
|
-
/**
|
|
6004
|
-
* identity of the map object
|
|
6005
|
-
*/
|
|
6006
|
-
readonly id: string;
|
|
6007
|
-
constructor(id: string, details?: Details);
|
|
6008
|
-
/**
|
|
6009
|
-
* Gets the links associated with this data type.
|
|
6010
|
-
*
|
|
6011
|
-
* @returns {Hyperlink[]} The links associated with this data type
|
|
6012
|
-
*/
|
|
6013
|
-
links: Hyperlink[];
|
|
6014
|
-
}
|
|
6015
|
-
}
|
|
6016
|
-
|
|
6017
7047
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object' {
|
|
6018
7048
|
export default abstract class BaseMetaData {
|
|
6019
7049
|
/**
|
|
@@ -6024,17 +7054,18 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metada
|
|
|
6024
7054
|
}
|
|
6025
7055
|
}
|
|
6026
7056
|
|
|
6027
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
7057
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
|
|
6028
7058
|
import { Object3D } from 'three';
|
|
6029
7059
|
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
6030
7060
|
import type { MeshComponent } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
6031
7061
|
import type { ModelComponent } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
6032
7062
|
import type { PathComponent } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
6033
7063
|
import type { StyleComponent } from '@mappedin/react-sdk/geojson/src/components/style';
|
|
7064
|
+
import type { ImageComponent } from '@mappedin/react-sdk/geojson/src/components/image';
|
|
6034
7065
|
import type { CustomGeometryComponent } from '@mappedin/react-sdk/geojson/src/components/custom';
|
|
6035
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
6036
|
-
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
6037
|
-
export enum
|
|
7066
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
7067
|
+
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
7068
|
+
export enum Geometry3DComponents {
|
|
6038
7069
|
Mesh = 0,
|
|
6039
7070
|
Style = 1,
|
|
6040
7071
|
Interaction = 2
|
|
@@ -6042,27 +7073,27 @@ declare module '@mappedin/react-sdk/geojson/src/entities/three-d' {
|
|
|
6042
7073
|
export class Geometry3DObject3D extends Object3D {
|
|
6043
7074
|
userData: {
|
|
6044
7075
|
entityId: string;
|
|
6045
|
-
type: 'geometry' | 'path' | 'model' | 'custom-geometry';
|
|
7076
|
+
type: 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
|
|
6046
7077
|
};
|
|
6047
7078
|
}
|
|
6048
|
-
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent;
|
|
7079
|
+
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent;
|
|
6049
7080
|
export class Geometry3D {
|
|
6050
7081
|
id: string | number;
|
|
6051
7082
|
components: [MeshComponentTypes, StyleComponent, InteractionComponent?];
|
|
6052
|
-
get object3d(): import("../components/mesh").EntityBatchedMesh |
|
|
7083
|
+
get object3d(): Geometry3DObject3D | import("../components/mesh").EntityBatchedMesh | undefined;
|
|
6053
7084
|
get parent(): GroupContainerObject3D | GeometryGroupObject3D | null;
|
|
6054
|
-
get type(): 'geometry' | 'path' | 'model' | 'custom-geometry';
|
|
6055
|
-
constructor(meshComponent: MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent, styleComponent: StyleComponent);
|
|
7085
|
+
get type(): 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
|
|
7086
|
+
constructor(meshComponent: MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent, styleComponent: StyleComponent);
|
|
6056
7087
|
}
|
|
6057
7088
|
}
|
|
6058
7089
|
|
|
6059
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
7090
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/geometry2d' {
|
|
6060
7091
|
import { Object3D, Vector3 } from 'three';
|
|
6061
7092
|
import type { MarkerComponent } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
6062
7093
|
import type LabelComponent from '@mappedin/react-sdk/geojson/src/components/label';
|
|
6063
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
7094
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
6064
7095
|
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
6065
|
-
export enum
|
|
7096
|
+
export enum Geometry2DComponents {
|
|
6066
7097
|
UI = 0,
|
|
6067
7098
|
Interaction = 1
|
|
6068
7099
|
}
|
|
@@ -6108,6 +7139,8 @@ declare module '@mappedin/react-sdk/geojson/src/components/geometry-group-style'
|
|
|
6108
7139
|
opacity: number;
|
|
6109
7140
|
shading?: Shading;
|
|
6110
7141
|
outline: boolean;
|
|
7142
|
+
texture?: string;
|
|
7143
|
+
topTexture?: string;
|
|
6111
7144
|
};
|
|
6112
7145
|
export class GeometryGroupStyleComponent implements GeometryGroupStyle {
|
|
6113
7146
|
#private;
|
|
@@ -6115,6 +7148,13 @@ declare module '@mappedin/react-sdk/geojson/src/components/geometry-group-style'
|
|
|
6115
7148
|
topColor?: string;
|
|
6116
7149
|
opacity: number;
|
|
6117
7150
|
outline: boolean;
|
|
7151
|
+
texture?: string;
|
|
7152
|
+
topTexture?: string;
|
|
7153
|
+
/**
|
|
7154
|
+
* Ideally for handling all style component changes. However, it's only used for handling outline for now.
|
|
7155
|
+
* Color update is handled separately in each child. See: https://github.com/MappedIn/sdk/blob/v6.0.1-beta.1/sdks/geojson/src/entities/utils.ts#L70
|
|
7156
|
+
*/
|
|
7157
|
+
dirty: boolean;
|
|
6118
7158
|
get shading(): Required<Shading> | undefined;
|
|
6119
7159
|
set shading(value: Shading | undefined);
|
|
6120
7160
|
constructor(style?: Partial<GeometryGroupStyle>);
|
|
@@ -6122,6 +7162,143 @@ declare module '@mappedin/react-sdk/geojson/src/components/geometry-group-style'
|
|
|
6122
7162
|
export {};
|
|
6123
7163
|
}
|
|
6124
7164
|
|
|
7165
|
+
declare module '@mappedin/react-sdk/geojson/src/components/image' {
|
|
7166
|
+
import type { LineSegments, PlaneGeometry, MeshLambertMaterial } from 'three';
|
|
7167
|
+
import { Vector3, Mesh } from 'three';
|
|
7168
|
+
import type { Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
7169
|
+
import type { Feature, Point } from 'geojson';
|
|
7170
|
+
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
7171
|
+
import { z } from 'zod';
|
|
7172
|
+
export class EntityMesh extends Mesh {
|
|
7173
|
+
userData: {
|
|
7174
|
+
entityId: string | number;
|
|
7175
|
+
};
|
|
7176
|
+
}
|
|
7177
|
+
export type ImageStyle = {
|
|
7178
|
+
/**
|
|
7179
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
7180
|
+
*/
|
|
7181
|
+
flipImageToFaceCamera?: boolean;
|
|
7182
|
+
/**
|
|
7183
|
+
* url of the image
|
|
7184
|
+
*/
|
|
7185
|
+
url: string;
|
|
7186
|
+
};
|
|
7187
|
+
export type ImageProperties = {
|
|
7188
|
+
width: number;
|
|
7189
|
+
height: number;
|
|
7190
|
+
rotation?: number;
|
|
7191
|
+
verticalOffset?: number;
|
|
7192
|
+
};
|
|
7193
|
+
export const addImageFeatureStyleSchema: z.ZodObject<{
|
|
7194
|
+
flipImageToFaceCamera: z.ZodOptional<z.ZodBoolean>;
|
|
7195
|
+
url: z.ZodString;
|
|
7196
|
+
}, "strip", z.ZodTypeAny, {
|
|
7197
|
+
url: string;
|
|
7198
|
+
flipImageToFaceCamera?: boolean | undefined;
|
|
7199
|
+
}, {
|
|
7200
|
+
url: string;
|
|
7201
|
+
flipImageToFaceCamera?: boolean | undefined;
|
|
7202
|
+
}>;
|
|
7203
|
+
export const addImageFeatureSchema: z.ZodObject<{
|
|
7204
|
+
type: z.ZodEnum<["Feature"]>;
|
|
7205
|
+
properties: z.ZodObject<{
|
|
7206
|
+
width: z.ZodNumber;
|
|
7207
|
+
height: z.ZodNumber;
|
|
7208
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
7209
|
+
verticalOffset: z.ZodOptional<z.ZodNumber>;
|
|
7210
|
+
}, "strip", z.ZodTypeAny, {
|
|
7211
|
+
height: number;
|
|
7212
|
+
width: number;
|
|
7213
|
+
rotation?: number | undefined;
|
|
7214
|
+
verticalOffset?: number | undefined;
|
|
7215
|
+
}, {
|
|
7216
|
+
height: number;
|
|
7217
|
+
width: number;
|
|
7218
|
+
rotation?: number | undefined;
|
|
7219
|
+
verticalOffset?: number | undefined;
|
|
7220
|
+
}>;
|
|
7221
|
+
geometry: z.ZodObject<{
|
|
7222
|
+
type: z.ZodEnum<["Point"]>;
|
|
7223
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
7224
|
+
}, "strip", z.ZodTypeAny, {
|
|
7225
|
+
type: "Point";
|
|
7226
|
+
coordinates: number[];
|
|
7227
|
+
}, {
|
|
7228
|
+
type: "Point";
|
|
7229
|
+
coordinates: number[];
|
|
7230
|
+
}>;
|
|
7231
|
+
}, "strip", z.ZodTypeAny, {
|
|
7232
|
+
type: "Feature";
|
|
7233
|
+
geometry: {
|
|
7234
|
+
type: "Point";
|
|
7235
|
+
coordinates: number[];
|
|
7236
|
+
};
|
|
7237
|
+
properties: {
|
|
7238
|
+
height: number;
|
|
7239
|
+
width: number;
|
|
7240
|
+
rotation?: number | undefined;
|
|
7241
|
+
verticalOffset?: number | undefined;
|
|
7242
|
+
};
|
|
7243
|
+
}, {
|
|
7244
|
+
type: "Feature";
|
|
7245
|
+
geometry: {
|
|
7246
|
+
type: "Point";
|
|
7247
|
+
coordinates: number[];
|
|
7248
|
+
};
|
|
7249
|
+
properties: {
|
|
7250
|
+
height: number;
|
|
7251
|
+
width: number;
|
|
7252
|
+
rotation?: number | undefined;
|
|
7253
|
+
verticalOffset?: number | undefined;
|
|
7254
|
+
};
|
|
7255
|
+
}>;
|
|
7256
|
+
export function validateImage(id: string | number, feature: Feature<Point, ImageProperties>, style: ImageStyle): void;
|
|
7257
|
+
/**
|
|
7258
|
+
* State representing an Image
|
|
7259
|
+
*/
|
|
7260
|
+
export type ImageState = {
|
|
7261
|
+
readonly id: string | number;
|
|
7262
|
+
readonly type: 'image';
|
|
7263
|
+
/**
|
|
7264
|
+
* The position of the image in [lon, lat]
|
|
7265
|
+
*/
|
|
7266
|
+
readonly position: Position;
|
|
7267
|
+
/**
|
|
7268
|
+
* The offset of the image in the z direction
|
|
7269
|
+
*/
|
|
7270
|
+
readonly verticalOffset: number;
|
|
7271
|
+
/**
|
|
7272
|
+
* Whether the image is visible
|
|
7273
|
+
*/
|
|
7274
|
+
visible: boolean;
|
|
7275
|
+
/**
|
|
7276
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
7277
|
+
*/
|
|
7278
|
+
flipImageToFaceCamera: boolean;
|
|
7279
|
+
};
|
|
7280
|
+
export class ImageComponent {
|
|
7281
|
+
mesh: Geometry3DObject3D;
|
|
7282
|
+
imageMesh?: EntityMesh;
|
|
7283
|
+
outline?: LineSegments;
|
|
7284
|
+
readonly type = "image";
|
|
7285
|
+
instanceIndex: number;
|
|
7286
|
+
geometry?: PlaneGeometry;
|
|
7287
|
+
material?: MeshLambertMaterial;
|
|
7288
|
+
feature: Feature<Point, ImageProperties>;
|
|
7289
|
+
constructor(feature: Feature<Point, ImageProperties>);
|
|
7290
|
+
get visible(): boolean;
|
|
7291
|
+
set visible(visible: boolean);
|
|
7292
|
+
position: Vector3;
|
|
7293
|
+
}
|
|
7294
|
+
}
|
|
7295
|
+
|
|
7296
|
+
declare module '@mappedin/react-sdk/geojson/src/entities' {
|
|
7297
|
+
export { updateInteractivity } from '@mappedin/react-sdk/geojson/src/entities/utils';
|
|
7298
|
+
export { Geometry2D, Geometry2DComponents } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
7299
|
+
export { Geometry3D, Geometry3DComponents } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
7300
|
+
}
|
|
7301
|
+
|
|
6125
7302
|
declare module '@mappedin/react-sdk/geojson/src/types/options' {
|
|
6126
7303
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types/geometry';
|
|
6127
7304
|
import type { Map as MapLibreMap } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
@@ -6162,15 +7339,28 @@ declare module '@mappedin/react-sdk/geojson/src/types/constants' {
|
|
|
6162
7339
|
declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/batched-material' {
|
|
6163
7340
|
import { MeshLambertMaterial, type Color, type Texture, type MeshLambertMaterialParameters } from 'three';
|
|
6164
7341
|
export class BatchedStandardMaterial extends MeshLambertMaterial {
|
|
6165
|
-
constructor(params: MeshLambertMaterialParameters, geometryCount: number);
|
|
7342
|
+
constructor(params: MeshLambertMaterialParameters, geometryCount: number, scaleFactor?: number);
|
|
7343
|
+
/**
|
|
7344
|
+
* These control the repeat factor of the texture in the Y direction.
|
|
7345
|
+
* So when we scale a geometry, it needs to scale the texture as well.
|
|
7346
|
+
* For now this only applies to detached geometries.
|
|
7347
|
+
*/
|
|
7348
|
+
get repeatYFactor(): number;
|
|
7349
|
+
set repeatYFactor(value: number);
|
|
6166
7350
|
get texture(): Texture;
|
|
6167
7351
|
set texture(texture: Texture);
|
|
6168
7352
|
get topTexture(): Texture;
|
|
6169
7353
|
set topTexture(texture: Texture);
|
|
6170
7354
|
setGradientShading(start: number, end: number, intensity: number): void;
|
|
6171
7355
|
setColor(batchId: number, color: Color, topColor: Color): void;
|
|
7356
|
+
getColor(batchId: number): {
|
|
7357
|
+
color: Color;
|
|
7358
|
+
topColor: Color;
|
|
7359
|
+
};
|
|
6172
7360
|
showTextures: (batchId: number) => void;
|
|
6173
7361
|
hideTextures(batchId: number): void;
|
|
7362
|
+
removeSideTexture(batchId: number): void;
|
|
7363
|
+
removeTopTexture(batchId: number): void;
|
|
6174
7364
|
dispose(): void;
|
|
6175
7365
|
}
|
|
6176
7366
|
}
|
|
@@ -6245,6 +7435,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6245
7435
|
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
6246
7436
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6247
7437
|
import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor';
|
|
7438
|
+
import { WatermarkPosition } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
6248
7439
|
export type TMessageEvent = MessageEvent<{
|
|
6249
7440
|
msgId: string;
|
|
6250
7441
|
colliders: TSerializedColliderResponse[];
|
|
@@ -6261,6 +7452,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6261
7452
|
totalHeight: number;
|
|
6262
7453
|
watermarkWidth: number;
|
|
6263
7454
|
watermarkHeight: number;
|
|
7455
|
+
watermarkPosition: WatermarkPosition;
|
|
6264
7456
|
colliders: TSerializedCollider[];
|
|
6265
7457
|
devicePixelRatio: number;
|
|
6266
7458
|
};
|
|
@@ -6276,7 +7468,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6276
7468
|
totalHeight: number,
|
|
6277
7469
|
totalWidth: number,
|
|
6278
7470
|
watermarkWidth: number,
|
|
6279
|
-
watermarkHeight: number
|
|
7471
|
+
watermarkHeight: number,
|
|
7472
|
+
watermarkPosition: WatermarkPosition
|
|
6280
7473
|
];
|
|
6281
7474
|
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
6282
7475
|
dirty: boolean;
|
|
@@ -6295,8 +7488,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6295
7488
|
currentMsgId: string;
|
|
6296
7489
|
working: boolean;
|
|
6297
7490
|
componentArray: (MarkerComponent | LabelComponent)[];
|
|
6298
|
-
update: (watermarkWidth: number, watermarkHeight: number) => void;
|
|
6299
|
-
resize(watermarkWidth: number, watermarkHeight: number): void;
|
|
7491
|
+
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition) => void;
|
|
7492
|
+
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
6300
7493
|
/**
|
|
6301
7494
|
* Resolve collisions
|
|
6302
7495
|
*/
|
|
@@ -6337,7 +7530,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/zoom-interpolation/zoom-
|
|
|
6337
7530
|
declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/system' {
|
|
6338
7531
|
import type { BufferGeometry } from 'three';
|
|
6339
7532
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6340
|
-
import { Geometry3D, Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
7533
|
+
import { Geometry3D, Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
6341
7534
|
import type { Feature, LineString, MultiPolygon, Point, Polygon } from 'geojson';
|
|
6342
7535
|
import type { LineStyle, ModelProperties, ModelStyle, PaintStyle } from '@mappedin/react-sdk/geojson/src/types';
|
|
6343
7536
|
import type { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
|
@@ -6433,13 +7626,18 @@ declare module '@mappedin/react-sdk/geojson/src/systems/2d-draw/system' {
|
|
|
6433
7626
|
|
|
6434
7627
|
declare module '@mappedin/react-sdk/geojson/src/systems/draw/system' {
|
|
6435
7628
|
import { PubSub } from '@packages/internal/common';
|
|
7629
|
+
import { MeshComponent } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
7630
|
+
import { StyleComponent } from '@mappedin/react-sdk/geojson/src/components/style';
|
|
6436
7631
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
7632
|
+
import { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
7633
|
+
import type { GeometryGroupStyleComponent } from '@mappedin/react-sdk/geojson/src/components/geometry-group-style';
|
|
6437
7634
|
export class DrawSystem extends PubSub<{
|
|
6438
7635
|
'texture-loaded': void;
|
|
6439
7636
|
}> {
|
|
6440
7637
|
#private;
|
|
6441
7638
|
state: RendererState;
|
|
6442
7639
|
constructor(state: RendererState);
|
|
7640
|
+
processTextures(component: MeshComponent, styleComponent: StyleComponent | GeometryGroupStyleComponent, interactionComponent?: InteractionComponent): void;
|
|
6443
7641
|
update(): void;
|
|
6444
7642
|
destroy(): void;
|
|
6445
7643
|
}
|
|
@@ -6718,11 +7916,13 @@ declare module '@mappedin/react-sdk/geojson/src/systems/custom-geometry/system'
|
|
|
6718
7916
|
declare module '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/system' {
|
|
6719
7917
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6720
7918
|
export class OutlineInterpolationSystem {
|
|
7919
|
+
#private;
|
|
6721
7920
|
/**
|
|
6722
7921
|
* Set to true when we need to update the outline color of all entities, regardless of zoom level.
|
|
6723
7922
|
*/
|
|
6724
7923
|
dirty: boolean;
|
|
6725
|
-
geometries3DDirty: boolean;
|
|
7924
|
+
get geometries3DDirty(): boolean;
|
|
7925
|
+
set geometries3DDirty(value: boolean);
|
|
6726
7926
|
constructor(rendererState: RendererState);
|
|
6727
7927
|
/**
|
|
6728
7928
|
* Update the outline color of all entities with an outline component.
|
|
@@ -6733,6 +7933,21 @@ declare module '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/sy
|
|
|
6733
7933
|
}
|
|
6734
7934
|
}
|
|
6735
7935
|
|
|
7936
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/image/system' {
|
|
7937
|
+
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
7938
|
+
import { type Texture } from 'three';
|
|
7939
|
+
import type { RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
7940
|
+
import { PubSub } from '@packages/internal/common';
|
|
7941
|
+
export const DEFAULT_VERTICAL_OFFSET = 0.01;
|
|
7942
|
+
export class ImageSystem extends PubSub<{
|
|
7943
|
+
'image-loaded': void;
|
|
7944
|
+
}> {
|
|
7945
|
+
constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
|
|
7946
|
+
imageLoadingCache: Map<string, Promise<Texture>>;
|
|
7947
|
+
update(cameraRotationRadians: number): void;
|
|
7948
|
+
}
|
|
7949
|
+
}
|
|
7950
|
+
|
|
6736
7951
|
declare module '@mappedin/react-sdk/geojson/src/systems/geometry-in-focus/system' {
|
|
6737
7952
|
import { PubSub } from '@packages/internal/common';
|
|
6738
7953
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
@@ -6766,6 +7981,45 @@ declare module '@mappedin/react-sdk/geojson/src/systems/path' {
|
|
|
6766
7981
|
export { PathSystem } from '@mappedin/react-sdk/geojson/src/systems/path/system';
|
|
6767
7982
|
}
|
|
6768
7983
|
|
|
7984
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/mesh-detachment/system' {
|
|
7985
|
+
import { type Geometry3DTypes, type RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
7986
|
+
/**
|
|
7987
|
+
* This system is responsible for updating the opacity of the mesh, which results in the mesh
|
|
7988
|
+
* being detached from the parent's optimized geometry group and rendered as a separate mesh.
|
|
7989
|
+
*/
|
|
7990
|
+
export class MeshDetachmentSystem {
|
|
7991
|
+
#private;
|
|
7992
|
+
rendererState: RendererState;
|
|
7993
|
+
dirty: boolean;
|
|
7994
|
+
constructor(rendererState: RendererState);
|
|
7995
|
+
updateOne(geometry: Geometry3DTypes | undefined): void;
|
|
7996
|
+
update(): void;
|
|
7997
|
+
}
|
|
7998
|
+
}
|
|
7999
|
+
|
|
8000
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/mesh-modification/system' {
|
|
8001
|
+
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities';
|
|
8002
|
+
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
8003
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
8004
|
+
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
8005
|
+
/**
|
|
8006
|
+
* Any physical changes to geometry should go in here. This includes height changes, etc.
|
|
8007
|
+
* This is to ensure that physical changes apply before any other systems need to do their work,
|
|
8008
|
+
* such as the outline system.
|
|
8009
|
+
*
|
|
8010
|
+
* TODO: For now, this piggybacks of style.dirty, but we may want to create a flag indicating geometry dirty.
|
|
8011
|
+
*/
|
|
8012
|
+
export class MeshModificationSystem {
|
|
8013
|
+
#private;
|
|
8014
|
+
rendererState: RendererState;
|
|
8015
|
+
dirty: boolean;
|
|
8016
|
+
constructor(rendererState: RendererState);
|
|
8017
|
+
updateOne(entity: Geometry3D | GeometryGroupObject3D | GroupContainerObject3D | undefined): void;
|
|
8018
|
+
update(): void;
|
|
8019
|
+
cleanup(): void;
|
|
8020
|
+
}
|
|
8021
|
+
}
|
|
8022
|
+
|
|
6769
8023
|
declare module '@mappedin/react-sdk/packages/geojson-navigator/src' {
|
|
6770
8024
|
export { Navigator } from '@mappedin/react-sdk/packages/geojson-navigator/src/navigator';
|
|
6771
8025
|
export type { SimplifyDirectionsOptions } from '@mappedin/react-sdk/packages/geojson-navigator/src/navigator/navigator';
|
|
@@ -6832,10 +8086,13 @@ declare module '@mappedin/react-sdk/geojson/src/utils/fp' {
|
|
|
6832
8086
|
export function noop(): void;
|
|
6833
8087
|
}
|
|
6834
8088
|
|
|
6835
|
-
declare module '@mappedin/react-sdk/geojson/src/
|
|
6836
|
-
export
|
|
6837
|
-
|
|
6838
|
-
|
|
8089
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/tranform-request' {
|
|
8090
|
+
export const transformRequest: (headers: {
|
|
8091
|
+
"x-mappedin-tiles-key": string;
|
|
8092
|
+
}) => (url: string) => {
|
|
8093
|
+
url: string;
|
|
8094
|
+
headers: {};
|
|
8095
|
+
};
|
|
6839
8096
|
}
|
|
6840
8097
|
|
|
6841
8098
|
declare module '@mappedin/react-sdk/geojson/src/systems/exporter/exporter' {
|
|
@@ -6871,15 +8128,21 @@ declare module '@mappedin/react-sdk/geojson/src/systems/exporter/exporter' {
|
|
|
6871
8128
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
6872
8129
|
import { Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
6873
8130
|
import type { Position, EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
|
|
6874
|
-
import type {
|
|
8131
|
+
import type { WithPolygonImage } from '@packages/internal/mvf-utils';
|
|
8132
|
+
import type { FeatureCollection, MultiLineString } from 'geojson';
|
|
6875
8133
|
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle } from '@mappedin/core-sdk';
|
|
6876
8134
|
import type { TGeometryState, TLabelState, TDirectionInstructionAction, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
6877
|
-
import type { TMarkerState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
8135
|
+
import type { TDoorsState, TMarkerState, TWallsState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
6878
8136
|
export function convertCoordinateToPosition(coord: Coordinate): Position;
|
|
6879
8137
|
export function convertPositionToCoordinate(coord: Position): Coordinate;
|
|
6880
|
-
export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) =>
|
|
8138
|
+
export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => {
|
|
8139
|
+
entrances: FeatureCollection<LineString, any>;
|
|
8140
|
+
walls: Feature<MultiLineString, any>;
|
|
8141
|
+
};
|
|
6881
8142
|
export function translateLabelStateToGeojsonCore(state: Partial<TLabelState>, currentState: Partial<LabelState>): Partial<LabelState>;
|
|
6882
8143
|
export function translateMarkerStateToGeojsonCore(state: Partial<TMarkerState>, currentState: Partial<MarkerState>): Partial<MarkerState>;
|
|
8144
|
+
export function translateDoorsStateToGeojsonCore(state: Partial<TDoorsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
8145
|
+
export function translateWallsStateToGeojsonCore(state: Partial<TWallsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
6883
8146
|
export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
6884
8147
|
export function differenceBetweenAngles(a: number, b: number): number;
|
|
6885
8148
|
export function getRelativeBearing(relativeBearingAngle: number, threshold: number): TDirectionInstructionAction['bearing'];
|
|
@@ -6894,12 +8157,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
|
6894
8157
|
export type WithId<T> = T & {
|
|
6895
8158
|
id?: string;
|
|
6896
8159
|
};
|
|
6897
|
-
export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon,
|
|
8160
|
+
export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon, WithPolygonImage<SpaceProperties> | WithPolygonImage<ObstructionProperties>>[]>;
|
|
6898
8161
|
export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
|
|
6899
8162
|
}
|
|
6900
8163
|
|
|
6901
8164
|
declare module '@mappedin/react-sdk/geojson/src/components/style' {
|
|
6902
|
-
import type {
|
|
8165
|
+
import type { LineStyle } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
8166
|
+
export const DEFAULT_COLOR = "#ffffff";
|
|
8167
|
+
export const DEFAULT_HEIGHT = 0.1;
|
|
6903
8168
|
type Style = {
|
|
6904
8169
|
color: string;
|
|
6905
8170
|
width: number;
|
|
@@ -6907,12 +8172,15 @@ declare module '@mappedin/react-sdk/geojson/src/components/style' {
|
|
|
6907
8172
|
visible: boolean;
|
|
6908
8173
|
height: number;
|
|
6909
8174
|
altitude: number;
|
|
6910
|
-
join:
|
|
6911
|
-
cap:
|
|
8175
|
+
join: LineStyle['join'];
|
|
8176
|
+
cap: LineStyle['cap'];
|
|
6912
8177
|
topColor?: string;
|
|
6913
8178
|
texture?: string;
|
|
6914
8179
|
topTexture?: string;
|
|
6915
8180
|
outline: boolean;
|
|
8181
|
+
showImage: boolean;
|
|
8182
|
+
flipImageToFaceCamera: boolean;
|
|
8183
|
+
url?: string;
|
|
6916
8184
|
};
|
|
6917
8185
|
export class StyleComponent implements Style {
|
|
6918
8186
|
initialColor: string;
|
|
@@ -6926,15 +8194,53 @@ declare module '@mappedin/react-sdk/geojson/src/components/style' {
|
|
|
6926
8194
|
opacity: number;
|
|
6927
8195
|
width: number;
|
|
6928
8196
|
height: number;
|
|
8197
|
+
initialHeight: number;
|
|
6929
8198
|
altitude: number;
|
|
6930
|
-
join:
|
|
6931
|
-
cap:
|
|
8199
|
+
join: LineStyle['join'];
|
|
8200
|
+
cap: LineStyle['cap'];
|
|
6932
8201
|
outline: boolean;
|
|
8202
|
+
showImage: boolean;
|
|
8203
|
+
flipImageToFaceCamera: boolean;
|
|
8204
|
+
url?: string;
|
|
6933
8205
|
constructor(style?: Partial<Style>);
|
|
6934
8206
|
}
|
|
6935
8207
|
export {};
|
|
6936
8208
|
}
|
|
6937
8209
|
|
|
8210
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
|
|
8211
|
+
import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
8212
|
+
import { type MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
8213
|
+
import type { Geometry3DTypes, Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
8214
|
+
import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
8215
|
+
import { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
8216
|
+
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
8217
|
+
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
8218
|
+
import type { StyleComponent } from '@mappedin/react-sdk/geojson/src/components/style';
|
|
8219
|
+
import type { GeometryGroupStyleComponent } from '@mappedin/react-sdk/geojson/src/components/geometry-group-style';
|
|
8220
|
+
export function updateInteractivity(entity: Geometry3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
|
|
8221
|
+
export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update: Partial<Pick<GeometryGroupState, 'color' | 'topColor'>>): boolean | undefined;
|
|
8222
|
+
export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
|
|
8223
|
+
export function updateImageProps(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
|
|
8224
|
+
export function updateHeight(entity: Geometry3D, update?: number): boolean;
|
|
8225
|
+
export function updateColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
|
|
8226
|
+
export function updatePosition(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
|
|
8227
|
+
export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
|
|
8228
|
+
export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
|
|
8229
|
+
export function updatePath(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<PathState> | undefined): void;
|
|
8230
|
+
export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined, state: RendererState): boolean;
|
|
8231
|
+
export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
|
|
8232
|
+
export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined, state: RendererState): void;
|
|
8233
|
+
export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
|
|
8234
|
+
export function updateFlipImageToFaceCamera(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): void;
|
|
8235
|
+
export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
|
|
8236
|
+
export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): void;
|
|
8237
|
+
export function updateGroupTexture(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Pick<GeometryGroupStyleComponent, 'texture' | 'topTexture'>): void;
|
|
8238
|
+
export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
|
|
8239
|
+
export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
|
|
8240
|
+
export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
|
|
8241
|
+
export function updateOutline(entity: Geometry3DTypes, update?: boolean): boolean;
|
|
8242
|
+
}
|
|
8243
|
+
|
|
6938
8244
|
declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor' {
|
|
6939
8245
|
import { Rectangle } from '@packages/internal/quad-tree';
|
|
6940
8246
|
export type TSerializedCollider = {
|
|
@@ -6950,7 +8256,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-proc
|
|
|
6950
8256
|
shouldCollideWithScreenEdges?: boolean;
|
|
6951
8257
|
};
|
|
6952
8258
|
export type TSerializedColliderResponse = [number, boolean, Rectangle?];
|
|
6953
|
-
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, msgId?: string): {
|
|
8259
|
+
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
|
|
6954
8260
|
msgId: string;
|
|
6955
8261
|
colliders: TSerializedColliderResponse[];
|
|
6956
8262
|
debug: {
|
|
@@ -6965,16 +8271,16 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-proc
|
|
|
6965
8271
|
declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|
|
6966
8272
|
import type { PerspectiveCamera, Vector3, Object3D, Mesh } from 'three';
|
|
6967
8273
|
import { Raycaster } from 'three';
|
|
6968
|
-
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
8274
|
+
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
6969
8275
|
import { QuadTree } from '@packages/internal/quad-tree';
|
|
6970
|
-
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
8276
|
+
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
6971
8277
|
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
6972
8278
|
import type { EntityMesh } from '@mappedin/react-sdk/geojson/src/types';
|
|
6973
8279
|
import { TapsController } from '@mappedin/react-sdk/geojson/src/systems/interactions/tap-controller';
|
|
6974
8280
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6975
8281
|
import 'style.scss';
|
|
6976
8282
|
import type { EntityBatchedMesh } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
6977
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
8283
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
6978
8284
|
type InteractionPayload = {
|
|
6979
8285
|
entity2D?: Geometry2D;
|
|
6980
8286
|
entity3D?: Geometry3D;
|
|
@@ -7000,8 +8306,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|
|
|
7000
8306
|
} | undefined;
|
|
7001
8307
|
};
|
|
7002
8308
|
export type InteractionRequiredCoreStateProps = {
|
|
7003
|
-
|
|
7004
|
-
|
|
8309
|
+
geometry2DIdsInScene: Set<Geometry2D['id']>;
|
|
8310
|
+
geometry3DIdsInScene: Set<Geometry3D['id']>;
|
|
7005
8311
|
};
|
|
7006
8312
|
/**
|
|
7007
8313
|
* TODO: touch support
|
|
@@ -7043,6 +8349,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|
|
|
7043
8349
|
* Get the current cursor type determined by the interaction.
|
|
7044
8350
|
*/
|
|
7045
8351
|
getCursor(): CursorTypes;
|
|
8352
|
+
resize: () => void;
|
|
7046
8353
|
}
|
|
7047
8354
|
export {};
|
|
7048
8355
|
}
|
|
@@ -15736,32 +17043,6 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/types/coordin
|
|
|
15736
17043
|
export type CoordinateFeature = Feature<Point, CoordinateProperties>;
|
|
15737
17044
|
}
|
|
15738
17045
|
|
|
15739
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
|
|
15740
|
-
import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
15741
|
-
import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
15742
|
-
import type { Entity3DTypes, Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
15743
|
-
import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/entity-group';
|
|
15744
|
-
import { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/entity-group-container';
|
|
15745
|
-
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/three-d';
|
|
15746
|
-
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/two-d';
|
|
15747
|
-
export function updateInteractivity(entity: Entity3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
|
|
15748
|
-
export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update?: Partial<GeometryGroupState>): boolean;
|
|
15749
|
-
export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
|
|
15750
|
-
export function updateColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
|
|
15751
|
-
export function updatePosition(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
|
|
15752
|
-
export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
|
|
15753
|
-
export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
|
|
15754
|
-
export function updatePath(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<PathState> | undefined): void;
|
|
15755
|
-
export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined): boolean;
|
|
15756
|
-
export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
|
|
15757
|
-
export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined): void;
|
|
15758
|
-
export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
|
|
15759
|
-
export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
|
|
15760
|
-
export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): void;
|
|
15761
|
-
export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
|
|
15762
|
-
export function updateOutline(entity: Entity3DTypes, update?: boolean): boolean;
|
|
15763
|
-
}
|
|
15764
|
-
|
|
15765
17046
|
declare module '@mappedin/react-sdk/geojson/src/systems/interactions/tap-controller' {
|
|
15766
17047
|
export enum TapType {
|
|
15767
17048
|
onefinger = 0,
|