@mappedin/mappedin-js 6.0.1-alpha.5 → 6.0.1-alpha.8
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-MOCQSAWG.js +1 -0
- package/lib/esm/{PerformanceController-JV6FTKVZ.js → PerformanceController-PTXC53B6.js} +1 -1
- package/lib/esm/{browser-LY35RRU5.js → browser-B5OIFI64.js} +1 -1
- package/lib/esm/chunk-64FES2K3.js +1 -0
- package/lib/esm/{chunk-TS6VC5W4.js → chunk-JBBQAE4M.js} +1 -1
- package/lib/esm/index.d.ts +613 -466
- package/lib/esm/index.js +1 -1
- package/lib/esm/outdoor-context-YIQYWFFW.js +1 -0
- package/package.json +1 -1
- package/CHANGELOG.md +0 -69
- package/lib/esm/GLTFExporter-RSVPWOLD.js +0 -1
- package/lib/esm/chunk-A6LAYI64.js +0 -1
- package/lib/esm/chunk-HPEKYYZ4.js +0 -1
- package/lib/esm/outdoor-context-TH2TGMFN.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -326,6 +326,9 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
|
|
|
326
326
|
* const floor = map.currentFloor;
|
|
327
327
|
*/
|
|
328
328
|
get currentFloor(): Floor;
|
|
329
|
+
get mapData(): {
|
|
330
|
+
[key: string]: MapData;
|
|
331
|
+
};
|
|
329
332
|
/**
|
|
330
333
|
* Sets the current floor of the map.
|
|
331
334
|
*/
|
|
@@ -488,7 +491,7 @@ declare module '@mappedin/mappedin-js/maker/src/events' {
|
|
|
488
491
|
}
|
|
489
492
|
|
|
490
493
|
declare module '@mappedin/mappedin-js/packages/get-venue' {
|
|
491
|
-
import type { TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
494
|
+
import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
492
495
|
import { Mappedin } from '@mappedin/mappedin-js/packages/get-venue/Mappedin';
|
|
493
496
|
import { defaultThings } from '@mappedin/mappedin-js/packages/get-venue/default-things';
|
|
494
497
|
import { GET_VENUE_EVENT } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
@@ -535,7 +538,10 @@ declare module '@mappedin/mappedin-js/packages/get-venue' {
|
|
|
535
538
|
import { MAP_RENDER_MODE } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
536
539
|
import { ParsedMVF } from '@mappedin/mvf';
|
|
537
540
|
export { MAP_RENDER_MODE, GET_VENUE_EVENT };
|
|
538
|
-
|
|
541
|
+
/**
|
|
542
|
+
* @internal
|
|
543
|
+
*/
|
|
544
|
+
export function parseOptions<T extends TAllGetVenueOptions>(options: T): TGetVenueOptionsInternal<T>;
|
|
539
545
|
/**
|
|
540
546
|
* @internal
|
|
541
547
|
*/
|
|
@@ -637,7 +643,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue' {
|
|
|
637
643
|
* Download a bundle and return a Mappedin instance
|
|
638
644
|
* @internal
|
|
639
645
|
*/
|
|
640
|
-
export function downloadBundle(userOptions:
|
|
646
|
+
export function downloadBundle(userOptions: TGetVenueBundleOptions, { url, updated_at }: {
|
|
641
647
|
url: any;
|
|
642
648
|
updated_at: any;
|
|
643
649
|
}): Promise<Mappedin>;
|
|
@@ -688,7 +694,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue' {
|
|
|
688
694
|
}
|
|
689
695
|
|
|
690
696
|
declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF' {
|
|
691
|
-
import { Connections, Map as MVFMap, NodeCollection, ObstructionCollection, ParsedMVF, RawMVF, SpaceCollection } from '@mappedin/mvf';
|
|
697
|
+
import { Connections, Map as MVFMap, NodeCollection, ObstructionCollection, ParsedMVF, RawMVF, SpaceCollection, StyleCollection } from '@mappedin/mvf';
|
|
692
698
|
import { Position } from 'geojson';
|
|
693
699
|
import { TCategory, TLocation, TMap, TMappedinAPI, TNode, TPolygon, TVortex } from '@mappedin/mappedin-js/packages/get-venue';
|
|
694
700
|
import { MVFv1ConnectionCollection, MVFv1LevelCollection, MVFv1NodeCollection, ParsedMVFv1, RawMVFv1, WithIDs, MVFStyle } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.types';
|
|
@@ -763,7 +769,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF' {
|
|
|
763
769
|
maxLat: number;
|
|
764
770
|
maxLong: number;
|
|
765
771
|
};
|
|
766
|
-
export function convertPolygons(map: string, mvfObstructions: ObstructionCollection, mvfSpaces: SpaceCollection, deskEntrances: Map<string, TPolygon['entrances']>, styles: WithIDs<MVFStyle>, converter: CoordinateConverter): TPolygon[];
|
|
772
|
+
export function convertPolygons(map: string, mvfObstructions: ObstructionCollection, mvfSpaces: SpaceCollection, deskEntrances: Map<string, TPolygon['entrances']>, styles: WithIDs<MVFStyle>, layerStyles: StyleCollection, converter: CoordinateConverter): TPolygon[];
|
|
767
773
|
export function convertVortexes(mvfConnections: Connections): TVortex[];
|
|
768
774
|
export function convertVortexes_MVFv1(mvfConnections: MVFv1ConnectionCollection): TVortex[];
|
|
769
775
|
export function overrideMVF(mvf: ParsedMVF, override?: Partial<Pick<ParsedMVF, 'styles.json'>>): ParsedMVF;
|
|
@@ -1750,6 +1756,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-objects' {
|
|
|
1750
1756
|
|
|
1751
1757
|
declare module '@mappedin/mappedin-js/maker/src/navigation' {
|
|
1752
1758
|
import type { MapView, Directions } from '@mappedin/mappedin-js/maker/src';
|
|
1759
|
+
import { INavigation } from '@mappedin/mappedin-js/maker/src/map-view-interface';
|
|
1753
1760
|
const defaultOptions: {
|
|
1754
1761
|
createMarkers: {
|
|
1755
1762
|
departure: boolean;
|
|
@@ -1791,7 +1798,7 @@ declare module '@mappedin/mappedin-js/maker/src/navigation' {
|
|
|
1791
1798
|
};
|
|
1792
1799
|
};
|
|
1793
1800
|
constructor(mapView: MapView);
|
|
1794
|
-
draw:
|
|
1801
|
+
draw: INavigation['draw'];
|
|
1795
1802
|
clear: () => void;
|
|
1796
1803
|
}
|
|
1797
1804
|
export {};
|
|
@@ -2285,6 +2292,14 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-objects/camera-transfor
|
|
|
2285
2292
|
}
|
|
2286
2293
|
|
|
2287
2294
|
declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.types' {
|
|
2295
|
+
import type { TGetVenueMVFOptions, TGetVenueMakerOptions } from '@mappedin/mappedin-js/packages/get-venue';
|
|
2296
|
+
import type { DefaultThings } from '@mappedin/mappedin-js/packages/get-venue/default-things';
|
|
2297
|
+
export type MergedThings = {
|
|
2298
|
+
[key in keyof DefaultThings]: string[];
|
|
2299
|
+
} & {
|
|
2300
|
+
[k: string]: string[];
|
|
2301
|
+
};
|
|
2302
|
+
export type ThingsOption = Partial<MergedThings>;
|
|
2288
2303
|
export type TGetVenueOptions = {
|
|
2289
2304
|
accessToken?: string;
|
|
2290
2305
|
clientId?: string;
|
|
@@ -2298,22 +2313,44 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.types' {
|
|
|
2298
2313
|
[key in string]: string;
|
|
2299
2314
|
};
|
|
2300
2315
|
venue: string;
|
|
2301
|
-
|
|
2316
|
+
/**
|
|
2317
|
+
* An object specifying additional properties to fetch for each data item.
|
|
2318
|
+
* Each key represents a data item (e.g., 'locations', 'nodes'), and the value is an array of strings indicating extra properties to be included.
|
|
2319
|
+
* @example
|
|
2320
|
+
* For example:
|
|
2321
|
+
* ```
|
|
2322
|
+
* getVenue({
|
|
2323
|
+
* venue: 'some-venue',
|
|
2324
|
+
* things: { vortexes: [ 'material' ]
|
|
2325
|
+
* }})
|
|
2326
|
+
* ```
|
|
2327
|
+
*/
|
|
2328
|
+
things?: ThingsOption;
|
|
2302
2329
|
useDraftData?: boolean;
|
|
2303
2330
|
platformString?: string;
|
|
2304
2331
|
emitAnalyticsEvents?: boolean;
|
|
2305
2332
|
secure?: boolean;
|
|
2306
2333
|
preloadMapGeometry?: boolean;
|
|
2307
2334
|
};
|
|
2308
|
-
export type
|
|
2335
|
+
export type TProcessedMVFOptions = TGetVenueMakerOptions & {
|
|
2336
|
+
emitAnalyticsEvents: boolean;
|
|
2337
|
+
clientId: string;
|
|
2338
|
+
clientSecret: string;
|
|
2339
|
+
venue: string;
|
|
2340
|
+
};
|
|
2341
|
+
export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & {
|
|
2342
|
+
perspective?: string;
|
|
2343
|
+
});
|
|
2344
|
+
export type TGetVenueOptionsInternal<T extends TAllGetVenueOptions> = Omit<T & {
|
|
2309
2345
|
baseUrl?: string;
|
|
2310
2346
|
supplementaryUrl?: string;
|
|
2311
2347
|
noAuth?: boolean;
|
|
2312
2348
|
includeHidden?: boolean;
|
|
2313
2349
|
apiGateway?: string;
|
|
2314
2350
|
authorization?: string;
|
|
2315
|
-
things?: any;
|
|
2316
2351
|
headers?: any;
|
|
2352
|
+
}, 'things'> & {
|
|
2353
|
+
things?: MergedThings;
|
|
2317
2354
|
};
|
|
2318
2355
|
export type TVenueMetadata = {
|
|
2319
2356
|
languages: {
|
|
@@ -2336,14 +2373,14 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.types' {
|
|
|
2336
2373
|
|
|
2337
2374
|
declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin' {
|
|
2338
2375
|
import { Navigator } from '@mappedin/mappedin-js/packages/navigator';
|
|
2339
|
-
import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
2376
|
+
import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
2340
2377
|
import type { MappedinNode, MappedinPolygon, MappedinLocation, MappedinCategory, MappedinVortex, MappedinVenue, MappedinTheme, MappedinRankings, MappedinLocationRankings, MappedinEvent, MappedinLocationState, MappedinMap, MappedinMapGroup, GET_VENUE_PAYLOAD } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
2341
2378
|
import { TAccessors, GET_VENUE_EVENT } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
2342
2379
|
import { IAnalytics } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.CustomerAnalytics';
|
|
2343
2380
|
import { ParsedMVF } from '@mappedin/mvf';
|
|
2344
2381
|
import { ParsedMVFv1 } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.types';
|
|
2345
2382
|
import { PubSub } from '@mappedin/mappedin-js/packages/get-venue/pub-sub.typed';
|
|
2346
|
-
export const defaultOptions: TGetVenueOptionsInternal
|
|
2383
|
+
export const defaultOptions: TGetVenueOptionsInternal<TGetVenueOptions>;
|
|
2347
2384
|
export class Mappedin extends PubSub<GET_VENUE_PAYLOAD, GET_VENUE_EVENT> {
|
|
2348
2385
|
#private;
|
|
2349
2386
|
perspective: any;
|
|
@@ -2575,7 +2612,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin' {
|
|
|
2575
2612
|
/**
|
|
2576
2613
|
* @deprecated Use {@link hydrateVenue} instead
|
|
2577
2614
|
*/
|
|
2578
|
-
constructor(options: TGetVenueOptionsInternal
|
|
2615
|
+
constructor(options: TGetVenueOptionsInternal<TAllGetVenueOptions>);
|
|
2579
2616
|
analytics: IAnalytics;
|
|
2580
2617
|
/**
|
|
2581
2618
|
* @hidden
|
|
@@ -2605,6 +2642,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/default-things' {
|
|
|
2605
2642
|
themes: string[];
|
|
2606
2643
|
rankings: string[];
|
|
2607
2644
|
};
|
|
2645
|
+
export type DefaultThings = typeof defaultThings;
|
|
2608
2646
|
}
|
|
2609
2647
|
|
|
2610
2648
|
declare module '@mappedin/mappedin-js/packages/get-venue/internal' {
|
|
@@ -2946,6 +2984,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinLocation' {
|
|
|
2946
2984
|
siblingGroups?: TSiblingGroup[] | undefined;
|
|
2947
2985
|
gallery?: TGalleryImage[] | undefined;
|
|
2948
2986
|
amenity?: string | undefined;
|
|
2987
|
+
filterFlags?: string[];
|
|
2949
2988
|
constructor(mappedin: Mappedin, data: any);
|
|
2950
2989
|
/**
|
|
2951
2990
|
* Polygons this Location is attached to.
|
|
@@ -3732,7 +3771,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.types' {
|
|
|
3732
3771
|
}
|
|
3733
3772
|
|
|
3734
3773
|
declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.utils' {
|
|
3735
|
-
import { Feature, LineString, Polygon } from '@turf/turf';
|
|
3774
|
+
import type { Feature, LineString, Polygon } from '@turf/turf';
|
|
3736
3775
|
import { EntranceCollection, ObstructionCollection, EntranceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle } from '@mappedin/mvf';
|
|
3737
3776
|
import { MVFStyle, WithIDs } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.types';
|
|
3738
3777
|
export const Z_FIGHTING_ADJUSTMENT_HORIZONTAL_FACTOR = 0.2;
|
|
@@ -3746,7 +3785,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.MVF.utils' {
|
|
|
3746
3785
|
*/
|
|
3747
3786
|
export const STATIC_MVF_FILES: readonly ["connection.json", "manifest.geojson", "map.geojson", "node.geojson", "styles.json", "mapstack.geojson"];
|
|
3748
3787
|
export type TStaticMVFFiles = (typeof STATIC_MVF_FILES)[number];
|
|
3749
|
-
export function processObstructions(obstructionCollection: ObstructionCollection, entrances: EntranceCollection
|
|
3788
|
+
export function processObstructions(obstructionCollection: ObstructionCollection, entrances: EntranceCollection): ObstructionCollection;
|
|
3750
3789
|
export function isPolygonStyle(style: PolygonStyle | LineStringStyle | undefined): style is PolygonStyle & LineStringStyle;
|
|
3751
3790
|
export function getStylesMap(styles: StyleCollection): WithIDs<MVFStyle>;
|
|
3752
3791
|
}
|
|
@@ -4301,8 +4340,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/object' {
|
|
|
4301
4340
|
}
|
|
4302
4341
|
|
|
4303
4342
|
declare module '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate' {
|
|
4304
|
-
import type { MapDataInternal } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
4305
|
-
import type Floor from '@mappedin/mappedin-js/maker/src/map-data-objects/floor';
|
|
4306
4343
|
/**
|
|
4307
4344
|
* Class representing a pseudo-mercator coordinate.
|
|
4308
4345
|
*
|
|
@@ -4312,7 +4349,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate' {
|
|
|
4312
4349
|
* which is commonly used in marine navigation.
|
|
4313
4350
|
*/
|
|
4314
4351
|
class Coordinate {
|
|
4315
|
-
#private;
|
|
4316
4352
|
/**
|
|
4317
4353
|
* @internal
|
|
4318
4354
|
*/
|
|
@@ -4332,6 +4368,10 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate' {
|
|
|
4332
4368
|
* @type {number}
|
|
4333
4369
|
*/
|
|
4334
4370
|
readonly longitude: number;
|
|
4371
|
+
/**
|
|
4372
|
+
* The floor ID of the coordinate.
|
|
4373
|
+
*/
|
|
4374
|
+
readonly floorId?: string;
|
|
4335
4375
|
/**
|
|
4336
4376
|
* Checks if the provided instance is of type Coordinate.
|
|
4337
4377
|
*
|
|
@@ -4342,11 +4382,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate' {
|
|
|
4342
4382
|
/**
|
|
4343
4383
|
* @internal
|
|
4344
4384
|
*/
|
|
4345
|
-
constructor(
|
|
4346
|
-
latitude: number;
|
|
4347
|
-
longitude: number;
|
|
4348
|
-
floorId?: string;
|
|
4349
|
-
});
|
|
4385
|
+
constructor(latitude: number, longitude: number, floorId?: string);
|
|
4350
4386
|
/**
|
|
4351
4387
|
* Checks if this coordinate is equal to another coordinate.
|
|
4352
4388
|
*
|
|
@@ -4354,13 +4390,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/coordinate' {
|
|
|
4354
4390
|
* @returns {boolean} True if coordinates are equal, false otherwise.
|
|
4355
4391
|
*/
|
|
4356
4392
|
isEqual(coordinate: Coordinate): boolean;
|
|
4357
|
-
/**
|
|
4358
|
-
* Gets the {@link Floor} associated with the coordinate.
|
|
4359
|
-
*
|
|
4360
|
-
* @returns {Floor | undefined} The {@link Floor} object if available.
|
|
4361
|
-
* @throws Will throw an error if the floor is not found.
|
|
4362
|
-
*/
|
|
4363
|
-
get floor(): Floor | undefined;
|
|
4364
4393
|
/**
|
|
4365
4394
|
* Serializes the coordinate data to JSON.
|
|
4366
4395
|
*
|
|
@@ -5377,7 +5406,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
5377
5406
|
import type { Path } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/PathsController';
|
|
5378
5407
|
import { TOOLTIP_ANCHOR } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.SmartTooltip';
|
|
5379
5408
|
import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE, CAMERA_EASING_MODE, E_MAP_CHANGED_REASON } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums';
|
|
5380
|
-
import {
|
|
5409
|
+
import { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/OutdoorViewController';
|
|
5381
5410
|
export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
|
|
5382
5411
|
/** @internal */
|
|
5383
5412
|
export type Without<T, U> = {
|
|
@@ -5870,6 +5899,13 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
5870
5899
|
outdoorGeometryLayers?: string[];
|
|
5871
5900
|
/**
|
|
5872
5901
|
* Use the current polygon objects directly rather than what is stored when rendering the map in CMS.
|
|
5902
|
+
*
|
|
5903
|
+
* Important Considerations:
|
|
5904
|
+
* - When this flag is set to true, the application will use live polygon data, which might not include certain enhancements such as 3D text annotations or automatically generated infill patterns. These features typically depend on the CMS's Render capabilities.
|
|
5905
|
+
* - Opting for live polygons means the system will not utilize the pre-processed optimized polygon data that is available through the CMS's rendering pipeline.
|
|
5906
|
+
* - This option is useful for applications requiring the most up-to-date representation of polygon data but may result in a less detailed visual representation due to the absence of certain rendered features.
|
|
5907
|
+
*
|
|
5908
|
+
* Use this option with caution, understanding the trade-offs between real-time update and visual detail.
|
|
5873
5909
|
*/
|
|
5874
5910
|
useLivePolygons?: boolean;
|
|
5875
5911
|
};
|
|
@@ -5878,7 +5914,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
5878
5914
|
* Requires `multiBufferRendering` to be enabled.
|
|
5879
5915
|
* @experimental
|
|
5880
5916
|
*/
|
|
5881
|
-
outdoorView?:
|
|
5917
|
+
outdoorView?: TOutdoorViewOptions & {
|
|
5882
5918
|
enabled?: boolean;
|
|
5883
5919
|
};
|
|
5884
5920
|
/**
|
|
@@ -6015,6 +6051,10 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
6015
6051
|
onWebGLRendererError?: () => void;
|
|
6016
6052
|
};
|
|
6017
6053
|
export type TShowVenueOptions = {
|
|
6054
|
+
/**
|
|
6055
|
+
* Enable shading of bottoms of geometry along with outlines to make geometry stand out.
|
|
6056
|
+
*/
|
|
6057
|
+
shadingAndOutlines?: boolean;
|
|
6018
6058
|
/**
|
|
6019
6059
|
* @experimental
|
|
6020
6060
|
*
|
|
@@ -6072,7 +6112,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
6072
6112
|
* @experimental
|
|
6073
6113
|
* Enable outdoor view. Requires multi-buffer rendering to be enabled
|
|
6074
6114
|
*/
|
|
6075
|
-
outdoorView?:
|
|
6115
|
+
outdoorView?: TOutdoorViewOptions & {
|
|
6076
6116
|
enabled?: boolean;
|
|
6077
6117
|
};
|
|
6078
6118
|
/**
|
|
@@ -6577,6 +6617,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
|
|
|
6577
6617
|
*/
|
|
6578
6618
|
[E_CAMERA_EVENT.TILT_CHANGED]: number;
|
|
6579
6619
|
};
|
|
6620
|
+
export type { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL };
|
|
6580
6621
|
export type { default as BlueDotController } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/BlueDotController';
|
|
6581
6622
|
export type { default as Journey } from '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Journey';
|
|
6582
6623
|
}
|
|
@@ -8299,6 +8340,17 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
8299
8340
|
assetManager: AssetManager;
|
|
8300
8341
|
imageVisible: boolean;
|
|
8301
8342
|
labelVisible: boolean;
|
|
8343
|
+
polygonHeight: number;
|
|
8344
|
+
geometry: ExtrudeGeometry;
|
|
8345
|
+
mesh: Mesh;
|
|
8346
|
+
material: MeshLambertMaterial | MeshLambertMaterial[];
|
|
8347
|
+
labelMesh?: Mesh;
|
|
8348
|
+
imageMesh?: Mesh;
|
|
8349
|
+
/**
|
|
8350
|
+
* For the time being we indicate inflated walls so they don't add to ray casting. Since these are walls it's a good optimization
|
|
8351
|
+
*/
|
|
8352
|
+
isInflated: boolean;
|
|
8353
|
+
sortScore: number | null;
|
|
8302
8354
|
boundingBox: {
|
|
8303
8355
|
min: {
|
|
8304
8356
|
x: number;
|
|
@@ -8311,13 +8363,6 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
8311
8363
|
z: number;
|
|
8312
8364
|
};
|
|
8313
8365
|
};
|
|
8314
|
-
polygonHeight: number;
|
|
8315
|
-
geometry: ExtrudeGeometry;
|
|
8316
|
-
mesh: Mesh;
|
|
8317
|
-
material: MeshLambertMaterial | MeshLambertMaterial[];
|
|
8318
|
-
labelMesh?: Mesh;
|
|
8319
|
-
imageMesh?: Mesh;
|
|
8320
|
-
sortScore: number | null;
|
|
8321
8366
|
static materials: {
|
|
8322
8367
|
[key in string]: MeshLambertMaterial | MeshLambertMaterial[];
|
|
8323
8368
|
};
|
|
@@ -8333,7 +8378,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
8333
8378
|
x: number;
|
|
8334
8379
|
y: number;
|
|
8335
8380
|
};
|
|
8336
|
-
static _makeFromCoords(className: any, coords: any, mapClass: any): any;
|
|
8381
|
+
static _makeFromCoords(className: any, coords: any, mapClass: any, element: any): any;
|
|
8382
|
+
static _inflate(coords: any, width: any): any;
|
|
8337
8383
|
static _setPolygonDefaults(poly: any): any;
|
|
8338
8384
|
constructor(poly: MappedinPolygon, mapClass: MappedinMap, container: Group, assetManager: any, mapLoadingStrategy?: MAP_RENDER_MODE);
|
|
8339
8385
|
getBoundingBox(): {
|
|
@@ -8665,8 +8711,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
8665
8711
|
}
|
|
8666
8712
|
|
|
8667
8713
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/FlatLabelsController' {
|
|
8668
|
-
import { TAddFlatLabelOptions, TFlatLabelAllLocationsOptions, TFlatLabelAppearance, ICore } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
8669
|
-
import { FlatLabel } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
8714
|
+
import { TAddFlatLabelOptions, TFlatLabelAllLocationsOptions, TFlatLabelAppearance, ICore, FlatLabel } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
8670
8715
|
import { MappedinPolygon } from '@mappedin/mappedin-js/packages/get-venue';
|
|
8671
8716
|
export const LABEL_ALL_LOCATIONS_WARNING = "Adding or removing individual labels after calling labelAllLocations() may cause unexpected behaviour. We recommend adding all labels individually if more specific control is desired. https://developer.mappedin.com/web-sdk-api/v5/latest/classes/flatlabels#add";
|
|
8672
8717
|
export type FlatLabelRenderObject = TAddFlatLabelOptions & {
|
|
@@ -9792,45 +9837,97 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
|
|
|
9792
9837
|
import './OutdoorViewController.scss';
|
|
9793
9838
|
import type { ICore } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
9794
9839
|
import { XOR } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types';
|
|
9840
|
+
/**
|
|
9841
|
+
* Represents the possible positions for map attribution.
|
|
9842
|
+
*/
|
|
9795
9843
|
export type TAttributionPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9844
|
+
/**
|
|
9845
|
+
* Defines the options for an Outdoor View when initialized with headers for authentication.
|
|
9846
|
+
*/
|
|
9847
|
+
export type TOutdoorViewOptionsWithHeaders = {
|
|
9848
|
+
/**
|
|
9849
|
+
* The URL to the map style file.
|
|
9850
|
+
* @see https://github.com/maplibre/maplibre-style-spec/
|
|
9851
|
+
*/
|
|
9852
|
+
url?: string;
|
|
9853
|
+
/**
|
|
9854
|
+
* The position on the map where the attribution should be displayed.
|
|
9855
|
+
* @default 'bottom-right'
|
|
9856
|
+
*/
|
|
9857
|
+
attributionPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
9858
|
+
/**
|
|
9859
|
+
* Custom text or an array of texts to be used for the map attribution.
|
|
9860
|
+
*/
|
|
9861
|
+
customAttribution?: string | string[];
|
|
9862
|
+
/**
|
|
9863
|
+
* An object containing HTTP headers for authentication purposes.
|
|
9864
|
+
* */
|
|
9865
|
+
headers: {
|
|
9866
|
+
[key: string]: string | null;
|
|
9867
|
+
};
|
|
9803
9868
|
};
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9869
|
+
/**
|
|
9870
|
+
* Defines the options for an Outdoor View when initialized with a URL for authentication.
|
|
9871
|
+
*/
|
|
9872
|
+
export type TOutdoorViewOptionsWithAuthURL = {
|
|
9873
|
+
/**
|
|
9874
|
+
* The URL to the map style file.
|
|
9875
|
+
* @see https://github.com/maplibre/maplibre-style-spec/
|
|
9876
|
+
*/
|
|
9877
|
+
url?: string;
|
|
9878
|
+
/**
|
|
9879
|
+
* The URL to obtain an authentication token.
|
|
9880
|
+
*/
|
|
9881
|
+
authURL?: string;
|
|
9882
|
+
/**
|
|
9883
|
+
* Custom text or an array of texts to be used for the map attribution.
|
|
9884
|
+
*/
|
|
9885
|
+
customAttribution?: string | string[];
|
|
9886
|
+
/**
|
|
9887
|
+
* The position on the map where the attribution should be displayed.
|
|
9888
|
+
* @default 'bottom-right'
|
|
9889
|
+
*/
|
|
9890
|
+
attributionPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
9809
9891
|
};
|
|
9810
|
-
|
|
9892
|
+
/**
|
|
9893
|
+
* Defines the options for initializing an Outdoor View.
|
|
9894
|
+
* This is a union type that requires exclusive or logic,
|
|
9895
|
+
* ensuring that an instance can either have headers or
|
|
9896
|
+
* an authentication URL, but not both.
|
|
9897
|
+
*
|
|
9898
|
+
* Note: It isn't permitted to use `.headers` and `.authURL` options simultaneously.
|
|
9899
|
+
*
|
|
9900
|
+
* @property {string} [url] - The URL to the map style file.
|
|
9901
|
+
* @property {TAttributionPosition} [attributionPosition='bottom-right'] - The position on the map where the attribution should be displayed.
|
|
9902
|
+
* @property {string | string[]} [customAttribution] - Custom text or an array of texts to be used for the map attribution.
|
|
9903
|
+
* @property {Object.<string, string | null>} [headers] - An object containing HTTP headers for authentication purposes. It isn't permitted to use `.headers` and `.authURL` options simultaneously.
|
|
9904
|
+
* @property {string} [authURL] - The URL to obtain an authentication token. It isn't permitted to use `.headers` and `.authURL` options simultaneously.
|
|
9905
|
+
* @interface
|
|
9906
|
+
*/
|
|
9907
|
+
export type TOutdoorViewOptions = XOR<TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL>;
|
|
9811
9908
|
class OutdoorViewController {
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
|
|
9909
|
+
_attribution: any;
|
|
9910
|
+
core: ICore;
|
|
9911
|
+
map: any;
|
|
9912
|
+
enabled: boolean;
|
|
9913
|
+
hidden: boolean;
|
|
9914
|
+
url: string;
|
|
9915
|
+
authURL: string;
|
|
9916
|
+
headers?: TOutdoorViewOptions['headers'];
|
|
9917
|
+
customAttribution?: string | string[];
|
|
9918
|
+
attributionPosition?: TAttributionPosition;
|
|
9919
|
+
loaded: boolean;
|
|
9920
|
+
constructor(core: ICore, options?: TOutdoorViewOptions);
|
|
9921
|
+
module: any;
|
|
9922
|
+
load(): Promise<void>;
|
|
9923
|
+
get attributions(): any;
|
|
9924
|
+
hide(): void;
|
|
9925
|
+
show(): void;
|
|
9926
|
+
resize(): void;
|
|
9927
|
+
getRequestHeaders: () => Promise<TOutdoorViewOptions['headers']>;
|
|
9928
|
+
render(): void;
|
|
9929
|
+
setStyle(style: any): void;
|
|
9930
|
+
setAttributionPosition(position: TAttributionPosition): void;
|
|
9834
9931
|
}
|
|
9835
9932
|
export default OutdoorViewController;
|
|
9836
9933
|
}
|
|
@@ -10087,158 +10184,9 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
10087
10184
|
}
|
|
10088
10185
|
|
|
10089
10186
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils' {
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
/**
|
|
10094
|
-
* Utils function listing
|
|
10095
|
-
*
|
|
10096
|
-
* - scrubMaterial
|
|
10097
|
-
* - getObjectID
|
|
10098
|
-
* - getObject
|
|
10099
|
-
* - getBoundingBox
|
|
10100
|
-
* - getBiggestBoundingBox
|
|
10101
|
-
* - upackBoundingBox
|
|
10102
|
-
* - getMapScale
|
|
10103
|
-
* - throttle -> taken from lodash.js
|
|
10104
|
-
* - getProjectionScaleFactor
|
|
10105
|
-
* - getZoom
|
|
10106
|
-
*/
|
|
10107
|
-
export function isGatewayKey(key: string): boolean;
|
|
10108
|
-
export function getCombinedBoundingBox(objects: Object3D[]): Box3;
|
|
10109
|
-
export function getMapsBoundingBox(maps: MapObject[], mapPadding: number): Box3;
|
|
10110
|
-
export function scrubMaterial(material: Material): void;
|
|
10111
|
-
/**
|
|
10112
|
-
* Takes a Mappedin Object or id and returns the ID, so our functions can take bottomRight
|
|
10113
|
-
* @template T extends string | {id: string}
|
|
10114
|
-
* @param {T} object - input can be object containing id or the id itself
|
|
10115
|
-
* @return {string}
|
|
10116
|
-
*/
|
|
10117
|
-
export function getObjectId(object: any): string;
|
|
10118
|
-
/**
|
|
10119
|
-
* Takes a Mappedin object or ID and the array to look in and retuns the Object, so our functions can take both
|
|
10120
|
-
*/
|
|
10121
|
-
export function getObject<K extends {
|
|
10122
|
-
id: string;
|
|
10123
|
-
}, T extends K | string>(obj: T, array: K[] | undefined): K | undefined;
|
|
10124
|
-
export function getBoundingBox(object: Object3D): Box3;
|
|
10125
|
-
/**
|
|
10126
|
-
* Function pushes the items of the second array onto the first array (inplace).
|
|
10127
|
-
* @template T
|
|
10128
|
-
* @param {Array.<T>} arr1 - base array
|
|
10129
|
-
* @param {Array.<T>} arr2 - array which items will be pushed to arr1
|
|
10130
|
-
*/
|
|
10131
|
-
export function appendItems<T>(arr1: T[], arr2: T[]): void;
|
|
10132
|
-
export function getBiggestBoundingBox(objects: Object3D[]): {
|
|
10133
|
-
min: any;
|
|
10134
|
-
max: any;
|
|
10135
|
-
};
|
|
10136
|
-
export function unpackBoundingBox(boundingBox: Box3): Vector3[];
|
|
10137
|
-
export function getMapScale(map: MappedinMap): number;
|
|
10138
|
-
export function getNorth(map: MappedinMap): number;
|
|
10139
|
-
export function throttle<T>(func: () => void, wait: number, options?: any): () => void;
|
|
10140
|
-
export function debounce<T>(func: () => void, wait: number, immediate?: boolean): () => void;
|
|
10141
|
-
export function flatten(list: any[]): any[];
|
|
10142
|
-
export function uniq(arr: any[]): any[];
|
|
10143
|
-
export function toStyleString(styles: Record<string, string>): string;
|
|
10144
|
-
/**
|
|
10145
|
-
/* getProjectionScaleFactor()
|
|
10146
|
-
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
10147
|
-
/*
|
|
10148
|
-
* R
|
|
10149
|
-
* /|
|
|
10150
|
-
* C : Camera / |
|
|
10151
|
-
* PQ : Projection Plane / |
|
|
10152
|
-
* OR : Origin / |
|
|
10153
|
-
* F : FOV / |
|
|
10154
|
-
* Q / |
|
|
10155
|
-
* /| |
|
|
10156
|
-
* / | |
|
|
10157
|
-
* / | |
|
|
10158
|
-
* / | |
|
|
10159
|
-
* / | |
|
|
10160
|
-
* / F/2 | |
|
|
10161
|
-
* C ------------P------------ O
|
|
10162
|
-
*
|
|
10163
|
-
*
|
|
10164
|
-
* ProjectionScaleFactor = ( OR / PQ )
|
|
10165
|
-
* PQ = canvasHeight / 2
|
|
10166
|
-
* CQ = zoom
|
|
10167
|
-
*
|
|
10168
|
-
* OR / C0 = tan(F/2)
|
|
10169
|
-
* so OR = CO * tan(F/2)
|
|
10170
|
-
*/
|
|
10171
|
-
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
10172
|
-
/** getZoom
|
|
10173
|
-
*
|
|
10174
|
-
* C - Camera, OP -- picture plane (canvas), S - origin,
|
|
10175
|
-
* QR - front side of maps Bounding Box, F: FOV
|
|
10176
|
-
*
|
|
10177
|
-
* Z-axis
|
|
10178
|
-
* R_____|______
|
|
10179
|
-
* /| | |
|
|
10180
|
-
* / | | |
|
|
10181
|
-
* P/ | | | maps BB
|
|
10182
|
-
* /| | | |
|
|
10183
|
-
* / | | | |
|
|
10184
|
-
* / | | | |
|
|
10185
|
-
* / F |E |T |S |
|
|
10186
|
-
* C /--------|-----|-----|-----|------ orthogonal to Y axis, midpoint of focus maps
|
|
10187
|
-
* \ | | | |
|
|
10188
|
-
* \ | | | |
|
|
10189
|
-
* \ | | | |
|
|
10190
|
-
* \ | | | |
|
|
10191
|
-
* \| | | |
|
|
10192
|
-
* O\ | | |
|
|
10193
|
-
* \ | | |
|
|
10194
|
-
* \|_____|_____|
|
|
10195
|
-
* Q
|
|
10196
|
-
*
|
|
10197
|
-
*
|
|
10198
|
-
* We want to get CS, which is the camera zoom
|
|
10199
|
-
*
|
|
10200
|
-
*/
|
|
10201
|
-
export function getZoom(focusBox: Box3, focusBoxHeight: number, FOV: number): number;
|
|
10202
|
-
interface CalculateTwoDProjectionsParams {
|
|
10203
|
-
maps: MapObject[];
|
|
10204
|
-
width: number;
|
|
10205
|
-
height: number;
|
|
10206
|
-
camera: Camera;
|
|
10207
|
-
}
|
|
10208
|
-
export function calculateTwoDProjections({ maps, width, height, camera }: CalculateTwoDProjectionsParams): {
|
|
10209
|
-
min: {
|
|
10210
|
-
x: number;
|
|
10211
|
-
y: number;
|
|
10212
|
-
};
|
|
10213
|
-
max: {
|
|
10214
|
-
x: number;
|
|
10215
|
-
y: number;
|
|
10216
|
-
};
|
|
10217
|
-
}[];
|
|
10218
|
-
export function splitLine(startNode: Vector3, endNode: Vector3, segments: number): Vector3[];
|
|
10219
|
-
export function isObject(item: any): boolean;
|
|
10220
|
-
export const determineStartingMap: (venue: Mappedin, options: TMapViewOptions) => MappedinMap;
|
|
10221
|
-
export function cyrb53(str: string, seed?: number): number;
|
|
10222
|
-
export function addMarginMultiplierToBoundingBox(bbox: Box3, multiplier: number): Box3;
|
|
10223
|
-
export function tweenPromise({ from, to, duration, easing, delay, onUpdate, onStart, onComplete, }: {
|
|
10224
|
-
from: any;
|
|
10225
|
-
to: any;
|
|
10226
|
-
duration?: number | undefined;
|
|
10227
|
-
easing?: any;
|
|
10228
|
-
delay?: number | undefined;
|
|
10229
|
-
onUpdate?: ((_: any) => void) | undefined;
|
|
10230
|
-
onStart?: (() => void) | undefined;
|
|
10231
|
-
onComplete?: (() => void) | undefined;
|
|
10232
|
-
}): {
|
|
10233
|
-
start(core: any): Promise<void>;
|
|
10234
|
-
};
|
|
10235
|
-
export const linearEase: (t: number) => number;
|
|
10236
|
-
export const quadEaseIn: (t: number) => number;
|
|
10237
|
-
export const quadEaseOut: (t: number) => number;
|
|
10238
|
-
export function interpolate(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number, easeFunc?: (t: number) => number): number;
|
|
10239
|
-
export function interpolateMulti(value: number, inputRange: number[], outputRange: number[], easeFunc?: (t: number) => number): number;
|
|
10240
|
-
export function checkWritableBeforeWrite(obj: any, key: string, value: any): void;
|
|
10241
|
-
export {};
|
|
10187
|
+
export * from '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/utils';
|
|
10188
|
+
export { shouldDisableOffscreenCanvas } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/browser';
|
|
10189
|
+
export { throttle, debounce } from '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/async';
|
|
10242
10190
|
}
|
|
10243
10191
|
|
|
10244
10192
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.MapManager' {
|
|
@@ -11979,6 +11927,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinVortex' {
|
|
|
11979
11927
|
weight?: number;
|
|
11980
11928
|
multiplier?: number;
|
|
11981
11929
|
nodes?: string[];
|
|
11930
|
+
filterFlags?: string[];
|
|
11982
11931
|
constructor(data: any);
|
|
11983
11932
|
static hydrate(vortexes: any): MappedinVortex[];
|
|
11984
11933
|
static fetch(mappedin: Mappedin): Promise<MappedinVortex[]>;
|
|
@@ -12311,12 +12260,12 @@ declare module '@mappedin/mappedin-js/packages/get-venue/MappedinMapGroup' {
|
|
|
12311
12260
|
}
|
|
12312
12261
|
|
|
12313
12262
|
declare module '@mappedin/mappedin-js/packages/get-venue/utils' {
|
|
12314
|
-
import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
12263
|
+
import type { MergedThings, TGetVenueOptions, TGetVenueOptionsInternal, ThingsOption } from '@mappedin/mappedin-js/packages/get-venue/Mappedin.types';
|
|
12315
12264
|
import type { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
12316
12265
|
import { Mappedin, MappedinNavigatable, MappedinNode, MappedinPolygon, MappedinLocation, MappedinCoordinate } from '@mappedin/mappedin-js/packages/get-venue/internal';
|
|
12317
12266
|
export function isGatewayKey(key: string): boolean;
|
|
12318
12267
|
export function stringifyQuery(query: any, gateway?: boolean): string;
|
|
12319
|
-
export function buildUrl(options: TGetVenueOptionsInternal
|
|
12268
|
+
export function buildUrl(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean): string;
|
|
12320
12269
|
/**
|
|
12321
12270
|
* Make a network request to the Mappedin API to fetch an array of objects.
|
|
12322
12271
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
@@ -12325,7 +12274,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/utils' {
|
|
|
12325
12274
|
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
12326
12275
|
* @returns the result json
|
|
12327
12276
|
*/
|
|
12328
|
-
export function getArray(options: TGetVenueOptionsInternal
|
|
12277
|
+
export function getArray(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean): Promise<any>;
|
|
12329
12278
|
/**
|
|
12330
12279
|
* Make a network request to the Mappedin API to fetch an object.
|
|
12331
12280
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
@@ -12335,21 +12284,21 @@ declare module '@mappedin/mappedin-js/packages/get-venue/utils' {
|
|
|
12335
12284
|
* @param isExpectingArray whether the endpoint returns an array
|
|
12336
12285
|
* @returns the result json
|
|
12337
12286
|
*/
|
|
12338
|
-
export function getObject(options: TGetVenueOptionsInternal
|
|
12287
|
+
export function getObject(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean, isExpectingArray?: boolean): Promise<any>;
|
|
12339
12288
|
/**
|
|
12340
12289
|
* Prepares the request and URL fields to pass into generateAPIRequest
|
|
12341
12290
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
12342
12291
|
* @param url string describing the url corresponding to the client's request
|
|
12343
12292
|
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
12344
12293
|
*/
|
|
12345
|
-
export function constructParamsForRequest(options: TGetVenueOptionsInternal
|
|
12294
|
+
export function constructParamsForRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): {
|
|
12346
12295
|
req: {
|
|
12347
12296
|
method: string;
|
|
12348
12297
|
headers: any;
|
|
12349
12298
|
};
|
|
12350
12299
|
url: string;
|
|
12351
12300
|
};
|
|
12352
|
-
export function generateAPIRequest(options: TGetVenueOptionsInternal
|
|
12301
|
+
export function generateAPIRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): Promise<any>;
|
|
12353
12302
|
export function addToSet(array: any, value: any): void;
|
|
12354
12303
|
export function getDistanceBetweenLatLon([lat1, lon1]: [number, number], [lat2, lon2]: [number, number]): any;
|
|
12355
12304
|
export function getMapScale(map: MappedinMap): any;
|
|
@@ -12383,6 +12332,7 @@ declare module '@mappedin/mappedin-js/packages/get-venue/utils' {
|
|
|
12383
12332
|
* @return {MappedinLocation}
|
|
12384
12333
|
*/
|
|
12385
12334
|
export const getPrimaryLocationForPolygon: (polygon: MappedinPolygon | string | undefined, venue: Mappedin) => MappedinLocation | null;
|
|
12335
|
+
export function mergeThings(thingsOption: ThingsOption | undefined): MergedThings;
|
|
12386
12336
|
}
|
|
12387
12337
|
|
|
12388
12338
|
declare module '@mappedin/mappedin-js/packages/get-venue/Mappedin.cache' {
|
|
@@ -12868,7 +12818,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/quad-tre
|
|
|
12868
12818
|
}
|
|
12869
12819
|
|
|
12870
12820
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/shave-text' {
|
|
12871
|
-
export type TDrawFn = (ctx: CanvasRenderingContext2D, x: number, y: number) => void;
|
|
12821
|
+
export type TDrawFn = (ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, x: number, y: number) => void;
|
|
12872
12822
|
type TShave = (str: string, size: number, maxWidth: number, maxLines?: number, lineHeight?: number, options?: {
|
|
12873
12823
|
strokeText: boolean;
|
|
12874
12824
|
}) => {
|
|
@@ -13087,242 +13037,201 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin
|
|
|
13087
13037
|
}
|
|
13088
13038
|
}
|
|
13089
13039
|
|
|
13090
|
-
declare module '@mappedin/mappedin-js/packages/legacy-renderer/
|
|
13091
|
-
import {
|
|
13092
|
-
import
|
|
13040
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/utils' {
|
|
13041
|
+
import { Box3, Vector3, Object3D, Material } from 'three';
|
|
13042
|
+
import { Mappedin, MapObject, MappedinMap, TMapViewOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
13043
|
+
import { Camera } from '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Camera';
|
|
13093
13044
|
/**
|
|
13094
|
-
*
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13147
|
-
*
|
|
13148
|
-
*
|
|
13149
|
-
*
|
|
13150
|
-
*
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
*
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
*
|
|
13159
|
-
|
|
13160
|
-
set minZoom(meters: number);
|
|
13161
|
-
/**
|
|
13162
|
-
* Get the maximum distance (in meters) the camera is allowed to get from the ground.
|
|
13163
|
-
*/
|
|
13164
|
-
get maxZoom(): number;
|
|
13165
|
-
/**
|
|
13166
|
-
* Set the maximum distance (in meters) the camera is allowed to get from the ground.
|
|
13167
|
-
*/
|
|
13168
|
-
set maxZoom(meters: number);
|
|
13169
|
-
/**
|
|
13170
|
-
* Get the current maximum tilt angle (in radians) the camera is allowed to use.
|
|
13171
|
-
*/
|
|
13172
|
-
get maxTilt(): number;
|
|
13173
|
-
/**
|
|
13174
|
-
* Sets the maximum tilt angle (in radians) the camera is allowed to use.
|
|
13175
|
-
*
|
|
13176
|
-
* Tilt angle must be between 0 and π/2 radians. It will be clamped within
|
|
13177
|
-
* this range if it exceeds it on either end.
|
|
13178
|
-
*
|
|
13179
|
-
* As tilt angle approaches π/2 radians, this will impact overall touch controls
|
|
13180
|
-
* and should be used sparingly.
|
|
13181
|
-
*/
|
|
13182
|
-
set maxTilt(radians: number);
|
|
13183
|
-
/**
|
|
13184
|
-
* Get the current camera position, which is at the center of the map.
|
|
13185
|
-
* @returns the position as a coordinate
|
|
13186
|
-
*/
|
|
13187
|
-
get position(): import("../../index.rn").MappedinCoordinate;
|
|
13188
|
-
/**
|
|
13189
|
-
* Enable or disable the ability for the user to interact with the camera (e.g. pan, zoom, tilt, etc).
|
|
13190
|
-
* This does not affect programmatic camera controls, such as {@link set} and {@link focusOn}.
|
|
13191
|
-
*
|
|
13192
|
-
* ```ts
|
|
13193
|
-
* // The user can no longer interact to move the camera
|
|
13194
|
-
* mapView.Camera.interactions.disable();
|
|
13195
|
-
*
|
|
13196
|
-
* // The user can now interact to move the camera again
|
|
13197
|
-
* mapView.Camera.interactions.enable();
|
|
13198
|
-
* ```
|
|
13199
|
-
*/
|
|
13200
|
-
interactions: {
|
|
13201
|
-
/**
|
|
13202
|
-
* Enable or disable specific user interactions.
|
|
13203
|
-
*
|
|
13204
|
-
* ```ts
|
|
13205
|
-
* mapView.Camera.interactions.set({ zoom: false });
|
|
13206
|
-
* ```
|
|
13207
|
-
*
|
|
13208
|
-
* @param options An object defining the interactions to switch on or off.
|
|
13209
|
-
*
|
|
13210
|
-
*/
|
|
13211
|
-
set: (options: TCameraInteractionsSetOptions) => void;
|
|
13212
|
-
/**
|
|
13213
|
-
* Enable all user interactions.
|
|
13214
|
-
*/
|
|
13215
|
-
enable: () => void;
|
|
13216
|
-
/**
|
|
13217
|
-
* Disable all user interactions.
|
|
13218
|
-
*/
|
|
13219
|
-
disable: () => void;
|
|
13220
|
-
};
|
|
13221
|
-
/**
|
|
13222
|
-
* Define an area of the screen that is safe for the camera. Anything outside the safe area is
|
|
13223
|
-
* assumed to be covered in some way (e.g. by UI) meaning the camera will not place
|
|
13224
|
-
* any map elements there when calling {@link focusOn}.
|
|
13225
|
-
*
|
|
13226
|
-
* ```ts
|
|
13227
|
-
* // The top 100px of the canvas are covered by a UI element
|
|
13228
|
-
* mapView.Camera.setSafeAreaInsets({ top: 100, left: 0, bottom: 0, right: 0});
|
|
13229
|
-
* mapView.Camera.focusOn({ nodes });
|
|
13230
|
-
* ```
|
|
13231
|
-
*
|
|
13232
|
-
* @param insets An object defining a number of pixels from the top, left, bottom, and right of
|
|
13233
|
-
* the screen. Only the area within the padding defined by these pixels is considered safe.
|
|
13234
|
-
*/
|
|
13235
|
-
setSafeAreaInsets(insets: {
|
|
13236
|
-
top: number;
|
|
13237
|
-
left: number;
|
|
13238
|
-
bottom: number;
|
|
13239
|
-
right: number;
|
|
13240
|
-
}): void;
|
|
13241
|
-
/**
|
|
13242
|
-
* Retrieve the values previously set by {@link setSafeAreaInsets}.
|
|
13243
|
-
*
|
|
13244
|
-
* @returns An object defining a number of pixels from the top, left, bottom, and right of
|
|
13245
|
-
* the screen.
|
|
13246
|
-
*/
|
|
13247
|
-
getSafeAreaInsets(): import("../../MapView.types").TPadding;
|
|
13248
|
-
/**
|
|
13249
|
-
* Animate the camera to focus on a collection of targets. To control where the targets should
|
|
13250
|
-
* be placed on screen, either specify `safeAreaInsets` on the {@link TFocusOnCameraOptions}
|
|
13251
|
-
* or call {@link setSafeAreaInsets}.
|
|
13252
|
-
*
|
|
13253
|
-
* ```ts
|
|
13254
|
-
* const location = mapView.venue.locations.find((l) => l.name === "My Location")!;
|
|
13255
|
-
*
|
|
13256
|
-
* mapView.Camera.focusOn({
|
|
13257
|
-
* polygons: location.polygons,
|
|
13258
|
-
* nodes: location.nodes,
|
|
13259
|
-
* });
|
|
13260
|
-
* ```
|
|
13261
|
-
*
|
|
13262
|
-
* @param targets A collection of things that the camera will place into view at the end of the
|
|
13263
|
-
* animation.
|
|
13264
|
-
* @param options
|
|
13265
|
-
* @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
|
|
13266
|
-
*/
|
|
13267
|
-
focusOn(targets: TCameraTargets, options?: TFocusOnCameraOptions & TCameraAnimationOptions): Promise<any>;
|
|
13268
|
-
/**
|
|
13269
|
-
* Instantaneously set the camera's transform to be in a new configuration. See also {@link animate}.
|
|
13270
|
-
*
|
|
13271
|
-
* ```ts
|
|
13272
|
-
* const coord = mapView.venue.maps[0].createCoordinate(33.66107, 31.83911);
|
|
13273
|
-
*
|
|
13274
|
-
* // Place the camera top-down at a specified coordinate
|
|
13275
|
-
* mapView.Camera.set({
|
|
13276
|
-
* tilt: 0,
|
|
13277
|
-
* position: coord,
|
|
13278
|
-
* });
|
|
13279
|
-
* ```
|
|
13280
|
-
*
|
|
13281
|
-
* @param transform The new transform of the camera.
|
|
13282
|
-
*/
|
|
13283
|
-
set(transform: TCameraTransform): void;
|
|
13284
|
-
/**
|
|
13285
|
-
* Convert a Mercator Zoom Level to altitude, which can be used in the Camera APIs
|
|
13286
|
-
*/
|
|
13287
|
-
convertZoomLevelToAltitude(zoomLevel: number): any;
|
|
13288
|
-
/**
|
|
13289
|
-
* Convert the altitude returned by getZoom into Mercator Zoom level
|
|
13290
|
-
*/
|
|
13291
|
-
convertAltitudeToZoomLevel(altitude: number): any;
|
|
13292
|
-
/**
|
|
13293
|
-
* Smoothly transition the camera's transform to be in a new configuration. See also {@link set}.
|
|
13294
|
-
*
|
|
13295
|
-
* ```ts
|
|
13296
|
-
* const coord = mapView.venue.maps[0].createCoordinate(33.66107, 31.83911);
|
|
13297
|
-
*
|
|
13298
|
-
* // Animate the camera to be top-down at a specified coordinate
|
|
13299
|
-
* mapView.Camera.animate({
|
|
13300
|
-
* tilt: 0,
|
|
13301
|
-
* position: coord,
|
|
13302
|
-
* });
|
|
13303
|
-
* ```
|
|
13045
|
+
* Utils function listing
|
|
13046
|
+
*
|
|
13047
|
+
* - scrubMaterial
|
|
13048
|
+
* - getObjectID
|
|
13049
|
+
* - getObject
|
|
13050
|
+
* - getBoundingBox
|
|
13051
|
+
* - getBiggestBoundingBox
|
|
13052
|
+
* - upackBoundingBox
|
|
13053
|
+
* - getMapScale
|
|
13054
|
+
* - throttle -> taken from lodash.js
|
|
13055
|
+
* - getProjectionScaleFactor
|
|
13056
|
+
* - getZoom
|
|
13057
|
+
*/
|
|
13058
|
+
export function isGatewayKey(key: string): boolean;
|
|
13059
|
+
export function getCombinedBoundingBox(objects: Object3D[]): Box3;
|
|
13060
|
+
export function getMapsBoundingBox(maps: MapObject[], mapPadding: number): Box3;
|
|
13061
|
+
export function scrubMaterial(material: Material): void;
|
|
13062
|
+
/**
|
|
13063
|
+
* Takes a Mappedin Object or id and returns the ID, so our functions can take bottomRight
|
|
13064
|
+
* @template T extends string | {id: string}
|
|
13065
|
+
* @param {T} object - input can be object containing id or the id itself
|
|
13066
|
+
* @return {string}
|
|
13067
|
+
*/
|
|
13068
|
+
export function getObjectId(object: any): string;
|
|
13069
|
+
/**
|
|
13070
|
+
* Takes a Mappedin object or ID and the array to look in and retuns the Object, so our functions can take both
|
|
13071
|
+
*/
|
|
13072
|
+
export function getObject<K extends {
|
|
13073
|
+
id: string;
|
|
13074
|
+
}, T extends K | string>(obj: T, array: K[] | undefined): K | undefined;
|
|
13075
|
+
export function getBoundingBox(object: Object3D): Box3;
|
|
13076
|
+
/**
|
|
13077
|
+
* Function pushes the items of the second array onto the first array (inplace).
|
|
13078
|
+
* @template T
|
|
13079
|
+
* @param {Array.<T>} arr1 - base array
|
|
13080
|
+
* @param {Array.<T>} arr2 - array which items will be pushed to arr1
|
|
13081
|
+
*/
|
|
13082
|
+
export function appendItems<T>(arr1: T[], arr2: T[]): void;
|
|
13083
|
+
export function getBiggestBoundingBox(objects: Object3D[]): {
|
|
13084
|
+
min: any;
|
|
13085
|
+
max: any;
|
|
13086
|
+
};
|
|
13087
|
+
export function unpackBoundingBox(boundingBox: Box3): Vector3[];
|
|
13088
|
+
export function getMapScale(map: MappedinMap): number;
|
|
13089
|
+
export function getNorth(map: MappedinMap): number;
|
|
13090
|
+
export function flatten(list: any[]): any[];
|
|
13091
|
+
export function uniq(arr: any[]): any[];
|
|
13092
|
+
export function toStyleString(styles: Record<string, string>): string;
|
|
13093
|
+
/**
|
|
13094
|
+
/* getProjectionScaleFactor()
|
|
13095
|
+
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
13096
|
+
/*
|
|
13097
|
+
* R
|
|
13098
|
+
* /|
|
|
13099
|
+
* C : Camera / |
|
|
13100
|
+
* PQ : Projection Plane / |
|
|
13101
|
+
* OR : Origin / |
|
|
13102
|
+
* F : FOV / |
|
|
13103
|
+
* Q / |
|
|
13104
|
+
* /| |
|
|
13105
|
+
* / | |
|
|
13106
|
+
* / | |
|
|
13107
|
+
* / | |
|
|
13108
|
+
* / | |
|
|
13109
|
+
* / F/2 | |
|
|
13110
|
+
* C ------------P------------ O
|
|
13304
13111
|
*
|
|
13305
|
-
* @param transform The new transform of the camera.
|
|
13306
|
-
* @param options
|
|
13307
|
-
* @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
|
|
13308
|
-
*/
|
|
13309
|
-
animate(transform: TCameraTransform, options?: TCameraAnimationOptions): Promise<undefined>;
|
|
13310
|
-
/**
|
|
13311
|
-
* Moves the Camera view in a relative direction by a given distance in meters.
|
|
13312
13112
|
*
|
|
13313
|
-
*
|
|
13314
|
-
*
|
|
13315
|
-
*
|
|
13316
|
-
* ```
|
|
13113
|
+
* ProjectionScaleFactor = ( OR / PQ )
|
|
13114
|
+
* PQ = canvasHeight / 2
|
|
13115
|
+
* CQ = zoom
|
|
13317
13116
|
*
|
|
13318
|
-
*
|
|
13319
|
-
|
|
13320
|
-
translate(direction: E_CAMERA_DIRECTION, distance: number, options?: TCameraAnimationOptions): Promise<unknown>;
|
|
13321
|
-
/**
|
|
13322
|
-
* Cancel the currently active Camera animation.
|
|
13117
|
+
* OR / C0 = tan(F/2)
|
|
13118
|
+
* so OR = CO * tan(F/2)
|
|
13323
13119
|
*/
|
|
13324
|
-
|
|
13120
|
+
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
13121
|
+
/** getZoom
|
|
13122
|
+
*
|
|
13123
|
+
* C - Camera, OP -- picture plane (canvas), S - origin,
|
|
13124
|
+
* QR - front side of maps Bounding Box, F: FOV
|
|
13125
|
+
*
|
|
13126
|
+
* Z-axis
|
|
13127
|
+
* R_____|______
|
|
13128
|
+
* /| | |
|
|
13129
|
+
* / | | |
|
|
13130
|
+
* P/ | | | maps BB
|
|
13131
|
+
* /| | | |
|
|
13132
|
+
* / | | | |
|
|
13133
|
+
* / | | | |
|
|
13134
|
+
* / F |E |T |S |
|
|
13135
|
+
* C /--------|-----|-----|-----|------ orthogonal to Y axis, midpoint of focus maps
|
|
13136
|
+
* \ | | | |
|
|
13137
|
+
* \ | | | |
|
|
13138
|
+
* \ | | | |
|
|
13139
|
+
* \ | | | |
|
|
13140
|
+
* \| | | |
|
|
13141
|
+
* O\ | | |
|
|
13142
|
+
* \ | | |
|
|
13143
|
+
* \|_____|_____|
|
|
13144
|
+
* Q
|
|
13145
|
+
*
|
|
13146
|
+
*
|
|
13147
|
+
* We want to get CS, which is the camera zoom
|
|
13148
|
+
*
|
|
13149
|
+
*/
|
|
13150
|
+
export function getZoom(focusBox: Box3, focusBoxHeight: number, FOV: number): number;
|
|
13151
|
+
interface CalculateTwoDProjectionsParams {
|
|
13152
|
+
maps: MapObject[];
|
|
13153
|
+
width: number;
|
|
13154
|
+
height: number;
|
|
13155
|
+
camera: Camera;
|
|
13325
13156
|
}
|
|
13157
|
+
export function calculateTwoDProjections({ maps, width, height, camera }: CalculateTwoDProjectionsParams): {
|
|
13158
|
+
min: {
|
|
13159
|
+
x: number;
|
|
13160
|
+
y: number;
|
|
13161
|
+
};
|
|
13162
|
+
max: {
|
|
13163
|
+
x: number;
|
|
13164
|
+
y: number;
|
|
13165
|
+
};
|
|
13166
|
+
}[];
|
|
13167
|
+
export function splitLine(startNode: Vector3, endNode: Vector3, segments: number): Vector3[];
|
|
13168
|
+
export function isObject(item: any): boolean;
|
|
13169
|
+
export const determineStartingMap: (venue: Mappedin, options: TMapViewOptions) => MappedinMap;
|
|
13170
|
+
export function cyrb53(str: string, seed?: number): number;
|
|
13171
|
+
export function addMarginMultiplierToBoundingBox(bbox: Box3, multiplier: number): Box3;
|
|
13172
|
+
export function tweenPromise({ from, to, duration, easing, delay, onUpdate, onStart, onComplete, }: {
|
|
13173
|
+
from: any;
|
|
13174
|
+
to: any;
|
|
13175
|
+
duration?: number | undefined;
|
|
13176
|
+
easing?: any;
|
|
13177
|
+
delay?: number | undefined;
|
|
13178
|
+
onUpdate?: ((_: any) => void) | undefined;
|
|
13179
|
+
onStart?: (() => void) | undefined;
|
|
13180
|
+
onComplete?: (() => void) | undefined;
|
|
13181
|
+
}): {
|
|
13182
|
+
start(core: any): Promise<void>;
|
|
13183
|
+
};
|
|
13184
|
+
export const linearEase: (t: number) => number;
|
|
13185
|
+
export const quadEaseIn: (t: number) => number;
|
|
13186
|
+
export const quadEaseOut: (t: number) => number;
|
|
13187
|
+
export function interpolate(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number, easeFunc?: (t: number) => number): number;
|
|
13188
|
+
export function interpolateMulti(value: number, inputRange: number[], outputRange: number[], easeFunc?: (t: number) => number): number;
|
|
13189
|
+
export function checkWritableBeforeWrite(obj: any, key: string, value: any): void;
|
|
13190
|
+
export {};
|
|
13191
|
+
}
|
|
13192
|
+
|
|
13193
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/browser' {
|
|
13194
|
+
type DeviceType = {
|
|
13195
|
+
isIpad: boolean;
|
|
13196
|
+
isMobile: boolean;
|
|
13197
|
+
isSafari12: boolean;
|
|
13198
|
+
isFirefox: boolean;
|
|
13199
|
+
isWindows: boolean;
|
|
13200
|
+
};
|
|
13201
|
+
/**
|
|
13202
|
+
* Get device OS info
|
|
13203
|
+
* export for testing purpose
|
|
13204
|
+
* @returns DeviceType
|
|
13205
|
+
*/
|
|
13206
|
+
export const _deviceTypeControl: {
|
|
13207
|
+
getDeviceType(): DeviceType;
|
|
13208
|
+
_reset(): void;
|
|
13209
|
+
};
|
|
13210
|
+
export const getDeviceType: () => DeviceType;
|
|
13211
|
+
/**
|
|
13212
|
+
* Creates a closure encapsulating the logic of getting device GPU info.
|
|
13213
|
+
* inspired by https://github.com/pmndrs/detect-gpu
|
|
13214
|
+
* export for testing
|
|
13215
|
+
*/
|
|
13216
|
+
export const _gpuInfoControl: {
|
|
13217
|
+
getInfo: () => string | undefined;
|
|
13218
|
+
shouldDisableOffscreenCanvas: () => boolean;
|
|
13219
|
+
_setCanvas(c: HTMLCanvasElement): void;
|
|
13220
|
+
};
|
|
13221
|
+
export const getGPUInfo: () => string | undefined;
|
|
13222
|
+
/**
|
|
13223
|
+
* Check if device is certain intel integrated GPU.
|
|
13224
|
+
* This is for implementing workaround - https://issues.chromium.org/issues/40251953
|
|
13225
|
+
* The reason we want to disable OffscreenCanvas at all is due to `willReadFrequently` flag only works in FF.
|
|
13226
|
+
* In order to ensure the integrated intel GPU render text correctly
|
|
13227
|
+
*/
|
|
13228
|
+
export const shouldDisableOffscreenCanvas: () => boolean;
|
|
13229
|
+
export {};
|
|
13230
|
+
}
|
|
13231
|
+
|
|
13232
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/utils/async' {
|
|
13233
|
+
export function throttle<T>(func: () => void, wait: number, options?: any): () => void;
|
|
13234
|
+
export function debounce<T>(func: () => void, wait: number, immediate?: boolean): () => void;
|
|
13326
13235
|
}
|
|
13327
13236
|
|
|
13328
13237
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/Mappedin.MultiFloorView' {
|
|
@@ -13918,6 +13827,244 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/BlueDo
|
|
|
13918
13827
|
}
|
|
13919
13828
|
}
|
|
13920
13829
|
|
|
13830
|
+
declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Camera' {
|
|
13831
|
+
import { E_CAMERA_DIRECTION } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums';
|
|
13832
|
+
import CameraController, { TCameraAnimationOptions, TCameraInteractionsSetOptions, TCameraTargets, TCameraTransform, TFocusOnCameraOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/CameraController';
|
|
13833
|
+
/**
|
|
13834
|
+
* API to control and respond to the state of the camera within the scene.
|
|
13835
|
+
*/
|
|
13836
|
+
export class Camera {
|
|
13837
|
+
#private;
|
|
13838
|
+
/**
|
|
13839
|
+
* @hidden
|
|
13840
|
+
*/
|
|
13841
|
+
constructor(controller: CameraController);
|
|
13842
|
+
/**
|
|
13843
|
+
* Subscribe a function to be called when an {@link E_CAMERA_EVENT} is fired.
|
|
13844
|
+
*
|
|
13845
|
+
* ```ts
|
|
13846
|
+
* const cameraChangedHandler = ({ tilt, position, zoom, rotation }) => {
|
|
13847
|
+
* // Do something with the new values
|
|
13848
|
+
* };
|
|
13849
|
+
* mapView.Camera.on(E_CAMERA_EVENT.CHANGED, cameraChangedHandler);
|
|
13850
|
+
* ```
|
|
13851
|
+
*
|
|
13852
|
+
* @param eventName An {@link E_CAMERA_EVENT} that is fired when the camera changes.
|
|
13853
|
+
* @param fn A callback that gets called when the corresponding event is fired. The
|
|
13854
|
+
* callback will get passed an argument with a type that's one of {@link CAMERA_EVENT_PAYLOAD}.
|
|
13855
|
+
*/
|
|
13856
|
+
on: CameraController['on'];
|
|
13857
|
+
/**
|
|
13858
|
+
* Unsubscribe a function that was previously subscribed with {@link on}.
|
|
13859
|
+
*
|
|
13860
|
+
* ```ts
|
|
13861
|
+
* mapView.Camera.on(E_CAMERA_EVENT.CHANGED, cameraChangedHandler);
|
|
13862
|
+
*
|
|
13863
|
+
* ...
|
|
13864
|
+
*
|
|
13865
|
+
* // Something changed and I no longer want this event to fire
|
|
13866
|
+
* mapView.Camera.off(E_CAMERA_EVENT.CHANGED, cameraChangedHandler);
|
|
13867
|
+
* ```
|
|
13868
|
+
*
|
|
13869
|
+
* @param eventName An {@link E_CAMERA_EVENT} that is fired when the camera changes.
|
|
13870
|
+
* @param fn A function that was previously passed to {@link on}. The function must
|
|
13871
|
+
* have the same reference as the function that was subscribed.
|
|
13872
|
+
*/
|
|
13873
|
+
off: CameraController['off'];
|
|
13874
|
+
/**
|
|
13875
|
+
* The current camera animation, if any. Resolves when the animation finishes.
|
|
13876
|
+
*/
|
|
13877
|
+
get currentAnimation(): Promise<undefined> | undefined;
|
|
13878
|
+
/**
|
|
13879
|
+
* Current Camera zoom (in meters)
|
|
13880
|
+
*/
|
|
13881
|
+
get zoom(): number;
|
|
13882
|
+
/**
|
|
13883
|
+
* Current Camera rotation (in radians) from north
|
|
13884
|
+
*/
|
|
13885
|
+
get rotation(): number;
|
|
13886
|
+
/**
|
|
13887
|
+
* Current camera tilt angle (in radians), relative to a top-down view.
|
|
13888
|
+
*
|
|
13889
|
+
* ex: 0 means the camera is facing top-down, π/2 means the camera is
|
|
13890
|
+
* facing directly from the side.
|
|
13891
|
+
*/
|
|
13892
|
+
get tilt(): number;
|
|
13893
|
+
/**
|
|
13894
|
+
* Get the minimum distance (in meters) the camera is allowed to get to the ground.
|
|
13895
|
+
*/
|
|
13896
|
+
get minZoom(): number;
|
|
13897
|
+
/**
|
|
13898
|
+
* Set the minimum distance (in meters) the camera is allowed to get to the ground.
|
|
13899
|
+
*/
|
|
13900
|
+
set minZoom(meters: number);
|
|
13901
|
+
/**
|
|
13902
|
+
* Get the maximum distance (in meters) the camera is allowed to get from the ground.
|
|
13903
|
+
*/
|
|
13904
|
+
get maxZoom(): number;
|
|
13905
|
+
/**
|
|
13906
|
+
* Set the maximum distance (in meters) the camera is allowed to get from the ground.
|
|
13907
|
+
*/
|
|
13908
|
+
set maxZoom(meters: number);
|
|
13909
|
+
/**
|
|
13910
|
+
* Get the current maximum tilt angle (in radians) the camera is allowed to use.
|
|
13911
|
+
*/
|
|
13912
|
+
get maxTilt(): number;
|
|
13913
|
+
/**
|
|
13914
|
+
* Sets the maximum tilt angle (in radians) the camera is allowed to use.
|
|
13915
|
+
*
|
|
13916
|
+
* Tilt angle must be between 0 and π/2 radians. It will be clamped within
|
|
13917
|
+
* this range if it exceeds it on either end.
|
|
13918
|
+
*
|
|
13919
|
+
* As tilt angle approaches π/2 radians, this will impact overall touch controls
|
|
13920
|
+
* and should be used sparingly.
|
|
13921
|
+
*/
|
|
13922
|
+
set maxTilt(radians: number);
|
|
13923
|
+
/**
|
|
13924
|
+
* Get the current camera position, which is at the center of the map.
|
|
13925
|
+
* @returns the position as a coordinate
|
|
13926
|
+
*/
|
|
13927
|
+
get position(): import("../../index.rn").MappedinCoordinate;
|
|
13928
|
+
/**
|
|
13929
|
+
* Enable or disable the ability for the user to interact with the camera (e.g. pan, zoom, tilt, etc).
|
|
13930
|
+
* This does not affect programmatic camera controls, such as {@link set} and {@link focusOn}.
|
|
13931
|
+
*
|
|
13932
|
+
* ```ts
|
|
13933
|
+
* // The user can no longer interact to move the camera
|
|
13934
|
+
* mapView.Camera.interactions.disable();
|
|
13935
|
+
*
|
|
13936
|
+
* // The user can now interact to move the camera again
|
|
13937
|
+
* mapView.Camera.interactions.enable();
|
|
13938
|
+
* ```
|
|
13939
|
+
*/
|
|
13940
|
+
interactions: {
|
|
13941
|
+
/**
|
|
13942
|
+
* Enable or disable specific user interactions.
|
|
13943
|
+
*
|
|
13944
|
+
* ```ts
|
|
13945
|
+
* mapView.Camera.interactions.set({ zoom: false });
|
|
13946
|
+
* ```
|
|
13947
|
+
*
|
|
13948
|
+
* @param options An object defining the interactions to switch on or off.
|
|
13949
|
+
*
|
|
13950
|
+
*/
|
|
13951
|
+
set: (options: TCameraInteractionsSetOptions) => void;
|
|
13952
|
+
/**
|
|
13953
|
+
* Enable all user interactions.
|
|
13954
|
+
*/
|
|
13955
|
+
enable: () => void;
|
|
13956
|
+
/**
|
|
13957
|
+
* Disable all user interactions.
|
|
13958
|
+
*/
|
|
13959
|
+
disable: () => void;
|
|
13960
|
+
};
|
|
13961
|
+
/**
|
|
13962
|
+
* Define an area of the screen that is safe for the camera. Anything outside the safe area is
|
|
13963
|
+
* assumed to be covered in some way (e.g. by UI) meaning the camera will not place
|
|
13964
|
+
* any map elements there when calling {@link focusOn}.
|
|
13965
|
+
*
|
|
13966
|
+
* ```ts
|
|
13967
|
+
* // The top 100px of the canvas are covered by a UI element
|
|
13968
|
+
* mapView.Camera.setSafeAreaInsets({ top: 100, left: 0, bottom: 0, right: 0});
|
|
13969
|
+
* mapView.Camera.focusOn({ nodes });
|
|
13970
|
+
* ```
|
|
13971
|
+
*
|
|
13972
|
+
* @param insets An object defining a number of pixels from the top, left, bottom, and right of
|
|
13973
|
+
* the screen. Only the area within the padding defined by these pixels is considered safe.
|
|
13974
|
+
*/
|
|
13975
|
+
setSafeAreaInsets(insets: {
|
|
13976
|
+
top: number;
|
|
13977
|
+
left: number;
|
|
13978
|
+
bottom: number;
|
|
13979
|
+
right: number;
|
|
13980
|
+
}): void;
|
|
13981
|
+
/**
|
|
13982
|
+
* Retrieve the values previously set by {@link setSafeAreaInsets}.
|
|
13983
|
+
*
|
|
13984
|
+
* @returns An object defining a number of pixels from the top, left, bottom, and right of
|
|
13985
|
+
* the screen.
|
|
13986
|
+
*/
|
|
13987
|
+
getSafeAreaInsets(): import("../../MapView.types").TPadding;
|
|
13988
|
+
/**
|
|
13989
|
+
* Animate the camera to focus on a collection of targets. To control where the targets should
|
|
13990
|
+
* be placed on screen, either specify `safeAreaInsets` on the {@link TFocusOnCameraOptions}
|
|
13991
|
+
* or call {@link setSafeAreaInsets}.
|
|
13992
|
+
*
|
|
13993
|
+
* ```ts
|
|
13994
|
+
* const location = mapView.venue.locations.find((l) => l.name === "My Location")!;
|
|
13995
|
+
*
|
|
13996
|
+
* mapView.Camera.focusOn({
|
|
13997
|
+
* polygons: location.polygons,
|
|
13998
|
+
* nodes: location.nodes,
|
|
13999
|
+
* });
|
|
14000
|
+
* ```
|
|
14001
|
+
*
|
|
14002
|
+
* @param targets A collection of things that the camera will place into view at the end of the
|
|
14003
|
+
* animation.
|
|
14004
|
+
* @param options
|
|
14005
|
+
* @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
|
|
14006
|
+
*/
|
|
14007
|
+
focusOn(targets: TCameraTargets, options?: TFocusOnCameraOptions & TCameraAnimationOptions): Promise<any>;
|
|
14008
|
+
/**
|
|
14009
|
+
* Instantaneously set the camera's transform to be in a new configuration. See also {@link animate}.
|
|
14010
|
+
*
|
|
14011
|
+
* ```ts
|
|
14012
|
+
* const coord = mapView.venue.maps[0].createCoordinate(33.66107, 31.83911);
|
|
14013
|
+
*
|
|
14014
|
+
* // Place the camera top-down at a specified coordinate
|
|
14015
|
+
* mapView.Camera.set({
|
|
14016
|
+
* tilt: 0,
|
|
14017
|
+
* position: coord,
|
|
14018
|
+
* });
|
|
14019
|
+
* ```
|
|
14020
|
+
*
|
|
14021
|
+
* @param transform The new transform of the camera.
|
|
14022
|
+
*/
|
|
14023
|
+
set(transform: TCameraTransform): void;
|
|
14024
|
+
/**
|
|
14025
|
+
* Convert a Mercator Zoom Level to altitude, which can be used in the Camera APIs
|
|
14026
|
+
*/
|
|
14027
|
+
convertZoomLevelToAltitude(zoomLevel: number): any;
|
|
14028
|
+
/**
|
|
14029
|
+
* Convert the altitude returned by getZoom into Mercator Zoom level
|
|
14030
|
+
*/
|
|
14031
|
+
convertAltitudeToZoomLevel(altitude: number): any;
|
|
14032
|
+
/**
|
|
14033
|
+
* Smoothly transition the camera's transform to be in a new configuration. See also {@link set}.
|
|
14034
|
+
*
|
|
14035
|
+
* ```ts
|
|
14036
|
+
* const coord = mapView.venue.maps[0].createCoordinate(33.66107, 31.83911);
|
|
14037
|
+
*
|
|
14038
|
+
* // Animate the camera to be top-down at a specified coordinate
|
|
14039
|
+
* mapView.Camera.animate({
|
|
14040
|
+
* tilt: 0,
|
|
14041
|
+
* position: coord,
|
|
14042
|
+
* });
|
|
14043
|
+
* ```
|
|
14044
|
+
*
|
|
14045
|
+
* @param transform The new transform of the camera.
|
|
14046
|
+
* @param options
|
|
14047
|
+
* @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
|
|
14048
|
+
*/
|
|
14049
|
+
animate(transform: TCameraTransform, options?: TCameraAnimationOptions): Promise<undefined>;
|
|
14050
|
+
/**
|
|
14051
|
+
* Moves the Camera view in a relative direction by a given distance in meters.
|
|
14052
|
+
*
|
|
14053
|
+
* ```ts
|
|
14054
|
+
* // Move the camera 50 meters up relative to the camera frame
|
|
14055
|
+
* mapView.Camera.translate(E_CAMERA_DIRECTION.UP, 50);
|
|
14056
|
+
* ```
|
|
14057
|
+
*
|
|
14058
|
+
* @returns a Promise that resolves when the translation animation finishes, or rejects when it is cancelled.
|
|
14059
|
+
*/
|
|
14060
|
+
translate(direction: E_CAMERA_DIRECTION, distance: number, options?: TCameraAnimationOptions): Promise<unknown>;
|
|
14061
|
+
/**
|
|
14062
|
+
* Cancel the currently active Camera animation.
|
|
14063
|
+
*/
|
|
14064
|
+
cancelAnimation(): void;
|
|
14065
|
+
}
|
|
14066
|
+
}
|
|
14067
|
+
|
|
13921
14068
|
declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Exporter' {
|
|
13922
14069
|
import { ExportController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
|
|
13923
14070
|
/**
|