@mappedin/mappedin-js 6.0.1-beta.0 → 6.0.1-beta.2
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/README.md +1 -1
- package/THIRD_PARTY_LICENSES.txt +58 -602
- package/lib/esm/{GLTFExporter-YC3NE427.js → GLTFExporter-KPBXVK2J.js} +1 -1
- package/lib/esm/{GLTFLoader-D47EWL22.js → GLTFLoader-WY3JJZTH.js} +1 -1
- package/lib/esm/{browser-QIMNSDZW.js → browser-YJRMCITR.js} +1 -1
- package/lib/esm/{chunk-GG5LPORK.js → chunk-4GHXJDEX.js} +1 -1
- package/lib/esm/{chunk-LWG6YXE4.js → chunk-BC5TNRJZ.js} +1 -1
- package/lib/esm/chunk-FOZIXWBX.js +950 -0
- package/lib/esm/{chunk-A6EX3TQG.js → chunk-GQMFEIP3.js} +1 -1
- package/lib/esm/{chunk-BGS3EEU5.js → chunk-HGQSHE2E.js} +1 -1
- package/lib/esm/index.css +1 -1
- package/lib/esm/index.d.ts +361 -103
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-2XM6P7XL.js → inspector-HU2N2RIA.js} +3 -3
- package/lib/esm/inspector-XYNFPRUR.css +1 -0
- package/lib/esm/{outdoor-context-v4-L46VWWFC.js → outdoor-context-v4-2EO5ZD2B.js} +1 -1
- package/lib/index.css +1 -1
- package/package.json +3 -3
- package/lib/esm/chunk-75MC2N2Z.js +0 -950
- package/lib/esm/inspector-BG5MSFCC.css +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -281,7 +281,7 @@ declare module '@mappedin/mappedin-js' {
|
|
|
281
281
|
* Asynchronously retrieves map data ({@link MapData}) based on user-provided options.
|
|
282
282
|
*
|
|
283
283
|
* @experimental
|
|
284
|
-
* @param userOptions Options provided by the user to retrieve map data.
|
|
284
|
+
* @param userOptions {TGetMapDataOptions} Options provided by the user to retrieve map data.
|
|
285
285
|
* @returns {Promise<MapData>} Promise resolving to the MapData.
|
|
286
286
|
* @example
|
|
287
287
|
* const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
|
|
@@ -318,11 +318,11 @@ declare module '@mappedin/mappedin-js' {
|
|
|
318
318
|
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, };
|
|
319
319
|
export type * from 'geojson';
|
|
320
320
|
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/mappedin-js/mappedin-js/src/types';
|
|
321
|
-
export type { Label, Marker, Path,
|
|
321
|
+
export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
322
322
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
323
323
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
324
324
|
export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
325
|
-
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Outdoor } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
325
|
+
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
326
326
|
export { analytics };
|
|
327
327
|
}
|
|
328
328
|
|
|
@@ -593,6 +593,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
593
593
|
* Represents a map of entrance IDs to obstruction IDs.
|
|
594
594
|
*/
|
|
595
595
|
readonly obstructionIdByEntranceId: Record<string, string>;
|
|
596
|
+
doorsByNodeId: Record<string, Door>;
|
|
596
597
|
/**
|
|
597
598
|
* @internal
|
|
598
599
|
*/
|
|
@@ -700,7 +701,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
700
701
|
}
|
|
701
702
|
|
|
702
703
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
703
|
-
import type { RendererCore } from '@mappedin/core-sdk';
|
|
704
|
+
import type { RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
|
|
704
705
|
import { PubSub } from '@packages/internal/common';
|
|
705
706
|
import { type TEvents, type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
706
707
|
import type { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
@@ -711,7 +712,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
711
712
|
import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
712
713
|
import type { Label, Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
713
714
|
import type { TEventPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
714
|
-
import type {
|
|
715
|
+
import type { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
|
|
715
716
|
export class MapView extends PubSub<TEvents> {
|
|
716
717
|
#private;
|
|
717
718
|
/**
|
|
@@ -755,7 +756,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
755
756
|
/**
|
|
756
757
|
* Controls custom GeoJSON geometry on the map
|
|
757
758
|
*/
|
|
758
|
-
|
|
759
|
+
Shapes: Shapes;
|
|
759
760
|
/**
|
|
760
761
|
* Controls for the outdoor map.
|
|
761
762
|
*/
|
|
@@ -823,6 +824,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
823
824
|
* The current floor ({@link Floor}) of the map.
|
|
824
825
|
*/
|
|
825
826
|
get currentFloor(): Floor;
|
|
827
|
+
/**
|
|
828
|
+
* Updates the watermark on the map.
|
|
829
|
+
*
|
|
830
|
+
* @param options {WatermarkOptions}
|
|
831
|
+
* @hidden
|
|
832
|
+
*/
|
|
833
|
+
updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
|
|
826
834
|
getState<T extends Space | MapObject | Label | Marker | string>(target: T): TGetState<T> | undefined;
|
|
827
835
|
setHoverColor(c: string): void;
|
|
828
836
|
getHoverColor(): string | undefined;
|
|
@@ -926,13 +934,14 @@ declare module '@mappedin/mappedin-js/geojson/src' {
|
|
|
926
934
|
import type { Position } from '@mappedin/mappedin-js/geojson/src/types/geometry';
|
|
927
935
|
import type { InsetPadding, RendererCoreOptions, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload } from '@mappedin/mappedin-js/geojson/src/types';
|
|
928
936
|
import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
929
|
-
import type {
|
|
937
|
+
import type { ShapeState, CustomGeometryBuilder } from '@mappedin/mappedin-js/geojson/src/components/custom';
|
|
930
938
|
import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
|
|
931
939
|
import RendererCore, { type MapViewState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
932
940
|
import type { Camera, AnimateToOptions, FocusOnOptions, EasingCurve } from '@mappedin/mappedin-js/geojson/src/camera';
|
|
933
941
|
import { mountSceneGraphVisualizer } from '@mappedin/mappedin-js/geojson/examples/src/utils/scene-graph-visualizer';
|
|
934
942
|
import '../../packages/outdoor-context-v4/css/maplibre-gl.css';
|
|
935
943
|
import type { CollisionRankingTier } from '@mappedin/mappedin-js/geojson/src/utils/collision-ranking-tier';
|
|
944
|
+
export { Navigator } from '@mappedin/mappedin-js/packages/geojson-navigator';
|
|
936
945
|
export { interpolate, debounce } from '@mappedin/mappedin-js/geojson/src/utils';
|
|
937
946
|
export { MAPPEDIN_LAYER_ID } from '@mappedin/mappedin-js/geojson/src/utils/constants';
|
|
938
947
|
/**
|
|
@@ -947,7 +956,7 @@ declare module '@mappedin/mappedin-js/geojson/src' {
|
|
|
947
956
|
export type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
|
|
948
957
|
export type { AttributionControlOptions, AttributionPosition } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
|
|
949
958
|
export { ATTRIBUTION_POSITIONS } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
|
|
950
|
-
export type { AddPathOptions, AddMarkerOptions, AddLabelOptions, AnimateToOptions, FocusOnOptions, MapViewState, MarkerState, PathState, GroupContainerState, GeometryGroupState,
|
|
959
|
+
export type { AddPathOptions, AddMarkerOptions, AddLabelOptions, AnimateToOptions, FocusOnOptions, MapViewState, MarkerState, PathState, GroupContainerState, GeometryGroupState, ShapeState, CustomGeometryBuilder, LabelState, GeometryState, ModelState, EasingCurve, Camera, InsetPadding, Position, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload, CollisionRankingTier, LabelAppearance, RendererCore, };
|
|
951
960
|
export function createRenderer(container: HTMLElement, options?: RendererCoreOptions & {
|
|
952
961
|
[key: string]: any;
|
|
953
962
|
}): Promise<RendererCore>;
|
|
@@ -1297,18 +1306,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1297
1306
|
* @defaultValue 0.4
|
|
1298
1307
|
*/
|
|
1299
1308
|
farRadius?: number;
|
|
1300
|
-
/**
|
|
1301
|
-
* Zoom level in meters where the path size is `nearRadius`.
|
|
1302
|
-
*
|
|
1303
|
-
* @defaultValue 5
|
|
1304
|
-
*/
|
|
1305
|
-
nearZoom?: number;
|
|
1306
|
-
/**
|
|
1307
|
-
* Zoom level in meters where the path size is `farRadius`.
|
|
1308
|
-
*
|
|
1309
|
-
* @defaultValue 1000
|
|
1310
|
-
*/
|
|
1311
|
-
farZoom?: number;
|
|
1312
1309
|
/**
|
|
1313
1310
|
* Duration of path drawing in milliseconds.
|
|
1314
1311
|
*
|
|
@@ -1676,7 +1673,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects' {
|
|
|
1676
1673
|
export { Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/model';
|
|
1677
1674
|
export { Path } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
|
|
1678
1675
|
export { CameraTransform } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform';
|
|
1679
|
-
export {
|
|
1676
|
+
export { Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape';
|
|
1680
1677
|
}
|
|
1681
1678
|
|
|
1682
1679
|
declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
@@ -1776,6 +1773,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
|
|
|
1776
1773
|
export { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera';
|
|
1777
1774
|
export { Labels } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels';
|
|
1778
1775
|
export { Markers } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers';
|
|
1776
|
+
export { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
|
|
1779
1777
|
export { Models } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models';
|
|
1780
1778
|
export { Paths } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths';
|
|
1781
1779
|
export { Exporter } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/exporter';
|
|
@@ -2023,6 +2021,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
|
2023
2021
|
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2024
2022
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
2025
2023
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
2024
|
+
import Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
|
|
2026
2025
|
/**
|
|
2027
2026
|
* Represents the various types of spaces that can be defined within a map.
|
|
2028
2027
|
* - 'room': A standard room or enclosed area.
|
|
@@ -2084,6 +2083,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
|
2084
2083
|
* @throws Will throw an error if the floor is not found.
|
|
2085
2084
|
*/
|
|
2086
2085
|
get floor(): Floor;
|
|
2086
|
+
/**
|
|
2087
|
+
* Gets the array of {@link Door}s associated with the space.
|
|
2088
|
+
*
|
|
2089
|
+
* @returns {Door[]} The doors array.
|
|
2090
|
+
*/
|
|
2091
|
+
get doors(): Door[];
|
|
2087
2092
|
/**
|
|
2088
2093
|
* Gets the center {@link Coordinate} of the space.
|
|
2089
2094
|
*
|
|
@@ -3029,7 +3034,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3029
3034
|
* Asynchronously retrieves map data ({@link MapData}) based on user-provided options.
|
|
3030
3035
|
*
|
|
3031
3036
|
* @experimental
|
|
3032
|
-
* @param userOptions Options provided by the user to retrieve map data.
|
|
3037
|
+
* @param userOptions {TGetMapDataOptions} Options provided by the user to retrieve map data.
|
|
3033
3038
|
* @returns {Promise<MapData>} Promise resolving to the MapData.
|
|
3034
3039
|
* @example
|
|
3035
3040
|
* const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
|
|
@@ -3066,11 +3071,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3066
3071
|
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, };
|
|
3067
3072
|
export type * from 'geojson';
|
|
3068
3073
|
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/mappedin-js/mappedin-js/src/types';
|
|
3069
|
-
export type { Label, Marker, Path,
|
|
3074
|
+
export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3070
3075
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
3071
3076
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3072
3077
|
export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3073
|
-
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Outdoor } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
3078
|
+
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
3074
3079
|
export { analytics };
|
|
3075
3080
|
}
|
|
3076
3081
|
|
|
@@ -3101,13 +3106,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-
|
|
|
3101
3106
|
}
|
|
3102
3107
|
}
|
|
3103
3108
|
|
|
3104
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/
|
|
3109
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes' {
|
|
3105
3110
|
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
3106
|
-
import {
|
|
3111
|
+
import { Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3107
3112
|
import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
|
|
3108
3113
|
import type { LineStyle, PaintStyle } from '@mappedin/core-sdk';
|
|
3109
3114
|
import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3110
|
-
export class
|
|
3115
|
+
export class Shapes {
|
|
3111
3116
|
#private;
|
|
3112
3117
|
/**
|
|
3113
3118
|
* @internal
|
|
@@ -3122,31 +3127,31 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/custom-geometr
|
|
|
3122
3127
|
/**
|
|
3123
3128
|
* @internal
|
|
3124
3129
|
*/
|
|
3125
|
-
getById(id: string):
|
|
3130
|
+
getById(id: string): Shape | undefined;
|
|
3126
3131
|
/**
|
|
3127
|
-
* Adds a custom GeoJSON geometry ({@link
|
|
3132
|
+
* Adds a custom GeoJSON geometry ({@link Shape}) to the map.
|
|
3128
3133
|
*
|
|
3129
3134
|
* @param geometry a valid GeoJSON feature collection
|
|
3130
3135
|
* @param style
|
|
3131
3136
|
* @param floor Floor to add the geometry to
|
|
3132
|
-
* @returns {
|
|
3137
|
+
* @returns {Shape | undefined} The created shapes, or undefined if creation failed.
|
|
3133
3138
|
* @example
|
|
3134
3139
|
*
|
|
3135
|
-
* map.
|
|
3140
|
+
* map.Shapes.add(polygons, { color: 'red' }, mapView.currentFloor);
|
|
3136
3141
|
*/
|
|
3137
|
-
add<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, floor?: Floor):
|
|
3142
|
+
add<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, floor?: Floor): Shape;
|
|
3138
3143
|
/**
|
|
3139
|
-
* Removes a specific
|
|
3140
|
-
* @param
|
|
3144
|
+
* Removes a specific shapes ({@link Shape}) from the map.
|
|
3145
|
+
* @param shapes The shapes to be removed.
|
|
3141
3146
|
* @example
|
|
3142
|
-
* map.
|
|
3147
|
+
* map.Shapes.remove(geo);
|
|
3143
3148
|
*/
|
|
3144
|
-
remove(
|
|
3149
|
+
remove(shapes: Shape): void;
|
|
3145
3150
|
/**
|
|
3146
|
-
* Removes all
|
|
3151
|
+
* Removes all Shapes ({@link Shape}) from the map.
|
|
3147
3152
|
*
|
|
3148
3153
|
* @example
|
|
3149
|
-
* map.
|
|
3154
|
+
* map.Shapes.removeAll();
|
|
3150
3155
|
*/
|
|
3151
3156
|
removeAll(): string[];
|
|
3152
3157
|
}
|
|
@@ -3874,11 +3879,11 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
3874
3879
|
import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
|
|
3875
3880
|
import type { LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
3876
3881
|
import type { MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
3877
|
-
import type {
|
|
3882
|
+
import type { ShapeState } from '@mappedin/mappedin-js/geojson/src/components/custom';
|
|
3878
3883
|
/**
|
|
3879
3884
|
* The state of an entity, which can be a geometry, geometry group, group container, path, model, label, or marker.
|
|
3880
3885
|
*/
|
|
3881
|
-
export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState |
|
|
3886
|
+
export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ShapeState;
|
|
3882
3887
|
/**
|
|
3883
3888
|
* 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
|
|
3884
3889
|
* to `getState` and `setState` of the entity.
|
|
@@ -4101,6 +4106,11 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
4101
4106
|
* Fired when the user stops interacting with the map.
|
|
4102
4107
|
*/
|
|
4103
4108
|
'user-interaction-end': undefined;
|
|
4109
|
+
/**
|
|
4110
|
+
* Fired when a geometry is in focus, meaning it occupies the area closest to the center of the screen. This will only be true for one geometry at a time.
|
|
4111
|
+
* Geometries can be added to the focus listener via `mapView.setState(.., { focusable: true })`.
|
|
4112
|
+
*/
|
|
4113
|
+
'geometry-in-focus': string | number | null;
|
|
4104
4114
|
};
|
|
4105
4115
|
/**
|
|
4106
4116
|
* The payload of an event. See also {@link MapEvent}.
|
|
@@ -4111,7 +4121,7 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
4111
4121
|
}
|
|
4112
4122
|
|
|
4113
4123
|
declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
4114
|
-
import type { Texture, BufferGeometry, LineSegments } from 'three';
|
|
4124
|
+
import type { Texture, BufferGeometry, LineSegments, Mesh } from 'three';
|
|
4115
4125
|
import { BatchedMesh, Color, Vector3 } from 'three';
|
|
4116
4126
|
import type { BatchedStandardMaterial } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material';
|
|
4117
4127
|
import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
|
|
@@ -4167,10 +4177,15 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
|
4167
4177
|
* Whether the geometry is outlined with a 30% darkened color. This effect adds lines around the geometry to make it stand out.
|
|
4168
4178
|
*/
|
|
4169
4179
|
outline: boolean;
|
|
4180
|
+
/**
|
|
4181
|
+
* Whether the geometry should emit an event when focused on by the center of the camera
|
|
4182
|
+
*/
|
|
4183
|
+
focusable: boolean;
|
|
4170
4184
|
};
|
|
4171
4185
|
export class MeshComponent {
|
|
4172
4186
|
#private;
|
|
4173
4187
|
mesh?: EntityBatchedMesh;
|
|
4188
|
+
focusMesh?: Mesh;
|
|
4174
4189
|
outline?: LineSegments;
|
|
4175
4190
|
readonly type = "geometry";
|
|
4176
4191
|
instanceIndex: number;
|
|
@@ -4181,6 +4196,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
|
4181
4196
|
get visible(): boolean;
|
|
4182
4197
|
set visible(visible: boolean);
|
|
4183
4198
|
setOpacity(opacity: number): void;
|
|
4199
|
+
focusable: boolean;
|
|
4184
4200
|
color: Color;
|
|
4185
4201
|
topColor: Color;
|
|
4186
4202
|
setColor(color: string, topColor: string): void;
|
|
@@ -4209,7 +4225,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/custom' {
|
|
|
4209
4225
|
/**
|
|
4210
4226
|
* State representing a Custom Geometry
|
|
4211
4227
|
*/
|
|
4212
|
-
export type
|
|
4228
|
+
export type ShapeState = {
|
|
4213
4229
|
readonly id: string;
|
|
4214
4230
|
readonly type: 'custom-geometry';
|
|
4215
4231
|
/**
|
|
@@ -4346,17 +4362,20 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4346
4362
|
import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
|
|
4347
4363
|
import { DOMResizeSystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-resize/system';
|
|
4348
4364
|
import { Camera } from '@mappedin/mappedin-js/geojson/src/camera';
|
|
4349
|
-
import { WatermarkSystem } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
|
|
4365
|
+
import { type WatermarkOptions, WatermarkSystem } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
|
|
4350
4366
|
import { PanBoundsSystem } from '@mappedin/mappedin-js/geojson/src/systems/pan-bounds/system';
|
|
4351
4367
|
import { HTMLControlsSystem } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
|
|
4352
|
-
import { type CustomGeometryBuilder, type
|
|
4368
|
+
import { type CustomGeometryBuilder, type ShapeState } from '@mappedin/mappedin-js/geojson/src/components/custom';
|
|
4353
4369
|
import { CustomGeometrySystem } from '@mappedin/mappedin-js/geojson/src/systems/custom-geometry/system';
|
|
4354
4370
|
import { OutlineInterpolationSystem } from '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/system';
|
|
4371
|
+
import { GeometryInFocusSystem } from '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/system';
|
|
4355
4372
|
import { OutdoorLayers } from '@mappedin/mappedin-js/geojson/src/systems/outdoor-layers/system';
|
|
4356
4373
|
import { PathSystem } from '@mappedin/mappedin-js/geojson/src/systems/path';
|
|
4357
4374
|
export type * from '@mappedin/mappedin-js/geojson/src/types';
|
|
4358
4375
|
export const raycaster: Raycaster;
|
|
4359
4376
|
export const DEFAULT_ZOOM_LEVEL = 18;
|
|
4377
|
+
export const DEFAULT_MIN_ZOOM_LEVEL = 12;
|
|
4378
|
+
export const DEFAULT_MAX_ZOOM_LEVEL = 22;
|
|
4360
4379
|
export const DEFAULT_PITCH = 0;
|
|
4361
4380
|
export const DEFAULT_BEARING = 0;
|
|
4362
4381
|
/**
|
|
@@ -4382,6 +4401,8 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4382
4401
|
insetsPadding: InsetPadding;
|
|
4383
4402
|
shouldMeasureCanvas: boolean;
|
|
4384
4403
|
pixelRatio: number;
|
|
4404
|
+
canvasWidth: number;
|
|
4405
|
+
canvasHeight: number;
|
|
4385
4406
|
};
|
|
4386
4407
|
export type Systems = {
|
|
4387
4408
|
cameraSystem: CameraSystem;
|
|
@@ -4406,6 +4427,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4406
4427
|
outlineInterpolationSystem: OutlineInterpolationSystem;
|
|
4407
4428
|
outdoorLayersSystem: OutdoorLayers;
|
|
4408
4429
|
pathSystem: PathSystem;
|
|
4430
|
+
geometryInFocusSystem: GeometryInFocusSystem;
|
|
4409
4431
|
};
|
|
4410
4432
|
export type MapViewState = {
|
|
4411
4433
|
readonly type: 'map-view';
|
|
@@ -4458,7 +4480,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4458
4480
|
addCustomGeometry(id: string, feature: Feature<Point>, builder: CustomGeometryBuilder, style?: {
|
|
4459
4481
|
visible?: boolean;
|
|
4460
4482
|
altitude?: number;
|
|
4461
|
-
}, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<
|
|
4483
|
+
}, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<ShapeState>;
|
|
4462
4484
|
/**
|
|
4463
4485
|
* Add a geometry group from GeoJSON data
|
|
4464
4486
|
*/
|
|
@@ -4479,6 +4501,12 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4479
4501
|
* Add a Path along a set of GeoJSON coordinates that can be animated.
|
|
4480
4502
|
*/
|
|
4481
4503
|
addPath(geometry: FeatureCollection<Point, any>, options?: AddPathOptions, parent?: EntityId<GroupContainerState> | string | null): EntityId<PathState>;
|
|
4504
|
+
/**
|
|
4505
|
+
* Updates the watermark on the map.
|
|
4506
|
+
*
|
|
4507
|
+
* @param options {WatermarkOptions}
|
|
4508
|
+
*/
|
|
4509
|
+
updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
|
|
4482
4510
|
/**
|
|
4483
4511
|
* @deprecated
|
|
4484
4512
|
* @TODO: remove this method and do this in setstate instead
|
|
@@ -4515,9 +4543,9 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4515
4543
|
* Get the current state of the map view, or any entity that was added, regardless of whether it is visible in the scene
|
|
4516
4544
|
*/
|
|
4517
4545
|
getState(): MapViewState;
|
|
4518
|
-
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> ?
|
|
4546
|
+
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;
|
|
4519
4547
|
getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
|
|
4520
|
-
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 ?
|
|
4548
|
+
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;
|
|
4521
4549
|
/**
|
|
4522
4550
|
* Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
|
|
4523
4551
|
*/
|
|
@@ -4527,7 +4555,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4527
4555
|
setState<T extends EntityId<GeometryGroupState>>(object: T | T['id'], state: Partial<GeometryGroupState>): void;
|
|
4528
4556
|
setState<T extends EntityId<GroupContainerState>>(object: T | T['id'], state: Partial<GroupContainerState>): void;
|
|
4529
4557
|
setState<T extends EntityId<GeometryState>>(object: T | T['id'], state: Partial<GeometryState>): void;
|
|
4530
|
-
setState<T extends EntityId<
|
|
4558
|
+
setState<T extends EntityId<ShapeState>>(object: T | T['id'], state: Partial<ShapeState>): void;
|
|
4531
4559
|
setState<T extends EntityId<PathState>>(object: T | T['id'], state: Partial<PathState>): void;
|
|
4532
4560
|
setState<T extends EntityId<ModelState>>(object: T | T['id'], state: Partial<ModelState>): void;
|
|
4533
4561
|
setState<T extends EntityState>(object: T | T['id'], state: Partial<T>): void;
|
|
@@ -4722,12 +4750,14 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
|
|
|
4722
4750
|
* How far out the camera can zoom
|
|
4723
4751
|
*
|
|
4724
4752
|
* @param zoomLevel The minimum zoom level in mercator zoom level units.
|
|
4753
|
+
* @default 0
|
|
4725
4754
|
*/
|
|
4726
4755
|
setMinZoomLevel(zoomLevel: number): void;
|
|
4727
4756
|
/**
|
|
4728
4757
|
* How far in the camera can zoom
|
|
4729
4758
|
*
|
|
4730
4759
|
* @param zoomLevel The maximum zoom level in mercator zoom level units.
|
|
4760
|
+
* @default Infinity
|
|
4731
4761
|
*/
|
|
4732
4762
|
setMaxZoomLevel(zoomLevel: number): void;
|
|
4733
4763
|
/**
|
|
@@ -4826,6 +4856,10 @@ declare module '@mappedin/mappedin-js/geojson/src/utils/collision-ranking-tier'
|
|
|
4826
4856
|
export function convertNumberToCollisionRankingTier(rank: number): CollisionRankingTier;
|
|
4827
4857
|
}
|
|
4828
4858
|
|
|
4859
|
+
declare module '@mappedin/mappedin-js/packages/geojson-navigator' {
|
|
4860
|
+
export * from '@mappedin/mappedin-js/packages/geojson-navigator/src';
|
|
4861
|
+
}
|
|
4862
|
+
|
|
4829
4863
|
declare module '@mappedin/mappedin-js/geojson/src/utils' {
|
|
4830
4864
|
import type { Box3, Camera as THREECamera } from 'three';
|
|
4831
4865
|
import { Box2 } from 'three';
|
|
@@ -4973,6 +5007,7 @@ declare module '@mappedin/mappedin-js/geojson/src/services/renderer' {
|
|
|
4973
5007
|
|
|
4974
5008
|
declare module '@mappedin/mappedin-js/geojson/src/systems/watermark/system' {
|
|
4975
5009
|
import type { PerspectiveCamera } from 'three';
|
|
5010
|
+
import { PubSub } from '@packages/internal/common';
|
|
4976
5011
|
import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities';
|
|
4977
5012
|
import type { QuadTree } from '@packages/internal/quad-tree';
|
|
4978
5013
|
export type WatermarkPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center' | 'top' | 'bottom' | 'left' | 'right';
|
|
@@ -5012,10 +5047,13 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/watermark/system' {
|
|
|
5012
5047
|
*/
|
|
5013
5048
|
onClick?: () => void;
|
|
5014
5049
|
};
|
|
5015
|
-
export class WatermarkSystem {
|
|
5050
|
+
export class WatermarkSystem extends PubSub<{
|
|
5051
|
+
'texture-loaded': void;
|
|
5052
|
+
}> {
|
|
5016
5053
|
#private;
|
|
5017
|
-
options: Required<WatermarkOptions>;
|
|
5018
5054
|
dirty: boolean;
|
|
5055
|
+
get options(): WatermarkOptions;
|
|
5056
|
+
set options(options: WatermarkOptions);
|
|
5019
5057
|
get icon(): string;
|
|
5020
5058
|
constructor(cameraObject: PerspectiveCamera, canvasWidth: number, canvasHeight: number, rendererState: any, options?: WatermarkOptions);
|
|
5021
5059
|
get width(): number;
|
|
@@ -5327,31 +5365,31 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
|
|
|
5327
5365
|
}
|
|
5328
5366
|
}
|
|
5329
5367
|
|
|
5330
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/
|
|
5368
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape' {
|
|
5331
5369
|
/**
|
|
5332
|
-
* Class representing
|
|
5370
|
+
* Class representing GeoJSON shape on the {@link MapView}.
|
|
5333
5371
|
*
|
|
5334
5372
|
*/
|
|
5335
|
-
export class
|
|
5373
|
+
export class Shape {
|
|
5336
5374
|
/**
|
|
5337
|
-
*
|
|
5375
|
+
* id of Shape
|
|
5338
5376
|
*/
|
|
5339
5377
|
readonly id: string;
|
|
5340
5378
|
/**
|
|
5341
5379
|
* @internal
|
|
5342
5380
|
*/
|
|
5343
|
-
static readonly __type = "
|
|
5381
|
+
static readonly __type = "Shape";
|
|
5344
5382
|
/**
|
|
5345
5383
|
* @internal
|
|
5346
5384
|
*/
|
|
5347
|
-
readonly __type = "
|
|
5385
|
+
readonly __type = "Shape";
|
|
5348
5386
|
/**
|
|
5349
|
-
* Checks if the provided instance is of type
|
|
5387
|
+
* Checks if the provided instance is of type Shape.
|
|
5350
5388
|
*
|
|
5351
5389
|
* @param instance The instance to check.
|
|
5352
|
-
* @returns {boolean} True if the instance is a
|
|
5390
|
+
* @returns {boolean} True if the instance is a Shape, false otherwise.
|
|
5353
5391
|
*/
|
|
5354
|
-
static is(instance: object): instance is
|
|
5392
|
+
static is(instance: object): instance is Shape;
|
|
5355
5393
|
/**
|
|
5356
5394
|
* @internal
|
|
5357
5395
|
*/
|
|
@@ -5360,7 +5398,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/custom-ge
|
|
|
5360
5398
|
}
|
|
5361
5399
|
|
|
5362
5400
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
5363
|
-
import type { Position, RendererCore } from '@mappedin/core-sdk';
|
|
5401
|
+
import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
|
|
5364
5402
|
import { type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
5365
5403
|
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
5366
5404
|
import { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
@@ -5379,7 +5417,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
5379
5417
|
import { Paths } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths';
|
|
5380
5418
|
import { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
5381
5419
|
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
5382
|
-
import {
|
|
5420
|
+
import { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
|
|
5383
5421
|
import { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
|
|
5384
5422
|
import Outdoor from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
|
|
5385
5423
|
export class GeoJsonApi {
|
|
@@ -5402,7 +5440,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
5402
5440
|
Navigation: Navigation;
|
|
5403
5441
|
Outdoor: Outdoor;
|
|
5404
5442
|
BlueDot: BlueDot;
|
|
5405
|
-
|
|
5443
|
+
Shapes: Shapes;
|
|
5406
5444
|
Style: Style;
|
|
5407
5445
|
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
5408
5446
|
updateState<T extends Space | MapObject | Label | Marker | 'walls' | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
@@ -5415,6 +5453,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
5415
5453
|
collapse(): Promise<void> | undefined;
|
|
5416
5454
|
addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
|
|
5417
5455
|
setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
|
|
5456
|
+
updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
|
|
5418
5457
|
get currentFloor(): Floor;
|
|
5419
5458
|
getState<T extends Space | MapObject | Label | Marker | Model | string>(target: T): TGetState<T> | undefined;
|
|
5420
5459
|
setHoverColor(c: string): void;
|
|
@@ -5514,6 +5553,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
|
|
|
5514
5553
|
* Update the minimum zoom level of the camera in mercator zoom levels.
|
|
5515
5554
|
* @param zoomLevel The new minimum zoom level.
|
|
5516
5555
|
* @see https://wiki.openstreetmap.org/wiki/Zoom_levels
|
|
5556
|
+
* @default 22
|
|
5517
5557
|
*/
|
|
5518
5558
|
setMinZoomLevel: (zoomLevel: number) => void;
|
|
5519
5559
|
/**
|
|
@@ -5526,6 +5566,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
|
|
|
5526
5566
|
* Update the maximum zoom level of the camera in mercator zoom levels.
|
|
5527
5567
|
* @param zoomLevel The new maximum zoom level.
|
|
5528
5568
|
* @see https://wiki.openstreetmap.org/wiki/Zoom_levels
|
|
5569
|
+
* @default 12
|
|
5529
5570
|
*/
|
|
5530
5571
|
setMaxZoomLevel: (zoomLevel: number) => void;
|
|
5531
5572
|
}
|
|
@@ -5938,7 +5979,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
5938
5979
|
import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
5939
5980
|
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
5940
5981
|
import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
|
|
5941
|
-
import type {
|
|
5982
|
+
import type { Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
5942
5983
|
export class GeojsonApiMapObject extends PubSub<{
|
|
5943
5984
|
'floor-change': {
|
|
5944
5985
|
reason?: TFloorChangeReason;
|
|
@@ -5976,11 +6017,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
|
5976
6017
|
Exporter: {
|
|
5977
6018
|
getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
|
|
5978
6019
|
};
|
|
5979
|
-
|
|
6020
|
+
Shapes: {
|
|
5980
6021
|
add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
|
|
5981
6022
|
floorId?: string;
|
|
5982
6023
|
}) => string;
|
|
5983
|
-
remove: (customGeometry:
|
|
6024
|
+
remove: (customGeometry: Shape) => string;
|
|
5984
6025
|
};
|
|
5985
6026
|
Labels: {
|
|
5986
6027
|
all: ({ onCreate }: {
|
|
@@ -6757,6 +6798,24 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/
|
|
|
6757
6798
|
}
|
|
6758
6799
|
}
|
|
6759
6800
|
|
|
6801
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/system' {
|
|
6802
|
+
import { PubSub } from '@packages/internal/common';
|
|
6803
|
+
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
6804
|
+
import { type PerspectiveCamera } from 'three';
|
|
6805
|
+
export class GeometryInFocusSystem extends PubSub<{
|
|
6806
|
+
'geometry-in-focus': string | number | null;
|
|
6807
|
+
}> {
|
|
6808
|
+
#private;
|
|
6809
|
+
cameraDirty: boolean;
|
|
6810
|
+
focusablesDirty: boolean;
|
|
6811
|
+
constructor(state: RendererState, camera: PerspectiveCamera);
|
|
6812
|
+
resize(): void;
|
|
6813
|
+
update: () => void;
|
|
6814
|
+
updateRaf(): void;
|
|
6815
|
+
destroy(): void;
|
|
6816
|
+
}
|
|
6817
|
+
}
|
|
6818
|
+
|
|
6760
6819
|
declare module '@mappedin/mappedin-js/geojson/src/systems/outdoor-layers/system' {
|
|
6761
6820
|
import type { Map } from '@packages/internal/outdoor-context-v4';
|
|
6762
6821
|
import type { Position } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
@@ -6772,6 +6831,15 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/path' {
|
|
|
6772
6831
|
export { PathSystem } from '@mappedin/mappedin-js/geojson/src/systems/path/system';
|
|
6773
6832
|
}
|
|
6774
6833
|
|
|
6834
|
+
declare module '@mappedin/mappedin-js/packages/geojson-navigator/src' {
|
|
6835
|
+
export { Navigator } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator';
|
|
6836
|
+
export type { SimplifyDirectionsOptions } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator/navigator';
|
|
6837
|
+
export type { NodeCollection, NodeProperties, NodeFeature, NodeNeighbor } from '@mappedin/mappedin-js/packages/geojson-navigator/src/types/node';
|
|
6838
|
+
export type { ObstructionCollection, ObstructionProperties, ObstructionFeature } from '@mappedin/mappedin-js/packages/geojson-navigator/src/types/obstruction';
|
|
6839
|
+
export type { DirectionsCollection, DirectionProperties, DirectionFeature } from '@mappedin/mappedin-js/packages/geojson-navigator/src/types/directions';
|
|
6840
|
+
export type { CoordinateFeature, CoordinateProperties } from '@mappedin/mappedin-js/packages/geojson-navigator/src/types/coordinate';
|
|
6841
|
+
}
|
|
6842
|
+
|
|
6775
6843
|
declare module '@mappedin/mappedin-js/geojson/src/utils/bounding-box' {
|
|
6776
6844
|
import { type Box3, Vector3 } from 'three';
|
|
6777
6845
|
export function getCornersOfBoundingBox(boundingBox: Box3): Vector3[];
|
|
@@ -7018,6 +7086,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
|
|
|
7018
7086
|
hasTouched: boolean;
|
|
7019
7087
|
onPointerMoveRaf: (event: PointerEvent) => void;
|
|
7020
7088
|
tapsControl: TapsController;
|
|
7089
|
+
handleHover(e?: PointerEvent): void;
|
|
7021
7090
|
dirty3D: boolean;
|
|
7022
7091
|
get _hitBoxes(): {
|
|
7023
7092
|
entities: (Object3D | EntityMesh<Geometry3D> | EntityBatchedMesh)[];
|
|
@@ -7157,26 +7226,28 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
|
|
|
7157
7226
|
* This is actually the minium distance the camera can get from it's anchor on the ground. May be worth changing if your map has very tall buildings to avoid the camera clipping through them.
|
|
7158
7227
|
*
|
|
7159
7228
|
* @property minZoomAltitude {Number}
|
|
7160
|
-
* @default
|
|
7229
|
+
* @default 0
|
|
7161
7230
|
*/
|
|
7162
7231
|
minZoomAltitude: number;
|
|
7232
|
+
/**
|
|
7233
|
+
* Maximum distance the camera can get from it's anchor on the ground. Setting this too high will result in parts of the map falling out of the camera's clipping plane and disappearing.
|
|
7234
|
+
*
|
|
7235
|
+
* @property maxZoomAltitude {Number}
|
|
7236
|
+
* @default Infinity
|
|
7237
|
+
*/
|
|
7238
|
+
maxZoomAltitude: number;
|
|
7163
7239
|
/**
|
|
7164
7240
|
* How far the camera can zoom in towards the ground.
|
|
7165
7241
|
*
|
|
7166
7242
|
* This is equivalent to the minZoomAltitude property in mercator zoom level units.
|
|
7243
|
+
* @default 0
|
|
7167
7244
|
*/
|
|
7168
7245
|
get maxZoomLevel(): number;
|
|
7169
7246
|
/**
|
|
7170
7247
|
* Sets distance the camera can zoom in towards the ground.
|
|
7248
|
+
* @default Infinity
|
|
7171
7249
|
*/
|
|
7172
7250
|
setMaxZoomLevel(zoomLevel: number): void;
|
|
7173
|
-
/**
|
|
7174
|
-
* Maximum distance the camera can get from it's anchor on the ground. Setting this too high will result in parts of the map falling out of the camera's clipping plane and disappearing.
|
|
7175
|
-
*
|
|
7176
|
-
* @property maxZoomAltitude {Number}
|
|
7177
|
-
* @default 10000
|
|
7178
|
-
*/
|
|
7179
|
-
maxZoomAltitude: number;
|
|
7180
7251
|
/**
|
|
7181
7252
|
* How far the camera can zoom out away from the ground.
|
|
7182
7253
|
*
|
|
@@ -7187,27 +7258,11 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
|
|
|
7187
7258
|
* Sets distance the camera can zoom away from the ground.
|
|
7188
7259
|
*/
|
|
7189
7260
|
setMinZoomLevel(zoomLevel: number): void;
|
|
7190
|
-
/**
|
|
7191
|
-
* Initial min zoom; zoom cannot be restricted beyond this.
|
|
7192
|
-
*
|
|
7193
|
-
* @property initialMinZoom {Number}
|
|
7194
|
-
* @default 5
|
|
7195
|
-
*/
|
|
7196
|
-
initialMinZoom: number;
|
|
7197
|
-
/**
|
|
7198
|
-
* Initial max zoom; zoom cannot be restricted beyond this.
|
|
7199
|
-
*
|
|
7200
|
-
* @property initialMaxZoom {Number}
|
|
7201
|
-
* @default 10000
|
|
7202
|
-
*/
|
|
7203
|
-
initialMaxZoom: number;
|
|
7204
7261
|
/**
|
|
7205
7262
|
* ignoreZoomLimits; use with caution for special effects
|
|
7206
7263
|
* @default false
|
|
7207
7264
|
*/
|
|
7208
7265
|
ignoreZoomLimits: boolean;
|
|
7209
|
-
minExpandedZoom: number;
|
|
7210
|
-
maxExpandedZoom: number;
|
|
7211
7266
|
/**
|
|
7212
7267
|
* Multiplier for min and max zoom, for convenience.
|
|
7213
7268
|
*
|
|
@@ -7460,20 +7515,6 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
|
|
|
7460
7515
|
* @param zoom {Number} The distance to increase or decrease the zoom.
|
|
7461
7516
|
*/
|
|
7462
7517
|
zoom: (zoomDelta: number) => void;
|
|
7463
|
-
/**
|
|
7464
|
-
* Expands the zoom limits to allow zooming to the specified distance.
|
|
7465
|
-
*
|
|
7466
|
-
* @param zoom {Number} The distance to allow zooming to.
|
|
7467
|
-
* @param buffer {Number} The factor by which the user should be able to zoom beyond the specified distance.
|
|
7468
|
-
*/
|
|
7469
|
-
expandZoomLimits: (zoom: number, buffer: number) => void;
|
|
7470
|
-
/**
|
|
7471
|
-
* Restricts the zoom limits, but will not restrict beyond the current zoom level.
|
|
7472
|
-
*
|
|
7473
|
-
* @param zoom {Number} The number to limit zooming to.
|
|
7474
|
-
* @param buffer {Number} The factor by which the user should be able to zoom beyond the specified distance.
|
|
7475
|
-
*/
|
|
7476
|
-
restrictZoomLimits: (zoom: number, buffer: number) => void;
|
|
7477
7518
|
/**
|
|
7478
7519
|
* Returns the current projection scale factor.
|
|
7479
7520
|
* @param FOV {number} Field of view
|
|
@@ -15543,6 +15584,223 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/path/system' {
|
|
|
15543
15584
|
}
|
|
15544
15585
|
}
|
|
15545
15586
|
|
|
15587
|
+
declare module '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator' {
|
|
15588
|
+
export * from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator/navigator';
|
|
15589
|
+
}
|
|
15590
|
+
|
|
15591
|
+
declare module '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator/navigator' {
|
|
15592
|
+
import type { Position, Feature, MultiPolygon, Polygon } from 'geojson';
|
|
15593
|
+
import type { NodeCollection, NodeFeature } from '@mappedin/mappedin-js/packages/geojson-navigator/src/types/node';
|
|
15594
|
+
import type { ObstructionCollection } from '@mappedin/mappedin-js/packages/geojson-navigator/src/types/obstruction';
|
|
15595
|
+
import type { DirectionsCollection } from '@mappedin/mappedin-js/packages/geojson-navigator/src/types/directions';
|
|
15596
|
+
import type { CoordinateFeature } from '@mappedin/mappedin-js/packages/geojson-navigator/src/types/coordinate';
|
|
15597
|
+
/**
|
|
15598
|
+
* Options for simplifying directions in the Navigator class.
|
|
15599
|
+
*/
|
|
15600
|
+
export type SimplifyDirectionsOptions = {
|
|
15601
|
+
/**
|
|
15602
|
+
* Enable or disable simplifying.
|
|
15603
|
+
*/
|
|
15604
|
+
enabled: boolean;
|
|
15605
|
+
/**
|
|
15606
|
+
* The radius of the buffer around the path to consider when simplifying, in meters.
|
|
15607
|
+
* @default 0.7
|
|
15608
|
+
*/
|
|
15609
|
+
bufferRadius?: number;
|
|
15610
|
+
};
|
|
15611
|
+
/**
|
|
15612
|
+
* Defines the special zone for navigation operations.
|
|
15613
|
+
*/
|
|
15614
|
+
export type DirectionsZone = {
|
|
15615
|
+
geometry: Feature<MultiPolygon | Polygon>;
|
|
15616
|
+
/**
|
|
15617
|
+
* The additional cost for navigation through the zone.
|
|
15618
|
+
*/
|
|
15619
|
+
cost: number;
|
|
15620
|
+
/**
|
|
15621
|
+
*
|
|
15622
|
+
* Additional property specific to the navigator based on the 'groupBy' option.
|
|
15623
|
+
*/
|
|
15624
|
+
[index: string]: any;
|
|
15625
|
+
};
|
|
15626
|
+
export class Navigator {
|
|
15627
|
+
/**
|
|
15628
|
+
* Constructs a Navigator instance to manage pathfinding with optional obstructions and grouping features.
|
|
15629
|
+
*
|
|
15630
|
+
* @param {NodeCollection} nodes - Collection of nodes for the navigation graph.
|
|
15631
|
+
* @param {ObstructionCollection} [obstructions] - Optional collection of obstructions that could block paths.
|
|
15632
|
+
* @param {string} [groupBy] - Optional property name to group nodes and paths for differentiated processing.
|
|
15633
|
+
*/
|
|
15634
|
+
constructor({ nodes, obstructions, groupBy, }: {
|
|
15635
|
+
nodes: NodeCollection;
|
|
15636
|
+
obstructions?: ObstructionCollection;
|
|
15637
|
+
groupBy?: string;
|
|
15638
|
+
});
|
|
15639
|
+
findNearestNode: (feature: CoordinateFeature) => NodeFeature | null;
|
|
15640
|
+
/**
|
|
15641
|
+
* Calculates and returns a set of directions from origin nodes to destination nodes, including detailed properties.
|
|
15642
|
+
*
|
|
15643
|
+
* @param {string[]} originIds - IDs of origin nodes.
|
|
15644
|
+
* @param {string[]} destinationNodeIds - IDs of destination nodes.
|
|
15645
|
+
* @param {string[]} [excludedNodeIds] - IDs of nodes to exclude from pathfinding.
|
|
15646
|
+
* @param {SimplifyDirectionsOptions} [simplify] - Options to simplify the pathfinding result.
|
|
15647
|
+
* @returns {DirectionsCollection} A collection of directional features representing the path.
|
|
15648
|
+
*/
|
|
15649
|
+
getDirections({ zones: directionsZones, originIds, destinationNodeIds, excludedNodeIds, simplify, }: {
|
|
15650
|
+
originIds: string[];
|
|
15651
|
+
destinationNodeIds: string[];
|
|
15652
|
+
zones?: DirectionsZone[];
|
|
15653
|
+
excludedNodeIds?: string[];
|
|
15654
|
+
simplify?: SimplifyDirectionsOptions;
|
|
15655
|
+
}): DirectionsCollection;
|
|
15656
|
+
/**
|
|
15657
|
+
* Calculates the approximate distance between two geographic coordinates on Earth's surface.
|
|
15658
|
+
*
|
|
15659
|
+
* This function uses the equirectangular approximation method to compute the distance, which simplifies
|
|
15660
|
+
* the math and speeds up calculations, but is less accurate over long distances compared to other methods
|
|
15661
|
+
* like the haversine formula.
|
|
15662
|
+
*
|
|
15663
|
+
* @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
|
|
15664
|
+
* @param {Position} point2 - The second point's longitude and latitude as [longitude, latitude].
|
|
15665
|
+
* @return
|
|
15666
|
+
* @return {number} The approximate distance between the two points in meters.
|
|
15667
|
+
*/
|
|
15668
|
+
getDistance: (point1: Position, point2: Position) => number;
|
|
15669
|
+
/**
|
|
15670
|
+
* Calculates the angle between two geographic coordinates.
|
|
15671
|
+
*
|
|
15672
|
+
* @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
|
|
15673
|
+
* @param {Position} point2 - The second point's longitude and latitude as [longitude, latitude].
|
|
15674
|
+
* @hidden
|
|
15675
|
+
*
|
|
15676
|
+
* @return {number} The angle in radians, calculated clockwise from the north between the two points specified.
|
|
15677
|
+
*/
|
|
15678
|
+
getAngle: (point1: Position, point2: Position) => number;
|
|
15679
|
+
}
|
|
15680
|
+
}
|
|
15681
|
+
|
|
15682
|
+
declare module '@mappedin/mappedin-js/packages/geojson-navigator/src/types/node' {
|
|
15683
|
+
import type { Feature, FeatureCollection, Point } from 'geojson';
|
|
15684
|
+
/**
|
|
15685
|
+
* The neighboring node with associated weight.
|
|
15686
|
+
*/
|
|
15687
|
+
export type NodeNeighbor = {
|
|
15688
|
+
id: string;
|
|
15689
|
+
weight: number;
|
|
15690
|
+
};
|
|
15691
|
+
/**
|
|
15692
|
+
* Properties specific to node features in a geospatial context.
|
|
15693
|
+
* Each node includes a mandatory unique identifier and supports additional custom properties.
|
|
15694
|
+
*/
|
|
15695
|
+
export type NodeProperties = {
|
|
15696
|
+
/**
|
|
15697
|
+
* Unique identifier for the node.
|
|
15698
|
+
*/
|
|
15699
|
+
id: string;
|
|
15700
|
+
/**
|
|
15701
|
+
* An array of neighboring nodes with associated weights.
|
|
15702
|
+
*/
|
|
15703
|
+
neighbors: NodeNeighbor[];
|
|
15704
|
+
/**
|
|
15705
|
+
* Additional property specific to the navigator based on the 'groupBy' option.
|
|
15706
|
+
* */
|
|
15707
|
+
[name: string]: any;
|
|
15708
|
+
};
|
|
15709
|
+
/**
|
|
15710
|
+
* A GeoJSON feature collection that groups multiple nodes, each represented as a point.
|
|
15711
|
+
* This structure is commonly used in mapping, routing, and network analysis applications.
|
|
15712
|
+
*/
|
|
15713
|
+
export type NodeCollection = FeatureCollection<Point, NodeProperties>;
|
|
15714
|
+
/**
|
|
15715
|
+
* A GeoJSON feature representing a node as a point with associated properties.
|
|
15716
|
+
* Nodes are critical for defining specific locations in network-based analyses, such as transportation networks,
|
|
15717
|
+
* utility networks, or any kind of spatial network analysis.
|
|
15718
|
+
*/
|
|
15719
|
+
export type NodeFeature = Feature<Point, NodeProperties>;
|
|
15720
|
+
}
|
|
15721
|
+
|
|
15722
|
+
declare module '@mappedin/mappedin-js/packages/geojson-navigator/src/types/obstruction' {
|
|
15723
|
+
import type { LineString, FeatureCollection, Polygon, Feature } from 'geojson';
|
|
15724
|
+
/**
|
|
15725
|
+
* Properties specific to obstruction features in a geospatial context.
|
|
15726
|
+
* Includes a mandatory unique identifier and allows for any additional custom properties.
|
|
15727
|
+
*/
|
|
15728
|
+
export type ObstructionProperties = {
|
|
15729
|
+
/**
|
|
15730
|
+
* Unique identifier for the obstruction.
|
|
15731
|
+
*/
|
|
15732
|
+
id: string;
|
|
15733
|
+
/**
|
|
15734
|
+
* Additional property specific to the navigator based on the 'groupBy' option.
|
|
15735
|
+
* */
|
|
15736
|
+
[name: string]: any;
|
|
15737
|
+
};
|
|
15738
|
+
/**
|
|
15739
|
+
* A GeoJSON feature collection that groups multiple obstruction features, which can be line strings or polygons.
|
|
15740
|
+
* This is typically used to represent physical barriers or areas where access is restricted.
|
|
15741
|
+
*/
|
|
15742
|
+
export type ObstructionCollection = FeatureCollection<LineString | Polygon, ObstructionProperties>;
|
|
15743
|
+
/**
|
|
15744
|
+
* A GeoJSON feature representing an obstruction, which can be either a line string or a polygon.
|
|
15745
|
+
* This type is crucial for mapping and managing areas that impede or restrict movement, such as barriers or restricted zones.
|
|
15746
|
+
*
|
|
15747
|
+
*/
|
|
15748
|
+
export type ObstructionFeature = Feature<LineString | Polygon, ObstructionProperties>;
|
|
15749
|
+
}
|
|
15750
|
+
|
|
15751
|
+
declare module '@mappedin/mappedin-js/packages/geojson-navigator/src/types/directions' {
|
|
15752
|
+
import type { Feature, FeatureCollection, Point } from 'geojson';
|
|
15753
|
+
/**
|
|
15754
|
+
* Properties specific to directional features in a navigation context.
|
|
15755
|
+
* Includes an identifier, optional angle and distance, and allows for any additional properties.
|
|
15756
|
+
*/
|
|
15757
|
+
export type DirectionProperties = {
|
|
15758
|
+
/**
|
|
15759
|
+
* Unique identifier for the direction.
|
|
15760
|
+
*/
|
|
15761
|
+
id: string;
|
|
15762
|
+
/**
|
|
15763
|
+
* An angle between this point and the destination, in radians.
|
|
15764
|
+
*/
|
|
15765
|
+
angle?: number;
|
|
15766
|
+
/**
|
|
15767
|
+
* Distance to the next point, in meters.
|
|
15768
|
+
*/
|
|
15769
|
+
distance?: number;
|
|
15770
|
+
/**
|
|
15771
|
+
* Group id which the direction belongs to (e.g. floor, building, etc).
|
|
15772
|
+
* It's based on the groupBy property of the navigator.
|
|
15773
|
+
*/
|
|
15774
|
+
groupBy?: string;
|
|
15775
|
+
};
|
|
15776
|
+
/**
|
|
15777
|
+
* A GeoJSON feature representing a point with properties tailored for navigation directions.
|
|
15778
|
+
*/
|
|
15779
|
+
export type DirectionFeature = Feature<Point, DirectionProperties>;
|
|
15780
|
+
/**
|
|
15781
|
+
* A GeoJSON feature collection that groups multiple directional features, often used to represent a route or path.
|
|
15782
|
+
*/
|
|
15783
|
+
export type DirectionsCollection = FeatureCollection<Point, DirectionProperties>;
|
|
15784
|
+
}
|
|
15785
|
+
|
|
15786
|
+
declare module '@mappedin/mappedin-js/packages/geojson-navigator/src/types/coordinate' {
|
|
15787
|
+
import type { Feature, Point } from 'geojson';
|
|
15788
|
+
/**
|
|
15789
|
+
* Properties specific to node features in a geospatial context.
|
|
15790
|
+
* Each node includes a mandatory unique identifier and supports additional custom properties.
|
|
15791
|
+
*/
|
|
15792
|
+
export type CoordinateProperties = {
|
|
15793
|
+
/**
|
|
15794
|
+
* Additional property specific to the navigator based on the 'groupBy' option.
|
|
15795
|
+
* */
|
|
15796
|
+
[name: string]: any;
|
|
15797
|
+
};
|
|
15798
|
+
/**
|
|
15799
|
+
* A GeoJSON feature representing a coordinate as a point with associated properties.
|
|
15800
|
+
*/
|
|
15801
|
+
export type CoordinateFeature = Feature<Point, CoordinateProperties>;
|
|
15802
|
+
}
|
|
15803
|
+
|
|
15546
15804
|
declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
|
|
15547
15805
|
import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
15548
15806
|
import type { MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
|