@mappedin/mappedin-js 6.0.1-beta.1 → 6.0.1-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES.txt +84 -602
- package/lib/esm/GLTFExporter-XOP3B7V5.js +1 -0
- package/lib/esm/{GLTFLoader-YATT2FR2.js → GLTFLoader-HKCKJXQO.js} +1 -1
- package/lib/esm/{browser-MBHO2IHH.js → browser-4BG3CNXW.js} +1 -1
- package/lib/esm/chunk-7P6SMTYY.js +1 -0
- package/lib/esm/{chunk-FFDKE6ZN.js → chunk-A6QTJRY4.js} +1 -1
- package/lib/esm/chunk-CBWWQFNR.js +1 -0
- package/lib/esm/{chunk-ICAZ6TUF.js → chunk-GLHDHW4V.js} +1 -1
- package/lib/esm/chunk-TKFKQMTK.js +1 -0
- package/lib/esm/chunk-X4O3T5J7.js +1 -0
- package/lib/esm/index.css +1 -1
- package/lib/esm/index.d.ts +2637 -589
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-XYNFPRUR.css → inspector-OZDC5DPH.css} +1 -1
- package/lib/esm/inspector-TH36X7KS.js +1 -0
- package/lib/esm/internal-3SSHRPBM.js +1 -0
- package/lib/esm/{outdoor-context-v4-HOWB3AEV.js → outdoor-context-v4-6FK55GUT.js} +1 -1
- package/lib/index.css +1 -1
- package/package.json +2 -2
- package/lib/esm/GLTFExporter-KPPZ5BWT.js +0 -18
- package/lib/esm/chunk-AD5XTQM2.js +0 -577
- package/lib/esm/chunk-QYKF4M6W.js +0 -3799
- package/lib/esm/chunk-V5JUBEEV.js +0 -950
- package/lib/esm/inspector-6LWH2QCH.js +0 -425
package/lib/esm/index.d.ts
CHANGED
|
@@ -5,19 +5,22 @@
|
|
|
5
5
|
// ../mappedin-js/@packages/internal/common/pubsub
|
|
6
6
|
// ../mappedin-js/@packages/internal/common/Mappedin.Logger
|
|
7
7
|
// ../mappedin-js/geojson
|
|
8
|
-
// ../mappedin-js/@mappedin/core-sdk
|
|
9
8
|
// ../mappedin-js/@packages/internal/common
|
|
10
|
-
// ../mappedin-js/@
|
|
9
|
+
// ../mappedin-js/@mappedin/core-sdk
|
|
11
10
|
// ../mappedin-js/@mappedin/core-sdk/src/camera
|
|
11
|
+
// ../mappedin-js/@tweenjs/tween.js
|
|
12
|
+
// ../mappedin-js/@mappedin/mvf/dist/locale
|
|
12
13
|
// ../mappedin-js/three
|
|
14
|
+
// ../mappedin-js/zod
|
|
13
15
|
// ../mappedin-js/@packages/internal/shave-text/shave-text
|
|
14
16
|
// ../mappedin-js/@turf/turf
|
|
15
17
|
// ../mappedin-js/@packages/internal/quad-tree
|
|
18
|
+
// ../mappedin-js/@packages/internal/outdoor-context-v4
|
|
16
19
|
// ../mappedin-js/@packages/internal/geojson-navigator
|
|
20
|
+
// ../mappedin-js/minisearch
|
|
17
21
|
// ../mappedin-js/three/addons/loaders/GLTFLoader.js
|
|
18
22
|
// ../mappedin-js/@mapbox/point-geometry
|
|
19
23
|
// ../mappedin-js/@maplibre/maplibre-gl-style-spec
|
|
20
|
-
// ../mappedin-js/@tweenjs/tween.js
|
|
21
24
|
// ../mappedin-js/gl-matrix
|
|
22
25
|
// ../mappedin-js/@mapbox/vector-tile
|
|
23
26
|
// ../mappedin-js/potpack
|
|
@@ -34,11 +37,11 @@ declare module '@mappedin/mappedin-js' {
|
|
|
34
37
|
import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
35
38
|
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle } from '@mappedin/mvf';
|
|
36
39
|
import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
37
|
-
import type { Shading, PaintStyle, LineStyle, WatermarkOptions
|
|
40
|
+
import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
|
|
38
41
|
import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
|
|
39
42
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
43
|
+
import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
|
|
44
|
+
import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
42
45
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
43
46
|
/**
|
|
44
47
|
* Represents all the available antialiasing options.
|
|
@@ -250,6 +253,14 @@ declare module '@mappedin/mappedin-js' {
|
|
|
250
253
|
* @experimental
|
|
251
254
|
*/
|
|
252
255
|
style?: {
|
|
256
|
+
/**
|
|
257
|
+
* Background color. Only relevant if outdoor map is disabled.
|
|
258
|
+
*/
|
|
259
|
+
backgroundColor?: string;
|
|
260
|
+
/**
|
|
261
|
+
* Background alpha value. Only relevant if outdoor map is disabled.
|
|
262
|
+
*/
|
|
263
|
+
backgroundAlpha?: number;
|
|
253
264
|
/**
|
|
254
265
|
* Set the global shading for all elements. True will use default values, false will disable shading.
|
|
255
266
|
* @default true
|
|
@@ -271,10 +282,12 @@ declare module '@mappedin/mappedin-js' {
|
|
|
271
282
|
*
|
|
272
283
|
* Returns a {@link MapData} instance from a parsed MVF object.
|
|
273
284
|
*/
|
|
274
|
-
export const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions
|
|
275
|
-
|
|
285
|
+
export const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions & {
|
|
286
|
+
languagePacks?: LanguagePackHydrationItem[];
|
|
287
|
+
}) => Promise<MapData>;
|
|
276
288
|
/**
|
|
277
|
-
* @internal
|
|
289
|
+
* @internal
|
|
290
|
+
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
278
291
|
*/
|
|
279
292
|
export function setUseEnterpriseAPI(value: boolean): void;
|
|
280
293
|
/**
|
|
@@ -287,26 +300,11 @@ declare module '@mappedin/mappedin-js' {
|
|
|
287
300
|
* const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
|
|
288
301
|
*/
|
|
289
302
|
export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* MapView instance
|
|
297
|
-
*/
|
|
298
|
-
mapView: MapView;
|
|
299
|
-
/**
|
|
300
|
-
* MapData instance
|
|
301
|
-
*/
|
|
302
|
-
mapData: MapData;
|
|
303
|
-
};
|
|
304
|
-
}> {
|
|
305
|
-
#private;
|
|
306
|
-
static instance: MappedinMapLibreOverlay;
|
|
307
|
-
constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
|
|
308
|
-
onAdd(map: any): HTMLDivElement;
|
|
309
|
-
}
|
|
303
|
+
/**
|
|
304
|
+
* @internal
|
|
305
|
+
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
306
|
+
*/
|
|
307
|
+
export const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
310
308
|
/**
|
|
311
309
|
* Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
|
|
312
310
|
* @experimental
|
|
@@ -317,17 +315,26 @@ declare module '@mappedin/mappedin-js' {
|
|
|
317
315
|
export { parseMVF, unzipMVF, enableTestMode };
|
|
318
316
|
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
317
|
export type * from 'geojson';
|
|
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';
|
|
318
|
+
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
319
|
+
export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
321
320
|
export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
322
321
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
323
322
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
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, Shapes, Outdoor, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
326
|
-
export {
|
|
323
|
+
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
324
|
+
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
325
|
+
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
326
|
+
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
330
|
-
import
|
|
330
|
+
import { Analytics } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
331
|
+
import { PubSub } from '@packages/internal/common';
|
|
332
|
+
import type { TSearchOptions } from '@packages/internal/mvf-utils';
|
|
333
|
+
import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
334
|
+
import type EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
|
|
335
|
+
import type EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
|
|
336
|
+
import type EnterpriseVenue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
|
|
337
|
+
import { Search } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
331
338
|
/**
|
|
332
339
|
* A WeakMap to associate {@link MapData} instances with their internal representation.
|
|
333
340
|
* We need a way to get the internal data object from the API
|
|
@@ -339,14 +346,40 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
339
346
|
* Represents the data for a map, providing access to map elements
|
|
340
347
|
* like spaces, floors, and points of interest.
|
|
341
348
|
*/
|
|
342
|
-
class MapData {
|
|
349
|
+
class MapData extends PubSub<{
|
|
350
|
+
'language-change': {
|
|
351
|
+
code: string;
|
|
352
|
+
name: string;
|
|
353
|
+
};
|
|
354
|
+
}> {
|
|
343
355
|
#private;
|
|
356
|
+
Analytics: Analytics;
|
|
357
|
+
/**
|
|
358
|
+
* Search API for MapData
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* // Enable search
|
|
362
|
+
* const mapData = await getMapData({ search: { enabled: true } });
|
|
363
|
+
* // or
|
|
364
|
+
* await mapData.Search.enable();
|
|
365
|
+
*
|
|
366
|
+
* // Perform a search query
|
|
367
|
+
* const results = await mapData.Search.query('Coffee Shop');
|
|
368
|
+
* console.log(results.locations);
|
|
369
|
+
*
|
|
370
|
+
* // Get search suggestions
|
|
371
|
+
* const suggestions = await mapData.Search.suggest('Coff');
|
|
372
|
+
* console.log(suggestions);
|
|
373
|
+
*/
|
|
374
|
+
Search: Search;
|
|
344
375
|
/**
|
|
345
376
|
* Constructs a new instance of {@link MapData}.
|
|
346
377
|
*
|
|
347
378
|
* @internal
|
|
348
379
|
*/
|
|
349
|
-
constructor(internal: MapDataInternal
|
|
380
|
+
constructor(internal: MapDataInternal, { search }?: {
|
|
381
|
+
search?: TSearchOptions;
|
|
382
|
+
});
|
|
350
383
|
/**
|
|
351
384
|
* The name of the map.
|
|
352
385
|
*
|
|
@@ -398,6 +431,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
398
431
|
* const floors = mapData.getByType('floor');
|
|
399
432
|
*/
|
|
400
433
|
getByType(type: 'floor'): Floor[];
|
|
434
|
+
/**
|
|
435
|
+
* @returns The stacks of floors ({@link FloorStack}) within the map.
|
|
436
|
+
* @example
|
|
437
|
+
* const floorStacks = mapData.getByType('floor-stack');
|
|
438
|
+
*/
|
|
439
|
+
getByType(type: 'floor-stack'): FloorStack[];
|
|
401
440
|
/**
|
|
402
441
|
* @returns The connections ({@link Connection}) on the map.
|
|
403
442
|
* @example
|
|
@@ -422,6 +461,24 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
422
461
|
* const annotations = mapData.getByType('annotation');
|
|
423
462
|
*/
|
|
424
463
|
getByType(type: 'annotation'): Annotation[];
|
|
464
|
+
/**
|
|
465
|
+
* @returns The enterprise locations ({@link EnterpriseLocation}) on the map.
|
|
466
|
+
* @example
|
|
467
|
+
* const enterpriseLocations = mapData.getByType('enterprise-location');
|
|
468
|
+
*/
|
|
469
|
+
getByType(type: 'enterprise-location'): EnterpriseLocation[];
|
|
470
|
+
/**
|
|
471
|
+
* @returns The enterprise categories ({@link EnterpriseCategory}) on the map.
|
|
472
|
+
* @example
|
|
473
|
+
* const enterpriseCategories = mapData.getByType('enterprise-category');
|
|
474
|
+
*/
|
|
475
|
+
getByType(type: 'enterprise-category'): EnterpriseCategory[];
|
|
476
|
+
/**
|
|
477
|
+
* @returns The enterprise venue ({@link EnterpriseVenue}) on the map.
|
|
478
|
+
* @example
|
|
479
|
+
* const enterpriseVenue = mapData.getByType('enterprise-venue');
|
|
480
|
+
*/
|
|
481
|
+
getByType(type: 'enterprise-venue'): EnterpriseVenue;
|
|
425
482
|
/**
|
|
426
483
|
* Retrieves a specific map feature by its type and ID.
|
|
427
484
|
*
|
|
@@ -434,13 +491,39 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
|
|
|
434
491
|
getById(type: 'space', id: string): Space | undefined;
|
|
435
492
|
getById(type: 'door', id: string): Door | undefined;
|
|
436
493
|
getById(type: 'floor', id: string): Floor | undefined;
|
|
494
|
+
getById(type: 'floor-stack', id: string): FloorStack | undefined;
|
|
437
495
|
getById(type: 'connection', id: string): Connection | undefined;
|
|
438
496
|
getById(type: 'object', id: string): MapObject | undefined;
|
|
439
497
|
getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
|
|
440
498
|
getById(type: 'annotation', id: string): Annotation | undefined;
|
|
499
|
+
getById(type: 'enterprise-location', id: string): EnterpriseLocation | undefined;
|
|
500
|
+
getById(type: 'enterprise-category', id: string): EnterpriseCategory | undefined;
|
|
441
501
|
getById(type: string, id: string): object | undefined;
|
|
502
|
+
/**
|
|
503
|
+
* Changes the language of the map data.
|
|
504
|
+
*
|
|
505
|
+
* @param localeCode The ISO 639-1 language code to change to (e.g., 'en' for English, 'fr' for French). Check venue.languages for available languages
|
|
506
|
+
* @returns A promise that resolves when the language change is complete.
|
|
507
|
+
* @throws An error if the language change fails.
|
|
508
|
+
* @example
|
|
509
|
+
* try {
|
|
510
|
+
* await mapData.changeLanguage('fr');
|
|
511
|
+
* console.log('Language changed to French');
|
|
512
|
+
* } catch (error) {
|
|
513
|
+
* console.error('Failed to change language:', error);
|
|
514
|
+
* }
|
|
515
|
+
*/
|
|
516
|
+
changeLanguage(localeCode: string): Promise<void>;
|
|
517
|
+
/**
|
|
518
|
+
* @internal
|
|
519
|
+
*/
|
|
520
|
+
get currentLanguage(): import("@mappedin/mvf").Language | undefined;
|
|
442
521
|
}
|
|
443
522
|
export default MapData;
|
|
523
|
+
/**
|
|
524
|
+
* @internal
|
|
525
|
+
*/
|
|
526
|
+
export function getMapDataInternal(mapData: MapData): MapDataInternal;
|
|
444
527
|
}
|
|
445
528
|
|
|
446
529
|
declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
|
|
@@ -564,15 +647,30 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
564
647
|
import Annotation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/annotation';
|
|
565
648
|
import Hyperlink from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/hyperlink';
|
|
566
649
|
import Image from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image';
|
|
567
|
-
import
|
|
568
|
-
import type {
|
|
650
|
+
import FloorStack from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor-stack';
|
|
651
|
+
import type { MapDataRecords } from '@mappedin/mappedin-js/mappedin-js/src/utils/data-creation';
|
|
652
|
+
import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, FloorProperties as MVFFloor, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseCategory as MVFEnterpriseCategory, Language } from '@mappedin/mvf';
|
|
653
|
+
import { AnalyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
654
|
+
import EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
|
|
655
|
+
import EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
|
|
656
|
+
import EnterpriseVenue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
|
|
657
|
+
import { PubSub } from '@packages/internal/common';
|
|
658
|
+
import type { LanguagePack, Places } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
|
|
659
|
+
import { type LocalePackUrls } from '@packages/internal/mvf-utils';
|
|
660
|
+
import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
569
661
|
/**
|
|
570
662
|
* Internal class representing detailed map data.
|
|
571
663
|
*
|
|
572
664
|
* @internal
|
|
573
665
|
*/
|
|
574
|
-
class MapDataInternal {
|
|
666
|
+
class MapDataInternal extends PubSub<{
|
|
667
|
+
'language-change': {
|
|
668
|
+
code: string;
|
|
669
|
+
name: string;
|
|
670
|
+
};
|
|
671
|
+
}> {
|
|
575
672
|
#private;
|
|
673
|
+
Analytics: AnalyticsInternal;
|
|
576
674
|
/**
|
|
577
675
|
* Represents the parsed Mappedin Venue Format (MVF) data.
|
|
578
676
|
*/
|
|
@@ -593,10 +691,47 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
593
691
|
* Represents a map of entrance IDs to obstruction IDs.
|
|
594
692
|
*/
|
|
595
693
|
readonly obstructionIdByEntranceId: Record<string, string>;
|
|
694
|
+
readonly venue?: EnterpriseVenue;
|
|
695
|
+
enterpriseMode: boolean;
|
|
696
|
+
nodesById: MapDataRecords['nodesById'];
|
|
697
|
+
spacesById: MapDataRecords['spacesById'];
|
|
698
|
+
floorsById: MapDataRecords['floorsById'];
|
|
699
|
+
floorStacksById: MapDataRecords['floorStacksById'];
|
|
700
|
+
connectionsById: MapDataRecords['connectionsById'];
|
|
701
|
+
objectsById: MapDataRecords['objectsById'];
|
|
702
|
+
doorsById: MapDataRecords['doorsById'];
|
|
703
|
+
pointsOfInterestById: MapDataRecords['poisById'];
|
|
704
|
+
annotationsById: MapDataRecords['annotationsById'];
|
|
705
|
+
locationsById: MapDataRecords['locationsById'];
|
|
706
|
+
categoriesById: MapDataRecords['categoriesById'];
|
|
707
|
+
doorsByNodeId: MapDataRecords['doorsByNodeId'];
|
|
708
|
+
locationsBySpaceId: MapDataRecords['mvfLocationsBySpaceId'];
|
|
709
|
+
mvfAnnotationsById: MapDataRecords['mvfAnnotationsById'];
|
|
710
|
+
mvfConnectionsById: MapDataRecords['mvfConnectionsById'];
|
|
711
|
+
mvfConnectionsByNodeId: MapDataRecords['mvfConnectionsByNodeId'];
|
|
712
|
+
mvfEntrancesById: MapDataRecords['mvfEntrancesById'];
|
|
713
|
+
mvfNodesById: MapDataRecords['mvfNodesById'];
|
|
714
|
+
mvfObstructionById: MapDataRecords['mvfObstructionById'];
|
|
715
|
+
mvfSpacesById: MapDataRecords['mvfSpacesById'];
|
|
716
|
+
mvfFloorsById: MapDataRecords['mvfFloorsById'];
|
|
717
|
+
mvfFloorStacksById: MapDataRecords['mvfFloorStacksById'];
|
|
718
|
+
localePacksUrls: LocalePackUrls;
|
|
719
|
+
currentLanguage?: Language;
|
|
720
|
+
/**
|
|
721
|
+
* These represent maps of diffed objects that are used to store the translated values
|
|
722
|
+
*/
|
|
723
|
+
languagePacks: {
|
|
724
|
+
[languageCode: string]: LanguagePack;
|
|
725
|
+
};
|
|
596
726
|
/**
|
|
597
727
|
* @internal
|
|
598
728
|
*/
|
|
599
|
-
constructor(mvf: ParsedMVF, outdoorViewToken?:
|
|
729
|
+
constructor(mvf: ParsedMVF, { outdoorViewToken, localePacksUrls: localePacks, enterprise, languagePacks, }?: {
|
|
730
|
+
enterprise?: boolean;
|
|
731
|
+
outdoorViewToken?: string;
|
|
732
|
+
localePacksUrls?: LocalePackUrls;
|
|
733
|
+
languagePacks?: LanguagePackHydrationItem[];
|
|
734
|
+
});
|
|
600
735
|
/**
|
|
601
736
|
* Retrieves the map name.
|
|
602
737
|
*
|
|
@@ -629,6 +764,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
629
764
|
* @returns {Floor[]} An array of Floor objects.
|
|
630
765
|
*/
|
|
631
766
|
get floors(): Floor[];
|
|
767
|
+
get floorStacks(): FloorStack[];
|
|
632
768
|
/**
|
|
633
769
|
* Retrieves all doors in the map.
|
|
634
770
|
*
|
|
@@ -655,6 +791,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
655
791
|
* @returns {Annotation[]} An array of Annotation objects.
|
|
656
792
|
*/
|
|
657
793
|
get nodes(): Node[];
|
|
794
|
+
get locations(): EnterpriseLocation[];
|
|
795
|
+
get categories(): EnterpriseCategory[];
|
|
658
796
|
/**
|
|
659
797
|
* Retrieves an object by its type and ID.
|
|
660
798
|
*
|
|
@@ -666,11 +804,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
666
804
|
getById(type: 'space', id: string): Space | undefined;
|
|
667
805
|
getById(type: 'door', id: string): Door | undefined;
|
|
668
806
|
getById(type: 'floor', id: string): Floor | undefined;
|
|
807
|
+
getById(type: 'floor-stack', id: string): FloorStack | undefined;
|
|
669
808
|
getById(type: 'connection', id: string): Connection | undefined;
|
|
670
809
|
getById(type: 'object', id: string): MapObject | undefined;
|
|
671
810
|
getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
|
|
672
811
|
getById(type: 'annotation', id: string): Annotation | undefined;
|
|
673
|
-
|
|
812
|
+
getById(type: 'enterprise-location', id: string): EnterpriseLocation | undefined;
|
|
813
|
+
getById(type: 'enterprise-category', id: string): EnterpriseCategory | undefined;
|
|
814
|
+
getMapDataById(id: string): Places | undefined;
|
|
674
815
|
/**
|
|
675
816
|
* Retrieves a feature by its type and ID from the Mappedin Venue Format (MVF) data.
|
|
676
817
|
*
|
|
@@ -681,12 +822,17 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
681
822
|
getMVFFeatureById(type: 'space', id: string): SpaceCollection['features'][number] | undefined;
|
|
682
823
|
getMVFFeatureById(type: 'node', id: string): NodeCollection['features'][number] | undefined;
|
|
683
824
|
getMVFFeatureById(type: 'obstruction', id: string): ObstructionCollection['features'][number] | undefined;
|
|
684
|
-
getMVFFeatureById(type: 'map', id: string):
|
|
825
|
+
getMVFFeatureById(type: 'map', id: string): MVFFloor | undefined;
|
|
685
826
|
getMVFFeatureById(type: 'connection', id: string): MVFConnection | undefined;
|
|
686
827
|
getMVFFeatureById(type: 'entrance', id: string): EntranceCollection['features'][number] | undefined;
|
|
687
828
|
getMVFFeatureById(type: 'annotation', id: string): AnnotationCollection['features'][number] | undefined;
|
|
688
829
|
getMVFFeatureById(type: string, id: string): object | undefined;
|
|
689
830
|
getMVFFeatureByNodeId(type: 'connection', id: string): MVFConnection | undefined;
|
|
831
|
+
getPropTranslation(type: 'enterprise-location' | 'enterprise-category', prop: string, id: string, fallback: MVFEnterpriseLocation[keyof MVFEnterpriseLocation] | MVFEnterpriseCategory[keyof MVFEnterpriseCategory]): unknown;
|
|
832
|
+
/**
|
|
833
|
+
* change the langauge of the data objects in mapdata
|
|
834
|
+
*/
|
|
835
|
+
changeLanguage(languageCode: string): Promise<void>;
|
|
690
836
|
/**
|
|
691
837
|
* Cleans up resources used by the instance.
|
|
692
838
|
*
|
|
@@ -694,9 +840,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
694
840
|
*/
|
|
695
841
|
destroy(): void;
|
|
696
842
|
}
|
|
697
|
-
export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, };
|
|
843
|
+
export { MapDataInternal, Space, Floor, FloorStack, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, };
|
|
698
844
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space';
|
|
699
|
-
export type {
|
|
845
|
+
export type { Places };
|
|
700
846
|
}
|
|
701
847
|
|
|
702
848
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
@@ -704,14 +850,15 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
704
850
|
import { PubSub } from '@packages/internal/common';
|
|
705
851
|
import { type TEvents, type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
706
852
|
import type { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
707
|
-
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
853
|
+
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
708
854
|
import type { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
709
855
|
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
710
|
-
import type { Floor, MapObject, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
711
|
-
import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
712
|
-
import type { Label, Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
856
|
+
import type { Door, Floor, MapObject, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
857
|
+
import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
858
|
+
import type { Label, Marker, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
713
859
|
import type { TEventPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
714
860
|
import type { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
|
|
861
|
+
import type { TShowStackOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
715
862
|
export class MapView extends PubSub<TEvents> {
|
|
716
863
|
#private;
|
|
717
864
|
/**
|
|
@@ -726,6 +873,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
726
873
|
* Controls for the map's markers.
|
|
727
874
|
*/
|
|
728
875
|
Markers: Markers;
|
|
876
|
+
/**
|
|
877
|
+
* Controls for the map's markers.
|
|
878
|
+
*/
|
|
879
|
+
Images: Images;
|
|
729
880
|
/**
|
|
730
881
|
* Controls for the map's models.
|
|
731
882
|
*/
|
|
@@ -781,8 +932,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
781
932
|
* // Update the color of a space to red.
|
|
782
933
|
* map.updateState(space, { color: 'red' });
|
|
783
934
|
*/
|
|
784
|
-
updateState<T extends Space | MapObject | Label | Marker>(target: T
|
|
785
|
-
updateState<T extends
|
|
935
|
+
updateState<T extends Space | MapObject | Label | Marker | Door | WALLS | DOORS>(target: T, state: TUpdateState<T>): any;
|
|
936
|
+
updateState<T extends string & NonNullable<unknown>>(target: T, state: TUpdateStates): any;
|
|
786
937
|
update: () => void;
|
|
787
938
|
getMapData(): {
|
|
788
939
|
[x: string]: MapData;
|
|
@@ -802,6 +953,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
802
953
|
expand(opts?: {
|
|
803
954
|
excludeFloors: Floor[];
|
|
804
955
|
}): Promise<void> | undefined;
|
|
956
|
+
showStack(opts?: TShowStackOptions): Promise<void> | undefined;
|
|
805
957
|
/**
|
|
806
958
|
* @experimental
|
|
807
959
|
* @hidden
|
|
@@ -818,7 +970,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
818
970
|
* Sets the current floor ({@link Floor}) of the map.
|
|
819
971
|
* @param floor The floor or floor ID to set.
|
|
820
972
|
*/
|
|
821
|
-
setFloor(floor: Floor | string): void;
|
|
973
|
+
setFloor(floor: Floor | string): Promise<void> | undefined;
|
|
822
974
|
/**
|
|
823
975
|
* The current floor ({@link Floor}) of the map.
|
|
824
976
|
*/
|
|
@@ -830,7 +982,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
830
982
|
* @hidden
|
|
831
983
|
*/
|
|
832
984
|
updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
|
|
833
|
-
getState<T extends Space | MapObject | Label | Marker | string>(target: T): TGetState<T> | undefined;
|
|
985
|
+
getState<T extends Space | MapObject | Label | Marker | Image | string>(target: T): TGetState<T> | undefined;
|
|
834
986
|
setHoverColor(c: string): void;
|
|
835
987
|
getHoverColor(): string | undefined;
|
|
836
988
|
/**
|
|
@@ -911,14 +1063,17 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
|
|
|
911
1063
|
* @internal
|
|
912
1064
|
*/
|
|
913
1065
|
get __core(): RendererCore;
|
|
1066
|
+
/**
|
|
1067
|
+
* Clears all added elements from the map.
|
|
1068
|
+
*/
|
|
1069
|
+
clear(): void;
|
|
914
1070
|
/**
|
|
915
1071
|
* Destroys the MapView.
|
|
916
1072
|
*/
|
|
917
1073
|
destroy(): void;
|
|
918
1074
|
/**
|
|
919
|
-
* @internal
|
|
920
1075
|
* @experimental
|
|
921
|
-
*
|
|
1076
|
+
* Enable debug interface
|
|
922
1077
|
*/
|
|
923
1078
|
enableDebug(): Promise<void>;
|
|
924
1079
|
}
|
|
@@ -928,8 +1083,8 @@ declare module '@mappedin/mappedin-js/geojson/src' {
|
|
|
928
1083
|
import type { MarkerState, AddMarkerOptions } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
929
1084
|
import type { PathState, AddPathOptions } from '@mappedin/mappedin-js/geojson/src/components/path';
|
|
930
1085
|
import type { AddLabelOptions, LabelAppearance, LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
931
|
-
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
932
|
-
import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
1086
|
+
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
1087
|
+
import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
933
1088
|
import type { Position } from '@mappedin/mappedin-js/geojson/src/types/geometry';
|
|
934
1089
|
import type { InsetPadding, RendererCoreOptions, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload } from '@mappedin/mappedin-js/geojson/src/types';
|
|
935
1090
|
import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
@@ -961,31 +1116,48 @@ declare module '@mappedin/mappedin-js/geojson/src' {
|
|
|
961
1116
|
}): Promise<RendererCore>;
|
|
962
1117
|
}
|
|
963
1118
|
|
|
964
|
-
declare module '@mappedin/mappedin-js/
|
|
965
|
-
import
|
|
966
|
-
import type
|
|
967
|
-
import
|
|
968
|
-
import {
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
1119
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay' {
|
|
1120
|
+
import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
1121
|
+
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
1122
|
+
import type { TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
1123
|
+
import { MapLibreOverlay } from '@mappedin/mappedin-js/geojson/src/maplibre-overlay';
|
|
1124
|
+
import type { Position } from '@mappedin/core-sdk';
|
|
1125
|
+
export class MappedinMapLibreOverlay extends MapLibreOverlay<{
|
|
1126
|
+
/**
|
|
1127
|
+
* Event emitted when the MappedinMap is loaded
|
|
1128
|
+
*/
|
|
1129
|
+
loaded: {
|
|
1130
|
+
/**
|
|
1131
|
+
* MapView instance
|
|
1132
|
+
*/
|
|
1133
|
+
mapView: MapView;
|
|
1134
|
+
/**
|
|
1135
|
+
* MapData instance
|
|
1136
|
+
*/
|
|
1137
|
+
mapData: MapData;
|
|
1138
|
+
};
|
|
1139
|
+
}> {
|
|
1140
|
+
#private;
|
|
1141
|
+
static instance: MappedinMapLibreOverlay;
|
|
1142
|
+
constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
|
|
1143
|
+
onAdd(map: any): HTMLDivElement;
|
|
1144
|
+
onRemove(): void;
|
|
976
1145
|
}
|
|
977
1146
|
}
|
|
978
1147
|
|
|
979
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/analytics' {
|
|
980
|
-
export { analytics, analyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
|
|
981
|
-
export type { CustomerAnalytics, AnalyticsOptions } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
|
|
982
|
-
}
|
|
983
|
-
|
|
984
1148
|
declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
985
|
-
import { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
986
|
-
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
987
|
-
import type { Label, Marker, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
1149
|
+
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1150
|
+
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation, EnterpriseLocation } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
1151
|
+
import type { Label, Marker, Model, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
988
1152
|
import type { EasingCurve } from '@mappedin/core-sdk/src/camera';
|
|
1153
|
+
import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
1154
|
+
export type DeepRequired<T> = Required<{
|
|
1155
|
+
[K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
|
|
1156
|
+
}>;
|
|
1157
|
+
export type CancellablePromise<T> = {
|
|
1158
|
+
promise: Promise<T>;
|
|
1159
|
+
cancel: () => void;
|
|
1160
|
+
};
|
|
989
1161
|
/**
|
|
990
1162
|
* @hidden
|
|
991
1163
|
*/
|
|
@@ -1016,6 +1188,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1016
1188
|
* The target {@link Floor} for this action.
|
|
1017
1189
|
*/
|
|
1018
1190
|
toFloor?: Floor;
|
|
1191
|
+
/**
|
|
1192
|
+
* Connection object related to the action.
|
|
1193
|
+
* This represents the specific connection (e.g., elevator, stairs) involved in the current direction step.
|
|
1194
|
+
*/
|
|
1019
1195
|
connection?: Connection;
|
|
1020
1196
|
/**
|
|
1021
1197
|
* The direction of the connection (e.g., 'up', 'down').
|
|
@@ -1023,6 +1199,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1023
1199
|
direction?: 'up' | 'down' | 'none';
|
|
1024
1200
|
/**
|
|
1025
1201
|
* The type of the connection (e.g., 'elevator', 'escalator').
|
|
1202
|
+
* @deprecated in favor of `connection.type`
|
|
1026
1203
|
*/
|
|
1027
1204
|
connectionType?: string;
|
|
1028
1205
|
};
|
|
@@ -1047,6 +1224,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1047
1224
|
* Defines the state for a label when its appearance is updated.
|
|
1048
1225
|
*/
|
|
1049
1226
|
export type TLabelState = {
|
|
1227
|
+
text: string;
|
|
1050
1228
|
type: 'label';
|
|
1051
1229
|
/**
|
|
1052
1230
|
* Appearance settings for the label.
|
|
@@ -1071,7 +1249,44 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1071
1249
|
export type TModelState = {
|
|
1072
1250
|
type: 'model';
|
|
1073
1251
|
};
|
|
1252
|
+
/**
|
|
1253
|
+
* Defines the state for an image when its appearance is updated.
|
|
1254
|
+
*/
|
|
1255
|
+
export type TImageState = {
|
|
1256
|
+
type: 'image';
|
|
1257
|
+
};
|
|
1074
1258
|
export type TWallsState = {
|
|
1259
|
+
type: 'walls';
|
|
1260
|
+
/**
|
|
1261
|
+
* Color of the walls.
|
|
1262
|
+
*/
|
|
1263
|
+
color: string | 'initial';
|
|
1264
|
+
/**
|
|
1265
|
+
* Color of the top of walls, if not set, defaults to the color.
|
|
1266
|
+
*/
|
|
1267
|
+
topColor?: string | 'initial';
|
|
1268
|
+
/**
|
|
1269
|
+
* Texture to apply to the geometry element.
|
|
1270
|
+
*/
|
|
1271
|
+
texture?: {
|
|
1272
|
+
url?: string;
|
|
1273
|
+
};
|
|
1274
|
+
/**
|
|
1275
|
+
* Top texture to apply to the geometry element.
|
|
1276
|
+
*/
|
|
1277
|
+
topTexture?: {
|
|
1278
|
+
url?: string;
|
|
1279
|
+
};
|
|
1280
|
+
/**
|
|
1281
|
+
* Visibility of the walls.
|
|
1282
|
+
*/
|
|
1283
|
+
visible: boolean;
|
|
1284
|
+
};
|
|
1285
|
+
/**
|
|
1286
|
+
* @interface
|
|
1287
|
+
*/
|
|
1288
|
+
export type TDoorsState = {
|
|
1289
|
+
type: 'doors';
|
|
1075
1290
|
/**
|
|
1076
1291
|
* Color of the walls.
|
|
1077
1292
|
*/
|
|
@@ -1080,6 +1295,26 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1080
1295
|
* Color of the top of walls, if not set, defaults to the color.
|
|
1081
1296
|
*/
|
|
1082
1297
|
topColor?: string | 'initial';
|
|
1298
|
+
/**
|
|
1299
|
+
* Texture to apply to the geometry element.
|
|
1300
|
+
*/
|
|
1301
|
+
texture?: {
|
|
1302
|
+
url?: string;
|
|
1303
|
+
};
|
|
1304
|
+
/**
|
|
1305
|
+
* Top texture to apply to the geometry element.
|
|
1306
|
+
*/
|
|
1307
|
+
topTexture?: {
|
|
1308
|
+
url?: string;
|
|
1309
|
+
};
|
|
1310
|
+
/**
|
|
1311
|
+
* Visibility of the walls.
|
|
1312
|
+
*/
|
|
1313
|
+
visible: boolean;
|
|
1314
|
+
/**
|
|
1315
|
+
* Opacity of the doors.
|
|
1316
|
+
*/
|
|
1317
|
+
opacity: number;
|
|
1083
1318
|
};
|
|
1084
1319
|
export type TMarkerState = {
|
|
1085
1320
|
type: 'marker';
|
|
@@ -1129,13 +1364,41 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1129
1364
|
* Indicates if the geometry element is interactive. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1130
1365
|
*/
|
|
1131
1366
|
interactive: boolean;
|
|
1367
|
+
/**
|
|
1368
|
+
* Opacity of the geometry element.
|
|
1369
|
+
*/
|
|
1370
|
+
opacity: number;
|
|
1371
|
+
/**
|
|
1372
|
+
* Height of the geometry element in meters.
|
|
1373
|
+
*/
|
|
1374
|
+
height: number;
|
|
1375
|
+
/**
|
|
1376
|
+
* Texture to apply to the geometry element.
|
|
1377
|
+
*/
|
|
1378
|
+
texture?: {
|
|
1379
|
+
url: string;
|
|
1380
|
+
};
|
|
1381
|
+
/**
|
|
1382
|
+
* Top texture to apply to the geometry element.
|
|
1383
|
+
*/
|
|
1384
|
+
topTexture?: {
|
|
1385
|
+
url: string;
|
|
1386
|
+
};
|
|
1132
1387
|
};
|
|
1388
|
+
export enum WALLS {
|
|
1389
|
+
Exterior = "exterior-walls",
|
|
1390
|
+
Interior = "interior-walls"
|
|
1391
|
+
}
|
|
1392
|
+
export enum DOORS {
|
|
1393
|
+
Interior = "interior-doors",
|
|
1394
|
+
Exterior = "exterior-doors"
|
|
1395
|
+
}
|
|
1133
1396
|
/**
|
|
1134
1397
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
1135
1398
|
*/
|
|
1136
|
-
export type TUpdateState<T> = T extends
|
|
1399
|
+
export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS ? Partial<TDoorsState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Door ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
|
|
1137
1400
|
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
|
|
1138
|
-
export type TGetEntityState<T> = T extends Marker ? TMarkerState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
|
|
1401
|
+
export type TGetEntityState<T> = T extends WALLS ? TWallsState : T extends DOORS ? TDoorsState : T extends Marker ? TMarkerState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Image ? TImageState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
|
|
1139
1402
|
export type TGetState<T> = TGetEntityState<T> | undefined;
|
|
1140
1403
|
/**
|
|
1141
1404
|
* Options for {@link Camera} animations on the map.
|
|
@@ -1243,7 +1506,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1243
1506
|
/**
|
|
1244
1507
|
* Defines the target for navigation operations.
|
|
1245
1508
|
*/
|
|
1246
|
-
export type TNavigationTarget = Space | MapObject | Coordinate | Door | PointOfInterest | Connection;
|
|
1509
|
+
export type TNavigationTarget = Space | MapObject | Coordinate | Door | PointOfInterest | Connection | EnterpriseLocation;
|
|
1247
1510
|
/**
|
|
1248
1511
|
* Defines the special zone for navigation operations.
|
|
1249
1512
|
*/
|
|
@@ -1597,6 +1860,42 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1597
1860
|
*/
|
|
1598
1861
|
url: string;
|
|
1599
1862
|
};
|
|
1863
|
+
/**
|
|
1864
|
+
* Options for controlling the behavior of a {@link Marker}.
|
|
1865
|
+
* @interface
|
|
1866
|
+
*/
|
|
1867
|
+
export type TAddImageOptions = {
|
|
1868
|
+
/**
|
|
1869
|
+
* @internal
|
|
1870
|
+
*/
|
|
1871
|
+
id?: string;
|
|
1872
|
+
/**
|
|
1873
|
+
* Width of the image in meters.
|
|
1874
|
+
*/
|
|
1875
|
+
width: number;
|
|
1876
|
+
/**
|
|
1877
|
+
* Height of the image in meters.
|
|
1878
|
+
*/
|
|
1879
|
+
height: number;
|
|
1880
|
+
/**
|
|
1881
|
+
* Rotation of the image in degrees.
|
|
1882
|
+
*
|
|
1883
|
+
* @default 0
|
|
1884
|
+
*/
|
|
1885
|
+
rotation?: number;
|
|
1886
|
+
/**
|
|
1887
|
+
* Vertical offset of the image in meters.
|
|
1888
|
+
*
|
|
1889
|
+
* @default 0
|
|
1890
|
+
*/
|
|
1891
|
+
verticalOffset?: number;
|
|
1892
|
+
/**
|
|
1893
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
1894
|
+
*
|
|
1895
|
+
* @default false
|
|
1896
|
+
*/
|
|
1897
|
+
flipImageToFaceCamera?: boolean;
|
|
1898
|
+
};
|
|
1600
1899
|
/**
|
|
1601
1900
|
* Options for controlling the behavior of a {@link Marker}.
|
|
1602
1901
|
* @interface
|
|
@@ -1664,11 +1963,38 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
|
|
|
1664
1963
|
*/
|
|
1665
1964
|
id?: string;
|
|
1666
1965
|
};
|
|
1966
|
+
export type TBlueDotOptions = {
|
|
1967
|
+
/** The radius of the BlueDot in pixels. The BlueDot will maintain this size clamped to a minimum of 0.35 metres. */
|
|
1968
|
+
radius?: number;
|
|
1969
|
+
/** The color of the BlueDot core element. */
|
|
1970
|
+
color?: string;
|
|
1971
|
+
/** Options for the accuracy ring around the BlueDot. */
|
|
1972
|
+
accuracyRing?: {
|
|
1973
|
+
/** The color of the accuracy ring. */
|
|
1974
|
+
color?: string;
|
|
1975
|
+
/** The opacity of the accuracy ring. */
|
|
1976
|
+
opacity?: number;
|
|
1977
|
+
};
|
|
1978
|
+
/**
|
|
1979
|
+
* Options for the bearing directional indicator.
|
|
1980
|
+
*/
|
|
1981
|
+
bearing?: {
|
|
1982
|
+
/** The color of the bearing cone. */
|
|
1983
|
+
color?: string;
|
|
1984
|
+
/** The opacity of the bearing cone. */
|
|
1985
|
+
opacity?: number;
|
|
1986
|
+
};
|
|
1987
|
+
};
|
|
1988
|
+
export type LanguagePackHydrationItem = {
|
|
1989
|
+
language: Language;
|
|
1990
|
+
localePack: ParsedMVFLocalePack;
|
|
1991
|
+
};
|
|
1667
1992
|
}
|
|
1668
1993
|
|
|
1669
1994
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects' {
|
|
1670
1995
|
export { Label } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label';
|
|
1671
1996
|
export { Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker';
|
|
1997
|
+
export { Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/image';
|
|
1672
1998
|
export { Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/model';
|
|
1673
1999
|
export { Path } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
|
|
1674
2000
|
export { CameraTransform } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform';
|
|
@@ -1676,8 +2002,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects' {
|
|
|
1676
2002
|
}
|
|
1677
2003
|
|
|
1678
2004
|
declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
1679
|
-
import type { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
1680
2005
|
import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
2006
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
2007
|
+
import type { RendererCore } from '@mappedin/core-sdk';
|
|
1681
2008
|
/**
|
|
1682
2009
|
* Options for navigation.
|
|
1683
2010
|
*/
|
|
@@ -1738,14 +2065,19 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
|
1738
2065
|
animateArrowsOnPath?: boolean;
|
|
1739
2066
|
};
|
|
1740
2067
|
/**
|
|
1741
|
-
* Options for the departure and destination
|
|
2068
|
+
* Options for the markers at the departure and destination.
|
|
1742
2069
|
*/
|
|
1743
|
-
|
|
2070
|
+
markerOptions?: {
|
|
1744
2071
|
/**
|
|
1745
|
-
* The color of the departure
|
|
1746
|
-
* @default '#
|
|
2072
|
+
* The color of the departure marker.
|
|
2073
|
+
* @default '#1890FF'
|
|
2074
|
+
*/
|
|
2075
|
+
departureColor?: string;
|
|
2076
|
+
/**
|
|
2077
|
+
* The color of the destination marker.
|
|
2078
|
+
* @default '#722ED1'
|
|
1747
2079
|
*/
|
|
1748
|
-
|
|
2080
|
+
destinationColor?: string;
|
|
1749
2081
|
};
|
|
1750
2082
|
};
|
|
1751
2083
|
export class Navigation {
|
|
@@ -1753,18 +2085,24 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
|
|
|
1753
2085
|
/**
|
|
1754
2086
|
* @internal
|
|
1755
2087
|
*/
|
|
1756
|
-
|
|
2088
|
+
get currentMap(): GeojsonApiMapObject;
|
|
2089
|
+
/**
|
|
2090
|
+
* @internal
|
|
2091
|
+
*/
|
|
2092
|
+
constructor(core: RendererCore, currentMapGetter: CurrentMapGetter);
|
|
1757
2093
|
/**
|
|
1758
2094
|
* Draws the specified directions on the map.
|
|
1759
2095
|
* @param directions The directions to be drawn.
|
|
1760
2096
|
* @param options Optional additional options for the navigation.
|
|
1761
2097
|
*/
|
|
1762
|
-
draw: (directions: Directions, options?: TNavigationOptions) => Promise<
|
|
2098
|
+
draw: (directions: Directions, options?: TNavigationOptions) => Promise<unknown>;
|
|
1763
2099
|
/**
|
|
1764
2100
|
* Clears any drawn navigation paths or directions from the map.
|
|
1765
2101
|
*/
|
|
1766
2102
|
clear: () => void;
|
|
1767
2103
|
}
|
|
2104
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
2105
|
+
export {};
|
|
1768
2106
|
}
|
|
1769
2107
|
|
|
1770
2108
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
|
|
@@ -1779,41 +2117,276 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
|
|
|
1779
2117
|
export { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions';
|
|
1780
2118
|
export { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
|
|
1781
2119
|
export { default as Outdoor } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
|
|
2120
|
+
export { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
|
|
1782
2121
|
}
|
|
1783
2122
|
|
|
1784
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
import { PubSub } from '@packages/internal/common';
|
|
1789
|
-
export const GAP_BELOW_FLOORS = 30;
|
|
1790
|
-
export const DURATION = 1000;
|
|
1791
|
-
export type TStackedMapsEvents = {
|
|
1792
|
-
expanded: void;
|
|
1793
|
-
collapsed: void;
|
|
1794
|
-
};
|
|
1795
|
-
export class StackedMaps extends PubSub<TStackedMapsEvents> {
|
|
1796
|
-
#private;
|
|
1797
|
-
constructor(api: GeojsonApiMapObject, core: RendererCore);
|
|
1798
|
-
includedFloors: FloorObject[];
|
|
1799
|
-
get percentExpanded(): number;
|
|
1800
|
-
set percentExpanded(value: number);
|
|
1801
|
-
animateToCurrentFloor(): void;
|
|
1802
|
-
expanded: boolean;
|
|
1803
|
-
expand(opts?: {
|
|
1804
|
-
excludeFloorIds: string[];
|
|
1805
|
-
}): Promise<void>;
|
|
1806
|
-
collapse(): Promise<void>;
|
|
1807
|
-
animate(direction: 'expand' | 'collapse'): Promise<void>;
|
|
1808
|
-
}
|
|
2123
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/search' {
|
|
2124
|
+
export type { SearchResult, SearchResultItem, SearchOptions, Suggestion, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search/internal';
|
|
2125
|
+
export type { SearchState } from '@mappedin/mappedin-js/mappedin-js/src/search/external';
|
|
2126
|
+
export { Search } from '@mappedin/mappedin-js/mappedin-js/src/search/external';
|
|
1809
2127
|
}
|
|
1810
2128
|
|
|
1811
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/
|
|
1812
|
-
|
|
2129
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/analytics' {
|
|
2130
|
+
export { Analytics, AnalyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
|
|
2131
|
+
export type { AnalyticsUpdateOptions, AnalyticState, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category' {
|
|
2135
|
+
import type { EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
|
|
2136
|
+
import type { MapDataInternal, EnterpriseLocation } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2137
|
+
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
1813
2138
|
/**
|
|
1814
|
-
*
|
|
2139
|
+
* An EnterpriseCategory is a collection of similar EnterpriseLocations.
|
|
2140
|
+
*
|
|
1815
2141
|
*/
|
|
1816
|
-
|
|
2142
|
+
class EnterpriseCategory extends BaseMapData implements Omit<MVFEnterpriseCategory, 'children' | 'locations'> {
|
|
2143
|
+
#private;
|
|
2144
|
+
/**
|
|
2145
|
+
* @internal
|
|
2146
|
+
*/
|
|
2147
|
+
static readonly __type = "enterprise-category";
|
|
2148
|
+
/**
|
|
2149
|
+
* @internal
|
|
2150
|
+
*/
|
|
2151
|
+
readonly __type = "enterprise-category";
|
|
2152
|
+
name: string;
|
|
2153
|
+
color?: string | undefined;
|
|
2154
|
+
externalId: string;
|
|
2155
|
+
extra?: Record<string, unknown> | undefined;
|
|
2156
|
+
icon?: string | undefined;
|
|
2157
|
+
iconFromDefaultList?: string | null | undefined;
|
|
2158
|
+
sortOrder: number;
|
|
2159
|
+
/**
|
|
2160
|
+
* Checks if the provided instance is of type EnterpriseCategory.
|
|
2161
|
+
*
|
|
2162
|
+
* @param instance The instance to check.
|
|
2163
|
+
* @returns {boolean} True if the instance is a EnterpriseCategory, false otherwise.
|
|
2164
|
+
*/
|
|
2165
|
+
static is(instance: object): instance is EnterpriseCategory;
|
|
2166
|
+
/**
|
|
2167
|
+
* @internal
|
|
2168
|
+
*/
|
|
2169
|
+
constructor(data: MapDataInternal, options: {
|
|
2170
|
+
mvfData: MVFEnterpriseCategory;
|
|
2171
|
+
});
|
|
2172
|
+
get children(): EnterpriseCategory[];
|
|
2173
|
+
get locations(): EnterpriseLocation[];
|
|
2174
|
+
/**
|
|
2175
|
+
* Serializes the EnterpriseCategory data to JSON.
|
|
2176
|
+
*
|
|
2177
|
+
* @returns An object representing the EnterpriseCategory.
|
|
2178
|
+
*/
|
|
2179
|
+
toJSON(): {
|
|
2180
|
+
id: string;
|
|
2181
|
+
name: string;
|
|
2182
|
+
};
|
|
2183
|
+
/**
|
|
2184
|
+
* Cleans up resources used by the instance.
|
|
2185
|
+
*
|
|
2186
|
+
* @internal
|
|
2187
|
+
*/
|
|
2188
|
+
destroy(): void;
|
|
2189
|
+
}
|
|
2190
|
+
export default EnterpriseCategory;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location' {
|
|
2194
|
+
import type { EnterpriseLocation as MVFEnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
|
|
2195
|
+
import type { Coordinate, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2196
|
+
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
2197
|
+
import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
2198
|
+
/**
|
|
2199
|
+
* A class representing enterprise location data within the map.
|
|
2200
|
+
*
|
|
2201
|
+
* An EnterpriseLocation is something like a store, or a washroom on a map.
|
|
2202
|
+
*/
|
|
2203
|
+
class EnterpriseLocation extends BaseMapData implements Omit<MVFEnterpriseLocation, 'polygons' | 'nodes' | 'links'> {
|
|
2204
|
+
#private;
|
|
2205
|
+
/**
|
|
2206
|
+
* @internal
|
|
2207
|
+
*/
|
|
2208
|
+
static readonly __type = "enterprise-location";
|
|
2209
|
+
/**
|
|
2210
|
+
* @internal
|
|
2211
|
+
*/
|
|
2212
|
+
readonly __type = "enterprise-location";
|
|
2213
|
+
description?: string | undefined;
|
|
2214
|
+
name: string;
|
|
2215
|
+
amenity?: string | undefined;
|
|
2216
|
+
externalId: string;
|
|
2217
|
+
extra?: Record<string, unknown> | undefined;
|
|
2218
|
+
gallery?: {
|
|
2219
|
+
caption?: string | null;
|
|
2220
|
+
image: string;
|
|
2221
|
+
embeddedUrl?: string | null;
|
|
2222
|
+
}[] | undefined;
|
|
2223
|
+
logo?: string | undefined;
|
|
2224
|
+
operationHours?: OperationHours[] | undefined;
|
|
2225
|
+
phone?: {
|
|
2226
|
+
number: string;
|
|
2227
|
+
extension?: string;
|
|
2228
|
+
} | undefined;
|
|
2229
|
+
picture?: string | undefined;
|
|
2230
|
+
shortName?: string | undefined;
|
|
2231
|
+
showFloatingLabelWhenImagePresent?: boolean | undefined;
|
|
2232
|
+
showLogo?: boolean | undefined;
|
|
2233
|
+
siblingGroups?: SiblingGroup[] | undefined;
|
|
2234
|
+
social?: {
|
|
2235
|
+
facebook?: string;
|
|
2236
|
+
instagram?: string;
|
|
2237
|
+
twitter?: string;
|
|
2238
|
+
website?: string;
|
|
2239
|
+
} | undefined;
|
|
2240
|
+
sortOrder: number;
|
|
2241
|
+
states?: LocationState[] | undefined;
|
|
2242
|
+
tags?: string[] | undefined;
|
|
2243
|
+
type: string;
|
|
2244
|
+
/**
|
|
2245
|
+
* Checks if the provided instance is of type EnterpriseLocation.
|
|
2246
|
+
*
|
|
2247
|
+
* @param instance The instance to check.
|
|
2248
|
+
* @returns {boolean} True if the instance is a EnterpriseLocation, false otherwise.
|
|
2249
|
+
*/
|
|
2250
|
+
static is(instance: object): instance is EnterpriseLocation;
|
|
2251
|
+
/**
|
|
2252
|
+
* @internal
|
|
2253
|
+
*/
|
|
2254
|
+
constructor(data: MapDataInternal, options: {
|
|
2255
|
+
mvfData: MVFEnterpriseLocation;
|
|
2256
|
+
});
|
|
2257
|
+
get coordinates(): Coordinate[];
|
|
2258
|
+
get nodes(): Node[];
|
|
2259
|
+
get spaces(): Space[];
|
|
2260
|
+
/**
|
|
2261
|
+
* Serializes the EnterpriseLocation data to JSON.
|
|
2262
|
+
*
|
|
2263
|
+
* @returns An object representing the EnterpriseLocation.
|
|
2264
|
+
*/
|
|
2265
|
+
toJSON(): {
|
|
2266
|
+
id: string;
|
|
2267
|
+
name: string;
|
|
2268
|
+
};
|
|
2269
|
+
/**
|
|
2270
|
+
* Cleans up resources used by the instance.
|
|
2271
|
+
*
|
|
2272
|
+
* @internal
|
|
2273
|
+
*/
|
|
2274
|
+
destroy(): void;
|
|
2275
|
+
}
|
|
2276
|
+
export default EnterpriseLocation;
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
|
|
2280
|
+
import type { EnterpriseVenue as MVFEnterpriseVenue, Language } from '@mappedin/mvf';
|
|
2281
|
+
import type { Hyperlink, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2282
|
+
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
2283
|
+
/**
|
|
2284
|
+
* An EnterpriseVenue is a specific place (like a mall, office building, or stadium) with one or more Floors
|
|
2285
|
+
*/
|
|
2286
|
+
class EnterpriseVenue extends BaseMapData implements MVFEnterpriseVenue {
|
|
2287
|
+
#private;
|
|
2288
|
+
/**
|
|
2289
|
+
* @internal
|
|
2290
|
+
*/
|
|
2291
|
+
static readonly __type = "enterprise-venue";
|
|
2292
|
+
/**
|
|
2293
|
+
* @internal
|
|
2294
|
+
*/
|
|
2295
|
+
readonly __type = "enterprise-venue";
|
|
2296
|
+
countrycode?: string | undefined;
|
|
2297
|
+
externalId: string;
|
|
2298
|
+
defaultLanguage: Language;
|
|
2299
|
+
defaultMap?: string | undefined;
|
|
2300
|
+
extra?: Record<string, unknown> | undefined;
|
|
2301
|
+
icon?: string | undefined;
|
|
2302
|
+
languages: Language[];
|
|
2303
|
+
links: Hyperlink[];
|
|
2304
|
+
logo?: string | undefined;
|
|
2305
|
+
mappedinWebUrl?: string | undefined;
|
|
2306
|
+
slug: string;
|
|
2307
|
+
topLocations?: string[] | undefined;
|
|
2308
|
+
tzid?: string | undefined;
|
|
2309
|
+
/**
|
|
2310
|
+
* Checks if the provided instance is of type EnterpriseVenue.
|
|
2311
|
+
*
|
|
2312
|
+
* @param instance The instance to check.
|
|
2313
|
+
* @returns {boolean} True if the instance is a EnterpriseVenue, false otherwise.
|
|
2314
|
+
*/
|
|
2315
|
+
static is(instance: object): instance is EnterpriseVenue;
|
|
2316
|
+
/**
|
|
2317
|
+
* @internal
|
|
2318
|
+
*/
|
|
2319
|
+
constructor(_data: MapDataInternal, options: {
|
|
2320
|
+
mvfData: MVFEnterpriseVenue;
|
|
2321
|
+
});
|
|
2322
|
+
/**
|
|
2323
|
+
* Gets the name of the EnterpriseVenue.
|
|
2324
|
+
*
|
|
2325
|
+
* @returns {string} The name of the EnterpriseVenue.
|
|
2326
|
+
*/
|
|
2327
|
+
get name(): string;
|
|
2328
|
+
/**
|
|
2329
|
+
* Serializes the EnterpriseVenue data to JSON.
|
|
2330
|
+
*
|
|
2331
|
+
* @returns An object representing the EnterpriseVenue.
|
|
2332
|
+
*/
|
|
2333
|
+
toJSON(): {
|
|
2334
|
+
id: string;
|
|
2335
|
+
name: string;
|
|
2336
|
+
};
|
|
2337
|
+
/**
|
|
2338
|
+
* Cleans up resources used by the instance.
|
|
2339
|
+
*
|
|
2340
|
+
* @internal
|
|
2341
|
+
*/
|
|
2342
|
+
destroy(): void;
|
|
2343
|
+
}
|
|
2344
|
+
export default EnterpriseVenue;
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
|
|
2348
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
2349
|
+
import type { RendererCore } from '@mappedin/core-sdk';
|
|
2350
|
+
import TWEEN from '@tweenjs/tween.js';
|
|
2351
|
+
import { PubSub } from '@packages/internal/common';
|
|
2352
|
+
import type { TFocusOnOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
2353
|
+
export const GAP_BELOW_FLOORS = 50;
|
|
2354
|
+
export const DURATION = 1000;
|
|
2355
|
+
export type TStackedMapsEvents = {
|
|
2356
|
+
expanded: void;
|
|
2357
|
+
collapsed: void;
|
|
2358
|
+
};
|
|
2359
|
+
export type TShowStackOptions = {
|
|
2360
|
+
numFloors?: number;
|
|
2361
|
+
cameraOptions?: TFocusOnOptions;
|
|
2362
|
+
};
|
|
2363
|
+
export class StackedMaps extends PubSub<TStackedMapsEvents> {
|
|
2364
|
+
#private;
|
|
2365
|
+
constructor(api: GeojsonApiMapObject, core: RendererCore);
|
|
2366
|
+
percentExpanded: number;
|
|
2367
|
+
animateToCurrentFloorTween: TWEEN.Tween | null;
|
|
2368
|
+
expanded: boolean;
|
|
2369
|
+
handlePreRender: () => void;
|
|
2370
|
+
handleUserInteractionStart: () => void;
|
|
2371
|
+
handleUserInteractionEnd: () => void;
|
|
2372
|
+
animateToCurrentFloor(): Promise<void>;
|
|
2373
|
+
expand(opts?: {
|
|
2374
|
+
excludeFloorIds: string[];
|
|
2375
|
+
}): Promise<void>;
|
|
2376
|
+
collapse(): Promise<void>;
|
|
2377
|
+
showStack(opts?: TShowStackOptions): Promise<void>;
|
|
2378
|
+
animate(direction: 'expand' | 'collapse', options?: {
|
|
2379
|
+
duration: number;
|
|
2380
|
+
}): Promise<void>;
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform' {
|
|
2385
|
+
import type { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
2386
|
+
/**
|
|
2387
|
+
* Class representing camera transformation data.
|
|
2388
|
+
*/
|
|
2389
|
+
export class CameraTransform {
|
|
1817
2390
|
#private;
|
|
1818
2391
|
/**
|
|
1819
2392
|
* @internal
|
|
@@ -2017,9 +2590,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
|
|
|
2017
2590
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
2018
2591
|
import type { Image, SpaceCollection } from '@mappedin/mvf';
|
|
2019
2592
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
2020
|
-
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2593
|
+
import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2021
2594
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
2022
2595
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
2596
|
+
import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
|
|
2023
2597
|
/**
|
|
2024
2598
|
* Represents the various types of spaces that can be defined within a map.
|
|
2025
2599
|
* - 'room': A standard room or enclosed area.
|
|
@@ -2074,6 +2648,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
|
2074
2648
|
get type(): TSpaceType;
|
|
2075
2649
|
get description(): string;
|
|
2076
2650
|
get images(): Image[];
|
|
2651
|
+
/**
|
|
2652
|
+
* @internal
|
|
2653
|
+
*/
|
|
2654
|
+
get locations(): EnterpriseLocation[];
|
|
2077
2655
|
/**
|
|
2078
2656
|
* Gets the {@link Floor} object associated with the space.
|
|
2079
2657
|
*
|
|
@@ -2081,6 +2659,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
|
2081
2659
|
* @throws Will throw an error if the floor is not found.
|
|
2082
2660
|
*/
|
|
2083
2661
|
get floor(): Floor;
|
|
2662
|
+
/**
|
|
2663
|
+
* Gets the array of {@link Door}s associated with the space.
|
|
2664
|
+
*
|
|
2665
|
+
* @returns {Door[]} The doors array.
|
|
2666
|
+
*/
|
|
2667
|
+
get doors(): Door[];
|
|
2084
2668
|
/**
|
|
2085
2669
|
* Gets the center {@link Coordinate} of the space.
|
|
2086
2670
|
*
|
|
@@ -2119,8 +2703,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
|
2119
2703
|
}
|
|
2120
2704
|
|
|
2121
2705
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
|
|
2122
|
-
import type {
|
|
2123
|
-
import type { Annotation, Connection, Door, MapDataInternal, PointOfInterest, Space, MapObject } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2706
|
+
import type { FloorProperties as MVFFloor } from '@mappedin/mvf';
|
|
2707
|
+
import type { Annotation, Connection, Door, MapDataInternal, PointOfInterest, Space, MapObject, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2124
2708
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
2125
2709
|
/**
|
|
2126
2710
|
* A class representing floor data within the map.
|
|
@@ -2148,7 +2732,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
|
|
|
2148
2732
|
* @internal
|
|
2149
2733
|
*/
|
|
2150
2734
|
constructor(data: MapDataInternal, options: {
|
|
2151
|
-
mvfData:
|
|
2735
|
+
mvfData: MVFFloor;
|
|
2152
2736
|
});
|
|
2153
2737
|
/**
|
|
2154
2738
|
* Gets the name of the floor.
|
|
@@ -2198,6 +2782,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
|
|
|
2198
2782
|
* @returns {PointOfInterest[]} An array of PointOfInterest objects on this floor.
|
|
2199
2783
|
*/
|
|
2200
2784
|
get pois(): PointOfInterest[];
|
|
2785
|
+
/**
|
|
2786
|
+
* Gets the FloorStack ({@link FloorStack}) that this floor belongs to.
|
|
2787
|
+
*
|
|
2788
|
+
* @returns {FloorStack} The FloorStack that this floor belongs to.
|
|
2789
|
+
*/
|
|
2790
|
+
get floorStack(): FloorStack;
|
|
2201
2791
|
/**
|
|
2202
2792
|
* Serializes the floor data to JSON.
|
|
2203
2793
|
*
|
|
@@ -2265,6 +2855,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connectio
|
|
|
2265
2855
|
get name(): string;
|
|
2266
2856
|
get description(): string;
|
|
2267
2857
|
get images(): Image[];
|
|
2858
|
+
get externalId(): string;
|
|
2859
|
+
/**
|
|
2268
2860
|
/**
|
|
2269
2861
|
* Gets the type of the connection.
|
|
2270
2862
|
*
|
|
@@ -2292,6 +2884,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connectio
|
|
|
2292
2884
|
id: string;
|
|
2293
2885
|
name: string;
|
|
2294
2886
|
type: string;
|
|
2887
|
+
externalId: string;
|
|
2295
2888
|
coordinates: {
|
|
2296
2889
|
latitude: number;
|
|
2297
2890
|
longitude: number;
|
|
@@ -2759,16 +3352,191 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image' {
|
|
|
2759
3352
|
export default Image;
|
|
2760
3353
|
}
|
|
2761
3354
|
|
|
3355
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor-stack' {
|
|
3356
|
+
import type { FloorStack as MVFFloorStack } from '@mappedin/mvf';
|
|
3357
|
+
import type { MapDataInternal, Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3358
|
+
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
3359
|
+
/**
|
|
3360
|
+
* A class representing floor stack data within the map.
|
|
3361
|
+
*
|
|
3362
|
+
* FloorStacks are used to represent a group of floors that are part of a single entity.
|
|
3363
|
+
*/
|
|
3364
|
+
class FloorStack extends BaseMapData {
|
|
3365
|
+
#private;
|
|
3366
|
+
/**
|
|
3367
|
+
* @internal
|
|
3368
|
+
*/
|
|
3369
|
+
static readonly __type = "floor-stack";
|
|
3370
|
+
/**
|
|
3371
|
+
* @internal
|
|
3372
|
+
*/
|
|
3373
|
+
readonly __type = "floor-stack";
|
|
3374
|
+
/**
|
|
3375
|
+
* Checks if the provided instance is of type FloorStack.
|
|
3376
|
+
*
|
|
3377
|
+
* @param instance The instance to check.
|
|
3378
|
+
* @returns {boolean} True if the instance is a FloorStack, false otherwise.
|
|
3379
|
+
*/
|
|
3380
|
+
static is(instance: object): instance is FloorStack;
|
|
3381
|
+
/**
|
|
3382
|
+
* @internal
|
|
3383
|
+
*/
|
|
3384
|
+
constructor(data: MapDataInternal, options: {
|
|
3385
|
+
mvfData: MVFFloorStack;
|
|
3386
|
+
});
|
|
3387
|
+
/**
|
|
3388
|
+
* Gets the type of FloorStack.
|
|
3389
|
+
*/
|
|
3390
|
+
get type(): MVFFloorStack['type'];
|
|
3391
|
+
/**
|
|
3392
|
+
* Gets the name of the FloorStack.
|
|
3393
|
+
*
|
|
3394
|
+
* @returns {string} The name of the FloorStack.
|
|
3395
|
+
*/
|
|
3396
|
+
get name(): string;
|
|
3397
|
+
/**
|
|
3398
|
+
* Gets the floors ({@link Floor}) included in this FloorStack.
|
|
3399
|
+
*
|
|
3400
|
+
* @returns {Floor[]} An array of Floor objects in this FloorStack.
|
|
3401
|
+
*/
|
|
3402
|
+
get floors(): Floor[];
|
|
3403
|
+
/**
|
|
3404
|
+
* Serializes the FloorStack data to JSON.
|
|
3405
|
+
*
|
|
3406
|
+
* @returns An object representing the FloorStack.
|
|
3407
|
+
*/
|
|
3408
|
+
toJSON(): {
|
|
3409
|
+
id: string;
|
|
3410
|
+
name: string;
|
|
3411
|
+
type: "Building" | "Outdoor" | undefined;
|
|
3412
|
+
floors: string[];
|
|
3413
|
+
};
|
|
3414
|
+
/**
|
|
3415
|
+
* Cleans up resources used by the instance.
|
|
3416
|
+
*
|
|
3417
|
+
* @internal
|
|
3418
|
+
*/
|
|
3419
|
+
destroy(): void;
|
|
3420
|
+
}
|
|
3421
|
+
export default FloorStack;
|
|
3422
|
+
}
|
|
3423
|
+
|
|
3424
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/utils/data-creation' {
|
|
3425
|
+
import type { Feature, FloorProperties as MVFFloor, FloorStack as MVFFloorStack, NodeCollection, ObstructionCollection, Point, SpaceCollection, SpaceProperties, Connection as MVFConnection, EntranceCollection, AnnotationCollection, ParsedMVF, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseLocationId as MVFEnterpriseLocationId, EnterpriseCategoryId as MVFEnterpriseCategoryId, EnterpriseCategory as MVFEnterpriseCategory, EnterpriseVenue as MVFEnterpriseVenue } from '@mappedin/mvf';
|
|
3426
|
+
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3427
|
+
import { Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3428
|
+
import Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
3429
|
+
import EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
|
|
3430
|
+
import EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
|
|
3431
|
+
import FloorStack from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor-stack';
|
|
3432
|
+
export type MapDataRecords = {
|
|
3433
|
+
spacesById: Record<string, Space>;
|
|
3434
|
+
nodesById: Record<string, Node>;
|
|
3435
|
+
objectsById: Record<string, MapObject>;
|
|
3436
|
+
floorsById: Record<string, Floor>;
|
|
3437
|
+
floorStacksById: Record<string, FloorStack>;
|
|
3438
|
+
connectionsById: Record<string, Connection>;
|
|
3439
|
+
doorsById: Record<string, Door>;
|
|
3440
|
+
doorsByNodeId: Record<string, Door>;
|
|
3441
|
+
poisById: Record<string, PointOfInterest>;
|
|
3442
|
+
annotationsById: Record<string, Annotation>;
|
|
3443
|
+
locationsById: Record<MVFEnterpriseLocationId, EnterpriseLocation>;
|
|
3444
|
+
categoriesById: Record<MVFEnterpriseCategoryId, EnterpriseCategory>;
|
|
3445
|
+
venue: MVFEnterpriseVenue;
|
|
3446
|
+
spaceIdsByDestinationNodeId: Record<string, string[]>;
|
|
3447
|
+
objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
|
|
3448
|
+
obstructionIdByEntranceId: Record<string, string>;
|
|
3449
|
+
connectionIdsByLatLon: Record<string, string[]>;
|
|
3450
|
+
mvfSpacesById: Record<string, SpaceCollection['features'][number]>;
|
|
3451
|
+
mvfNodesById: Record<string, NodeCollection['features'][number]>;
|
|
3452
|
+
mvfObstructionById: Record<string, ObstructionCollection['features'][number]>;
|
|
3453
|
+
mvfFloorsById: Record<string, MVFFloor>;
|
|
3454
|
+
mvfFloorStacksById: Record<string, MVFFloorStack>;
|
|
3455
|
+
mvfConnectionsById: Record<string, MVFConnection>;
|
|
3456
|
+
mvfConnectionsByNodeId: Record<string, MVFConnection>;
|
|
3457
|
+
mvfEntrancesById: Record<string, EntranceCollection['features'][number]>;
|
|
3458
|
+
mvfAnnotationsById: Record<string, AnnotationCollection['features'][number]>;
|
|
3459
|
+
mvfCategoriesById: Record<string, MVFEnterpriseCategory>;
|
|
3460
|
+
mvfLocationsById: Record<string, MVFEnterpriseLocation>;
|
|
3461
|
+
mvfLocationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
|
|
3462
|
+
};
|
|
3463
|
+
export const processMVFFloors: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "floorsById" | "mvfFloorsById">;
|
|
3464
|
+
export const processMVFFloorStacks: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "floorStacksById" | "mvfFloorStacksById">;
|
|
3465
|
+
/**
|
|
3466
|
+
* @internal
|
|
3467
|
+
*/
|
|
3468
|
+
export const createEnterpriseDataFromMVF: (mvf: ParsedMVF, data: MapDataInternal) => {
|
|
3469
|
+
locationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
|
|
3470
|
+
mvfLocationsById: Record<string, MVFEnterpriseLocation>;
|
|
3471
|
+
mvfCategoriesById: Record<string, MVFEnterpriseCategory>;
|
|
3472
|
+
locationsById: Record<string, EnterpriseLocation>;
|
|
3473
|
+
categoriesById: Record<string, EnterpriseCategory>;
|
|
3474
|
+
venue: MVFEnterpriseVenue;
|
|
3475
|
+
};
|
|
3476
|
+
/**
|
|
3477
|
+
* @internal
|
|
3478
|
+
*/
|
|
3479
|
+
export const createDataFromMVF: (mvf: ParsedMVF, data: MapDataInternal) => {
|
|
3480
|
+
spacesById: Record<string, Space>;
|
|
3481
|
+
nodesById: Record<string, Node>;
|
|
3482
|
+
objectsById: Record<string, MapObject>;
|
|
3483
|
+
floorsById: Record<string, Floor>;
|
|
3484
|
+
floorStacksById: Record<string, FloorStack>;
|
|
3485
|
+
connectionsById: Record<string, Connection>;
|
|
3486
|
+
doorsById: Record<string, Door>;
|
|
3487
|
+
doorsByNodeId: Record<string, Door>;
|
|
3488
|
+
poisById: Record<string, PointOfInterest>;
|
|
3489
|
+
annotationsById: Record<string, Annotation>;
|
|
3490
|
+
spaceIdsByDestinationNodeId: Record<string, string[]>;
|
|
3491
|
+
objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
|
|
3492
|
+
obstructionIdByEntranceId: Record<string, string>;
|
|
3493
|
+
connectionIdsByLatLon: Record<string, string[]>;
|
|
3494
|
+
mvfSpacesById: Record<string, Feature<Point | import("@mappedin/mvf").LineString | import("@mappedin/mvf").Polygon, SpaceProperties>>;
|
|
3495
|
+
mvfNodesById: Record<string, Feature<Point, import("@mappedin/mvf").NodeProperties>>;
|
|
3496
|
+
mvfObstructionById: Record<string, Feature<import("@mappedin/mvf").LineString | import("@mappedin/mvf").Polygon, import("@mappedin/mvf").ObstructionProperties>>;
|
|
3497
|
+
mvfFloorsById: Record<string, MVFFloor>;
|
|
3498
|
+
mvfFloorStacksById: Record<string, MVFFloorStack>;
|
|
3499
|
+
mvfConnectionsById: Record<string, MVFConnection>;
|
|
3500
|
+
mvfConnectionsByNodeId: Record<string, MVFConnection>;
|
|
3501
|
+
mvfEntrancesById: Record<string, Feature<import("@mappedin/mvf").LineString, import("@mappedin/mvf").EntranceProperties>>;
|
|
3502
|
+
mvfAnnotationsById: Record<string, {
|
|
3503
|
+
type: import("@mappedin/mvf").FeatureType;
|
|
3504
|
+
geometry: Point;
|
|
3505
|
+
properties: import("@mappedin/mvf").AnnotationProperties;
|
|
3506
|
+
}>;
|
|
3507
|
+
};
|
|
3508
|
+
}
|
|
3509
|
+
|
|
2762
3510
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types' {
|
|
2763
3511
|
import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
|
|
2764
3512
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
2765
|
-
import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
2766
3513
|
import type Space from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space';
|
|
2767
3514
|
import type PointOfInterest from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/poi';
|
|
2768
3515
|
import type Annotation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/annotation';
|
|
2769
3516
|
import type Connection from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connection';
|
|
2770
3517
|
import type MapObject from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/object';
|
|
2771
|
-
|
|
3518
|
+
import type { EnterpriseLocation as MvfEnterpriseLocation, EnterpriseCategory as MvfEnterpriseCategory, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
3519
|
+
import type { PartialExcept } from '@mappedin/mvf/dist/locale';
|
|
3520
|
+
/**
|
|
3521
|
+
* Places are the main objects that can be searched for.
|
|
3522
|
+
*/
|
|
3523
|
+
export type Places = Space | Floor | Door | Connection | MapObject | PointOfInterest | Annotation;
|
|
3524
|
+
export type LocationWithLocale = PartialExcept<MvfEnterpriseLocation, 'id'>;
|
|
3525
|
+
export type CategoryWithLocale = PartialExcept<MvfEnterpriseCategory, 'id'>;
|
|
3526
|
+
export type LanguagePack = {
|
|
3527
|
+
type: 'downloaded';
|
|
3528
|
+
data: ParsedMVFLocalePack;
|
|
3529
|
+
optimized: {
|
|
3530
|
+
locations: Record<string, LocationWithLocale> | undefined;
|
|
3531
|
+
categories: Record<string, CategoryWithLocale> | undefined;
|
|
3532
|
+
};
|
|
3533
|
+
} | {
|
|
3534
|
+
type: 'initial';
|
|
3535
|
+
optimized: {
|
|
3536
|
+
locations: Record<string, MvfEnterpriseLocation>;
|
|
3537
|
+
categories: Record<string, MvfEnterpriseCategory>;
|
|
3538
|
+
};
|
|
3539
|
+
};
|
|
2772
3540
|
}
|
|
2773
3541
|
|
|
2774
3542
|
declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
@@ -2779,11 +3547,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
2779
3547
|
import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2780
3548
|
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle } from '@mappedin/mvf';
|
|
2781
3549
|
import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
2782
|
-
import type { Shading, PaintStyle, LineStyle, WatermarkOptions
|
|
3550
|
+
import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
|
|
2783
3551
|
import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
|
|
2784
3552
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
2785
|
-
import {
|
|
2786
|
-
import {
|
|
3553
|
+
import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
|
|
3554
|
+
import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
2787
3555
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
2788
3556
|
/**
|
|
2789
3557
|
* Represents all the available antialiasing options.
|
|
@@ -2995,6 +3763,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
2995
3763
|
* @experimental
|
|
2996
3764
|
*/
|
|
2997
3765
|
style?: {
|
|
3766
|
+
/**
|
|
3767
|
+
* Background color. Only relevant if outdoor map is disabled.
|
|
3768
|
+
*/
|
|
3769
|
+
backgroundColor?: string;
|
|
3770
|
+
/**
|
|
3771
|
+
* Background alpha value. Only relevant if outdoor map is disabled.
|
|
3772
|
+
*/
|
|
3773
|
+
backgroundAlpha?: number;
|
|
2998
3774
|
/**
|
|
2999
3775
|
* Set the global shading for all elements. True will use default values, false will disable shading.
|
|
3000
3776
|
* @default true
|
|
@@ -3016,10 +3792,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3016
3792
|
*
|
|
3017
3793
|
* Returns a {@link MapData} instance from a parsed MVF object.
|
|
3018
3794
|
*/
|
|
3019
|
-
export const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions
|
|
3020
|
-
|
|
3795
|
+
export const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions & {
|
|
3796
|
+
languagePacks?: LanguagePackHydrationItem[];
|
|
3797
|
+
}) => Promise<MapData>;
|
|
3021
3798
|
/**
|
|
3022
|
-
* @internal
|
|
3799
|
+
* @internal
|
|
3800
|
+
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
3023
3801
|
*/
|
|
3024
3802
|
export function setUseEnterpriseAPI(value: boolean): void;
|
|
3025
3803
|
/**
|
|
@@ -3032,26 +3810,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3032
3810
|
* const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
|
|
3033
3811
|
*/
|
|
3034
3812
|
export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
/**
|
|
3041
|
-
* MapView instance
|
|
3042
|
-
*/
|
|
3043
|
-
mapView: MapView;
|
|
3044
|
-
/**
|
|
3045
|
-
* MapData instance
|
|
3046
|
-
*/
|
|
3047
|
-
mapData: MapData;
|
|
3048
|
-
};
|
|
3049
|
-
}> {
|
|
3050
|
-
#private;
|
|
3051
|
-
static instance: MappedinMapLibreOverlay;
|
|
3052
|
-
constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
|
|
3053
|
-
onAdd(map: any): HTMLDivElement;
|
|
3054
|
-
}
|
|
3813
|
+
/**
|
|
3814
|
+
* @internal
|
|
3815
|
+
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
3816
|
+
*/
|
|
3817
|
+
export const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
3055
3818
|
/**
|
|
3056
3819
|
* Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
|
|
3057
3820
|
* @experimental
|
|
@@ -3062,38 +3825,32 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
3062
3825
|
export { parseMVF, unzipMVF, enableTestMode };
|
|
3063
3826
|
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, };
|
|
3064
3827
|
export type * from 'geojson';
|
|
3065
|
-
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';
|
|
3828
|
+
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3829
|
+
export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3066
3830
|
export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
3067
3831
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
3068
3832
|
export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3069
|
-
export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3070
|
-
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
3071
|
-
export {
|
|
3833
|
+
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3834
|
+
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
|
|
3835
|
+
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
|
|
3836
|
+
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
|
|
3072
3837
|
}
|
|
3073
3838
|
|
|
3074
3839
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
|
|
3075
3840
|
import type { RendererCore } from '@mappedin/core-sdk';
|
|
3076
3841
|
import { PubSub } from '@packages/internal/common';
|
|
3077
3842
|
import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
3843
|
+
import type { TBlueDotOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
3078
3844
|
export type TBlueDotEvents = {
|
|
3079
3845
|
'floor-change': {
|
|
3080
3846
|
reason: 'blue-dot-floor-change';
|
|
3081
3847
|
floorId: string;
|
|
3082
3848
|
};
|
|
3083
3849
|
};
|
|
3084
|
-
export const POSITION_ANIMATION_DURATION = 500;
|
|
3085
|
-
export const SCALE_ANIMATION_DURATION = 150;
|
|
3086
|
-
export const ROTATION_ANIMATION_DURATION = 150;
|
|
3087
|
-
export const MIN_AURA_RADIUS = 0;
|
|
3088
|
-
export const MAX_AURA_RADIUS = 5;
|
|
3089
|
-
export const MIN_ACCURACY = 5;
|
|
3090
|
-
export const MAX_ACCURACY = 30;
|
|
3091
|
-
export const CONE_START_RADIUS = 0.4;
|
|
3092
|
-
export const CONE_DISTANCE = 1.25;
|
|
3093
|
-
export const BLUE_DOT_RADIUS = 0.35;
|
|
3094
3850
|
export class BlueDot extends PubSub<TBlueDotEvents> {
|
|
3851
|
+
#private;
|
|
3095
3852
|
constructor(core: RendererCore, geoJSONApi: GeoJsonApi);
|
|
3096
|
-
enable(): void;
|
|
3853
|
+
enable(options?: TBlueDotOptions): void;
|
|
3097
3854
|
disable(): void;
|
|
3098
3855
|
}
|
|
3099
3856
|
}
|
|
@@ -3133,12 +3890,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes' {
|
|
|
3133
3890
|
*/
|
|
3134
3891
|
add<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, floor?: Floor): Shape;
|
|
3135
3892
|
/**
|
|
3136
|
-
* Removes a specific
|
|
3137
|
-
* @param
|
|
3893
|
+
* Removes a specific shape ({@link Shape}) from the map.
|
|
3894
|
+
* @param shape The shape to be removed.
|
|
3138
3895
|
* @example
|
|
3139
3896
|
* map.Shapes.remove(geo);
|
|
3140
3897
|
*/
|
|
3141
|
-
remove(
|
|
3898
|
+
remove(shape: Shape): void;
|
|
3142
3899
|
/**
|
|
3143
3900
|
* Removes all Shapes ({@link Shape}) from the map.
|
|
3144
3901
|
*
|
|
@@ -3155,8 +3912,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
3155
3912
|
import './marker.scss';
|
|
3156
3913
|
import { Vector2 } from 'three';
|
|
3157
3914
|
import type { Entity2DHTMLDivElement, EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
|
|
3158
|
-
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
3915
|
+
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
3159
3916
|
import type { CollisionRankingTier } from '@mappedin/mappedin-js/geojson/src/utils/collision-ranking-tier';
|
|
3917
|
+
import { z } from 'zod';
|
|
3160
3918
|
/**
|
|
3161
3919
|
* State reprsenting a Marker
|
|
3162
3920
|
*/
|
|
@@ -3203,6 +3961,26 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
3203
3961
|
interactive?: boolean;
|
|
3204
3962
|
};
|
|
3205
3963
|
};
|
|
3964
|
+
export const addMarkerOptionsSchema: z.ZodObject<{
|
|
3965
|
+
rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
|
|
3966
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
3967
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3968
|
+
anchor: z.ZodOptional<z.ZodEnum<["top", "bottom", "left", "right", "center"]>>;
|
|
3969
|
+
dynamicResize: z.ZodOptional<z.ZodBoolean>;
|
|
3970
|
+
}, "strip", z.ZodTypeAny, {
|
|
3971
|
+
interactive?: boolean | undefined;
|
|
3972
|
+
id?: string | undefined;
|
|
3973
|
+
anchor?: "center" | "left" | "right" | "bottom" | "top" | undefined;
|
|
3974
|
+
rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
|
|
3975
|
+
dynamicResize?: boolean | undefined;
|
|
3976
|
+
}, {
|
|
3977
|
+
interactive?: boolean | undefined;
|
|
3978
|
+
id?: string | undefined;
|
|
3979
|
+
anchor?: "center" | "left" | "right" | "bottom" | "top" | undefined;
|
|
3980
|
+
rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
|
|
3981
|
+
dynamicResize?: boolean | undefined;
|
|
3982
|
+
}>;
|
|
3983
|
+
export function validateMarker(coordinate: Position, contentHTML: string, options: AddMarkerOptions): void;
|
|
3206
3984
|
/**
|
|
3207
3985
|
* Options for creating a new Marker
|
|
3208
3986
|
*/
|
|
@@ -3286,10 +4064,18 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
|
|
|
3286
4064
|
}
|
|
3287
4065
|
|
|
3288
4066
|
declare module '@mappedin/mappedin-js/geojson/src/components/path' {
|
|
3289
|
-
import {
|
|
3290
|
-
import type {
|
|
3291
|
-
import {
|
|
4067
|
+
import { Vector3 } from 'three';
|
|
4068
|
+
import type { Mesh, ShaderMaterial, BufferGeometry } from 'three';
|
|
4069
|
+
import type { EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
|
|
4070
|
+
import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
3292
4071
|
import type { FeatureCollection, Point } from 'geojson';
|
|
4072
|
+
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
4073
|
+
export type PathProperties = {
|
|
4074
|
+
/**
|
|
4075
|
+
* The parentId of the point. The point will be anchored to the altitude of this parent group container.
|
|
4076
|
+
*/
|
|
4077
|
+
parentId?: EntityId<GroupContainerState> | string | null;
|
|
4078
|
+
};
|
|
3293
4079
|
/**
|
|
3294
4080
|
* State representing a Path
|
|
3295
4081
|
*/
|
|
@@ -3361,7 +4147,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
|
|
|
3361
4147
|
material?: ShaderMaterial;
|
|
3362
4148
|
geometry?: BufferGeometry;
|
|
3363
4149
|
outline?: Mesh;
|
|
3364
|
-
feature: FeatureCollection<Point>;
|
|
4150
|
+
feature: FeatureCollection<Point, PathProperties>;
|
|
3365
4151
|
options: AddPathOptions;
|
|
3366
4152
|
nearRadius: number;
|
|
3367
4153
|
farRadius: number;
|
|
@@ -3370,8 +4156,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
|
|
|
3370
4156
|
altitudeAdjustment: number;
|
|
3371
4157
|
displayArrowsOnPath: boolean;
|
|
3372
4158
|
animateArrowsOnPath: boolean;
|
|
4159
|
+
/**
|
|
4160
|
+
* If the path is vertical it will be rebuilt whenever altitudeDirty = true. This will be set during the first render of the path.
|
|
4161
|
+
*/
|
|
4162
|
+
isVertical: boolean;
|
|
3373
4163
|
dirty: boolean;
|
|
3374
|
-
constructor(feature: FeatureCollection<Point,
|
|
4164
|
+
constructor(feature: FeatureCollection<Point, PathProperties>, options?: AddPathOptions);
|
|
3375
4165
|
setColor(): void;
|
|
3376
4166
|
setOpacity(): void;
|
|
3377
4167
|
set completeFraction(value: number);
|
|
@@ -3389,9 +4179,175 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
|
|
|
3389
4179
|
import { Vector2 } from 'three';
|
|
3390
4180
|
import type { TDrawFn } from '@packages/internal/shave-text/shave-text';
|
|
3391
4181
|
import type { EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
|
|
3392
|
-
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4182
|
+
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
3393
4183
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
3394
4184
|
import type { CollisionRankingTier } from '@mappedin/mappedin-js/geojson/src';
|
|
4185
|
+
import { z } from 'zod';
|
|
4186
|
+
export const addLabelOptionsSchema: z.ZodObject<{
|
|
4187
|
+
rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
|
|
4188
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
4189
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
4190
|
+
margin: z.ZodOptional<z.ZodNumber>;
|
|
4191
|
+
text: z.ZodOptional<z.ZodObject<{
|
|
4192
|
+
numLines: z.ZodOptional<z.ZodNumber>;
|
|
4193
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
4194
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
4195
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
4196
|
+
foregroundColor: z.ZodOptional<z.ZodString>;
|
|
4197
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
4198
|
+
}, "strip", z.ZodTypeAny, {
|
|
4199
|
+
size?: number | undefined;
|
|
4200
|
+
maxWidth?: number | undefined;
|
|
4201
|
+
lineHeight?: number | undefined;
|
|
4202
|
+
numLines?: number | undefined;
|
|
4203
|
+
foregroundColor?: string | undefined;
|
|
4204
|
+
backgroundColor?: string | undefined;
|
|
4205
|
+
}, {
|
|
4206
|
+
size?: number | undefined;
|
|
4207
|
+
maxWidth?: number | undefined;
|
|
4208
|
+
lineHeight?: number | undefined;
|
|
4209
|
+
numLines?: number | undefined;
|
|
4210
|
+
foregroundColor?: string | undefined;
|
|
4211
|
+
backgroundColor?: string | undefined;
|
|
4212
|
+
}>>;
|
|
4213
|
+
marker: z.ZodOptional<z.ZodObject<{
|
|
4214
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
4215
|
+
foregroundColor: z.ZodOptional<z.ZodObject<{
|
|
4216
|
+
active: z.ZodOptional<z.ZodString>;
|
|
4217
|
+
inactive: z.ZodOptional<z.ZodString>;
|
|
4218
|
+
}, "strip", z.ZodTypeAny, {
|
|
4219
|
+
active?: string | undefined;
|
|
4220
|
+
inactive?: string | undefined;
|
|
4221
|
+
}, {
|
|
4222
|
+
active?: string | undefined;
|
|
4223
|
+
inactive?: string | undefined;
|
|
4224
|
+
}>>;
|
|
4225
|
+
backgroundColor: z.ZodOptional<z.ZodObject<{
|
|
4226
|
+
active: z.ZodOptional<z.ZodString>;
|
|
4227
|
+
inactive: z.ZodOptional<z.ZodString>;
|
|
4228
|
+
}, "strip", z.ZodTypeAny, {
|
|
4229
|
+
active?: string | undefined;
|
|
4230
|
+
inactive?: string | undefined;
|
|
4231
|
+
}, {
|
|
4232
|
+
active?: string | undefined;
|
|
4233
|
+
inactive?: string | undefined;
|
|
4234
|
+
}>>;
|
|
4235
|
+
}, "strip", z.ZodTypeAny, {
|
|
4236
|
+
size?: number | undefined;
|
|
4237
|
+
foregroundColor?: {
|
|
4238
|
+
active?: string | undefined;
|
|
4239
|
+
inactive?: string | undefined;
|
|
4240
|
+
} | undefined;
|
|
4241
|
+
backgroundColor?: {
|
|
4242
|
+
active?: string | undefined;
|
|
4243
|
+
inactive?: string | undefined;
|
|
4244
|
+
} | undefined;
|
|
4245
|
+
}, {
|
|
4246
|
+
size?: number | undefined;
|
|
4247
|
+
foregroundColor?: {
|
|
4248
|
+
active?: string | undefined;
|
|
4249
|
+
inactive?: string | undefined;
|
|
4250
|
+
} | undefined;
|
|
4251
|
+
backgroundColor?: {
|
|
4252
|
+
active?: string | undefined;
|
|
4253
|
+
inactive?: string | undefined;
|
|
4254
|
+
} | undefined;
|
|
4255
|
+
}>>;
|
|
4256
|
+
}, "strip", z.ZodTypeAny, {
|
|
4257
|
+
text?: {
|
|
4258
|
+
size?: number | undefined;
|
|
4259
|
+
maxWidth?: number | undefined;
|
|
4260
|
+
lineHeight?: number | undefined;
|
|
4261
|
+
numLines?: number | undefined;
|
|
4262
|
+
foregroundColor?: string | undefined;
|
|
4263
|
+
backgroundColor?: string | undefined;
|
|
4264
|
+
} | undefined;
|
|
4265
|
+
marker?: {
|
|
4266
|
+
size?: number | undefined;
|
|
4267
|
+
foregroundColor?: {
|
|
4268
|
+
active?: string | undefined;
|
|
4269
|
+
inactive?: string | undefined;
|
|
4270
|
+
} | undefined;
|
|
4271
|
+
backgroundColor?: {
|
|
4272
|
+
active?: string | undefined;
|
|
4273
|
+
inactive?: string | undefined;
|
|
4274
|
+
} | undefined;
|
|
4275
|
+
} | undefined;
|
|
4276
|
+
margin?: number | undefined;
|
|
4277
|
+
}, {
|
|
4278
|
+
text?: {
|
|
4279
|
+
size?: number | undefined;
|
|
4280
|
+
maxWidth?: number | undefined;
|
|
4281
|
+
lineHeight?: number | undefined;
|
|
4282
|
+
numLines?: number | undefined;
|
|
4283
|
+
foregroundColor?: string | undefined;
|
|
4284
|
+
backgroundColor?: string | undefined;
|
|
4285
|
+
} | undefined;
|
|
4286
|
+
marker?: {
|
|
4287
|
+
size?: number | undefined;
|
|
4288
|
+
foregroundColor?: {
|
|
4289
|
+
active?: string | undefined;
|
|
4290
|
+
inactive?: string | undefined;
|
|
4291
|
+
} | undefined;
|
|
4292
|
+
backgroundColor?: {
|
|
4293
|
+
active?: string | undefined;
|
|
4294
|
+
inactive?: string | undefined;
|
|
4295
|
+
} | undefined;
|
|
4296
|
+
} | undefined;
|
|
4297
|
+
margin?: number | undefined;
|
|
4298
|
+
}>>;
|
|
4299
|
+
}, "strip", z.ZodTypeAny, {
|
|
4300
|
+
interactive?: boolean | undefined;
|
|
4301
|
+
rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
|
|
4302
|
+
appearance?: {
|
|
4303
|
+
text?: {
|
|
4304
|
+
size?: number | undefined;
|
|
4305
|
+
maxWidth?: number | undefined;
|
|
4306
|
+
lineHeight?: number | undefined;
|
|
4307
|
+
numLines?: number | undefined;
|
|
4308
|
+
foregroundColor?: string | undefined;
|
|
4309
|
+
backgroundColor?: string | undefined;
|
|
4310
|
+
} | undefined;
|
|
4311
|
+
marker?: {
|
|
4312
|
+
size?: number | undefined;
|
|
4313
|
+
foregroundColor?: {
|
|
4314
|
+
active?: string | undefined;
|
|
4315
|
+
inactive?: string | undefined;
|
|
4316
|
+
} | undefined;
|
|
4317
|
+
backgroundColor?: {
|
|
4318
|
+
active?: string | undefined;
|
|
4319
|
+
inactive?: string | undefined;
|
|
4320
|
+
} | undefined;
|
|
4321
|
+
} | undefined;
|
|
4322
|
+
margin?: number | undefined;
|
|
4323
|
+
} | undefined;
|
|
4324
|
+
}, {
|
|
4325
|
+
interactive?: boolean | undefined;
|
|
4326
|
+
rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
|
|
4327
|
+
appearance?: {
|
|
4328
|
+
text?: {
|
|
4329
|
+
size?: number | undefined;
|
|
4330
|
+
maxWidth?: number | undefined;
|
|
4331
|
+
lineHeight?: number | undefined;
|
|
4332
|
+
numLines?: number | undefined;
|
|
4333
|
+
foregroundColor?: string | undefined;
|
|
4334
|
+
backgroundColor?: string | undefined;
|
|
4335
|
+
} | undefined;
|
|
4336
|
+
marker?: {
|
|
4337
|
+
size?: number | undefined;
|
|
4338
|
+
foregroundColor?: {
|
|
4339
|
+
active?: string | undefined;
|
|
4340
|
+
inactive?: string | undefined;
|
|
4341
|
+
} | undefined;
|
|
4342
|
+
backgroundColor?: {
|
|
4343
|
+
active?: string | undefined;
|
|
4344
|
+
inactive?: string | undefined;
|
|
4345
|
+
} | undefined;
|
|
4346
|
+
} | undefined;
|
|
4347
|
+
margin?: number | undefined;
|
|
4348
|
+
} | undefined;
|
|
4349
|
+
}>;
|
|
4350
|
+
export function validateLabel(coordinate: Position, text: string, options: AddLabelOptions): void;
|
|
3395
4351
|
export const labelThemes: {
|
|
3396
4352
|
lightOnDark: {
|
|
3397
4353
|
text: {
|
|
@@ -3727,18 +4683,18 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
|
|
|
3727
4683
|
export default LabelComponent;
|
|
3728
4684
|
}
|
|
3729
4685
|
|
|
3730
|
-
declare module '@mappedin/mappedin-js/geojson/src/entities/
|
|
4686
|
+
declare module '@mappedin/mappedin-js/geojson/src/entities/group-container' {
|
|
3731
4687
|
import { Object3D } from 'three';
|
|
3732
|
-
import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
3733
|
-
import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
3734
|
-
import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4688
|
+
import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
4689
|
+
import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
4690
|
+
import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
|
|
3735
4691
|
import type { StackComponent } from '@mappedin/mappedin-js/geojson/src/components/stack';
|
|
3736
4692
|
import type { MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
3737
4693
|
import type { LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
3738
|
-
import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4694
|
+
import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
3739
4695
|
import type { PathState } from '@mappedin/mappedin-js/geojson/src/components/path';
|
|
3740
|
-
import { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
|
|
3741
|
-
export enum
|
|
4696
|
+
import type { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
|
|
4697
|
+
export enum GroupContainerComponents {
|
|
3742
4698
|
Stack = 0,
|
|
3743
4699
|
Interaction = 1
|
|
3744
4700
|
}
|
|
@@ -3780,13 +4736,13 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/entity-group-containe
|
|
|
3780
4736
|
}
|
|
3781
4737
|
}
|
|
3782
4738
|
|
|
3783
|
-
declare module '@mappedin/mappedin-js/geojson/src/entities/
|
|
4739
|
+
declare module '@mappedin/mappedin-js/geojson/src/entities/geometry-group' {
|
|
3784
4740
|
import type { LineStyle, PaintStyle, Shading } from '@mappedin/mappedin-js/geojson/src/types';
|
|
3785
4741
|
import { Object3D } from 'three';
|
|
3786
|
-
import type
|
|
4742
|
+
import { type GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
3787
4743
|
import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
|
|
3788
4744
|
import { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
|
|
3789
|
-
export enum
|
|
4745
|
+
export enum GeometryGroupComponents {
|
|
3790
4746
|
GeometryGroupStyle = 0
|
|
3791
4747
|
}
|
|
3792
4748
|
/**
|
|
@@ -3833,6 +4789,14 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/entity-group' {
|
|
|
3833
4789
|
* Whether the geometry and its children are outlined. This will affect all children of the geometry group and override their outline state.
|
|
3834
4790
|
*/
|
|
3835
4791
|
outline?: boolean;
|
|
4792
|
+
/**
|
|
4793
|
+
* The texture URL of the geometry
|
|
4794
|
+
*/
|
|
4795
|
+
texture?: string;
|
|
4796
|
+
/**
|
|
4797
|
+
* The top texture URL of the geometry
|
|
4798
|
+
*/
|
|
4799
|
+
topTexture?: string;
|
|
3836
4800
|
};
|
|
3837
4801
|
export type ChildUpdatable<T> = T extends LineStyle ? Partial<Pick<LineStyle, 'color' | 'opacity' | 'visible'>> : Partial<Pick<PaintStyle, 'color' | 'opacity' | 'visible'>>;
|
|
3838
4802
|
export class GeometryGroupObject3D extends Object3D {
|
|
@@ -3853,6 +4817,11 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/entity-group' {
|
|
|
3853
4817
|
setOpacity(opacity: number): void;
|
|
3854
4818
|
removeEntity(): void;
|
|
3855
4819
|
constructor(id: string, style?: GeometryGroupStyleComponent);
|
|
4820
|
+
/**
|
|
4821
|
+
* Get first child entity of a group if it's a batched mesh
|
|
4822
|
+
* We use this logic a lot for getting the material of the group. since group does not have material and batched mesh does
|
|
4823
|
+
*/
|
|
4824
|
+
getfirstChildEntityId(): string | number | undefined;
|
|
3856
4825
|
}
|
|
3857
4826
|
}
|
|
3858
4827
|
|
|
@@ -3862,20 +4831,22 @@ declare module '@mappedin/mappedin-js/geojson/src/types/geometry' {
|
|
|
3862
4831
|
|
|
3863
4832
|
declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
3864
4833
|
import { Mesh, Object3D, InstancedMesh } from 'three';
|
|
3865
|
-
import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4834
|
+
import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
|
|
3866
4835
|
import type { Position } from '@mappedin/mappedin-js/geojson/src/types/geometry';
|
|
3867
4836
|
import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
3868
|
-
import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
3869
|
-
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4837
|
+
import type { GeometryGroupObject3D, GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
4838
|
+
import type { GroupContainerObject3D, GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
3870
4839
|
import type { PathState } from '@mappedin/mappedin-js/geojson/src/components/path';
|
|
3871
4840
|
import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
|
|
3872
4841
|
import type { LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
3873
4842
|
import type { MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
4843
|
+
import type { ImageState } from '@mappedin/mappedin-js/geojson/src/components/image';
|
|
3874
4844
|
import type { ShapeState } from '@mappedin/mappedin-js/geojson/src/components/custom';
|
|
4845
|
+
import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities';
|
|
3875
4846
|
/**
|
|
3876
4847
|
* The state of an entity, which can be a geometry, geometry group, group container, path, model, label, or marker.
|
|
3877
4848
|
*/
|
|
3878
|
-
export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ShapeState;
|
|
4849
|
+
export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ImageState | ShapeState;
|
|
3879
4850
|
/**
|
|
3880
4851
|
* 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
|
|
3881
4852
|
* to `getState` and `setState` of the entity.
|
|
@@ -3924,9 +4895,9 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
3924
4895
|
texture?: string;
|
|
3925
4896
|
shading?: Shading;
|
|
3926
4897
|
outline?: boolean;
|
|
4898
|
+
showImage?: boolean;
|
|
4899
|
+
flipImageToFaceCamera?: boolean;
|
|
3927
4900
|
};
|
|
3928
|
-
export type Cap = 'round' | 'square' | 'butt';
|
|
3929
|
-
export type Join = 'round' | 'bevel' | 'miter';
|
|
3930
4901
|
export type Shading = {
|
|
3931
4902
|
start?: number;
|
|
3932
4903
|
end?: number;
|
|
@@ -3940,8 +4911,8 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
3940
4911
|
height?: number;
|
|
3941
4912
|
altitude?: number;
|
|
3942
4913
|
visible?: boolean;
|
|
3943
|
-
cap?:
|
|
3944
|
-
join?:
|
|
4914
|
+
cap?: 'round' | 'square' | 'butt';
|
|
4915
|
+
join?: 'round' | 'bevel' | 'miter';
|
|
3945
4916
|
shading?: Shading;
|
|
3946
4917
|
outline?: boolean;
|
|
3947
4918
|
};
|
|
@@ -3957,6 +4928,12 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
3957
4928
|
};
|
|
3958
4929
|
source: string;
|
|
3959
4930
|
};
|
|
4931
|
+
export type PolygonImage = {
|
|
4932
|
+
width: number;
|
|
4933
|
+
height: number;
|
|
4934
|
+
verticalOffset?: number;
|
|
4935
|
+
rotation?: number;
|
|
4936
|
+
};
|
|
3960
4937
|
export type PolygonSource = {
|
|
3961
4938
|
features: {
|
|
3962
4939
|
type: 'Feature';
|
|
@@ -4103,6 +5080,10 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
4103
5080
|
* Geometries can be added to the focus listener via `mapView.setState(.., { focusable: true })`.
|
|
4104
5081
|
*/
|
|
4105
5082
|
'geometry-in-focus': string | number | null;
|
|
5083
|
+
/**
|
|
5084
|
+
* Fired before the scene is rendered. Use this to modify the scene before it is rendered.
|
|
5085
|
+
*/
|
|
5086
|
+
'pre-render': undefined;
|
|
4106
5087
|
};
|
|
4107
5088
|
/**
|
|
4108
5089
|
* The payload of an event. See also {@link MapEvent}.
|
|
@@ -4110,6 +5091,21 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
|
|
|
4110
5091
|
export type MapEventPayload<EventName extends keyof MapEvent> = MapEvent[EventName] extends {
|
|
4111
5092
|
data: null;
|
|
4112
5093
|
} ? MapEvent[EventName]['data'] : MapEvent[EventName];
|
|
5094
|
+
export type Geometry3DTypes = Geometry3D | GeometryGroupObject3D | GroupContainerObject3D;
|
|
5095
|
+
export type RendererState = {
|
|
5096
|
+
geometry3DMap: Map<string | number, Geometry3DTypes>;
|
|
5097
|
+
geometry2DMap: Map<string | number, Geometry2D>;
|
|
5098
|
+
geometry2DIdsInScene: Set<Geometry2D['id']>;
|
|
5099
|
+
geometry3DIdsInScene: Set<Geometry3DTypes['id']>;
|
|
5100
|
+
entityScene: GroupContainerObject3D;
|
|
5101
|
+
hoverColor: string;
|
|
5102
|
+
center?: Position;
|
|
5103
|
+
insetsPadding: InsetPadding;
|
|
5104
|
+
shouldMeasureCanvas: boolean;
|
|
5105
|
+
pixelRatio: number;
|
|
5106
|
+
canvasWidth: number;
|
|
5107
|
+
canvasHeight: number;
|
|
5108
|
+
};
|
|
4113
5109
|
}
|
|
4114
5110
|
|
|
4115
5111
|
declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
@@ -4124,6 +5120,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
|
4124
5120
|
entities: {
|
|
4125
5121
|
[key: number]: string | number;
|
|
4126
5122
|
};
|
|
5123
|
+
detached?: boolean;
|
|
4127
5124
|
};
|
|
4128
5125
|
}
|
|
4129
5126
|
/**
|
|
@@ -4169,21 +5166,49 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
|
4169
5166
|
* Whether the geometry is outlined with a 30% darkened color. This effect adds lines around the geometry to make it stand out.
|
|
4170
5167
|
*/
|
|
4171
5168
|
outline: boolean;
|
|
5169
|
+
/**
|
|
5170
|
+
* Show geometry image if present
|
|
5171
|
+
*/
|
|
5172
|
+
showImage: boolean;
|
|
5173
|
+
/**
|
|
5174
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
5175
|
+
*/
|
|
5176
|
+
flipImageToFaceCamera: boolean;
|
|
4172
5177
|
/**
|
|
4173
5178
|
* Whether the geometry should emit an event when focused on by the center of the camera
|
|
4174
5179
|
*/
|
|
4175
5180
|
focusable: boolean;
|
|
5181
|
+
/**
|
|
5182
|
+
* The opacity of the geometry
|
|
5183
|
+
*/
|
|
5184
|
+
opacity: number;
|
|
5185
|
+
/**
|
|
5186
|
+
* The height of the geometry
|
|
5187
|
+
*/
|
|
5188
|
+
height: number;
|
|
5189
|
+
/**
|
|
5190
|
+
* The texture URL of the geometry
|
|
5191
|
+
*/
|
|
5192
|
+
texture?: string;
|
|
5193
|
+
/**
|
|
5194
|
+
* The top texture URL of the geometry
|
|
5195
|
+
*/
|
|
5196
|
+
topTexture?: string;
|
|
4176
5197
|
};
|
|
4177
5198
|
export class MeshComponent {
|
|
4178
5199
|
#private;
|
|
4179
5200
|
mesh?: EntityBatchedMesh;
|
|
4180
5201
|
focusMesh?: Mesh;
|
|
4181
5202
|
outline?: LineSegments;
|
|
5203
|
+
imageMesh?: Mesh;
|
|
4182
5204
|
readonly type = "geometry";
|
|
5205
|
+
dirty: boolean;
|
|
5206
|
+
detached: boolean;
|
|
4183
5207
|
instanceIndex: number;
|
|
4184
5208
|
geometry?: BufferGeometry;
|
|
4185
5209
|
material?: BatchedStandardMaterial;
|
|
4186
5210
|
feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>;
|
|
5211
|
+
currentHeight: number;
|
|
4187
5212
|
constructor(feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>);
|
|
4188
5213
|
get visible(): boolean;
|
|
4189
5214
|
set visible(visible: boolean);
|
|
@@ -4192,6 +5217,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
|
4192
5217
|
color: Color;
|
|
4193
5218
|
topColor: Color;
|
|
4194
5219
|
setColor(color: string, topColor: string): void;
|
|
5220
|
+
getColor(): {
|
|
5221
|
+
color: Color;
|
|
5222
|
+
topColor: Color;
|
|
5223
|
+
} | undefined;
|
|
4195
5224
|
position: Vector3;
|
|
4196
5225
|
get altitude(): number;
|
|
4197
5226
|
set altitude(value: number);
|
|
@@ -4199,12 +5228,16 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
|
|
|
4199
5228
|
set opacity(value: number);
|
|
4200
5229
|
get texture(): string;
|
|
4201
5230
|
set texture(texture: Texture);
|
|
5231
|
+
get textureInstance(): Texture | undefined;
|
|
4202
5232
|
set topTexture(texture: Texture);
|
|
4203
5233
|
get topTexture(): string;
|
|
5234
|
+
get topTextureInstance(): Texture | undefined;
|
|
4204
5235
|
get featureBbox(): BBox;
|
|
4205
5236
|
texturesVisible: boolean;
|
|
4206
5237
|
showTextures(): void;
|
|
4207
5238
|
hideTextures(): void;
|
|
5239
|
+
removeSideTexture(): void;
|
|
5240
|
+
removeTopTexture(): void;
|
|
4208
5241
|
}
|
|
4209
5242
|
}
|
|
4210
5243
|
|
|
@@ -4212,8 +5245,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/custom' {
|
|
|
4212
5245
|
import { Color, type Object3D, type LineSegments } from 'three';
|
|
4213
5246
|
import type { EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
|
|
4214
5247
|
import type { Feature, Point } from 'geojson';
|
|
4215
|
-
import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4216
|
-
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
5248
|
+
import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
5249
|
+
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
4217
5250
|
/**
|
|
4218
5251
|
* State representing a Custom Geometry
|
|
4219
5252
|
*/
|
|
@@ -4268,10 +5301,11 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
|
|
|
4268
5301
|
import type { LineSegments, Object3D } from 'three';
|
|
4269
5302
|
import { Color, Vector3 } from 'three';
|
|
4270
5303
|
import type { BatchedStandardMaterial } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material';
|
|
4271
|
-
import type { Position, EntityId } from '@mappedin/mappedin-js/geojson/src/types';
|
|
4272
|
-
import type { Feature, Point } from 'geojson';
|
|
4273
|
-
import type { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4274
|
-
import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
5304
|
+
import type { Position, EntityId, ModelProperties, ModelStyle } from '@mappedin/mappedin-js/geojson/src/types';
|
|
5305
|
+
import type { Feature, FeatureCollection, Point } from 'geojson';
|
|
5306
|
+
import type { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
5307
|
+
import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
5308
|
+
import { z } from 'zod';
|
|
4275
5309
|
/**
|
|
4276
5310
|
* State representing a Model, typically loaded via a URL
|
|
4277
5311
|
*/
|
|
@@ -4296,6 +5330,190 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
|
|
|
4296
5330
|
*/
|
|
4297
5331
|
interactive: boolean;
|
|
4298
5332
|
};
|
|
5333
|
+
export const modelPropertiesSchema: z.ZodObject<{
|
|
5334
|
+
rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
5335
|
+
altitude: z.ZodOptional<z.ZodNumber>;
|
|
5336
|
+
scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
5337
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
5338
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
5339
|
+
}, "strip", z.ZodTypeAny, {
|
|
5340
|
+
rotation?: number[] | undefined;
|
|
5341
|
+
altitude?: number | undefined;
|
|
5342
|
+
scale?: number[] | undefined;
|
|
5343
|
+
interactive?: boolean | undefined;
|
|
5344
|
+
id?: string | number | undefined;
|
|
5345
|
+
}, {
|
|
5346
|
+
rotation?: number[] | undefined;
|
|
5347
|
+
altitude?: number | undefined;
|
|
5348
|
+
scale?: number[] | undefined;
|
|
5349
|
+
interactive?: boolean | undefined;
|
|
5350
|
+
id?: string | number | undefined;
|
|
5351
|
+
}>;
|
|
5352
|
+
export const featureSchema: z.ZodObject<{
|
|
5353
|
+
type: z.ZodEnum<["Feature"]>;
|
|
5354
|
+
geometry: z.ZodObject<{
|
|
5355
|
+
type: z.ZodEnum<["Point"]>;
|
|
5356
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
5357
|
+
}, "strip", z.ZodTypeAny, {
|
|
5358
|
+
type: "Point";
|
|
5359
|
+
coordinates: number[];
|
|
5360
|
+
}, {
|
|
5361
|
+
type: "Point";
|
|
5362
|
+
coordinates: number[];
|
|
5363
|
+
}>;
|
|
5364
|
+
properties: z.ZodObject<{
|
|
5365
|
+
rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
5366
|
+
altitude: z.ZodOptional<z.ZodNumber>;
|
|
5367
|
+
scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
5368
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
5369
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
5370
|
+
}, "strip", z.ZodTypeAny, {
|
|
5371
|
+
rotation?: number[] | undefined;
|
|
5372
|
+
altitude?: number | undefined;
|
|
5373
|
+
scale?: number[] | undefined;
|
|
5374
|
+
interactive?: boolean | undefined;
|
|
5375
|
+
id?: string | number | undefined;
|
|
5376
|
+
}, {
|
|
5377
|
+
rotation?: number[] | undefined;
|
|
5378
|
+
altitude?: number | undefined;
|
|
5379
|
+
scale?: number[] | undefined;
|
|
5380
|
+
interactive?: boolean | undefined;
|
|
5381
|
+
id?: string | number | undefined;
|
|
5382
|
+
}>;
|
|
5383
|
+
}, "strip", z.ZodTypeAny, {
|
|
5384
|
+
type: "Feature";
|
|
5385
|
+
geometry: {
|
|
5386
|
+
type: "Point";
|
|
5387
|
+
coordinates: number[];
|
|
5388
|
+
};
|
|
5389
|
+
properties: {
|
|
5390
|
+
rotation?: number[] | undefined;
|
|
5391
|
+
altitude?: number | undefined;
|
|
5392
|
+
scale?: number[] | undefined;
|
|
5393
|
+
interactive?: boolean | undefined;
|
|
5394
|
+
id?: string | number | undefined;
|
|
5395
|
+
};
|
|
5396
|
+
}, {
|
|
5397
|
+
type: "Feature";
|
|
5398
|
+
geometry: {
|
|
5399
|
+
type: "Point";
|
|
5400
|
+
coordinates: number[];
|
|
5401
|
+
};
|
|
5402
|
+
properties: {
|
|
5403
|
+
rotation?: number[] | undefined;
|
|
5404
|
+
altitude?: number | undefined;
|
|
5405
|
+
scale?: number[] | undefined;
|
|
5406
|
+
interactive?: boolean | undefined;
|
|
5407
|
+
id?: string | number | undefined;
|
|
5408
|
+
};
|
|
5409
|
+
}>;
|
|
5410
|
+
export const addModelFeatureSchema: z.ZodObject<{
|
|
5411
|
+
type: z.ZodEnum<["FeatureCollection"]>;
|
|
5412
|
+
features: z.ZodArray<z.ZodObject<{
|
|
5413
|
+
type: z.ZodEnum<["Feature"]>;
|
|
5414
|
+
geometry: z.ZodObject<{
|
|
5415
|
+
type: z.ZodEnum<["Point"]>;
|
|
5416
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
5417
|
+
}, "strip", z.ZodTypeAny, {
|
|
5418
|
+
type: "Point";
|
|
5419
|
+
coordinates: number[];
|
|
5420
|
+
}, {
|
|
5421
|
+
type: "Point";
|
|
5422
|
+
coordinates: number[];
|
|
5423
|
+
}>;
|
|
5424
|
+
properties: z.ZodObject<{
|
|
5425
|
+
rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
5426
|
+
altitude: z.ZodOptional<z.ZodNumber>;
|
|
5427
|
+
scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
5428
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
5429
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
5430
|
+
}, "strip", z.ZodTypeAny, {
|
|
5431
|
+
rotation?: number[] | undefined;
|
|
5432
|
+
altitude?: number | undefined;
|
|
5433
|
+
scale?: number[] | undefined;
|
|
5434
|
+
interactive?: boolean | undefined;
|
|
5435
|
+
id?: string | number | undefined;
|
|
5436
|
+
}, {
|
|
5437
|
+
rotation?: number[] | undefined;
|
|
5438
|
+
altitude?: number | undefined;
|
|
5439
|
+
scale?: number[] | undefined;
|
|
5440
|
+
interactive?: boolean | undefined;
|
|
5441
|
+
id?: string | number | undefined;
|
|
5442
|
+
}>;
|
|
5443
|
+
}, "strip", z.ZodTypeAny, {
|
|
5444
|
+
type: "Feature";
|
|
5445
|
+
geometry: {
|
|
5446
|
+
type: "Point";
|
|
5447
|
+
coordinates: number[];
|
|
5448
|
+
};
|
|
5449
|
+
properties: {
|
|
5450
|
+
rotation?: number[] | undefined;
|
|
5451
|
+
altitude?: number | undefined;
|
|
5452
|
+
scale?: number[] | undefined;
|
|
5453
|
+
interactive?: boolean | undefined;
|
|
5454
|
+
id?: string | number | undefined;
|
|
5455
|
+
};
|
|
5456
|
+
}, {
|
|
5457
|
+
type: "Feature";
|
|
5458
|
+
geometry: {
|
|
5459
|
+
type: "Point";
|
|
5460
|
+
coordinates: number[];
|
|
5461
|
+
};
|
|
5462
|
+
properties: {
|
|
5463
|
+
rotation?: number[] | undefined;
|
|
5464
|
+
altitude?: number | undefined;
|
|
5465
|
+
scale?: number[] | undefined;
|
|
5466
|
+
interactive?: boolean | undefined;
|
|
5467
|
+
id?: string | number | undefined;
|
|
5468
|
+
};
|
|
5469
|
+
}>, "many">;
|
|
5470
|
+
}, "strip", z.ZodTypeAny, {
|
|
5471
|
+
type: "FeatureCollection";
|
|
5472
|
+
features: {
|
|
5473
|
+
type: "Feature";
|
|
5474
|
+
geometry: {
|
|
5475
|
+
type: "Point";
|
|
5476
|
+
coordinates: number[];
|
|
5477
|
+
};
|
|
5478
|
+
properties: {
|
|
5479
|
+
rotation?: number[] | undefined;
|
|
5480
|
+
altitude?: number | undefined;
|
|
5481
|
+
scale?: number[] | undefined;
|
|
5482
|
+
interactive?: boolean | undefined;
|
|
5483
|
+
id?: string | number | undefined;
|
|
5484
|
+
};
|
|
5485
|
+
}[];
|
|
5486
|
+
}, {
|
|
5487
|
+
type: "FeatureCollection";
|
|
5488
|
+
features: {
|
|
5489
|
+
type: "Feature";
|
|
5490
|
+
geometry: {
|
|
5491
|
+
type: "Point";
|
|
5492
|
+
coordinates: number[];
|
|
5493
|
+
};
|
|
5494
|
+
properties: {
|
|
5495
|
+
rotation?: number[] | undefined;
|
|
5496
|
+
altitude?: number | undefined;
|
|
5497
|
+
scale?: number[] | undefined;
|
|
5498
|
+
interactive?: boolean | undefined;
|
|
5499
|
+
id?: string | number | undefined;
|
|
5500
|
+
};
|
|
5501
|
+
}[];
|
|
5502
|
+
}>;
|
|
5503
|
+
export const modelStyleSchema: z.ZodObject<{
|
|
5504
|
+
url: z.ZodString;
|
|
5505
|
+
color: z.ZodOptional<z.ZodString>;
|
|
5506
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
5507
|
+
}, "strip", z.ZodTypeAny, {
|
|
5508
|
+
url: string;
|
|
5509
|
+
color?: string | undefined;
|
|
5510
|
+
opacity?: number | undefined;
|
|
5511
|
+
}, {
|
|
5512
|
+
url: string;
|
|
5513
|
+
color?: string | undefined;
|
|
5514
|
+
opacity?: number | undefined;
|
|
5515
|
+
}>;
|
|
5516
|
+
export function validateModelGroup(id: string | number, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle): void;
|
|
4299
5517
|
export class ModelComponent {
|
|
4300
5518
|
#private;
|
|
4301
5519
|
mesh?: Geometry3DObject3D;
|
|
@@ -4320,13 +5538,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
|
|
|
4320
5538
|
|
|
4321
5539
|
declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
4322
5540
|
import './utils/object-this-polyfill';
|
|
4323
|
-
import type { Position as GeoJsonPosition } from 'geojson';
|
|
4324
5541
|
import { Vector3, Raycaster, Camera as ThreeCamera } from 'three';
|
|
4325
|
-
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4326
|
-
import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
5542
|
+
import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
5543
|
+
import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
4327
5544
|
import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
|
|
4328
|
-
import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
|
|
4329
|
-
import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/two-d';
|
|
4330
5545
|
import { CollisionSystem } from '@mappedin/mappedin-js/geojson/src/systems/collisions/system';
|
|
4331
5546
|
import { InteractionSystem } from '@mappedin/mappedin-js/geojson/src/systems/interactions';
|
|
4332
5547
|
import { ZoomInterpolationSystem } from '@mappedin/mappedin-js/geojson/src/systems/zoom-interpolation/zoom-interpolation';
|
|
@@ -4334,7 +5549,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4334
5549
|
import type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
|
|
4335
5550
|
import { ExporterSystem } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
|
|
4336
5551
|
import type { AddLabelOptions, LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
4337
|
-
import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, ModelStyle,
|
|
5552
|
+
import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, ModelStyle, EntityState, EntityId, MapEvent, MapEventPayload, RendererState } from '@mappedin/mappedin-js/geojson/src/types';
|
|
4338
5553
|
import { MeshCreationAndOptimizationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/system';
|
|
4339
5554
|
import { DOMVisibilitySystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-visiblity/system';
|
|
4340
5555
|
import { TwoDProjectionSystem } from '@mappedin/mappedin-js/geojson/src/systems/2d-projection/system';
|
|
@@ -4342,16 +5557,15 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4342
5557
|
import { DrawSystem } from '@mappedin/mappedin-js/geojson/src/systems/draw/system';
|
|
4343
5558
|
import { TwoDVisibilitySystem } from '@mappedin/mappedin-js/geojson/src/systems/2d-visibility/system';
|
|
4344
5559
|
import { RenderSystem } from '@mappedin/mappedin-js/geojson/src/systems/render/system';
|
|
4345
|
-
import type { FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
|
|
4346
|
-
import type { AddPathOptions, PathState } from '@mappedin/mappedin-js/geojson/src/components/path';
|
|
5560
|
+
import type { Position as GeoJsonPosition, FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
|
|
5561
|
+
import type { AddPathOptions, PathProperties, PathState } from '@mappedin/mappedin-js/geojson/src/components/path';
|
|
4347
5562
|
import { StackSystem } from '@mappedin/mappedin-js/geojson/src/systems/stack/system';
|
|
4348
5563
|
import { CameraSystem } from '@mappedin/mappedin-js/geojson/src/systems/camera';
|
|
4349
5564
|
import { DOMDrawSystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-draw/system';
|
|
4350
5565
|
import { type Map as MapLibreMap } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
|
|
4351
5566
|
import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
4352
5567
|
import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
|
|
4353
|
-
import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4354
|
-
import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
|
|
5568
|
+
import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
4355
5569
|
import { DOMResizeSystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-resize/system';
|
|
4356
5570
|
import { Camera } from '@mappedin/mappedin-js/geojson/src/camera';
|
|
4357
5571
|
import { type WatermarkOptions, WatermarkSystem } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
|
|
@@ -4360,16 +5574,16 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4360
5574
|
import { type CustomGeometryBuilder, type ShapeState } from '@mappedin/mappedin-js/geojson/src/components/custom';
|
|
4361
5575
|
import { CustomGeometrySystem } from '@mappedin/mappedin-js/geojson/src/systems/custom-geometry/system';
|
|
4362
5576
|
import { OutlineInterpolationSystem } from '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/system';
|
|
5577
|
+
import { ImageSystem } from '@mappedin/mappedin-js/geojson/src/systems/image/system';
|
|
4363
5578
|
import { GeometryInFocusSystem } from '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/system';
|
|
4364
5579
|
import { OutdoorLayers } from '@mappedin/mappedin-js/geojson/src/systems/outdoor-layers/system';
|
|
4365
5580
|
import { PathSystem } from '@mappedin/mappedin-js/geojson/src/systems/path';
|
|
5581
|
+
import { type ImageProperties, type ImageState, type ImageStyle } from '@mappedin/mappedin-js/geojson/src/components/image';
|
|
5582
|
+
import { MeshDetachmentSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-detachment/system';
|
|
5583
|
+
import { MeshModificationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/system';
|
|
5584
|
+
import { PreRenderSystem } from '@mappedin/mappedin-js/geojson/src/systems/pre-render/system';
|
|
4366
5585
|
export type * from '@mappedin/mappedin-js/geojson/src/types';
|
|
4367
5586
|
export const raycaster: Raycaster;
|
|
4368
|
-
export const DEFAULT_ZOOM_LEVEL = 18;
|
|
4369
|
-
export const DEFAULT_MIN_ZOOM_LEVEL = 12;
|
|
4370
|
-
export const DEFAULT_MAX_ZOOM_LEVEL = 22;
|
|
4371
|
-
export const DEFAULT_PITCH = 0;
|
|
4372
|
-
export const DEFAULT_BEARING = 0;
|
|
4373
5587
|
/**
|
|
4374
5588
|
* Some preset orderings for updates.
|
|
4375
5589
|
*/
|
|
@@ -4381,21 +5595,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4381
5595
|
AFTER_RENDER: number;
|
|
4382
5596
|
AFTER_ALL_UPDATES: number;
|
|
4383
5597
|
};
|
|
4384
|
-
export
|
|
4385
|
-
export type RendererState = {
|
|
4386
|
-
entity3DMap: Map<string | number, Entity3DTypes>;
|
|
4387
|
-
entity2DMap: Map<string | number, Geometry2D>;
|
|
4388
|
-
entity2DIds: Set<Geometry2D['id']>;
|
|
4389
|
-
threeDEntities: (string | number)[];
|
|
4390
|
-
entityScene: GroupContainerObject3D;
|
|
4391
|
-
hoverColor: string;
|
|
4392
|
-
center?: Position;
|
|
4393
|
-
insetsPadding: InsetPadding;
|
|
4394
|
-
shouldMeasureCanvas: boolean;
|
|
4395
|
-
pixelRatio: number;
|
|
4396
|
-
canvasWidth: number;
|
|
4397
|
-
canvasHeight: number;
|
|
4398
|
-
};
|
|
5598
|
+
export const DEFAULT_PITCH: number, DEFAULT_BEARING: number, DEFAULT_ZOOM_LEVEL: number, DEFAULT_MIN_ZOOM_LEVEL: number, DEFAULT_MAX_ZOOM_LEVEL: number;
|
|
4399
5599
|
export type Systems = {
|
|
4400
5600
|
cameraSystem: CameraSystem;
|
|
4401
5601
|
panBoundsSystem: PanBoundsSystem;
|
|
@@ -4419,7 +5619,11 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4419
5619
|
outlineInterpolationSystem: OutlineInterpolationSystem;
|
|
4420
5620
|
outdoorLayersSystem: OutdoorLayers;
|
|
4421
5621
|
pathSystem: PathSystem;
|
|
5622
|
+
imageSystem: ImageSystem;
|
|
4422
5623
|
geometryInFocusSystem: GeometryInFocusSystem;
|
|
5624
|
+
meshDetachmentSystem: MeshDetachmentSystem;
|
|
5625
|
+
meshModificationSystem: MeshModificationSystem;
|
|
5626
|
+
preRenderSystem: PreRenderSystem;
|
|
4423
5627
|
};
|
|
4424
5628
|
export type MapViewState = {
|
|
4425
5629
|
readonly type: 'map-view';
|
|
@@ -4465,6 +5669,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4465
5669
|
id: string;
|
|
4466
5670
|
type: string;
|
|
4467
5671
|
};
|
|
5672
|
+
getParentContainer: (parent?: EntityId<GroupContainerState> | string | number | null, defaultToScene?: boolean) => GroupContainerObject3D | undefined;
|
|
4468
5673
|
/**
|
|
4469
5674
|
* Add a custom THREE.js entity to the map. The geometry is placed at the GeoJSON coordinate and includes a `setup` and `update` methods.
|
|
4470
5675
|
* Setup is called when the first time the geometry visible, and update is called every render frame.
|
|
@@ -4477,36 +5682,29 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4477
5682
|
* Add a geometry group from GeoJSON data
|
|
4478
5683
|
*/
|
|
4479
5684
|
addGeometryGroup<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(id: string, geometry: T, style?: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GeometryGroupState>;
|
|
5685
|
+
addImage(id: string, geometry: Feature<Point, ImageProperties>, style: ImageStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<ImageState> | undefined;
|
|
4480
5686
|
/**
|
|
4481
5687
|
* Add a group of models from GeoJSON data. These will be instanced automatically for better performance.
|
|
4482
5688
|
*/
|
|
4483
|
-
addModelGroup(id: string, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<GeometryGroupState
|
|
5689
|
+
addModelGroup(id: string, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<GeometryGroupState> | undefined;
|
|
4484
5690
|
/**
|
|
4485
5691
|
* Add an HTML Marker at a GeoJSON coordinate.
|
|
4486
5692
|
*/
|
|
4487
|
-
addMarker2D(coordinate: Position, contentHTML: string, options?: AddMarkerOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<MarkerState
|
|
5693
|
+
addMarker2D(coordinate: Position, contentHTML: string, options?: AddMarkerOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<MarkerState> | undefined;
|
|
4488
5694
|
/**
|
|
4489
5695
|
* Add a 2D label at a GeoJSON coordinate.
|
|
4490
5696
|
*/
|
|
4491
|
-
addLabel2D(coordinate: Position, text: string, options?: AddLabelOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<LabelState
|
|
5697
|
+
addLabel2D(coordinate: Position, text: string, options?: AddLabelOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<LabelState> | undefined;
|
|
4492
5698
|
/**
|
|
4493
5699
|
* Add a Path along a set of GeoJSON coordinates that can be animated.
|
|
4494
5700
|
*/
|
|
4495
|
-
addPath(geometry: FeatureCollection<Point,
|
|
5701
|
+
addPath(geometry: FeatureCollection<Point, PathProperties>, options?: AddPathOptions, parent?: EntityId<GroupContainerState> | string | null): EntityId<PathState>;
|
|
4496
5702
|
/**
|
|
4497
5703
|
* Updates the watermark on the map.
|
|
4498
5704
|
*
|
|
4499
5705
|
* @param options {WatermarkOptions}
|
|
4500
5706
|
*/
|
|
4501
5707
|
updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
|
|
4502
|
-
/**
|
|
4503
|
-
* @deprecated
|
|
4504
|
-
* @TODO: remove this method and do this in setstate instead
|
|
4505
|
-
*/
|
|
4506
|
-
updateStackState(container: EntityId<GroupContainerState> | string | number, opts: {
|
|
4507
|
-
expandedFactor?: number;
|
|
4508
|
-
activeId?: string;
|
|
4509
|
-
}): void;
|
|
4510
5708
|
/**
|
|
4511
5709
|
* Remove an entity from the renderer and release associated resources.
|
|
4512
5710
|
*/
|
|
@@ -4535,9 +5733,9 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4535
5733
|
* Get the current state of the map view, or any entity that was added, regardless of whether it is visible in the scene
|
|
4536
5734
|
*/
|
|
4537
5735
|
getState(): MapViewState;
|
|
4538
|
-
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;
|
|
5736
|
+
getState<T extends EntityId<EntityState>>(geometryOrGeometryId: T): T extends EntityId<LabelState> ? LabelState : T extends EntityId<GeometryState> ? GeometryState : T extends EntityId<MarkerState> ? MarkerState : T extends EntityId<GeometryGroupState> ? GeometryGroupState : T extends EntityId<GroupContainerState> ? GroupContainerState : T extends EntityId<ModelState> ? ModelState : T extends EntityId<PathState> ? ShapeState : T extends EntityId<ShapeState> ? ShapeState : T extends EntityId<ImageState> ? ImageState : EntityState;
|
|
4539
5737
|
getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
|
|
4540
|
-
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;
|
|
5738
|
+
getState<T extends EntityState>(geometryOrGeometryId: T['id']): T extends LabelState ? LabelState : T extends GeometryState ? GeometryState : T extends MarkerState ? MarkerState : T extends GeometryGroupState ? GeometryGroupState : T extends GroupContainerState ? GroupContainerState : T extends ModelState ? ModelState : T extends PathState ? ShapeState : T extends ShapeState ? PathState : T extends ImageState ? ImageState : EntityState;
|
|
4541
5739
|
/**
|
|
4542
5740
|
* Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
|
|
4543
5741
|
*/
|
|
@@ -4550,6 +5748,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4550
5748
|
setState<T extends EntityId<ShapeState>>(object: T | T['id'], state: Partial<ShapeState>): void;
|
|
4551
5749
|
setState<T extends EntityId<PathState>>(object: T | T['id'], state: Partial<PathState>): void;
|
|
4552
5750
|
setState<T extends EntityId<ModelState>>(object: T | T['id'], state: Partial<ModelState>): void;
|
|
5751
|
+
setState<T extends EntityId<ImageState>>(object: T | T['id'], state: Partial<ImageState>): void;
|
|
4553
5752
|
setState<T extends EntityState>(object: T | T['id'], state: Partial<T>): void;
|
|
4554
5753
|
/**
|
|
4555
5754
|
* Project a screen coordinate to a geographic coordinate
|
|
@@ -4588,6 +5787,14 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
|
|
|
4588
5787
|
* Sets the background color of the renderer. Only applies to "standalone mode"
|
|
4589
5788
|
*/
|
|
4590
5789
|
setBackgroundColor: (color: any, alpha: any) => void;
|
|
5790
|
+
/**
|
|
5791
|
+
* Returns the background color of the renderer. Only applies to "standalone mode"
|
|
5792
|
+
*/
|
|
5793
|
+
get backgroundColor(): import("three").Color;
|
|
5794
|
+
/**
|
|
5795
|
+
* Returns the current scale of the map in metres per pixel.
|
|
5796
|
+
*/
|
|
5797
|
+
getMetresPerPixel: () => number | undefined;
|
|
4591
5798
|
/**
|
|
4592
5799
|
* @internal
|
|
4593
5800
|
* Filters out layers at a certain point on the outdoor map. This can be used to hide the outdoor building footprint underneath the 3D geometry.
|
|
@@ -4738,13 +5945,23 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
|
|
|
4738
5945
|
* How far the camera can zoom out away from the ground
|
|
4739
5946
|
*/
|
|
4740
5947
|
get minZoomLevel(): number;
|
|
5948
|
+
/**
|
|
5949
|
+
* Toggle the mode of the camera to automatically set the minimum zoom level based on the size of the scene.
|
|
5950
|
+
* It will be automatically disabled when the minimum zoom level is set manually.
|
|
5951
|
+
* @param value The new value for the auto min zoom level mode.
|
|
5952
|
+
*/
|
|
5953
|
+
setAutoMinZoomLevel(value: boolean): void;
|
|
5954
|
+
/**
|
|
5955
|
+
* The mode of the camera to automatically set the minimum zoom level based on the size of the scene.
|
|
5956
|
+
*/
|
|
5957
|
+
get autoMinZoomLevel(): boolean;
|
|
4741
5958
|
/**
|
|
4742
5959
|
* How far out the camera can zoom
|
|
4743
5960
|
*
|
|
4744
5961
|
* @param zoomLevel The minimum zoom level in mercator zoom level units.
|
|
4745
5962
|
* @default 0
|
|
4746
5963
|
*/
|
|
4747
|
-
setMinZoomLevel(zoomLevel: number): void;
|
|
5964
|
+
setMinZoomLevel(zoomLevel: number, disableAutoMinZoomLevel?: boolean): void;
|
|
4748
5965
|
/**
|
|
4749
5966
|
* How far in the camera can zoom
|
|
4750
5967
|
*
|
|
@@ -4857,40 +6074,40 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
|
|
|
4857
6074
|
import { Box2 } from 'three';
|
|
4858
6075
|
import { MercatorCoordinate } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
|
|
4859
6076
|
import type { CustomLayerInterface } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
|
|
4860
|
-
import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4861
|
-
import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4862
|
-
import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
4863
|
-
import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
6077
|
+
import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
6078
|
+
import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
6079
|
+
import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
|
|
6080
|
+
import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
4864
6081
|
import type { Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
4865
6082
|
import type { Camera } from '@mappedin/mappedin-js/geojson/src/camera';
|
|
4866
6083
|
export function cartesianToGeographic(centerLat: number, centerLon: number, x: number, y: number): {
|
|
4867
|
-
|
|
4868
|
-
|
|
6084
|
+
lat: number;
|
|
6085
|
+
lon: number;
|
|
4869
6086
|
};
|
|
4870
6087
|
export function geographicToCartesian(centerLat: number, centerLon: number, targetLat: number, targetLon: number): {
|
|
4871
|
-
|
|
4872
|
-
|
|
6088
|
+
x: number;
|
|
6089
|
+
y: number;
|
|
4873
6090
|
};
|
|
4874
|
-
export const
|
|
4875
|
-
export const
|
|
6091
|
+
export const populateGeometry3DIdsInScene: (tree: any, entities: RendererState["geometry3DIdsInScene"]) => Set<string | number>;
|
|
6092
|
+
export const populateGeometry2DIdsInScene: (tree: any, entities: Set<Geometry2D["id"]>) => Set<string | number>;
|
|
4876
6093
|
export function convertMapLibreStylePaintProps(paint: any): {
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
6094
|
+
color: any;
|
|
6095
|
+
height: any;
|
|
6096
|
+
altitude: any;
|
|
6097
|
+
opacity: any;
|
|
6098
|
+
outline: any;
|
|
4882
6099
|
};
|
|
4883
6100
|
export function convertMapLibreLineStylePaintProps(paint: any): {
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
6101
|
+
color: any;
|
|
6102
|
+
join: any;
|
|
6103
|
+
opacity: any;
|
|
6104
|
+
width: any;
|
|
6105
|
+
cap: any;
|
|
4889
6106
|
};
|
|
4890
6107
|
export function mergeObjects<T extends Record<string, any>>(obj1: T, obj2: T): T;
|
|
4891
6108
|
export function createCustomLayer(modelAsMercatorCoordinate: MercatorCoordinate, viewCamera: THREECamera, camera: Camera, onRender: () => void): CustomLayerInterface;
|
|
4892
6109
|
export function getRequestHeaders(authURL: string): Promise<{
|
|
4893
|
-
|
|
6110
|
+
'x-mappedin-tiles-key': string;
|
|
4894
6111
|
}>;
|
|
4895
6112
|
export function cyrb53(str: string, seed?: number): number;
|
|
4896
6113
|
export const linearEase: (t: number) => number;
|
|
@@ -4902,38 +6119,53 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
|
|
|
4902
6119
|
/* getProjectionScaleFactor()
|
|
4903
6120
|
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
4904
6121
|
/*
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
6122
|
+
* R
|
|
6123
|
+
* /|
|
|
6124
|
+
* C : Camera / |
|
|
6125
|
+
* PQ : Projection Plane / |
|
|
6126
|
+
* OR : Origin / |
|
|
6127
|
+
* F : FOV / |
|
|
6128
|
+
* Q / |
|
|
6129
|
+
* /| |
|
|
6130
|
+
* / | |
|
|
6131
|
+
* / | |
|
|
6132
|
+
* / | |
|
|
6133
|
+
* / | |
|
|
6134
|
+
* / F/2 | |
|
|
6135
|
+
* C ------------P------------ O
|
|
6136
|
+
*
|
|
6137
|
+
*
|
|
6138
|
+
* ProjectionScaleFactor = ( OR / PQ )
|
|
6139
|
+
* PQ = canvasHeight / 2
|
|
6140
|
+
* CQ = zoom
|
|
6141
|
+
*
|
|
6142
|
+
* OR / C0 = tan(F/2)
|
|
6143
|
+
* so OR = CO * tan(F/2)
|
|
6144
|
+
*/
|
|
4928
6145
|
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
4929
6146
|
export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3D | GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | undefined;
|
|
4930
6147
|
export function getBoundingBoxCenter(bbox: Position[]): [number, number];
|
|
6148
|
+
export function toRadians(degrees: number): number;
|
|
6149
|
+
/**
|
|
6150
|
+
* Calculates the approximate distance between two geographic coordinates on Earth's surface.
|
|
6151
|
+
*
|
|
6152
|
+
* This function uses the equirectangular approximation method to compute the distance, which simplifies
|
|
6153
|
+
* the math and speeds up calculations, but is less accurate over long distances compared to other methods
|
|
6154
|
+
* like the haversine formula.
|
|
6155
|
+
*
|
|
6156
|
+
* @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
|
|
6157
|
+
* @param {Position} point1 - The second point's longitude and latitude as [longitude, latitude].
|
|
6158
|
+
* @return
|
|
6159
|
+
* @return {number} The approximate distance between the two points in meters.
|
|
6160
|
+
*/
|
|
6161
|
+
export function haversineDistance(point1: Position, point2: Position): number;
|
|
4931
6162
|
export { getCornersOfBoundingBox } from '@mappedin/mappedin-js/geojson/src/utils/bounding-box';
|
|
4932
6163
|
export function isFiniteBox(box: Box2 | Box3): boolean;
|
|
4933
6164
|
export { getPixelRatio } from '@mappedin/mappedin-js/geojson/src/utils/get-pixel-ratio';
|
|
4934
6165
|
export { debounce } from '@mappedin/mappedin-js/geojson/src/utils/async';
|
|
4935
6166
|
export { shouldDisableOffscreenCanvas } from '@mappedin/mappedin-js/geojson/src/utils/browser';
|
|
4936
6167
|
export { noop } from '@mappedin/mappedin-js/geojson/src/utils/fp';
|
|
6168
|
+
export { transformRequest } from '@mappedin/mappedin-js/geojson/src/utils/tranform-request';
|
|
4937
6169
|
}
|
|
4938
6170
|
|
|
4939
6171
|
declare module '@mappedin/mappedin-js/geojson/src/utils/constants' {
|
|
@@ -5109,124 +6341,21 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/html-controls/system'
|
|
|
5109
6341
|
}
|
|
5110
6342
|
}
|
|
5111
6343
|
|
|
5112
|
-
declare module '@mappedin/mappedin-js/
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
export
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
* Reset state and options
|
|
5127
|
-
*/
|
|
5128
|
-
reset(): void;
|
|
5129
|
-
updateState(update: UpdateStateParam): void;
|
|
5130
|
-
get authReady(): boolean;
|
|
5131
|
-
getState(): AnalyticState;
|
|
5132
|
-
capture<T extends keyof CaptureEventsPayloadMap>(eventName: T, query: CaptureEventsPayloadMap[T]): Promise<Response> | Promise<void>;
|
|
5133
|
-
capture<T extends keyof CaptureEventsPayloadMap | (string & NonNullable<unknown>)>(target: T, query: T extends keyof CaptureEventsPayloadMap ? CaptureEventsPayloadMap[T] : Record<string, any>): Promise<Response> | Promise<void>;
|
|
5134
|
-
/**
|
|
5135
|
-
* @internal
|
|
5136
|
-
*/
|
|
5137
|
-
sendGetMapDataEvent(payload: {
|
|
5138
|
-
parseDuration: string;
|
|
5139
|
-
downloadDuration: string;
|
|
5140
|
-
viewId?: string;
|
|
5141
|
-
}): Promise<void> | Promise<Response>;
|
|
5142
|
-
sendWatchPositionDenied(): Promise<void> | Promise<Response>;
|
|
5143
|
-
/**
|
|
5144
|
-
* @internal
|
|
5145
|
-
*/
|
|
5146
|
-
sendMapViewLoadedEvent({ firstRenderDuration, dimension, }: {
|
|
5147
|
-
firstRenderDuration: string;
|
|
5148
|
-
dimension: {
|
|
5149
|
-
height: number;
|
|
5150
|
-
width: number;
|
|
5151
|
-
};
|
|
5152
|
-
}): Promise<void> | Promise<Response>;
|
|
5153
|
-
/**
|
|
5154
|
-
* @internal
|
|
5155
|
-
*/
|
|
5156
|
-
sendGetDirectionsEvent: (start: string, end: string) => void;
|
|
6344
|
+
declare module '@mappedin/mappedin-js/geojson/src/maplibre-overlay' {
|
|
6345
|
+
import type { IControl, Map as MapLibreMap, CustomLayerInterface } from '@packages/internal/outdoor-context-v4';
|
|
6346
|
+
import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
|
|
6347
|
+
import RendererCore from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
6348
|
+
import { PubSub } from '@packages/internal/common';
|
|
6349
|
+
export class MapLibreOverlay<T> extends PubSub<T> implements IControl {
|
|
6350
|
+
el: HTMLDivElement;
|
|
6351
|
+
core: RendererCore;
|
|
6352
|
+
origin?: Position;
|
|
6353
|
+
map?: MapLibreMap;
|
|
6354
|
+
layer?: CustomLayerInterface;
|
|
6355
|
+
constructor(origin: Position | undefined);
|
|
6356
|
+
onAdd(map: MapLibreMap): HTMLDivElement;
|
|
6357
|
+
onRemove(): void;
|
|
5157
6358
|
}
|
|
5158
|
-
type AnalyticsUserPosition = {
|
|
5159
|
-
bluedotTimestamp: number;
|
|
5160
|
-
latitude: number;
|
|
5161
|
-
longitude: number;
|
|
5162
|
-
floorLevel?: number;
|
|
5163
|
-
accuracy: number;
|
|
5164
|
-
};
|
|
5165
|
-
export type AnalyticsOptions = {
|
|
5166
|
-
key?: string;
|
|
5167
|
-
secret?: string;
|
|
5168
|
-
accessToken?: string;
|
|
5169
|
-
noAuth?: boolean;
|
|
5170
|
-
mapId?: string;
|
|
5171
|
-
logEvents?: boolean;
|
|
5172
|
-
sendEvents?: boolean;
|
|
5173
|
-
context?: string;
|
|
5174
|
-
platformString?: string;
|
|
5175
|
-
};
|
|
5176
|
-
export type AnalyticState = {
|
|
5177
|
-
accessToken?: string | undefined;
|
|
5178
|
-
version: string;
|
|
5179
|
-
platformString: string;
|
|
5180
|
-
baseUrl: string;
|
|
5181
|
-
noAuth: boolean;
|
|
5182
|
-
geolocationMode: boolean;
|
|
5183
|
-
mi_uuid: string;
|
|
5184
|
-
mi_session: string;
|
|
5185
|
-
context: ValidContext;
|
|
5186
|
-
userPosition?: AnalyticsUserPosition;
|
|
5187
|
-
mapId?: string;
|
|
5188
|
-
key?: string;
|
|
5189
|
-
secret?: string;
|
|
5190
|
-
logEvents: boolean;
|
|
5191
|
-
sendEvents: boolean;
|
|
5192
|
-
};
|
|
5193
|
-
type UpdateStateParam = Partial<Pick<AnalyticState, 'geolocationMode' | 'context' | 'logEvents' | 'userPosition' | 'mapId' | 'sendEvents' | 'logEvents' | 'accessToken'>>;
|
|
5194
|
-
type CaptureEventsPayloadMap = {
|
|
5195
|
-
'$select-location': {
|
|
5196
|
-
id: string;
|
|
5197
|
-
};
|
|
5198
|
-
'$select-category': {
|
|
5199
|
-
id: string;
|
|
5200
|
-
};
|
|
5201
|
-
'$query-suggest': Record<string, any>;
|
|
5202
|
-
'$query-search': Record<string, any>;
|
|
5203
|
-
};
|
|
5204
|
-
export const analyticsInternal: CustomerAnalytics;
|
|
5205
|
-
export const analytics: {
|
|
5206
|
-
/**
|
|
5207
|
-
* Initializes the analytics with the provided options.
|
|
5208
|
-
* @param args - The options to initialize the analytics.
|
|
5209
|
-
*/
|
|
5210
|
-
init(options?: AnalyticsOptions | undefined): void;
|
|
5211
|
-
/**
|
|
5212
|
-
* Captures an analytic event with a custom target and query payload.
|
|
5213
|
-
*
|
|
5214
|
-
* @param target - The event name or target can be .
|
|
5215
|
-
* @param query - The payload associated with the event.
|
|
5216
|
-
* @returns A promise that resolves to the server response or void.
|
|
5217
|
-
*/
|
|
5218
|
-
capture(target: keyof CaptureEventsPayloadMap | (string & {}), query: Record<string, any> | {
|
|
5219
|
-
id: string;
|
|
5220
|
-
} | {
|
|
5221
|
-
id: string;
|
|
5222
|
-
}): Promise<void> | Promise<Response>;
|
|
5223
|
-
/**
|
|
5224
|
-
* Updates the analytics state with the provided parameters.
|
|
5225
|
-
* @param update - The state parameters to update.
|
|
5226
|
-
*/
|
|
5227
|
-
updateState(update: Partial<Pick<AnalyticState, "logEvents" | "sendEvents" | "logEvents" | "accessToken">>): void;
|
|
5228
|
-
};
|
|
5229
|
-
export {};
|
|
5230
6359
|
}
|
|
5231
6360
|
|
|
5232
6361
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
|
|
@@ -5300,41 +6429,77 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
|
|
|
5300
6429
|
}
|
|
5301
6430
|
}
|
|
5302
6431
|
|
|
5303
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/
|
|
6432
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/image' {
|
|
5304
6433
|
/**
|
|
5305
|
-
* Class representing
|
|
6434
|
+
* Class representing an Image on the {@link MapView}.
|
|
5306
6435
|
*/
|
|
5307
|
-
export class
|
|
5308
|
-
|
|
5309
|
-
* The model's id
|
|
5310
|
-
*/
|
|
5311
|
-
id: string;
|
|
5312
|
-
/**
|
|
5313
|
-
* The group's id
|
|
5314
|
-
*/
|
|
5315
|
-
groupId: string;
|
|
6436
|
+
export class Image {
|
|
6437
|
+
#private;
|
|
5316
6438
|
/**
|
|
5317
6439
|
* @internal
|
|
5318
6440
|
*/
|
|
5319
|
-
static readonly __type = "
|
|
6441
|
+
static readonly __type = "Image";
|
|
5320
6442
|
/**
|
|
5321
6443
|
* @internal
|
|
5322
6444
|
*/
|
|
5323
|
-
readonly __type = "
|
|
6445
|
+
readonly __type = "Image";
|
|
5324
6446
|
/**
|
|
5325
|
-
* Checks if the provided instance is of type
|
|
6447
|
+
* Checks if the provided instance is of type Marker"
|
|
5326
6448
|
*
|
|
5327
6449
|
* @param instance The instance to check.
|
|
5328
6450
|
* @returns {boolean} True if the instance is a Marker, false otherwise.
|
|
5329
6451
|
*/
|
|
5330
|
-
static is(instance: object): instance is
|
|
6452
|
+
static is(instance: object): instance is Image;
|
|
5331
6453
|
/**
|
|
5332
6454
|
* @internal
|
|
5333
6455
|
*/
|
|
5334
|
-
constructor(id: string,
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
6456
|
+
constructor(id: string, url: string);
|
|
6457
|
+
/**
|
|
6458
|
+
* The image's id
|
|
6459
|
+
*/
|
|
6460
|
+
get id(): string;
|
|
6461
|
+
/**
|
|
6462
|
+
* The image's url
|
|
6463
|
+
*/
|
|
6464
|
+
get url(): string;
|
|
6465
|
+
}
|
|
6466
|
+
}
|
|
6467
|
+
|
|
6468
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/model' {
|
|
6469
|
+
/**
|
|
6470
|
+
* Class representing a 3D model on the {@link MapView}.
|
|
6471
|
+
*/
|
|
6472
|
+
export class Model {
|
|
6473
|
+
/**
|
|
6474
|
+
* The model's id
|
|
6475
|
+
*/
|
|
6476
|
+
id: string;
|
|
6477
|
+
/**
|
|
6478
|
+
* The group's id
|
|
6479
|
+
*/
|
|
6480
|
+
groupId: string;
|
|
6481
|
+
/**
|
|
6482
|
+
* @internal
|
|
6483
|
+
*/
|
|
6484
|
+
static readonly __type = "Model";
|
|
6485
|
+
/**
|
|
6486
|
+
* @internal
|
|
6487
|
+
*/
|
|
6488
|
+
readonly __type = "Model";
|
|
6489
|
+
/**
|
|
6490
|
+
* Checks if the provided instance is of type Model
|
|
6491
|
+
*
|
|
6492
|
+
* @param instance The instance to check.
|
|
6493
|
+
* @returns {boolean} True if the instance is a Marker, false otherwise.
|
|
6494
|
+
*/
|
|
6495
|
+
static is(instance: object): instance is Model;
|
|
6496
|
+
/**
|
|
6497
|
+
* @internal
|
|
6498
|
+
*/
|
|
6499
|
+
constructor(id: string, groupId: string);
|
|
6500
|
+
}
|
|
6501
|
+
}
|
|
6502
|
+
|
|
5338
6503
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path' {
|
|
5339
6504
|
/**
|
|
5340
6505
|
* Class representing a path on the {@link MapView}.
|
|
@@ -5389,14 +6554,94 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape' {
|
|
|
5389
6554
|
}
|
|
5390
6555
|
}
|
|
5391
6556
|
|
|
6557
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
|
|
6558
|
+
import type { ParsedMVF } from '@mappedin/mvf';
|
|
6559
|
+
import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
|
|
6560
|
+
import { PubSub } from '@packages/internal/common';
|
|
6561
|
+
import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
|
|
6562
|
+
import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
|
|
6563
|
+
import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
6564
|
+
import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, CancellablePromise } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
6565
|
+
import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
|
|
6566
|
+
import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
6567
|
+
import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
|
|
6568
|
+
import type { Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
6569
|
+
export class GeojsonApiMapObject extends PubSub<{
|
|
6570
|
+
'floor-change': {
|
|
6571
|
+
reason?: TFloorChangeReason;
|
|
6572
|
+
floorId: string;
|
|
6573
|
+
};
|
|
6574
|
+
'floor-change-start': {
|
|
6575
|
+
floorId: string;
|
|
6576
|
+
};
|
|
6577
|
+
}> {
|
|
6578
|
+
floors: FloorObject[];
|
|
6579
|
+
currentFloorId: string;
|
|
6580
|
+
id: string;
|
|
6581
|
+
renderer: RendererCore;
|
|
6582
|
+
mvf: ParsedMVF;
|
|
6583
|
+
styleMap: AggregatedStyleMap;
|
|
6584
|
+
StackedMaps: StackedMaps;
|
|
6585
|
+
get currentFloor(): FloorObject;
|
|
6586
|
+
setFloor(floorId: string, reason?: TFloorChangeReason): Promise<void> | undefined;
|
|
6587
|
+
Models: {
|
|
6588
|
+
add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
|
|
6589
|
+
floorId?: string;
|
|
6590
|
+
}) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
|
|
6591
|
+
remove: (_id: string, _groupId: string) => void;
|
|
6592
|
+
};
|
|
6593
|
+
Images: {
|
|
6594
|
+
add: (target: Position, url: string, opts: TAddImageOptions & {
|
|
6595
|
+
floorId?: string;
|
|
6596
|
+
}) => EntityId<import("@mappedin/core-sdk/src/components/image").ImageState> | undefined;
|
|
6597
|
+
remove: (id: string) => void;
|
|
6598
|
+
removeAll: () => void;
|
|
6599
|
+
};
|
|
6600
|
+
Markers: {
|
|
6601
|
+
add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions) => EntityId<MarkerState> | undefined;
|
|
6602
|
+
remove: (id: string) => void;
|
|
6603
|
+
getContentEl: (id: string) => HTMLElement | undefined;
|
|
6604
|
+
removeAll: () => void;
|
|
6605
|
+
setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
|
|
6606
|
+
animateTo: (id: string, coordinate: Position, targetFloorId: string, options?: TAnimationOptions) => Promise<void>;
|
|
6607
|
+
};
|
|
6608
|
+
Exporter: {
|
|
6609
|
+
getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
|
|
6610
|
+
};
|
|
6611
|
+
Shapes: {
|
|
6612
|
+
add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
|
|
6613
|
+
floorId?: string;
|
|
6614
|
+
}) => string;
|
|
6615
|
+
remove: (customGeometry: Shape) => string;
|
|
6616
|
+
};
|
|
6617
|
+
Labels: {
|
|
6618
|
+
all: ({ onCreate }: {
|
|
6619
|
+
onCreate: (labelId: string | number, text: string) => void;
|
|
6620
|
+
}) => void;
|
|
6621
|
+
add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
|
|
6622
|
+
floorId?: string;
|
|
6623
|
+
}) => {
|
|
6624
|
+
id: string | number;
|
|
6625
|
+
};
|
|
6626
|
+
remove: (targetId: string) => void;
|
|
6627
|
+
removeAll: () => void;
|
|
6628
|
+
};
|
|
6629
|
+
Paths: {
|
|
6630
|
+
add: (coordinates: Coordinate[], options?: TAddPathOptions) => CancellablePromise<EntityId<PathState>[]>;
|
|
6631
|
+
remove: (entityIds: string[]) => void;
|
|
6632
|
+
};
|
|
6633
|
+
constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, renderer: RendererCore);
|
|
6634
|
+
}
|
|
6635
|
+
}
|
|
6636
|
+
|
|
5392
6637
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
5393
6638
|
import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
|
|
5394
6639
|
import { type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
6640
|
+
import { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
5395
6641
|
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
5396
|
-
import { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5397
|
-
import { Coordinate, MapObject, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
6642
|
+
import { Coordinate, MapObject, Space, Floor, type MapDataInternal, Door } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5398
6643
|
import type { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
|
|
5399
|
-
import { Label, Marker, type Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
6644
|
+
import { Label, Marker, type Model, type Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
5400
6645
|
import { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
|
|
5401
6646
|
import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
5402
6647
|
import { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera';
|
|
@@ -5405,6 +6650,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
5405
6650
|
import { Labels } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels';
|
|
5406
6651
|
import { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
5407
6652
|
import { Markers } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers';
|
|
6653
|
+
import { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
|
|
5408
6654
|
import { Models } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models';
|
|
5409
6655
|
import { Paths } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths';
|
|
5410
6656
|
import { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
@@ -5412,6 +6658,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
5412
6658
|
import { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
|
|
5413
6659
|
import { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
|
|
5414
6660
|
import Outdoor from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
|
|
6661
|
+
import type { TShowStackOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
5415
6662
|
export class GeoJsonApi {
|
|
5416
6663
|
core: RendererCore;
|
|
5417
6664
|
outdoors: GeojsonApiMapObject;
|
|
@@ -5434,20 +6681,22 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
5434
6681
|
BlueDot: BlueDot;
|
|
5435
6682
|
Shapes: Shapes;
|
|
5436
6683
|
Style: Style;
|
|
6684
|
+
Images: Images;
|
|
5437
6685
|
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
5438
|
-
updateState<T extends Space | MapObject | Label | Marker |
|
|
6686
|
+
updateState<T extends Space | MapObject | Label | Marker | Door | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
5439
6687
|
update: () => void;
|
|
5440
|
-
getMapDataInternal():
|
|
6688
|
+
getMapDataInternal(): MapDataInternal | undefined;
|
|
5441
6689
|
getMapData(): MapData | undefined;
|
|
5442
6690
|
expand(opts?: {
|
|
5443
6691
|
excludeFloors: Floor[];
|
|
5444
6692
|
}): Promise<void> | undefined;
|
|
5445
6693
|
collapse(): Promise<void> | undefined;
|
|
6694
|
+
showStack(opts?: TShowStackOptions): Promise<void> | undefined;
|
|
5446
6695
|
addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
|
|
5447
|
-
setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
|
|
6696
|
+
setFloor(floor: Floor | string, reason?: TFloorChangeReason): Promise<void> | undefined;
|
|
5448
6697
|
updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
|
|
5449
6698
|
get currentFloor(): Floor;
|
|
5450
|
-
getState<T extends Space | MapObject | Label | Marker | Model | string>(target: T): TGetState<T> | undefined;
|
|
6699
|
+
getState<T extends Space | MapObject | Label | Marker | Model | Image | string>(target: T): TGetState<T> | undefined;
|
|
5451
6700
|
setHoverColor(c: string): void;
|
|
5452
6701
|
getHoverColor(): string | undefined;
|
|
5453
6702
|
getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], opt?: TGetDirectionsOptions) => Directions | undefined;
|
|
@@ -5459,6 +6708,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
|
|
|
5459
6708
|
* @internal
|
|
5460
6709
|
*/
|
|
5461
6710
|
get __core(): RendererCore;
|
|
6711
|
+
clear(): void;
|
|
5462
6712
|
destroy(): void;
|
|
5463
6713
|
}
|
|
5464
6714
|
}
|
|
@@ -5503,6 +6753,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
|
|
|
5503
6753
|
* The current center coordinate ({@link Coordinate}) of the camera.
|
|
5504
6754
|
*/
|
|
5505
6755
|
get center(): Coordinate;
|
|
6756
|
+
/**
|
|
6757
|
+
* Toggle the mode of the camera to automatically set the minimum zoom level based on the size of the scene.
|
|
6758
|
+
* It will be automatically disabled when the minimum zoom level is set manually.
|
|
6759
|
+
* @param value The new value for the auto min zoom level mode.
|
|
6760
|
+
*/
|
|
6761
|
+
setAutoMinZoomLevel(value: boolean): void;
|
|
6762
|
+
/**
|
|
6763
|
+
* The mode of the camera to automatically set the minimum zoom level based on the size of the scene.
|
|
6764
|
+
*/
|
|
6765
|
+
get autoMinZoomLevel(): boolean;
|
|
5506
6766
|
/**
|
|
5507
6767
|
* The current zoom level of the camera in mercator zoom levels.
|
|
5508
6768
|
*
|
|
@@ -5849,7 +7109,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions' {
|
|
|
5849
7109
|
import type { ParsedMVF } from '@mappedin/mvf';
|
|
5850
7110
|
import type { DirectionsCollection } from '@packages/internal/geojson-navigator';
|
|
5851
7111
|
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5852
|
-
import { Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
7112
|
+
import { Connection, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
5853
7113
|
import type { TDirectionInstruction, TDirectionZone, TNavigationTarget } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
5854
7114
|
/**
|
|
5855
7115
|
* Represents a set of directions between two points.
|
|
@@ -5875,6 +7135,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions' {
|
|
|
5875
7135
|
* The array of instructions ({@link TDirectionInstruction}).
|
|
5876
7136
|
*/
|
|
5877
7137
|
get instructions(): TDirectionInstruction[];
|
|
7138
|
+
lastConnectionAction?: 'take' | 'exit';
|
|
7139
|
+
lastConnection?: Connection;
|
|
5878
7140
|
}
|
|
5879
7141
|
export class DirectionsInternal {
|
|
5880
7142
|
/**
|
|
@@ -5957,100 +7219,584 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor' {
|
|
|
5957
7219
|
* Whether the outdoorView is enabled.
|
|
5958
7220
|
*/
|
|
5959
7221
|
get enabled(): boolean;
|
|
7222
|
+
/**
|
|
7223
|
+
* Whether the outdoorView is visible.
|
|
7224
|
+
*/
|
|
7225
|
+
get visible(): boolean;
|
|
7226
|
+
/**
|
|
7227
|
+
* Show the outdoor view.
|
|
7228
|
+
*/
|
|
7229
|
+
show(): void;
|
|
7230
|
+
/**
|
|
7231
|
+
* Hide the outdoor view.
|
|
7232
|
+
* @param excludedStyleLayerIds {string[]} E
|
|
7233
|
+
*/
|
|
7234
|
+
hide(excludedStyleLayerIds?: string[]): void;
|
|
5960
7235
|
}
|
|
5961
7236
|
}
|
|
5962
7237
|
|
|
5963
|
-
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/
|
|
5964
|
-
import type {
|
|
5965
|
-
import {
|
|
5966
|
-
import type {
|
|
5967
|
-
import type {
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
7238
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images' {
|
|
7239
|
+
import type { TAddImageOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
7240
|
+
import { Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
7241
|
+
import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
|
|
7242
|
+
import type { Space, Door, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
7243
|
+
export class Images {
|
|
7244
|
+
#private;
|
|
7245
|
+
/**
|
|
7246
|
+
* @internal
|
|
7247
|
+
*/
|
|
7248
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
7249
|
+
/**
|
|
7250
|
+
* @internal
|
|
7251
|
+
*/
|
|
7252
|
+
constructor({ currentMapGetter }: {
|
|
7253
|
+
currentMapGetter: CurrentMapGetter;
|
|
7254
|
+
});
|
|
7255
|
+
/**
|
|
7256
|
+
* @internal
|
|
7257
|
+
*/
|
|
7258
|
+
getById(id: string): {
|
|
7259
|
+
image: Image;
|
|
7260
|
+
entityId: string;
|
|
7261
|
+
} | undefined;
|
|
7262
|
+
/**
|
|
7263
|
+
* Adds an image to the map.
|
|
7264
|
+
*
|
|
7265
|
+
* @param target The target object ({@link Space}, {@link Door}, or {@link Coordinate}) for the image.
|
|
7266
|
+
* @param url The URL of the image.
|
|
7267
|
+
* @param options Optional additional options for the {@link Image}.
|
|
7268
|
+
* @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
|
|
7269
|
+
* @example
|
|
7270
|
+
* // Add an interactive {@link Image} to the map with custom HTML content.
|
|
7271
|
+
* map.Images.add(coordinate, '<div>Image Content</div>', { interactive: true });
|
|
7272
|
+
*/
|
|
7273
|
+
add(target: Space | Door | Coordinate, url: string, options: TAddImageOptions): Image;
|
|
7274
|
+
/**
|
|
7275
|
+
* Removes a image from the map.
|
|
7276
|
+
*
|
|
7277
|
+
* @param image {Image} The {@link Image} which should be removed.
|
|
7278
|
+
* @example
|
|
7279
|
+
* mapView.Images.remove(image);
|
|
7280
|
+
*/
|
|
7281
|
+
remove(image: Image): void;
|
|
7282
|
+
/**
|
|
7283
|
+
* Remove all the images from the map.
|
|
7284
|
+
*
|
|
7285
|
+
* @example
|
|
7286
|
+
* map.Images.removeAll();
|
|
7287
|
+
*/
|
|
7288
|
+
removeAll(): Image[];
|
|
7289
|
+
}
|
|
7290
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
7291
|
+
export {};
|
|
7292
|
+
}
|
|
7293
|
+
|
|
7294
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/search/internal' {
|
|
7295
|
+
import type { SearchResult as MiniSearchResult, Suggestion, MatchInfo } from 'minisearch';
|
|
7296
|
+
import type { EnterpriseLocation, EnterpriseCategory, Places } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
7297
|
+
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
7298
|
+
import { z } from 'zod';
|
|
7299
|
+
export class InternalSearch {
|
|
7300
|
+
constructor(mapData: MapData);
|
|
7301
|
+
/**
|
|
7302
|
+
* Populates the search indexes with the map data.
|
|
7303
|
+
* @returns A promise that resolves when the indexes are populated.
|
|
7304
|
+
*/
|
|
7305
|
+
populate(): Promise<any[]>;
|
|
7306
|
+
search(term: string, options?: SearchOptions): Promise<SearchResult>;
|
|
7307
|
+
suggest(term: string, options?: SuggestOptions): Promise<Suggestion[]>;
|
|
7308
|
+
}
|
|
7309
|
+
export type SearchResultItem<T extends Places | EnterpriseLocation | EnterpriseCategory> = {
|
|
7310
|
+
type: T['__type'];
|
|
7311
|
+
match: MiniSearchResult['match'];
|
|
7312
|
+
score: number;
|
|
7313
|
+
item: T;
|
|
7314
|
+
};
|
|
7315
|
+
/**
|
|
7316
|
+
* @interface
|
|
7317
|
+
*/
|
|
7318
|
+
export type SearchResultEnterpriseCategory = SearchResultItem<EnterpriseCategory>;
|
|
7319
|
+
/**
|
|
7320
|
+
* @interface
|
|
7321
|
+
*/
|
|
7322
|
+
export type SearchResultEnterpriseLocations = SearchResultItem<EnterpriseLocation>;
|
|
7323
|
+
/**
|
|
7324
|
+
* @interface
|
|
7325
|
+
*/
|
|
7326
|
+
export type SearchResultPlaces = SearchResultItem<Places>;
|
|
7327
|
+
/**
|
|
7328
|
+
* Search results
|
|
7329
|
+
*/
|
|
7330
|
+
export type SearchResult = {
|
|
7331
|
+
/**
|
|
7332
|
+
* Places search results
|
|
7333
|
+
*/
|
|
7334
|
+
places: SearchResultPlaces[];
|
|
7335
|
+
/**
|
|
7336
|
+
* Enterprise Locations search results
|
|
7337
|
+
*/
|
|
7338
|
+
enterpriseLocations?: SearchResultEnterpriseLocations[];
|
|
7339
|
+
/**
|
|
7340
|
+
* Enterprise Categories search results
|
|
7341
|
+
*/
|
|
7342
|
+
enterpriseCategories?: SearchResultEnterpriseCategory[];
|
|
7343
|
+
};
|
|
7344
|
+
export function removeAccents(it: string): string;
|
|
7345
|
+
const searchOptionsSchema: z.ZodObject<{
|
|
7346
|
+
/**
|
|
7347
|
+
* Options for searching places.
|
|
7348
|
+
* @property {Object} [fields] - Fields to search in places.
|
|
7349
|
+
* @property {boolean} [name] - Whether to search in the name field of places.
|
|
7350
|
+
* @property {boolean} [description] - Whether to search in the description field of places.
|
|
7351
|
+
* @property {number} [limit] - Maximum number of place results to return.
|
|
7352
|
+
*/
|
|
7353
|
+
places: z.ZodOptional<z.ZodObject<{
|
|
7354
|
+
/**
|
|
7355
|
+
* Fields to search in places.
|
|
7356
|
+
* @property {boolean} [name] - Whether to search in the name field of places.
|
|
7357
|
+
* @property {boolean} [description] - Whether to search in the description field of places.
|
|
7358
|
+
*/
|
|
7359
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
7360
|
+
/** Enable searching by place name */
|
|
7361
|
+
name: z.ZodOptional<z.ZodBoolean>;
|
|
7362
|
+
/** Enable searching by place description */
|
|
7363
|
+
description: z.ZodOptional<z.ZodBoolean>;
|
|
7364
|
+
}, "strip", z.ZodTypeAny, {
|
|
7365
|
+
name?: boolean | undefined;
|
|
7366
|
+
description?: boolean | undefined;
|
|
7367
|
+
}, {
|
|
7368
|
+
name?: boolean | undefined;
|
|
7369
|
+
description?: boolean | undefined;
|
|
7370
|
+
}>>;
|
|
7371
|
+
/** Maximum number of place results to return */
|
|
7372
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
7373
|
+
}, "strip", z.ZodTypeAny, {
|
|
7374
|
+
limit?: number | undefined;
|
|
7375
|
+
fields?: {
|
|
7376
|
+
name?: boolean | undefined;
|
|
7377
|
+
description?: boolean | undefined;
|
|
7378
|
+
} | undefined;
|
|
7379
|
+
}, {
|
|
7380
|
+
limit?: number | undefined;
|
|
7381
|
+
fields?: {
|
|
7382
|
+
name?: boolean | undefined;
|
|
7383
|
+
description?: boolean | undefined;
|
|
7384
|
+
} | undefined;
|
|
7385
|
+
}>>;
|
|
7386
|
+
/**
|
|
7387
|
+
* Options for searching categories.
|
|
7388
|
+
* @property {Object} [fields] - Fields to search in categories.
|
|
7389
|
+
* @property {boolean} [name] - Whether to search in the name field of categories.
|
|
7390
|
+
* @property {boolean} [description] - Whether to search in the description field of categories.
|
|
7391
|
+
* @property {boolean} ['locations.name'] - Whether to search in the locations' names of categories.
|
|
7392
|
+
* @property {number} [limit] - Maximum number of category results to return.
|
|
7393
|
+
*/
|
|
7394
|
+
enterpriseCategories: z.ZodOptional<z.ZodObject<{
|
|
7395
|
+
/**
|
|
7396
|
+
* Fields to search in categories.
|
|
7397
|
+
* @property {boolean} [name] - Whether to search in the name field of categories.
|
|
7398
|
+
* @property {boolean} [description] - Whether to search in the description field of categories.
|
|
7399
|
+
* @property {boolean} ['locations.name'] - Whether to search in the locations' names of categories.
|
|
7400
|
+
*/
|
|
7401
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
7402
|
+
/** Enable searching by category name */
|
|
7403
|
+
name: z.ZodOptional<z.ZodBoolean>;
|
|
7404
|
+
/** Enable searching by category description */
|
|
7405
|
+
description: z.ZodOptional<z.ZodBoolean>;
|
|
7406
|
+
/** Enable searching by names of locations within the category */
|
|
7407
|
+
'locations.name': z.ZodOptional<z.ZodBoolean>;
|
|
7408
|
+
}, "strip", z.ZodTypeAny, {
|
|
7409
|
+
name?: boolean | undefined;
|
|
7410
|
+
description?: boolean | undefined;
|
|
7411
|
+
'locations.name'?: boolean | undefined;
|
|
7412
|
+
}, {
|
|
7413
|
+
name?: boolean | undefined;
|
|
7414
|
+
description?: boolean | undefined;
|
|
7415
|
+
'locations.name'?: boolean | undefined;
|
|
7416
|
+
}>>;
|
|
7417
|
+
/** Maximum number of category results to return */
|
|
7418
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
7419
|
+
}, "strip", z.ZodTypeAny, {
|
|
7420
|
+
limit?: number | undefined;
|
|
7421
|
+
fields?: {
|
|
7422
|
+
name?: boolean | undefined;
|
|
7423
|
+
description?: boolean | undefined;
|
|
7424
|
+
'locations.name'?: boolean | undefined;
|
|
7425
|
+
} | undefined;
|
|
7426
|
+
}, {
|
|
7427
|
+
limit?: number | undefined;
|
|
7428
|
+
fields?: {
|
|
7429
|
+
name?: boolean | undefined;
|
|
7430
|
+
description?: boolean | undefined;
|
|
7431
|
+
'locations.name'?: boolean | undefined;
|
|
7432
|
+
} | undefined;
|
|
7433
|
+
}>>;
|
|
7434
|
+
/**
|
|
7435
|
+
* Options for searching locations.
|
|
7436
|
+
* @property {Object} [fields] - Fields to search in locations.
|
|
7437
|
+
* @property {boolean} [name] - Whether to search in the name field of locations.
|
|
7438
|
+
* @property {boolean} [tags] - Whether to search in the tags field of locations.
|
|
7439
|
+
* @property {boolean} [description] - Whether to search in the description field of locations.
|
|
7440
|
+
* @property {number} [limit] - Maximum number of location results to return.
|
|
7441
|
+
*/
|
|
7442
|
+
enterpriseLocations: z.ZodOptional<z.ZodObject<{
|
|
7443
|
+
/**
|
|
7444
|
+
* Fields to search in locations.
|
|
7445
|
+
* @property {boolean} [name] - Whether to search in the name field of locations.
|
|
7446
|
+
* @property {boolean} [tags] - Whether to search in the tags field of locations.
|
|
7447
|
+
* @property {boolean} [description] - Whether to search in the description field of locations.
|
|
7448
|
+
*/
|
|
7449
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
7450
|
+
/** Enable searching by location name */
|
|
7451
|
+
name: z.ZodOptional<z.ZodBoolean>;
|
|
7452
|
+
/** Enable searching by location tags */
|
|
7453
|
+
tags: z.ZodOptional<z.ZodBoolean>;
|
|
7454
|
+
/** Enable searching by location description */
|
|
7455
|
+
description: z.ZodOptional<z.ZodBoolean>;
|
|
7456
|
+
}, "strip", z.ZodTypeAny, {
|
|
7457
|
+
name?: boolean | undefined;
|
|
7458
|
+
description?: boolean | undefined;
|
|
7459
|
+
tags?: boolean | undefined;
|
|
7460
|
+
}, {
|
|
7461
|
+
name?: boolean | undefined;
|
|
7462
|
+
description?: boolean | undefined;
|
|
7463
|
+
tags?: boolean | undefined;
|
|
7464
|
+
}>>;
|
|
7465
|
+
/** Maximum number of location results to return */
|
|
7466
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
7467
|
+
}, "strip", z.ZodTypeAny, {
|
|
7468
|
+
limit?: number | undefined;
|
|
7469
|
+
fields?: {
|
|
7470
|
+
name?: boolean | undefined;
|
|
7471
|
+
description?: boolean | undefined;
|
|
7472
|
+
tags?: boolean | undefined;
|
|
7473
|
+
} | undefined;
|
|
7474
|
+
}, {
|
|
7475
|
+
limit?: number | undefined;
|
|
7476
|
+
fields?: {
|
|
7477
|
+
name?: boolean | undefined;
|
|
7478
|
+
description?: boolean | undefined;
|
|
7479
|
+
tags?: boolean | undefined;
|
|
7480
|
+
} | undefined;
|
|
7481
|
+
}>>;
|
|
7482
|
+
}, "strip", z.ZodTypeAny, {
|
|
7483
|
+
enterpriseLocations?: {
|
|
7484
|
+
limit?: number | undefined;
|
|
7485
|
+
fields?: {
|
|
7486
|
+
name?: boolean | undefined;
|
|
7487
|
+
description?: boolean | undefined;
|
|
7488
|
+
tags?: boolean | undefined;
|
|
7489
|
+
} | undefined;
|
|
7490
|
+
} | undefined;
|
|
7491
|
+
enterpriseCategories?: {
|
|
7492
|
+
limit?: number | undefined;
|
|
7493
|
+
fields?: {
|
|
7494
|
+
name?: boolean | undefined;
|
|
7495
|
+
description?: boolean | undefined;
|
|
7496
|
+
'locations.name'?: boolean | undefined;
|
|
7497
|
+
} | undefined;
|
|
7498
|
+
} | undefined;
|
|
7499
|
+
places?: {
|
|
7500
|
+
limit?: number | undefined;
|
|
7501
|
+
fields?: {
|
|
7502
|
+
name?: boolean | undefined;
|
|
7503
|
+
description?: boolean | undefined;
|
|
7504
|
+
} | undefined;
|
|
7505
|
+
} | undefined;
|
|
7506
|
+
}, {
|
|
7507
|
+
enterpriseLocations?: {
|
|
7508
|
+
limit?: number | undefined;
|
|
7509
|
+
fields?: {
|
|
7510
|
+
name?: boolean | undefined;
|
|
7511
|
+
description?: boolean | undefined;
|
|
7512
|
+
tags?: boolean | undefined;
|
|
7513
|
+
} | undefined;
|
|
7514
|
+
} | undefined;
|
|
7515
|
+
enterpriseCategories?: {
|
|
7516
|
+
limit?: number | undefined;
|
|
7517
|
+
fields?: {
|
|
7518
|
+
name?: boolean | undefined;
|
|
7519
|
+
description?: boolean | undefined;
|
|
7520
|
+
'locations.name'?: boolean | undefined;
|
|
7521
|
+
} | undefined;
|
|
7522
|
+
} | undefined;
|
|
7523
|
+
places?: {
|
|
7524
|
+
limit?: number | undefined;
|
|
7525
|
+
fields?: {
|
|
7526
|
+
name?: boolean | undefined;
|
|
7527
|
+
description?: boolean | undefined;
|
|
7528
|
+
} | undefined;
|
|
7529
|
+
} | undefined;
|
|
7530
|
+
}>;
|
|
7531
|
+
const suggestOptionsSchema: z.ZodObject<{
|
|
7532
|
+
/**
|
|
7533
|
+
* Options for searching places.
|
|
7534
|
+
* @property {boolean} [enabled] - Whether to search in places.
|
|
7535
|
+
*/
|
|
7536
|
+
places: z.ZodOptional<z.ZodObject<{
|
|
7537
|
+
/** Enable searching by place name */
|
|
7538
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
7539
|
+
}, "strip", z.ZodTypeAny, {
|
|
7540
|
+
enabled?: boolean | undefined;
|
|
7541
|
+
}, {
|
|
7542
|
+
enabled?: boolean | undefined;
|
|
7543
|
+
}>>;
|
|
7544
|
+
/**
|
|
7545
|
+
* Options for searching locations.
|
|
7546
|
+
* @property {boolean} [enabled] - Whether to search in locations.
|
|
7547
|
+
*/
|
|
7548
|
+
enterpriseLocations: z.ZodOptional<z.ZodObject<{
|
|
7549
|
+
/** Enable searching by location name */
|
|
7550
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
7551
|
+
}, "strip", z.ZodTypeAny, {
|
|
7552
|
+
enabled?: boolean | undefined;
|
|
7553
|
+
}, {
|
|
7554
|
+
enabled?: boolean | undefined;
|
|
7555
|
+
}>>;
|
|
7556
|
+
}, "strip", z.ZodTypeAny, {
|
|
7557
|
+
enterpriseLocations?: {
|
|
7558
|
+
enabled?: boolean | undefined;
|
|
7559
|
+
} | undefined;
|
|
7560
|
+
places?: {
|
|
7561
|
+
enabled?: boolean | undefined;
|
|
7562
|
+
} | undefined;
|
|
7563
|
+
}, {
|
|
7564
|
+
enterpriseLocations?: {
|
|
7565
|
+
enabled?: boolean | undefined;
|
|
7566
|
+
} | undefined;
|
|
7567
|
+
places?: {
|
|
7568
|
+
enabled?: boolean | undefined;
|
|
7569
|
+
} | undefined;
|
|
7570
|
+
}>;
|
|
7571
|
+
export type SearchOptions = z.infer<typeof searchOptionsSchema>;
|
|
7572
|
+
export type SuggestOptions = z.infer<typeof suggestOptionsSchema>;
|
|
7573
|
+
export { Suggestion, MatchInfo };
|
|
7574
|
+
}
|
|
7575
|
+
|
|
7576
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/search/external' {
|
|
7577
|
+
import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
|
|
7578
|
+
import type { InternalSearch, SearchOptions, SuggestOptions } from '@mappedin/mappedin-js/mappedin-js/src/search/internal';
|
|
7579
|
+
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
7580
|
+
export class Search {
|
|
7581
|
+
#private;
|
|
7582
|
+
/**
|
|
7583
|
+
* Whether the search is enabled.
|
|
7584
|
+
* @default false
|
|
7585
|
+
*/
|
|
7586
|
+
enabled: boolean;
|
|
7587
|
+
constructor(mapData: MapData, mapDataInternal: MapDataInternal, { enabled }?: {
|
|
7588
|
+
enabled?: boolean;
|
|
7589
|
+
});
|
|
7590
|
+
/**
|
|
7591
|
+
* Searches for places, locations, and categories.
|
|
7592
|
+
* @param term - The search term.
|
|
7593
|
+
* @param options - The search options.
|
|
7594
|
+
* @returns The search results.
|
|
7595
|
+
* @example
|
|
7596
|
+
* ```ts
|
|
7597
|
+
* const results = await search.query('Coffee Shop');
|
|
7598
|
+
* console.log(results.locations);
|
|
7599
|
+
* ```
|
|
7600
|
+
*/
|
|
7601
|
+
query(term: string, options?: SearchOptions): ReturnType<typeof InternalSearch.prototype.search>;
|
|
7602
|
+
/**
|
|
7603
|
+
* Suggests the names of places, locations, and categories.
|
|
7604
|
+
* @param term - The search term.
|
|
7605
|
+
* @param options - The suggest options.
|
|
7606
|
+
* @returns The search suggestions.
|
|
7607
|
+
* @example
|
|
7608
|
+
* ```ts
|
|
7609
|
+
* const suggestions = await search.suggest('Coffee');
|
|
7610
|
+
* console.log(suggestions);
|
|
7611
|
+
* ```
|
|
7612
|
+
*/
|
|
7613
|
+
suggest(term: string, options?: SuggestOptions): Promise<import("minisearch").Suggestion[]>;
|
|
7614
|
+
/**
|
|
7615
|
+
* Enables the search.
|
|
7616
|
+
*/
|
|
7617
|
+
enable(): Promise<void>;
|
|
7618
|
+
}
|
|
7619
|
+
export type SearchState = {
|
|
7620
|
+
/**
|
|
7621
|
+
* Whether the search is enabled.
|
|
7622
|
+
*/
|
|
7623
|
+
enabled: boolean;
|
|
7624
|
+
};
|
|
7625
|
+
}
|
|
7626
|
+
|
|
7627
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
|
|
7628
|
+
/**
|
|
7629
|
+
* Valid track-analytics API contexts. These should match the expected values of that endpoint or the requests will fail.
|
|
7630
|
+
* If a set context is not in this list, it will default to the first VALID_CONTEXTS value.
|
|
7631
|
+
*/
|
|
7632
|
+
export const VALID_CONTEXTS: readonly ["websdk", "web", "webv2", "kiosk-v2", "mobile", "iossdk", "androidsdk", "reactnativesdk", "gen7", "bespoke"];
|
|
7633
|
+
type ValidContext = (typeof VALID_CONTEXTS)[number];
|
|
7634
|
+
export const DEFAULT_CONTEXT: "websdk";
|
|
7635
|
+
export const ANALYTICS_URL = "https://api-gateway.mappedin.com/track-analytics/a/";
|
|
7636
|
+
export const FOUND_POSITION = "found-position";
|
|
7637
|
+
export const FOUND_FLOOR = "found-floor";
|
|
7638
|
+
type BlueDotEvents = typeof FOUND_FLOOR | typeof FOUND_POSITION;
|
|
7639
|
+
export class AnalyticsInternal {
|
|
7640
|
+
#private;
|
|
7641
|
+
constructor();
|
|
7642
|
+
init(options: AnalyticsUpdateOptions): void;
|
|
7643
|
+
/**
|
|
7644
|
+
* Reset state and options
|
|
7645
|
+
*/
|
|
7646
|
+
reset(): void;
|
|
7647
|
+
updateState(update: UpdateStateParam): void;
|
|
7648
|
+
get authReady(): boolean;
|
|
7649
|
+
getState(): AnalyticState;
|
|
7650
|
+
capture<T extends keyof CaptureEventsPayloadMap>(eventName: T, query: CaptureEventsPayloadMap[T]): Promise<Response> | Promise<void>;
|
|
7651
|
+
capture<T extends keyof CaptureEventsPayloadMap | (string & NonNullable<unknown>)>(target: T, query: T extends keyof CaptureEventsPayloadMap ? CaptureEventsPayloadMap[T] : Record<string, any>): Promise<Response> | Promise<void>;
|
|
7652
|
+
/**
|
|
7653
|
+
* @internal
|
|
7654
|
+
*/
|
|
7655
|
+
sendGetMapDataEvent(payload: {
|
|
7656
|
+
parseDuration: number;
|
|
7657
|
+
downloadDuration: number;
|
|
7658
|
+
viewId?: string;
|
|
7659
|
+
}): void | Promise<Response> | Promise<void>;
|
|
7660
|
+
sendChangeLanguageEvent(payload: {
|
|
7661
|
+
fromLanguage: string;
|
|
7662
|
+
}): void | Promise<Response> | Promise<void>;
|
|
7663
|
+
sendWatchPositionDenied(): void | Promise<Response> | Promise<void>;
|
|
7664
|
+
/**
|
|
7665
|
+
* @internal
|
|
7666
|
+
*/
|
|
7667
|
+
sendMapViewLoadedEvent({ firstRenderDuration, dimension, }: {
|
|
7668
|
+
firstRenderDuration: number;
|
|
7669
|
+
dimension: {
|
|
7670
|
+
height: number;
|
|
7671
|
+
width: number;
|
|
7672
|
+
};
|
|
7673
|
+
}): void | Promise<Response> | Promise<void>;
|
|
7674
|
+
/**
|
|
7675
|
+
* @internal
|
|
7676
|
+
*/
|
|
7677
|
+
sendGetDirectionsEvent: (start: string, end: string) => void;
|
|
7678
|
+
sendBlueDotEvents(event: BlueDotEvents): void | Promise<Response> | Promise<void>;
|
|
6037
7679
|
}
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
7680
|
+
type UpdateStateParam = Partial<Pick<AnalyticState, 'geolocationMode' | 'context' | 'logEvents' | 'userPosition' | 'mapId' | 'sendEvents' | 'logEvents' | 'accessToken' | 'sessionId'>>;
|
|
7681
|
+
type CaptureEventsPayloadMap = {
|
|
7682
|
+
'$select-location': {
|
|
7683
|
+
id: string;
|
|
7684
|
+
};
|
|
7685
|
+
'$select-category': {
|
|
7686
|
+
id: string;
|
|
7687
|
+
};
|
|
7688
|
+
'$query-suggest': {
|
|
7689
|
+
query: string;
|
|
7690
|
+
suggestions?: string[];
|
|
7691
|
+
};
|
|
7692
|
+
'$query-search': {
|
|
7693
|
+
query: string;
|
|
7694
|
+
hits?: string[];
|
|
7695
|
+
};
|
|
7696
|
+
};
|
|
7697
|
+
export const analyticsInternal: AnalyticsInternal;
|
|
7698
|
+
export class Analytics {
|
|
7699
|
+
#private;
|
|
7700
|
+
/**
|
|
7701
|
+
* @internal
|
|
7702
|
+
*/
|
|
7703
|
+
constructor(internalAnalytics: AnalyticsInternal);
|
|
7704
|
+
/**
|
|
7705
|
+
* Captures an analytic event with a custom target and query payload.
|
|
7706
|
+
*
|
|
7707
|
+
* @param target - The event name or target can be .
|
|
7708
|
+
* @param query - The payload associated with the event.
|
|
7709
|
+
* @returns A promise that resolves to the server response or void.
|
|
7710
|
+
*/
|
|
7711
|
+
capture: typeof AnalyticsInternal.prototype.capture;
|
|
7712
|
+
/**
|
|
7713
|
+
* Updates the analytics state with the provided parameters.
|
|
7714
|
+
* @param update - The state parameters to update.
|
|
7715
|
+
*/
|
|
7716
|
+
updateState: (update: TAnalyticsUpdateState) => void;
|
|
7717
|
+
/**
|
|
7718
|
+
* Returns the current analytics state.
|
|
7719
|
+
* @internal
|
|
7720
|
+
* @returns the current analytics state
|
|
7721
|
+
*/
|
|
7722
|
+
getState(): {
|
|
7723
|
+
version: string;
|
|
7724
|
+
/** The platform string to be included in analytics. */
|
|
7725
|
+
platformString: string;
|
|
7726
|
+
/** The base URI for the analytics endpoint. */
|
|
7727
|
+
baseUri: string;
|
|
7728
|
+
/** The base URI with mapId appended. */
|
|
7729
|
+
analyticsBaseUrl: string;
|
|
7730
|
+
/** Flag to disable authentication. */
|
|
7731
|
+
noAuth: boolean;
|
|
7732
|
+
/** Flag to enable geolocation mode. */
|
|
7733
|
+
geolocationMode: boolean;
|
|
7734
|
+
/** The device ID to be used for analytics. */
|
|
7735
|
+
deviceId: string;
|
|
7736
|
+
/** The session ID to be used for analytics. */
|
|
7737
|
+
sessionId: string;
|
|
7738
|
+
/** The context in which the analytics are being used. */
|
|
7739
|
+
context: ValidContext;
|
|
7740
|
+
/** The last known user position. */
|
|
7741
|
+
userPosition?: AnalyticsUserPosition;
|
|
7742
|
+
/** The ID of the map to be used for analytics. */
|
|
7743
|
+
mapId?: string;
|
|
7744
|
+
/** Flag to enable logging of events. */
|
|
7745
|
+
logEvents: boolean;
|
|
7746
|
+
/** Flag to enable sending of events. */
|
|
7747
|
+
sendEvents: boolean;
|
|
7748
|
+
} & AnalyticsAuth;
|
|
6053
7749
|
}
|
|
7750
|
+
type AnalyticsUserPosition = {
|
|
7751
|
+
bluedotTimestamp: number;
|
|
7752
|
+
latitude: number;
|
|
7753
|
+
longitude: number;
|
|
7754
|
+
floorLevel?: number;
|
|
7755
|
+
accuracy: number;
|
|
7756
|
+
};
|
|
7757
|
+
type AnalyticsAuth = {
|
|
7758
|
+
/** The API key for authentication. */
|
|
7759
|
+
key?: string;
|
|
7760
|
+
/** The API secret for authentication. */
|
|
7761
|
+
secret?: string;
|
|
7762
|
+
/** The access token for authentication. */
|
|
7763
|
+
accessToken?: string;
|
|
7764
|
+
};
|
|
7765
|
+
export type AnalyticState = {
|
|
7766
|
+
version: string;
|
|
7767
|
+
/** The platform string to be included in analytics. */
|
|
7768
|
+
platformString: string;
|
|
7769
|
+
/** The base URI for the analytics endpoint. */
|
|
7770
|
+
baseUri: string;
|
|
7771
|
+
/** The base URI with mapId appended. */
|
|
7772
|
+
analyticsBaseUrl: string;
|
|
7773
|
+
/** Flag to disable authentication. */
|
|
7774
|
+
noAuth: boolean;
|
|
7775
|
+
/** Flag to enable geolocation mode. */
|
|
7776
|
+
geolocationMode: boolean;
|
|
7777
|
+
/** The device ID to be used for analytics. */
|
|
7778
|
+
deviceId: string;
|
|
7779
|
+
/** The session ID to be used for analytics. */
|
|
7780
|
+
sessionId: string;
|
|
7781
|
+
/** The context in which the analytics are being used. */
|
|
7782
|
+
context: ValidContext;
|
|
7783
|
+
/** The last known user position. */
|
|
7784
|
+
userPosition?: AnalyticsUserPosition;
|
|
7785
|
+
/** The ID of the map to be used for analytics. */
|
|
7786
|
+
mapId?: string;
|
|
7787
|
+
/** Flag to enable logging of events. */
|
|
7788
|
+
logEvents: boolean;
|
|
7789
|
+
/** Flag to enable sending of events. */
|
|
7790
|
+
sendEvents: boolean;
|
|
7791
|
+
} & AnalyticsAuth;
|
|
7792
|
+
type AnalyticsOptions = Partial<Omit<AnalyticState, 'version' | 'analyticsBaseUrl' | 'geolocationMode' | 'deviceId' | 'userPosition'>>;
|
|
7793
|
+
export type AnalyticsUpdateOptions = Omit<AnalyticsOptions, keyof AnalyticsAuth> & ((Required<Pick<AnalyticsAuth, 'key' | 'secret'>> & Partial<Pick<AnalyticsAuth, 'accessToken'>>) | (Required<Pick<AnalyticsAuth, 'accessToken'>> & Partial<Pick<AnalyticsAuth, 'key' | 'secret'>>));
|
|
7794
|
+
/**
|
|
7795
|
+
* Options for updating the current state of analytics.
|
|
7796
|
+
* @interface
|
|
7797
|
+
*/
|
|
7798
|
+
export type TAnalyticsUpdateState = Pick<Partial<AnalyticState>, 'logEvents' | 'sendEvents' | 'baseUri' | 'accessToken'>;
|
|
7799
|
+
export {};
|
|
6054
7800
|
}
|
|
6055
7801
|
|
|
6056
7802
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object' {
|
|
@@ -6081,17 +7827,18 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-meta
|
|
|
6081
7827
|
}
|
|
6082
7828
|
}
|
|
6083
7829
|
|
|
6084
|
-
declare module '@mappedin/mappedin-js/geojson/src/entities/
|
|
7830
|
+
declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
|
|
6085
7831
|
import { Object3D } from 'three';
|
|
6086
7832
|
import type { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
|
|
6087
7833
|
import type { MeshComponent } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
6088
7834
|
import type { ModelComponent } from '@mappedin/mappedin-js/geojson/src/components/model';
|
|
6089
7835
|
import type { PathComponent } from '@mappedin/mappedin-js/geojson/src/components/path';
|
|
6090
7836
|
import type { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/style';
|
|
7837
|
+
import type { ImageComponent } from '@mappedin/mappedin-js/geojson/src/components/image';
|
|
6091
7838
|
import type { CustomGeometryComponent } from '@mappedin/mappedin-js/geojson/src/components/custom';
|
|
6092
|
-
import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
6093
|
-
import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
6094
|
-
export enum
|
|
7839
|
+
import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
7840
|
+
import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
7841
|
+
export enum Geometry3DComponents {
|
|
6095
7842
|
Mesh = 0,
|
|
6096
7843
|
Style = 1,
|
|
6097
7844
|
Interaction = 2
|
|
@@ -6099,27 +7846,27 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/three-d' {
|
|
|
6099
7846
|
export class Geometry3DObject3D extends Object3D {
|
|
6100
7847
|
userData: {
|
|
6101
7848
|
entityId: string;
|
|
6102
|
-
type: 'geometry' | 'path' | 'model' | 'custom-geometry';
|
|
7849
|
+
type: 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
|
|
6103
7850
|
};
|
|
6104
7851
|
}
|
|
6105
|
-
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent;
|
|
7852
|
+
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent;
|
|
6106
7853
|
export class Geometry3D {
|
|
6107
7854
|
id: string | number;
|
|
6108
7855
|
components: [MeshComponentTypes, StyleComponent, InteractionComponent?];
|
|
6109
|
-
get object3d(): import("../components/mesh").EntityBatchedMesh |
|
|
7856
|
+
get object3d(): Geometry3DObject3D | import("../components/mesh").EntityBatchedMesh | undefined;
|
|
6110
7857
|
get parent(): GroupContainerObject3D | GeometryGroupObject3D | null;
|
|
6111
|
-
get type(): 'geometry' | 'path' | 'model' | 'custom-geometry';
|
|
6112
|
-
constructor(meshComponent: MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent, styleComponent: StyleComponent);
|
|
7858
|
+
get type(): 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
|
|
7859
|
+
constructor(meshComponent: MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent, styleComponent: StyleComponent);
|
|
6113
7860
|
}
|
|
6114
7861
|
}
|
|
6115
7862
|
|
|
6116
|
-
declare module '@mappedin/mappedin-js/geojson/src/entities/
|
|
7863
|
+
declare module '@mappedin/mappedin-js/geojson/src/entities/geometry2d' {
|
|
6117
7864
|
import { Object3D, Vector3 } from 'three';
|
|
6118
7865
|
import type { MarkerComponent } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
6119
7866
|
import type LabelComponent from '@mappedin/mappedin-js/geojson/src/components/label';
|
|
6120
|
-
import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
7867
|
+
import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
6121
7868
|
import type { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
|
|
6122
|
-
export enum
|
|
7869
|
+
export enum Geometry2DComponents {
|
|
6123
7870
|
UI = 0,
|
|
6124
7871
|
Interaction = 1
|
|
6125
7872
|
}
|
|
@@ -6165,6 +7912,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-styl
|
|
|
6165
7912
|
opacity: number;
|
|
6166
7913
|
shading?: Shading;
|
|
6167
7914
|
outline: boolean;
|
|
7915
|
+
texture?: string;
|
|
7916
|
+
topTexture?: string;
|
|
6168
7917
|
};
|
|
6169
7918
|
export class GeometryGroupStyleComponent implements GeometryGroupStyle {
|
|
6170
7919
|
#private;
|
|
@@ -6172,6 +7921,13 @@ declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-styl
|
|
|
6172
7921
|
topColor?: string;
|
|
6173
7922
|
opacity: number;
|
|
6174
7923
|
outline: boolean;
|
|
7924
|
+
texture?: string;
|
|
7925
|
+
topTexture?: string;
|
|
7926
|
+
/**
|
|
7927
|
+
* Ideally for handling all style component changes. However, it's only used for handling outline for now.
|
|
7928
|
+
* Color update is handled separately in each child. See: https://github.com/MappedIn/sdk/blob/v6.0.1-beta.1/sdks/geojson/src/entities/utils.ts#L70
|
|
7929
|
+
*/
|
|
7930
|
+
dirty: boolean;
|
|
6175
7931
|
get shading(): Required<Shading> | undefined;
|
|
6176
7932
|
set shading(value: Shading | undefined);
|
|
6177
7933
|
constructor(style?: Partial<GeometryGroupStyle>);
|
|
@@ -6179,6 +7935,143 @@ declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-styl
|
|
|
6179
7935
|
export {};
|
|
6180
7936
|
}
|
|
6181
7937
|
|
|
7938
|
+
declare module '@mappedin/mappedin-js/geojson/src/components/image' {
|
|
7939
|
+
import type { LineSegments, PlaneGeometry, MeshLambertMaterial } from 'three';
|
|
7940
|
+
import { Vector3, Mesh } from 'three';
|
|
7941
|
+
import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
|
|
7942
|
+
import type { Feature, Point } from 'geojson';
|
|
7943
|
+
import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
7944
|
+
import { z } from 'zod';
|
|
7945
|
+
export class EntityMesh extends Mesh {
|
|
7946
|
+
userData: {
|
|
7947
|
+
entityId: string | number;
|
|
7948
|
+
};
|
|
7949
|
+
}
|
|
7950
|
+
export type ImageStyle = {
|
|
7951
|
+
/**
|
|
7952
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
7953
|
+
*/
|
|
7954
|
+
flipImageToFaceCamera?: boolean;
|
|
7955
|
+
/**
|
|
7956
|
+
* url of the image
|
|
7957
|
+
*/
|
|
7958
|
+
url: string;
|
|
7959
|
+
};
|
|
7960
|
+
export type ImageProperties = {
|
|
7961
|
+
width: number;
|
|
7962
|
+
height: number;
|
|
7963
|
+
rotation?: number;
|
|
7964
|
+
verticalOffset?: number;
|
|
7965
|
+
};
|
|
7966
|
+
export const addImageFeatureStyleSchema: z.ZodObject<{
|
|
7967
|
+
flipImageToFaceCamera: z.ZodOptional<z.ZodBoolean>;
|
|
7968
|
+
url: z.ZodString;
|
|
7969
|
+
}, "strip", z.ZodTypeAny, {
|
|
7970
|
+
url: string;
|
|
7971
|
+
flipImageToFaceCamera?: boolean | undefined;
|
|
7972
|
+
}, {
|
|
7973
|
+
url: string;
|
|
7974
|
+
flipImageToFaceCamera?: boolean | undefined;
|
|
7975
|
+
}>;
|
|
7976
|
+
export const addImageFeatureSchema: z.ZodObject<{
|
|
7977
|
+
type: z.ZodEnum<["Feature"]>;
|
|
7978
|
+
properties: z.ZodObject<{
|
|
7979
|
+
width: z.ZodNumber;
|
|
7980
|
+
height: z.ZodNumber;
|
|
7981
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
7982
|
+
verticalOffset: z.ZodOptional<z.ZodNumber>;
|
|
7983
|
+
}, "strip", z.ZodTypeAny, {
|
|
7984
|
+
height: number;
|
|
7985
|
+
width: number;
|
|
7986
|
+
rotation?: number | undefined;
|
|
7987
|
+
verticalOffset?: number | undefined;
|
|
7988
|
+
}, {
|
|
7989
|
+
height: number;
|
|
7990
|
+
width: number;
|
|
7991
|
+
rotation?: number | undefined;
|
|
7992
|
+
verticalOffset?: number | undefined;
|
|
7993
|
+
}>;
|
|
7994
|
+
geometry: z.ZodObject<{
|
|
7995
|
+
type: z.ZodEnum<["Point"]>;
|
|
7996
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
7997
|
+
}, "strip", z.ZodTypeAny, {
|
|
7998
|
+
type: "Point";
|
|
7999
|
+
coordinates: number[];
|
|
8000
|
+
}, {
|
|
8001
|
+
type: "Point";
|
|
8002
|
+
coordinates: number[];
|
|
8003
|
+
}>;
|
|
8004
|
+
}, "strip", z.ZodTypeAny, {
|
|
8005
|
+
type: "Feature";
|
|
8006
|
+
geometry: {
|
|
8007
|
+
type: "Point";
|
|
8008
|
+
coordinates: number[];
|
|
8009
|
+
};
|
|
8010
|
+
properties: {
|
|
8011
|
+
height: number;
|
|
8012
|
+
width: number;
|
|
8013
|
+
rotation?: number | undefined;
|
|
8014
|
+
verticalOffset?: number | undefined;
|
|
8015
|
+
};
|
|
8016
|
+
}, {
|
|
8017
|
+
type: "Feature";
|
|
8018
|
+
geometry: {
|
|
8019
|
+
type: "Point";
|
|
8020
|
+
coordinates: number[];
|
|
8021
|
+
};
|
|
8022
|
+
properties: {
|
|
8023
|
+
height: number;
|
|
8024
|
+
width: number;
|
|
8025
|
+
rotation?: number | undefined;
|
|
8026
|
+
verticalOffset?: number | undefined;
|
|
8027
|
+
};
|
|
8028
|
+
}>;
|
|
8029
|
+
export function validateImage(id: string | number, feature: Feature<Point, ImageProperties>, style: ImageStyle): void;
|
|
8030
|
+
/**
|
|
8031
|
+
* State representing an Image
|
|
8032
|
+
*/
|
|
8033
|
+
export type ImageState = {
|
|
8034
|
+
readonly id: string | number;
|
|
8035
|
+
readonly type: 'image';
|
|
8036
|
+
/**
|
|
8037
|
+
* The position of the image in [lon, lat]
|
|
8038
|
+
*/
|
|
8039
|
+
readonly position: Position;
|
|
8040
|
+
/**
|
|
8041
|
+
* The offset of the image in the z direction
|
|
8042
|
+
*/
|
|
8043
|
+
readonly verticalOffset: number;
|
|
8044
|
+
/**
|
|
8045
|
+
* Whether the image is visible
|
|
8046
|
+
*/
|
|
8047
|
+
visible: boolean;
|
|
8048
|
+
/**
|
|
8049
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
8050
|
+
*/
|
|
8051
|
+
flipImageToFaceCamera: boolean;
|
|
8052
|
+
};
|
|
8053
|
+
export class ImageComponent {
|
|
8054
|
+
mesh: Geometry3DObject3D;
|
|
8055
|
+
imageMesh?: EntityMesh;
|
|
8056
|
+
outline?: LineSegments;
|
|
8057
|
+
readonly type = "image";
|
|
8058
|
+
instanceIndex: number;
|
|
8059
|
+
geometry?: PlaneGeometry;
|
|
8060
|
+
material?: MeshLambertMaterial;
|
|
8061
|
+
feature: Feature<Point, ImageProperties>;
|
|
8062
|
+
constructor(feature: Feature<Point, ImageProperties>);
|
|
8063
|
+
get visible(): boolean;
|
|
8064
|
+
set visible(visible: boolean);
|
|
8065
|
+
position: Vector3;
|
|
8066
|
+
}
|
|
8067
|
+
}
|
|
8068
|
+
|
|
8069
|
+
declare module '@mappedin/mappedin-js/geojson/src/entities' {
|
|
8070
|
+
export { updateInteractivity } from '@mappedin/mappedin-js/geojson/src/entities/utils';
|
|
8071
|
+
export { Geometry2D, Geometry2DComponents } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
|
|
8072
|
+
export { Geometry3D, Geometry3DComponents } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
8073
|
+
}
|
|
8074
|
+
|
|
6182
8075
|
declare module '@mappedin/mappedin-js/geojson/src/types/options' {
|
|
6183
8076
|
import type { Position } from '@mappedin/mappedin-js/geojson/src/types/geometry';
|
|
6184
8077
|
import type { Map as MapLibreMap } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
|
|
@@ -6219,15 +8112,28 @@ declare module '@mappedin/mappedin-js/geojson/src/types/constants' {
|
|
|
6219
8112
|
declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material' {
|
|
6220
8113
|
import { MeshLambertMaterial, type Color, type Texture, type MeshLambertMaterialParameters } from 'three';
|
|
6221
8114
|
export class BatchedStandardMaterial extends MeshLambertMaterial {
|
|
6222
|
-
constructor(params: MeshLambertMaterialParameters, geometryCount: number);
|
|
8115
|
+
constructor(params: MeshLambertMaterialParameters, geometryCount: number, scaleFactor?: number);
|
|
8116
|
+
/**
|
|
8117
|
+
* These control the repeat factor of the texture in the Y direction.
|
|
8118
|
+
* So when we scale a geometry, it needs to scale the texture as well.
|
|
8119
|
+
* For now this only applies to detached geometries.
|
|
8120
|
+
*/
|
|
8121
|
+
get repeatYFactor(): number;
|
|
8122
|
+
set repeatYFactor(value: number);
|
|
6223
8123
|
get texture(): Texture;
|
|
6224
8124
|
set texture(texture: Texture);
|
|
6225
8125
|
get topTexture(): Texture;
|
|
6226
8126
|
set topTexture(texture: Texture);
|
|
6227
8127
|
setGradientShading(start: number, end: number, intensity: number): void;
|
|
6228
8128
|
setColor(batchId: number, color: Color, topColor: Color): void;
|
|
8129
|
+
getColor(batchId: number): {
|
|
8130
|
+
color: Color;
|
|
8131
|
+
topColor: Color;
|
|
8132
|
+
};
|
|
6229
8133
|
showTextures: (batchId: number) => void;
|
|
6230
8134
|
hideTextures(batchId: number): void;
|
|
8135
|
+
removeSideTexture(batchId: number): void;
|
|
8136
|
+
removeTopTexture(batchId: number): void;
|
|
6231
8137
|
dispose(): void;
|
|
6232
8138
|
}
|
|
6233
8139
|
}
|
|
@@ -6302,6 +8208,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
|
|
|
6302
8208
|
import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
|
|
6303
8209
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
6304
8210
|
import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-processor';
|
|
8211
|
+
import { WatermarkPosition } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
|
|
6305
8212
|
export type TMessageEvent = MessageEvent<{
|
|
6306
8213
|
msgId: string;
|
|
6307
8214
|
colliders: TSerializedColliderResponse[];
|
|
@@ -6318,6 +8225,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
|
|
|
6318
8225
|
totalHeight: number;
|
|
6319
8226
|
watermarkWidth: number;
|
|
6320
8227
|
watermarkHeight: number;
|
|
8228
|
+
watermarkPosition: WatermarkPosition;
|
|
6321
8229
|
colliders: TSerializedCollider[];
|
|
6322
8230
|
devicePixelRatio: number;
|
|
6323
8231
|
};
|
|
@@ -6333,7 +8241,8 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
|
|
|
6333
8241
|
totalHeight: number,
|
|
6334
8242
|
totalWidth: number,
|
|
6335
8243
|
watermarkWidth: number,
|
|
6336
|
-
watermarkHeight: number
|
|
8244
|
+
watermarkHeight: number,
|
|
8245
|
+
watermarkPosition: WatermarkPosition
|
|
6337
8246
|
];
|
|
6338
8247
|
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
6339
8248
|
dirty: boolean;
|
|
@@ -6352,8 +8261,8 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
|
|
|
6352
8261
|
currentMsgId: string;
|
|
6353
8262
|
working: boolean;
|
|
6354
8263
|
componentArray: (MarkerComponent | LabelComponent)[];
|
|
6355
|
-
update: (watermarkWidth: number, watermarkHeight: number) => void;
|
|
6356
|
-
resize(watermarkWidth: number, watermarkHeight: number): void;
|
|
8264
|
+
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition) => void;
|
|
8265
|
+
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
6357
8266
|
/**
|
|
6358
8267
|
* Resolve collisions
|
|
6359
8268
|
*/
|
|
@@ -6394,7 +8303,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/zoom-interpolation/zoo
|
|
|
6394
8303
|
declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/system' {
|
|
6395
8304
|
import type { BufferGeometry } from 'three';
|
|
6396
8305
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
6397
|
-
import { Geometry3D, Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
8306
|
+
import { Geometry3D, Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
6398
8307
|
import type { Feature, LineString, MultiPolygon, Point, Polygon } from 'geojson';
|
|
6399
8308
|
import type { LineStyle, ModelProperties, ModelStyle, PaintStyle } from '@mappedin/mappedin-js/geojson/src/types';
|
|
6400
8309
|
import type { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
|
@@ -6490,13 +8399,18 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/2d-draw/system' {
|
|
|
6490
8399
|
|
|
6491
8400
|
declare module '@mappedin/mappedin-js/geojson/src/systems/draw/system' {
|
|
6492
8401
|
import { PubSub } from '@packages/internal/common';
|
|
8402
|
+
import { MeshComponent } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
8403
|
+
import { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/style';
|
|
6493
8404
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
8405
|
+
import { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
|
|
8406
|
+
import type { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
|
|
6494
8407
|
export class DrawSystem extends PubSub<{
|
|
6495
8408
|
'texture-loaded': void;
|
|
6496
8409
|
}> {
|
|
6497
8410
|
#private;
|
|
6498
8411
|
state: RendererState;
|
|
6499
8412
|
constructor(state: RendererState);
|
|
8413
|
+
processTextures(component: MeshComponent, styleComponent: StyleComponent | GeometryGroupStyleComponent, interactionComponent?: InteractionComponent): void;
|
|
6500
8414
|
update(): void;
|
|
6501
8415
|
destroy(): void;
|
|
6502
8416
|
}
|
|
@@ -6749,8 +8663,12 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/dom-resize/system' {
|
|
|
6749
8663
|
declare module '@mappedin/mappedin-js/geojson/src/systems/pan-bounds/system' {
|
|
6750
8664
|
import type { CameraSystem } from '@mappedin/mappedin-js/geojson/src/systems/camera';
|
|
6751
8665
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
6752
|
-
|
|
8666
|
+
import { PubSub } from '@packages/internal/common';
|
|
8667
|
+
export class PanBoundsSystem extends PubSub<{
|
|
8668
|
+
update: void;
|
|
8669
|
+
}> {
|
|
6753
8670
|
dirty: boolean;
|
|
8671
|
+
autoMinZoomLevel: boolean;
|
|
6754
8672
|
constructor(state: RendererState, cameraSystem: CameraSystem);
|
|
6755
8673
|
/**
|
|
6756
8674
|
* Recomputes the pan bounds based on the current 2D and 3D entities in the scene
|
|
@@ -6775,11 +8693,13 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/custom-geometry/system
|
|
|
6775
8693
|
declare module '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/system' {
|
|
6776
8694
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
6777
8695
|
export class OutlineInterpolationSystem {
|
|
8696
|
+
#private;
|
|
6778
8697
|
/**
|
|
6779
8698
|
* Set to true when we need to update the outline color of all entities, regardless of zoom level.
|
|
6780
8699
|
*/
|
|
6781
8700
|
dirty: boolean;
|
|
6782
|
-
geometries3DDirty: boolean;
|
|
8701
|
+
get geometries3DDirty(): boolean;
|
|
8702
|
+
set geometries3DDirty(value: boolean);
|
|
6783
8703
|
constructor(rendererState: RendererState);
|
|
6784
8704
|
/**
|
|
6785
8705
|
* Update the outline color of all entities with an outline component.
|
|
@@ -6790,6 +8710,21 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/
|
|
|
6790
8710
|
}
|
|
6791
8711
|
}
|
|
6792
8712
|
|
|
8713
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/image/system' {
|
|
8714
|
+
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
8715
|
+
import { type Texture } from 'three';
|
|
8716
|
+
import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
8717
|
+
import { PubSub } from '@packages/internal/common';
|
|
8718
|
+
export const DEFAULT_VERTICAL_OFFSET = 0.01;
|
|
8719
|
+
export class ImageSystem extends PubSub<{
|
|
8720
|
+
'image-loaded': void;
|
|
8721
|
+
}> {
|
|
8722
|
+
constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
|
|
8723
|
+
imageLoadingCache: Map<string, Promise<Texture>>;
|
|
8724
|
+
update(cameraRotationRadians: number): void;
|
|
8725
|
+
}
|
|
8726
|
+
}
|
|
8727
|
+
|
|
6793
8728
|
declare module '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/system' {
|
|
6794
8729
|
import { PubSub } from '@packages/internal/common';
|
|
6795
8730
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
@@ -6823,6 +8758,58 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/path' {
|
|
|
6823
8758
|
export { PathSystem } from '@mappedin/mappedin-js/geojson/src/systems/path/system';
|
|
6824
8759
|
}
|
|
6825
8760
|
|
|
8761
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-detachment/system' {
|
|
8762
|
+
import { type Geometry3DTypes, type RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
8763
|
+
/**
|
|
8764
|
+
* This system is responsible for updating the opacity of the mesh, which results in the mesh
|
|
8765
|
+
* being detached from the parent's optimized geometry group and rendered as a separate mesh.
|
|
8766
|
+
*/
|
|
8767
|
+
export class MeshDetachmentSystem {
|
|
8768
|
+
#private;
|
|
8769
|
+
rendererState: RendererState;
|
|
8770
|
+
dirty: boolean;
|
|
8771
|
+
constructor(rendererState: RendererState);
|
|
8772
|
+
updateOne(geometry: Geometry3DTypes | undefined): void;
|
|
8773
|
+
update(): void;
|
|
8774
|
+
}
|
|
8775
|
+
}
|
|
8776
|
+
|
|
8777
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/system' {
|
|
8778
|
+
import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities';
|
|
8779
|
+
import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
8780
|
+
import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
8781
|
+
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
8782
|
+
/**
|
|
8783
|
+
* Any physical changes to geometry should go in here. This includes height changes, etc.
|
|
8784
|
+
* This is to ensure that physical changes apply before any other systems need to do their work,
|
|
8785
|
+
* such as the outline system.
|
|
8786
|
+
*
|
|
8787
|
+
* TODO: For now, this piggybacks of style.dirty, but we may want to create a flag indicating geometry dirty.
|
|
8788
|
+
*/
|
|
8789
|
+
export class MeshModificationSystem {
|
|
8790
|
+
#private;
|
|
8791
|
+
rendererState: RendererState;
|
|
8792
|
+
dirty: boolean;
|
|
8793
|
+
constructor(rendererState: RendererState);
|
|
8794
|
+
updateOne(entity: Geometry3D | GeometryGroupObject3D | GroupContainerObject3D | undefined): void;
|
|
8795
|
+
update(): void;
|
|
8796
|
+
cleanup(): void;
|
|
8797
|
+
}
|
|
8798
|
+
}
|
|
8799
|
+
|
|
8800
|
+
declare module '@mappedin/mappedin-js/geojson/src/systems/pre-render/system' {
|
|
8801
|
+
import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
8802
|
+
/**
|
|
8803
|
+
* This system runs any tasks at the very start of the render loop.
|
|
8804
|
+
* This is useful for ensuring that animations are synced with the render loop.
|
|
8805
|
+
*/
|
|
8806
|
+
export class PreRenderSystem {
|
|
8807
|
+
#private;
|
|
8808
|
+
constructor(core: RendererCore);
|
|
8809
|
+
update(): void;
|
|
8810
|
+
}
|
|
8811
|
+
}
|
|
8812
|
+
|
|
6826
8813
|
declare module '@mappedin/mappedin-js/packages/geojson-navigator/src' {
|
|
6827
8814
|
export { Navigator } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator';
|
|
6828
8815
|
export type { SimplifyDirectionsOptions } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator/navigator';
|
|
@@ -6889,10 +8876,13 @@ declare module '@mappedin/mappedin-js/geojson/src/utils/fp' {
|
|
|
6889
8876
|
export function noop(): void;
|
|
6890
8877
|
}
|
|
6891
8878
|
|
|
6892
|
-
declare module '@mappedin/mappedin-js/geojson/src/
|
|
6893
|
-
export
|
|
6894
|
-
|
|
6895
|
-
|
|
8879
|
+
declare module '@mappedin/mappedin-js/geojson/src/utils/tranform-request' {
|
|
8880
|
+
export const transformRequest: (headers: {
|
|
8881
|
+
"x-mappedin-tiles-key": string;
|
|
8882
|
+
}) => (url: string) => {
|
|
8883
|
+
url: string;
|
|
8884
|
+
headers: {};
|
|
8885
|
+
};
|
|
6896
8886
|
}
|
|
6897
8887
|
|
|
6898
8888
|
declare module '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter' {
|
|
@@ -6925,18 +8915,42 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter' {
|
|
|
6925
8915
|
}
|
|
6926
8916
|
}
|
|
6927
8917
|
|
|
8918
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object' {
|
|
8919
|
+
import type { ParsedMVF } from '@mappedin/mvf';
|
|
8920
|
+
import type { RendererCore } from '@mappedin/core-sdk';
|
|
8921
|
+
import type { AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
|
|
8922
|
+
import type { TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
8923
|
+
export class FloorObject {
|
|
8924
|
+
id: string;
|
|
8925
|
+
name: string;
|
|
8926
|
+
elevation: number;
|
|
8927
|
+
containerId: string;
|
|
8928
|
+
layers: Map<string, string>;
|
|
8929
|
+
constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf: ParsedMVF, styleMap?: AggregatedStyleMap);
|
|
8930
|
+
load: () => this;
|
|
8931
|
+
}
|
|
8932
|
+
}
|
|
8933
|
+
|
|
6928
8934
|
declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
|
|
6929
|
-
import { Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
8935
|
+
import { Coordinate, type MapObject, type Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
6930
8936
|
import type { Position, EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
|
|
6931
|
-
import type {
|
|
8937
|
+
import type { WithPolygonImage } from '@packages/internal/mvf-utils';
|
|
8938
|
+
import type { FeatureCollection, MultiLineString } from 'geojson';
|
|
6932
8939
|
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle } from '@mappedin/core-sdk';
|
|
6933
|
-
import type
|
|
6934
|
-
import type { TMarkerState } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
8940
|
+
import { type TGeometryState, type TLabelState, type TDirectionInstructionAction, type TShow3DMapOptions, type Label, type Marker, type Model } from '@mappedin/mappedin-js/mappedin-js/src';
|
|
8941
|
+
import type { TDoorsState, TMarkerState, TWallsState } from '@mappedin/mappedin-js/mappedin-js/src/types';
|
|
8942
|
+
import type { Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
|
|
8943
|
+
import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
|
|
6935
8944
|
export function convertCoordinateToPosition(coord: Coordinate): Position;
|
|
6936
8945
|
export function convertPositionToCoordinate(coord: Position): Coordinate;
|
|
6937
|
-
export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) =>
|
|
8946
|
+
export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => {
|
|
8947
|
+
entrances: FeatureCollection<LineString, any>;
|
|
8948
|
+
walls: Feature<MultiLineString, any>;
|
|
8949
|
+
};
|
|
6938
8950
|
export function translateLabelStateToGeojsonCore(state: Partial<TLabelState>, currentState: Partial<LabelState>): Partial<LabelState>;
|
|
6939
8951
|
export function translateMarkerStateToGeojsonCore(state: Partial<TMarkerState>, currentState: Partial<MarkerState>): Partial<MarkerState>;
|
|
8952
|
+
export function translateDoorsStateToGeojsonCore(state: Partial<TDoorsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
8953
|
+
export function translateWallsStateToGeojsonCore(state: Partial<TWallsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
6940
8954
|
export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
6941
8955
|
export function differenceBetweenAngles(a: number, b: number): number;
|
|
6942
8956
|
export function getRelativeBearing(relativeBearingAngle: number, threshold: number): TDirectionInstructionAction['bearing'];
|
|
@@ -6951,12 +8965,15 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
|
|
|
6951
8965
|
export type WithId<T> = T & {
|
|
6952
8966
|
id?: string;
|
|
6953
8967
|
};
|
|
6954
|
-
export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon,
|
|
8968
|
+
export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon, WithPolygonImage<SpaceProperties> | WithPolygonImage<ObstructionProperties>>[]>;
|
|
6955
8969
|
export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
|
|
8970
|
+
export const getTargetID: <T extends Space | MapObject | Label | Marker | Model | Image | string>(target: T, api: GeoJsonApi) => string | undefined;
|
|
6956
8971
|
}
|
|
6957
8972
|
|
|
6958
8973
|
declare module '@mappedin/mappedin-js/geojson/src/components/style' {
|
|
6959
|
-
import type {
|
|
8974
|
+
import type { LineStyle } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
8975
|
+
export const DEFAULT_COLOR = "#ffffff";
|
|
8976
|
+
export const DEFAULT_HEIGHT = 0.1;
|
|
6960
8977
|
type Style = {
|
|
6961
8978
|
color: string;
|
|
6962
8979
|
width: number;
|
|
@@ -6964,12 +8981,15 @@ declare module '@mappedin/mappedin-js/geojson/src/components/style' {
|
|
|
6964
8981
|
visible: boolean;
|
|
6965
8982
|
height: number;
|
|
6966
8983
|
altitude: number;
|
|
6967
|
-
join:
|
|
6968
|
-
cap:
|
|
8984
|
+
join: LineStyle['join'];
|
|
8985
|
+
cap: LineStyle['cap'];
|
|
6969
8986
|
topColor?: string;
|
|
6970
8987
|
texture?: string;
|
|
6971
8988
|
topTexture?: string;
|
|
6972
8989
|
outline: boolean;
|
|
8990
|
+
showImage: boolean;
|
|
8991
|
+
flipImageToFaceCamera: boolean;
|
|
8992
|
+
url?: string;
|
|
6973
8993
|
};
|
|
6974
8994
|
export class StyleComponent implements Style {
|
|
6975
8995
|
initialColor: string;
|
|
@@ -6983,15 +9003,53 @@ declare module '@mappedin/mappedin-js/geojson/src/components/style' {
|
|
|
6983
9003
|
opacity: number;
|
|
6984
9004
|
width: number;
|
|
6985
9005
|
height: number;
|
|
9006
|
+
initialHeight: number;
|
|
6986
9007
|
altitude: number;
|
|
6987
|
-
join:
|
|
6988
|
-
cap:
|
|
9008
|
+
join: LineStyle['join'];
|
|
9009
|
+
cap: LineStyle['cap'];
|
|
6989
9010
|
outline: boolean;
|
|
9011
|
+
showImage: boolean;
|
|
9012
|
+
flipImageToFaceCamera: boolean;
|
|
9013
|
+
url?: string;
|
|
6990
9014
|
constructor(style?: Partial<Style>);
|
|
6991
9015
|
}
|
|
6992
9016
|
export {};
|
|
6993
9017
|
}
|
|
6994
9018
|
|
|
9019
|
+
declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
|
|
9020
|
+
import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
9021
|
+
import { type MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
9022
|
+
import type { Geometry3DTypes, Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
9023
|
+
import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
|
|
9024
|
+
import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
9025
|
+
import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
9026
|
+
import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
|
|
9027
|
+
import type { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/style';
|
|
9028
|
+
import type { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
|
|
9029
|
+
export function updateInteractivity(entity: Geometry3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
|
|
9030
|
+
export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update: Partial<Pick<GeometryGroupState, 'color' | 'topColor'>>): boolean | undefined;
|
|
9031
|
+
export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
|
|
9032
|
+
export function updateImageProps(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
|
|
9033
|
+
export function updateHeight(entity: Geometry3D, update?: number): boolean;
|
|
9034
|
+
export function updateColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
|
|
9035
|
+
export function updatePosition(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
|
|
9036
|
+
export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
|
|
9037
|
+
export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
|
|
9038
|
+
export function updatePath(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<PathState> | undefined): void;
|
|
9039
|
+
export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined, state: RendererState): boolean;
|
|
9040
|
+
export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
|
|
9041
|
+
export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined, state: RendererState): void;
|
|
9042
|
+
export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
|
|
9043
|
+
export function updateFlipImageToFaceCamera(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): void;
|
|
9044
|
+
export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
|
|
9045
|
+
export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): void;
|
|
9046
|
+
export function updateGroupTexture(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Pick<GeometryGroupStyleComponent, 'texture' | 'topTexture'>): void;
|
|
9047
|
+
export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
|
|
9048
|
+
export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
|
|
9049
|
+
export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): boolean;
|
|
9050
|
+
export function updateOutline(entity: Geometry3DTypes, update?: boolean): boolean;
|
|
9051
|
+
}
|
|
9052
|
+
|
|
6995
9053
|
declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-processor' {
|
|
6996
9054
|
import { Rectangle } from '@packages/internal/quad-tree';
|
|
6997
9055
|
export type TSerializedCollider = {
|
|
@@ -7007,7 +9065,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-pr
|
|
|
7007
9065
|
shouldCollideWithScreenEdges?: boolean;
|
|
7008
9066
|
};
|
|
7009
9067
|
export type TSerializedColliderResponse = [number, boolean, Rectangle?];
|
|
7010
|
-
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, msgId?: string): {
|
|
9068
|
+
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
|
|
7011
9069
|
msgId: string;
|
|
7012
9070
|
colliders: TSerializedColliderResponse[];
|
|
7013
9071
|
debug: {
|
|
@@ -7022,16 +9080,16 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-pr
|
|
|
7022
9080
|
declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
|
|
7023
9081
|
import type { PerspectiveCamera, Vector3, Object3D, Mesh } from 'three';
|
|
7024
9082
|
import { Raycaster } from 'three';
|
|
7025
|
-
import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
9083
|
+
import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
|
|
7026
9084
|
import { QuadTree } from '@packages/internal/quad-tree';
|
|
7027
|
-
import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
9085
|
+
import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
|
|
7028
9086
|
import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
|
|
7029
9087
|
import type { EntityMesh } from '@mappedin/mappedin-js/geojson/src/types';
|
|
7030
9088
|
import { TapsController } from '@mappedin/mappedin-js/geojson/src/systems/interactions/tap-controller';
|
|
7031
9089
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
7032
9090
|
import 'style.scss';
|
|
7033
9091
|
import type { EntityBatchedMesh } from '@mappedin/mappedin-js/geojson/src/components/mesh';
|
|
7034
|
-
import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/
|
|
9092
|
+
import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
|
|
7035
9093
|
type InteractionPayload = {
|
|
7036
9094
|
entity2D?: Geometry2D;
|
|
7037
9095
|
entity3D?: Geometry3D;
|
|
@@ -7057,8 +9115,8 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
|
|
|
7057
9115
|
} | undefined;
|
|
7058
9116
|
};
|
|
7059
9117
|
export type InteractionRequiredCoreStateProps = {
|
|
7060
|
-
|
|
7061
|
-
|
|
9118
|
+
geometry2DIdsInScene: Set<Geometry2D['id']>;
|
|
9119
|
+
geometry3DIdsInScene: Set<Geometry3D['id']>;
|
|
7062
9120
|
};
|
|
7063
9121
|
/**
|
|
7064
9122
|
* TODO: touch support
|
|
@@ -7100,6 +9158,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
|
|
|
7100
9158
|
* Get the current cursor type determined by the interaction.
|
|
7101
9159
|
*/
|
|
7102
9160
|
getCursor(): CursorTypes;
|
|
9161
|
+
resize: () => void;
|
|
7103
9162
|
}
|
|
7104
9163
|
export {};
|
|
7105
9164
|
}
|
|
@@ -7130,9 +9189,9 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
|
|
|
7130
9189
|
};
|
|
7131
9190
|
'pedestal-change': {
|
|
7132
9191
|
pedestal: number;
|
|
7133
|
-
scrolledToTop
|
|
7134
|
-
scrolledToBottom
|
|
7135
|
-
scrollPercent
|
|
9192
|
+
scrolledToTop?: boolean;
|
|
9193
|
+
scrolledToBottom?: boolean;
|
|
9194
|
+
scrollPercent?: number;
|
|
7136
9195
|
};
|
|
7137
9196
|
};
|
|
7138
9197
|
type CameraEvents = {
|
|
@@ -7240,6 +9299,10 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
|
|
|
7240
9299
|
* @default Infinity
|
|
7241
9300
|
*/
|
|
7242
9301
|
setMaxZoomLevel(zoomLevel: number): void;
|
|
9302
|
+
/**
|
|
9303
|
+
* The default minimum zoom level of the camera in mercator zoom levels.
|
|
9304
|
+
*/
|
|
9305
|
+
get defaultMinZoomLevel(): number;
|
|
7243
9306
|
/**
|
|
7244
9307
|
* How far the camera can zoom out away from the ground.
|
|
7245
9308
|
*
|
|
@@ -7301,6 +9364,10 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
|
|
|
7301
9364
|
* 0% == camera is as far down as it will go
|
|
7302
9365
|
*/
|
|
7303
9366
|
get scrollPercent(): number;
|
|
9367
|
+
/**
|
|
9368
|
+
* Returns current field of view(FOV) in degrees
|
|
9369
|
+
*/
|
|
9370
|
+
get fov(): number;
|
|
7304
9371
|
/**
|
|
7305
9372
|
* Returns whether the maps are scrolled to bottom
|
|
7306
9373
|
*/
|
|
@@ -7706,6 +9773,11 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/constants' {
|
|
|
7706
9773
|
export const BLOCK_MERCATOR_ZOOM_LEVEL = 17;
|
|
7707
9774
|
export const ROOM_MERCATOR_ZOOM_LEVEL = 20;
|
|
7708
9775
|
export const EVENTS: readonly ["change", "pan-start", "pan-end", "rotate-start", "rotate-end", "zoom-start", "zoom-end", "multi-start", "multi-end", "multi-cancel", "pedestal-start", "pedestal-change", "pedestal-end", "user-pan-start", "user-pedestal-start", "user-rotate-start", "user-dolly-start", "user-zoom-start", "user-tilt-start", "user-pan-end", "user-pedestal-end", "user-rotate-end", "user-dolly-end", "user-zoom-end", "user-tilt-end", "position-updated", "zoom-updated", "tilt-updated", "rotation-updated"];
|
|
9776
|
+
export const DEFAULT_ZOOM_LEVEL = 18;
|
|
9777
|
+
export const DEFAULT_MIN_ZOOM_LEVEL = 12;
|
|
9778
|
+
export const DEFAULT_MAX_ZOOM_LEVEL = 22;
|
|
9779
|
+
export const DEFAULT_PITCH = 0;
|
|
9780
|
+
export const DEFAULT_BEARING = 0;
|
|
7709
9781
|
}
|
|
7710
9782
|
|
|
7711
9783
|
declare module '@mappedin/mappedin-js/packages/outdoor-context-v4/ui/map' {
|
|
@@ -15570,8 +17642,10 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/path/system' {
|
|
|
15570
17642
|
export class PathSystem extends PubSub<{
|
|
15571
17643
|
'animate:path': undefined;
|
|
15572
17644
|
}> {
|
|
17645
|
+
altitudeDirty: boolean;
|
|
15573
17646
|
convertTo3DMapPosition: RendererCore['convertTo3DMapPosition'];
|
|
15574
|
-
|
|
17647
|
+
getParentContainer: RendererCore['getParentContainer'];
|
|
17648
|
+
constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition'], getParentContainer: RendererCore['getParentContainer']);
|
|
15575
17649
|
update(minZoomAltitude: number, maxZoomAltitude: number, currentZoomAltitude: number): void;
|
|
15576
17650
|
}
|
|
15577
17651
|
}
|
|
@@ -15793,32 +17867,6 @@ declare module '@mappedin/mappedin-js/packages/geojson-navigator/src/types/coord
|
|
|
15793
17867
|
export type CoordinateFeature = Feature<Point, CoordinateProperties>;
|
|
15794
17868
|
}
|
|
15795
17869
|
|
|
15796
|
-
declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
|
|
15797
|
-
import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
15798
|
-
import type { MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
|
|
15799
|
-
import type { Entity3DTypes, Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
15800
|
-
import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
|
|
15801
|
-
import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
|
|
15802
|
-
import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
|
|
15803
|
-
import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/two-d';
|
|
15804
|
-
export function updateInteractivity(entity: Entity3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
|
|
15805
|
-
export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update?: Partial<GeometryGroupState>): boolean;
|
|
15806
|
-
export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
|
|
15807
|
-
export function updateColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
|
|
15808
|
-
export function updatePosition(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
|
|
15809
|
-
export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
|
|
15810
|
-
export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
|
|
15811
|
-
export function updatePath(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<PathState> | undefined): void;
|
|
15812
|
-
export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined): boolean;
|
|
15813
|
-
export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
|
|
15814
|
-
export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined): void;
|
|
15815
|
-
export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
|
|
15816
|
-
export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
|
|
15817
|
-
export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): void;
|
|
15818
|
-
export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
|
|
15819
|
-
export function updateOutline(entity: Entity3DTypes, update?: boolean): boolean;
|
|
15820
|
-
}
|
|
15821
|
-
|
|
15822
17870
|
declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/tap-controller' {
|
|
15823
17871
|
export enum TapType {
|
|
15824
17872
|
onefinger = 0,
|