@mappedin/mappedin-js 6.0.1-alpha.32 → 6.0.1-alpha.33
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/lib/esm/{GLTFExporter-TMSWNHZO.js → GLTFExporter-IXIGSGM3.js} +1 -1
- package/lib/esm/{GLTFLoader-NIXX5K7V.js → GLTFLoader-J36XXUE2.js} +1 -1
- package/lib/esm/{browser-7SS6EBDE.js → browser-VZNENOMI.js} +1 -1
- package/lib/esm/{chunk-W43PFPS7.js → chunk-5YBN4H5R.js} +1 -1
- package/lib/esm/{chunk-KMHSGG4L.js → chunk-JTHM7U3W.js} +1 -1
- package/lib/esm/{chunk-3MNEOWBT.js → chunk-TFQ3OMBN.js} +7 -7
- package/lib/esm/{chunk-NCVDSTLX.js → chunk-YQZI7WVJ.js} +1 -1
- package/lib/esm/index.d.ts +56 -10
- package/lib/esm/index.js +53 -28
- package/lib/esm/{outdoor-context-v4-2K6NTFX7.js → outdoor-context-v4-P6FPVSAJ.js} +1 -1
- package/package.json +2 -2
package/lib/esm/index.d.ts
CHANGED
|
@@ -440,6 +440,10 @@ declare module '@mappedin/mappedin-js/maker/src/events' {
|
|
|
440
440
|
* Emitted when the outdoor view is fully loaded and displayed.
|
|
441
441
|
*/
|
|
442
442
|
'outdoor-view-loaded': undefined;
|
|
443
|
+
/**
|
|
444
|
+
* Emitted when the outdoor style is loaded or changed.
|
|
445
|
+
*/
|
|
446
|
+
'outdoor-style-loaded': undefined;
|
|
443
447
|
/**
|
|
444
448
|
* Emitted when a user interaction with the map starts (e.g., dragging the map).
|
|
445
449
|
*/
|
|
@@ -617,12 +621,14 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
|
|
|
617
621
|
import type { TEvents, TShow3DMapOptions } from '@mappedin/mappedin-js/maker/src';
|
|
618
622
|
import type { Navigation } from '@mappedin/mappedin-js/maker/src/navigation';
|
|
619
623
|
import type { Camera, Labels, Markers, Paths, Exporter, Directions } from '@mappedin/mappedin-js/maker/src/api-geojson';
|
|
624
|
+
import { GeoJsonApi } from '@mappedin/mappedin-js/maker/src/api-geojson';
|
|
620
625
|
import type { BlueDot } from '@mappedin/mappedin-js/maker/src/api-geojson/blue-dot/blue-dot';
|
|
621
626
|
import type MapData from '@mappedin/mappedin-js/maker/src/map-data';
|
|
622
627
|
import type { Floor, MapObject, Space } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
623
628
|
import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState } from '@mappedin/mappedin-js/maker/src/types';
|
|
624
629
|
import type { Label, Marker } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
625
630
|
import type { TEventPayload } from '@mappedin/mappedin-js/maker/src/events';
|
|
631
|
+
import { Style } from '@mappedin/mappedin-js/maker/src/api-geojson/style';
|
|
626
632
|
export class MapView extends PubSub<TEvents> {
|
|
627
633
|
#private;
|
|
628
634
|
/**
|
|
@@ -655,6 +661,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
|
|
|
655
661
|
* Controls for BlueDot positioning.
|
|
656
662
|
*/
|
|
657
663
|
BlueDot: BlueDot;
|
|
664
|
+
Style: Style;
|
|
658
665
|
/**
|
|
659
666
|
* @internal
|
|
660
667
|
*/
|
|
@@ -742,6 +749,16 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
|
|
|
742
749
|
auto(): void;
|
|
743
750
|
Outdoor: {
|
|
744
751
|
setStyle: (style: any) => void;
|
|
752
|
+
/**
|
|
753
|
+
* Returns a Maplibre map for advanced usage.
|
|
754
|
+
*
|
|
755
|
+
* @returns {object} Maplibre map instance
|
|
756
|
+
*
|
|
757
|
+
* Limitations:
|
|
758
|
+
* - Maplibre interaction events are not supported; use SDK interaction events.
|
|
759
|
+
* - Maplibre markers and labels may overlap as they are not integrated with the SDK collision engine.
|
|
760
|
+
*/
|
|
761
|
+
map: GeoJsonApi['core']['map'];
|
|
745
762
|
};
|
|
746
763
|
/**
|
|
747
764
|
* Subscribe a function to an event.
|
|
@@ -1069,25 +1086,25 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1069
1086
|
/**
|
|
1070
1087
|
* Radius of path at nearest zoom, in metres.
|
|
1071
1088
|
*
|
|
1072
|
-
* @defaultValue
|
|
1089
|
+
* @defaultValue 0.2
|
|
1073
1090
|
*/
|
|
1074
1091
|
nearRadius?: number;
|
|
1075
1092
|
/**
|
|
1076
1093
|
* Radius of path at furthest zoom, in metres.
|
|
1077
1094
|
*
|
|
1078
|
-
* @defaultValue
|
|
1095
|
+
* @defaultValue 0.4
|
|
1079
1096
|
*/
|
|
1080
1097
|
farRadius?: number;
|
|
1081
1098
|
/**
|
|
1082
1099
|
* Zoom level in meters where the path size is `nearRadius`.
|
|
1083
1100
|
*
|
|
1084
|
-
* @defaultValue
|
|
1101
|
+
* @defaultValue 5
|
|
1085
1102
|
*/
|
|
1086
1103
|
nearZoom?: number;
|
|
1087
1104
|
/**
|
|
1088
1105
|
* Zoom level in meters where the path size is `farRadius`.
|
|
1089
1106
|
*
|
|
1090
|
-
* @defaultValue
|
|
1107
|
+
* @defaultValue 1000
|
|
1091
1108
|
*/
|
|
1092
1109
|
farZoom?: number;
|
|
1093
1110
|
/**
|
|
@@ -2744,6 +2761,27 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/blue-dot/blue-dot' {
|
|
|
2744
2761
|
}
|
|
2745
2762
|
}
|
|
2746
2763
|
|
|
2764
|
+
declare module '@mappedin/mappedin-js/maker/src/api-geojson/style' {
|
|
2765
|
+
import type { StyleCollection } from '@mappedin/mvf';
|
|
2766
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/maker/src/api-geojson/map-object';
|
|
2767
|
+
export class Style {
|
|
2768
|
+
#private;
|
|
2769
|
+
/**
|
|
2770
|
+
* @internal
|
|
2771
|
+
*/
|
|
2772
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
2773
|
+
/**
|
|
2774
|
+
* @internal
|
|
2775
|
+
*/
|
|
2776
|
+
constructor({ currentMapGetter }: {
|
|
2777
|
+
currentMapGetter: CurrentMapGetter;
|
|
2778
|
+
});
|
|
2779
|
+
setFromStyleCollection(styleCollection: StyleCollection): void;
|
|
2780
|
+
}
|
|
2781
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
2782
|
+
export {};
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2747
2785
|
declare module '@mappedin/mappedin-js/maker/src/map-view-objects/label' {
|
|
2748
2786
|
/**
|
|
2749
2787
|
* Class representing a label on the {@link MapView}.
|
|
@@ -2859,6 +2897,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/api' {
|
|
|
2859
2897
|
import { Paths } from '@mappedin/mappedin-js/maker/src/api-geojson/paths';
|
|
2860
2898
|
import { BlueDot } from '@mappedin/mappedin-js/maker/src/api-geojson/blue-dot/blue-dot';
|
|
2861
2899
|
import type { TFloorChangeReason } from '@mappedin/mappedin-js/maker/src/events';
|
|
2900
|
+
import { Style } from '@mappedin/mappedin-js/maker/src/api-geojson/style';
|
|
2862
2901
|
export class GeoJsonApi {
|
|
2863
2902
|
core: RendererCore;
|
|
2864
2903
|
outdoors: GeojsonApiMapObject;
|
|
@@ -2876,6 +2915,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/api' {
|
|
|
2876
2915
|
Exporter: Exporter;
|
|
2877
2916
|
Navigation: Navigation;
|
|
2878
2917
|
BlueDot: BlueDot;
|
|
2918
|
+
Style: Style;
|
|
2879
2919
|
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
2880
2920
|
updateState<T extends Space | MapObject | Label | Marker | string | 'walls'>(target: T, state: TUpdateState<T>): void;
|
|
2881
2921
|
update: () => void;
|
|
@@ -3160,7 +3200,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/paths' {
|
|
|
3160
3200
|
* // Add a red path to the map
|
|
3161
3201
|
* map.Paths.add(coordinate, { color: '#ff0000' });
|
|
3162
3202
|
*/
|
|
3163
|
-
add(coordinate: Coordinate[], options?: TAddPathOptions): Path
|
|
3203
|
+
add(coordinate: Coordinate[], options?: TAddPathOptions): Promise<Path>;
|
|
3164
3204
|
/**
|
|
3165
3205
|
* Removes a specific path ({@link Path}) from the map.
|
|
3166
3206
|
* @param path The path to be removed.
|
|
@@ -3284,7 +3324,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/map-object' {
|
|
|
3284
3324
|
import type { Position, AddLabelOptions, RendererCore, MarkerState } from '@mappedin/core-sdk';
|
|
3285
3325
|
import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/maker/src';
|
|
3286
3326
|
import type { GLTFExportOptions, TAnimationOptions } from '@mappedin/mappedin-js/maker/src/types';
|
|
3287
|
-
import type
|
|
3327
|
+
import { type AggregatedStyleMap } from '@mappedin/mappedin-js/maker/src/api-geojson/utils';
|
|
3288
3328
|
import { PubSub } from '@packages/internal/common';
|
|
3289
3329
|
import { StackedMaps } from '@mappedin/mappedin-js/maker/src/api-geojson/stacked-maps/stacked-maps';
|
|
3290
3330
|
import type { TFloorChangeReason } from '@mappedin/mappedin-js/maker/src/events';
|
|
@@ -3332,9 +3372,9 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/map-object' {
|
|
|
3332
3372
|
removeAll: () => void;
|
|
3333
3373
|
};
|
|
3334
3374
|
Paths: {
|
|
3335
|
-
add: (coordinates: Coordinate[], options?: TAddPathOptions) => {
|
|
3375
|
+
add: (coordinates: Coordinate[], options?: TAddPathOptions) => Promise<{
|
|
3336
3376
|
id: string | number;
|
|
3337
|
-
}[]
|
|
3377
|
+
}[]>;
|
|
3338
3378
|
remove: (entityIds: string[]) => void;
|
|
3339
3379
|
};
|
|
3340
3380
|
constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, renderer: RendererCore);
|
|
@@ -3401,10 +3441,16 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/utils' {
|
|
|
3401
3441
|
export function differenceBetweenAngles(a: number, b: number): number;
|
|
3402
3442
|
export function getRelativeBearing(relativeBearingAngle: number, threshold: number): TDirectionInstructionAction['bearing'];
|
|
3403
3443
|
export function convertCollisionRankingTeirToNumber(tier: CollisionRankingTier): number;
|
|
3444
|
+
export type StyleCollectionWithId = {
|
|
3445
|
+
[groupId: string]: WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle> | undefined;
|
|
3446
|
+
};
|
|
3404
3447
|
export type AggregatedStyleMap = {
|
|
3405
|
-
[id: string]:
|
|
3448
|
+
[id: string]: StyleCollectionWithId[keyof StyleCollectionWithId];
|
|
3406
3449
|
};
|
|
3407
3450
|
export function extractStyleMap(styles: StyleCollection): AggregatedStyleMap;
|
|
3408
|
-
export
|
|
3451
|
+
export type WithId<T> = T & {
|
|
3452
|
+
id?: string;
|
|
3453
|
+
};
|
|
3454
|
+
export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon, ObstructionProperties | SpaceProperties>[]>;
|
|
3409
3455
|
}
|
|
3410
3456
|
|