@mapxus/mapxus-map-jp 7.5.0 → 7.6.0
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/index.d.ts +335 -131
- package/index.js +1 -1
- package/package.json +3 -4
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
3
|
import { AxiosPromise } from 'axios';
|
|
4
|
-
import { ControlPosition, FilterSpecification, IControl, LngLat, Map as MaplibreMap,
|
|
4
|
+
import { ControlPosition, FilterSpecification, IControl, LngLat, Map as MaplibreMap, MapGeoJSONFeature, MapLayerEventType, PaddingOptions, PointLike, RequireAtLeastOne } from 'maplibre-gl';
|
|
5
5
|
|
|
6
6
|
export declare enum ThemeType {
|
|
7
7
|
CHRISTMAS = "christmas",
|
|
@@ -17,6 +17,9 @@ export interface ISelectedBuildingBorderStyle {
|
|
|
17
17
|
lineColor?: string;
|
|
18
18
|
lineOpacity?: number;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use 'IFloorSelectorStyle' instead.
|
|
22
|
+
*/
|
|
20
23
|
export interface IFloorsControlStyle {
|
|
21
24
|
fontColor?: string;
|
|
22
25
|
activeFontColor?: string;
|
|
@@ -26,16 +29,40 @@ export interface IFloorsControlStyle {
|
|
|
26
29
|
itemCount?: number;
|
|
27
30
|
defaultFolded?: boolean;
|
|
28
31
|
}
|
|
32
|
+
export interface IFloorSelectorStyle {
|
|
33
|
+
fontColor?: string;
|
|
34
|
+
activeFontColor?: string;
|
|
35
|
+
backgroundColor?: string;
|
|
36
|
+
activeBackgroundColor?: string;
|
|
37
|
+
itemSize?: number;
|
|
38
|
+
itemCount?: number;
|
|
39
|
+
defaultFolded?: boolean;
|
|
40
|
+
}
|
|
29
41
|
export declare enum FloorSwitchMode {
|
|
30
42
|
SWITCHED_BY_BUILDING = 0,
|
|
31
43
|
SWITCHED_BY_VENUE = 1
|
|
32
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Use enum `PresetLanguage` instead.
|
|
47
|
+
*/
|
|
48
|
+
export type TPresetLanguage = "en" | "zh-Hans" | "zh-Hant" | "ja" | "ko";
|
|
49
|
+
export declare enum PresetLanguage {
|
|
50
|
+
ENGLISH = "en",
|
|
51
|
+
CHINESE_SIMPLIFIED = "zh-Hans",
|
|
52
|
+
CHINESE_TRADITIONAL = "zh-Hant",
|
|
53
|
+
JAPANESE = "ja",
|
|
54
|
+
KOREAN = "ko"
|
|
55
|
+
}
|
|
33
56
|
export interface IMapOption {
|
|
34
57
|
map: MaplibreMap;
|
|
35
58
|
appId: string;
|
|
36
59
|
secret: string;
|
|
60
|
+
/** @deprecated Use 'floorSelectorEnabled' instead */
|
|
37
61
|
enableFloorControl?: boolean;
|
|
62
|
+
floorSelectorEnabled?: boolean;
|
|
63
|
+
/** @deprecated Use 'buildingSelectorEnabled' instead */
|
|
38
64
|
enableBuildingSelector?: boolean;
|
|
65
|
+
buildingSelectorEnabled?: boolean;
|
|
39
66
|
/**
|
|
40
67
|
* @description 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
41
68
|
* the priority is: poiId > floorId > buildingId > venueId.
|
|
@@ -57,11 +84,19 @@ export interface IMapOption {
|
|
|
57
84
|
* the priority is: poiId > floorId > buildingId > venueId.
|
|
58
85
|
*/
|
|
59
86
|
poiId?: string;
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated Use 'outdoorMapShown' instead.
|
|
89
|
+
*/
|
|
60
90
|
hiddenOutdoor?: boolean;
|
|
91
|
+
outdoorMapShown?: boolean;
|
|
61
92
|
theme?: ThemeType | string;
|
|
62
93
|
collapseCopyright?: boolean;
|
|
63
94
|
selectedBuildingBorderStyle?: ISelectedBuildingBorderStyle;
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated Use 'floorSelectorStyle' instead.
|
|
97
|
+
*/
|
|
64
98
|
floorsControlStyle?: IFloorsControlStyle;
|
|
99
|
+
floorSelectorStyle?: IFloorSelectorStyle;
|
|
65
100
|
/**
|
|
66
101
|
* @description Switch floors by venue/building, default by venue.
|
|
67
102
|
*/
|
|
@@ -82,6 +117,7 @@ export interface IMapOption {
|
|
|
82
117
|
* Parameter value ref to: https://maplibre.org/maplibre-gl-js/docs/API/types/maplibregl.PaddingOptions/
|
|
83
118
|
*/
|
|
84
119
|
boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
|
|
120
|
+
language?: PresetLanguage;
|
|
85
121
|
}
|
|
86
122
|
export type Listener = (param: Object) => any;
|
|
87
123
|
declare class DefinedEvent {
|
|
@@ -155,18 +191,16 @@ export declare class Indoor extends Evented {
|
|
|
155
191
|
private _ordinal;
|
|
156
192
|
private _floorId;
|
|
157
193
|
private _floorName;
|
|
158
|
-
private
|
|
159
|
-
private
|
|
160
|
-
private
|
|
194
|
+
private _allowOutdoorSwitch;
|
|
195
|
+
private _allowBuildingSwitch;
|
|
196
|
+
private _outdoorMapShown;
|
|
161
197
|
private _indoorLayers;
|
|
162
|
-
private _hasCustomLevelFill;
|
|
163
198
|
private _curVenueId;
|
|
164
199
|
private _curVenueFeature;
|
|
165
200
|
private _ordinalHistory;
|
|
166
201
|
private _buildingHighlightStyle;
|
|
167
202
|
private readonly _floorSwitchMode;
|
|
168
203
|
private _maskNonSelectedAreas;
|
|
169
|
-
private _isSelectBuildingByClickMap;
|
|
170
204
|
private readonly _hiddenBuildings;
|
|
171
205
|
private _lowerLayers;
|
|
172
206
|
private _upperLayers;
|
|
@@ -178,33 +212,57 @@ export declare class Indoor extends Evented {
|
|
|
178
212
|
private _dispatch;
|
|
179
213
|
private readonly _fitBuildingBounds;
|
|
180
214
|
private readonly _boundsPadding;
|
|
181
|
-
private readonly
|
|
215
|
+
private readonly _startWithIndoorView;
|
|
182
216
|
private _maplibreMapLoaded;
|
|
183
217
|
private _indoorMapLoaded;
|
|
184
218
|
constructor(props: {
|
|
185
|
-
map:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
219
|
+
map: MaplibreMap;
|
|
220
|
+
floorSwitchMode?: FloorSwitchMode;
|
|
221
|
+
fitBuildingBounds?: boolean;
|
|
222
|
+
boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
|
|
223
|
+
maskNonSelectedAreas?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* @deprecated Use 'startWithIndoorView' instead.
|
|
226
|
+
*/
|
|
227
|
+
isInitialIndoor?: boolean;
|
|
228
|
+
startWithIndoorView?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* @deprecated Use 'outdoorMapShown' instead.
|
|
231
|
+
*/
|
|
232
|
+
isHiddenOutdoor?: boolean;
|
|
233
|
+
outdoorMapShown?: boolean;
|
|
234
|
+
selectedBuildingBorderStyle?: ISelectedBuildingBorderStyle;
|
|
191
235
|
});
|
|
192
236
|
/**
|
|
193
237
|
* @description Turn on indoor-outdoor switching.
|
|
238
|
+
* @deprecated Use 'setAllowOutdoorSwitch(true)' instead.
|
|
194
239
|
*/
|
|
195
240
|
enableSwitch(): this;
|
|
196
241
|
/**
|
|
197
242
|
* @description Turn off indoor-outdoor switching.
|
|
243
|
+
* @deprecated Use 'setAllowOutdoorSwitch(false)' instead.
|
|
198
244
|
*/
|
|
199
245
|
disableSwitch(): this;
|
|
246
|
+
/**
|
|
247
|
+
* @description Set whether to allow exiting building.
|
|
248
|
+
* @param allow
|
|
249
|
+
*/
|
|
250
|
+
setAllowOutdoorSwitch(allow: boolean): this;
|
|
200
251
|
/**
|
|
201
252
|
* @description Turn on building-building switching.
|
|
253
|
+
* @deprecated Use 'setAllowBuildingSwitch(true)' instead.
|
|
202
254
|
*/
|
|
203
255
|
enableSwitchBuilding(): this;
|
|
204
256
|
/**
|
|
205
257
|
* @description Turn off building-building switching.
|
|
258
|
+
* @deprecated Use 'setAllowBuildingSwitch(false)' instead.
|
|
206
259
|
*/
|
|
207
260
|
disableSwitchBuilding(): this;
|
|
261
|
+
/**
|
|
262
|
+
* @description Set whether to allow switching building.
|
|
263
|
+
* @param allow
|
|
264
|
+
*/
|
|
265
|
+
setAllowBuildingSwitch(allow: boolean): this;
|
|
208
266
|
/**
|
|
209
267
|
* @description Get the current floor's information.
|
|
210
268
|
*/
|
|
@@ -245,7 +303,8 @@ export declare class Indoor extends Evented {
|
|
|
245
303
|
* @description Map pan to the building center and select the building.
|
|
246
304
|
* @param buildingId
|
|
247
305
|
* @param floorId
|
|
248
|
-
* @param callback
|
|
306
|
+
* @param callback - **@deprecated** The optional parameter **'callback' will be removed soon**, you
|
|
307
|
+
* should use this method as `await panToBuilding(buildingId)` or `panToBuilding(buildingId).then()`
|
|
249
308
|
*/
|
|
250
309
|
panToBuilding(buildingId: string, floorId?: string, callback?: (feature: MapGeoJSONFeature) => void): Promise<void>;
|
|
251
310
|
/**
|
|
@@ -255,9 +314,11 @@ export declare class Indoor extends Evented {
|
|
|
255
314
|
switchFloorByOrdinal(ordinal: string): void;
|
|
256
315
|
/**
|
|
257
316
|
* @description Hide the outdoor layer.
|
|
317
|
+
* @deprecated Use 'setOutdoorMapShown' instead.
|
|
258
318
|
* @param isHiddenOutdoor
|
|
259
319
|
*/
|
|
260
320
|
hiddenOutdoorLayer(isHiddenOutdoor: boolean): void;
|
|
321
|
+
setOutdoorMapShown(shown: boolean): void;
|
|
261
322
|
/**
|
|
262
323
|
* @description Update map layout.
|
|
263
324
|
*/
|
|
@@ -268,12 +329,13 @@ export declare class Indoor extends Evented {
|
|
|
268
329
|
*/
|
|
269
330
|
setFloorsFilter(): void;
|
|
270
331
|
/**
|
|
271
|
-
* @description Set the style of SelectedBuildingBorder.
|
|
332
|
+
* @description Set the style of SelectedBuildingBorder. If set to null, the border will be invisible.
|
|
272
333
|
* @param style {ISelectedBuildingBorderStyle | null}
|
|
273
334
|
*/
|
|
274
335
|
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): void;
|
|
275
336
|
/**
|
|
276
337
|
* @description Set whether to cover the unselected venues/buildings.
|
|
338
|
+
* @deprecated
|
|
277
339
|
* @param mask Default is false.
|
|
278
340
|
*/
|
|
279
341
|
setMaskNonSelectedAreas(mask: boolean): void;
|
|
@@ -301,14 +363,12 @@ export declare class Indoor extends Evented {
|
|
|
301
363
|
private _filter;
|
|
302
364
|
private _clear;
|
|
303
365
|
private _updateFilter;
|
|
304
|
-
private _setPoiTextColor;
|
|
305
|
-
private _addTextHaloColor;
|
|
306
366
|
private _getFeatures;
|
|
307
367
|
private _getBuildingFloorByOrdinal;
|
|
308
368
|
private _getBuildingFloorByFloorId;
|
|
309
369
|
private _getBuildingInitFloor;
|
|
310
370
|
private _isNotCurrentFeature;
|
|
311
|
-
private
|
|
371
|
+
private _setOutdoorVisibility;
|
|
312
372
|
private _addCustomLevelFillLayer;
|
|
313
373
|
private _setIndoorState;
|
|
314
374
|
private _setBuildingLineOpacity;
|
|
@@ -341,7 +401,7 @@ export declare class Indoor extends Evented {
|
|
|
341
401
|
private _addLevelToLower;
|
|
342
402
|
private _deleteLevelFromLower;
|
|
343
403
|
private _filterGroupLayers;
|
|
344
|
-
private
|
|
404
|
+
private _filterCommonLayers;
|
|
345
405
|
private _getNewFilter;
|
|
346
406
|
private static isFilterHasBeenReset;
|
|
347
407
|
}
|
|
@@ -362,18 +422,189 @@ export interface IMapClickEvent {
|
|
|
362
422
|
venue: MapGeoJSONFeature | null;
|
|
363
423
|
floor: IFloor;
|
|
364
424
|
}
|
|
365
|
-
export declare class
|
|
425
|
+
export declare class SwitchOutdoorHandler {
|
|
426
|
+
private _indoor;
|
|
427
|
+
private _isEnabled;
|
|
428
|
+
constructor(indoor: Indoor);
|
|
429
|
+
enable(): void;
|
|
430
|
+
disable(): void;
|
|
431
|
+
get isEnabled(): boolean;
|
|
432
|
+
}
|
|
433
|
+
export declare class SwitchBuildingHandler {
|
|
434
|
+
private _indoor;
|
|
435
|
+
private _isEnabled;
|
|
436
|
+
constructor(indoor: Indoor);
|
|
437
|
+
enable(): void;
|
|
438
|
+
disable(): void;
|
|
439
|
+
get isEnabled(): boolean;
|
|
440
|
+
}
|
|
441
|
+
export declare class BuildingFilterControl implements IControl {
|
|
366
442
|
private _map;
|
|
443
|
+
private _maplibre;
|
|
367
444
|
private _indoor;
|
|
445
|
+
private _buildingId;
|
|
446
|
+
private _features;
|
|
447
|
+
private _container;
|
|
448
|
+
private _buildingNameLayout;
|
|
449
|
+
private _buildingNameList;
|
|
450
|
+
private _listHeight;
|
|
451
|
+
private _visible;
|
|
452
|
+
private _position;
|
|
453
|
+
/**
|
|
454
|
+
* @param map
|
|
455
|
+
* @param position - **@deprecated** The optional parameter **'position' will be removed soon**.
|
|
456
|
+
* @param buildingSelectorEnabled
|
|
457
|
+
*/
|
|
458
|
+
constructor(map: Map$1, position?: ControlPosition, buildingSelectorEnabled?: boolean);
|
|
459
|
+
onAdd(map: MaplibreMap): HTMLElement;
|
|
460
|
+
onRemove(): void;
|
|
461
|
+
get position(): ControlPosition;
|
|
462
|
+
get enabled(): boolean;
|
|
463
|
+
getDefaultPosition(): ControlPosition;
|
|
464
|
+
/**
|
|
465
|
+
* @deprecated Use 'setVisibility' instead.
|
|
466
|
+
* @param isHidden
|
|
467
|
+
*/
|
|
468
|
+
setLayoutHidden(isHidden: boolean): void;
|
|
469
|
+
setVisibility(isVisible: boolean): void;
|
|
470
|
+
/**
|
|
471
|
+
* @deprecated Use 'changePosition' instead.
|
|
472
|
+
* @param from
|
|
473
|
+
* @param to
|
|
474
|
+
*/
|
|
475
|
+
moveBuildingFilter(from: ControlPosition, to: ControlPosition): void;
|
|
476
|
+
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
477
|
+
private _loadData;
|
|
478
|
+
private _init;
|
|
479
|
+
private _refresh;
|
|
480
|
+
private _select;
|
|
481
|
+
private _load;
|
|
482
|
+
private _buildingFilterIconCreate;
|
|
483
|
+
private _buildingNameListCreate;
|
|
484
|
+
private _buildingNameListUpdate;
|
|
485
|
+
private _buildingNameListClean;
|
|
486
|
+
private _setBuildingListHeight;
|
|
487
|
+
private _buildingNameCreate;
|
|
488
|
+
private _toggleList;
|
|
489
|
+
private _buildingNameClickEvent;
|
|
490
|
+
private _buildingToggleListEvent;
|
|
491
|
+
private _$showLayout;
|
|
492
|
+
private _$hideLayout;
|
|
493
|
+
private _updateBuildingListLayout;
|
|
494
|
+
}
|
|
495
|
+
export declare class BuildingSelectorHandler {
|
|
496
|
+
private _buildingSelector;
|
|
497
|
+
private _isEnabled;
|
|
498
|
+
private _position;
|
|
499
|
+
constructor(buildingSelector: BuildingFilterControl);
|
|
500
|
+
enable(): void;
|
|
501
|
+
disable(): void;
|
|
502
|
+
/**
|
|
503
|
+
* Set the position of the building selector control
|
|
504
|
+
* @param position
|
|
505
|
+
* @param index - The index of the control in the controls-container. Default at the last.
|
|
506
|
+
*/
|
|
507
|
+
setPosition(position: ControlPosition, index?: number): void;
|
|
508
|
+
get isEnabled(): boolean;
|
|
509
|
+
get position(): ControlPosition;
|
|
510
|
+
}
|
|
511
|
+
export interface IFloorSelectorOptions {
|
|
512
|
+
style?: IFloorSelectorStyle;
|
|
513
|
+
enabled?: boolean;
|
|
514
|
+
}
|
|
515
|
+
export declare class FloorsControl implements IControl {
|
|
516
|
+
private _container;
|
|
517
|
+
private _indoor;
|
|
518
|
+
private _position;
|
|
519
|
+
private _floorNames;
|
|
520
|
+
private _ordinals;
|
|
521
|
+
private _buildingId;
|
|
522
|
+
private _style;
|
|
523
|
+
private _$innerFloors;
|
|
524
|
+
private _$activeFloor;
|
|
525
|
+
private _centerSelectorIdx;
|
|
526
|
+
private _lastNormalScrollableIdx;
|
|
527
|
+
private _$arrowBtnUp;
|
|
528
|
+
private _$arrowBtnDown;
|
|
529
|
+
private _maxScrollTop;
|
|
530
|
+
private _$selectorExpanded;
|
|
531
|
+
private _$selectorFolded;
|
|
532
|
+
private _componentDidMount;
|
|
533
|
+
private _visible;
|
|
534
|
+
/**
|
|
535
|
+
* @param indoor
|
|
536
|
+
* @param options
|
|
537
|
+
*/
|
|
538
|
+
constructor(indoor: Indoor, options: IFloorSelectorOptions);
|
|
539
|
+
onAdd(): HTMLElement;
|
|
540
|
+
onRemove(): void;
|
|
541
|
+
get position(): ControlPosition;
|
|
542
|
+
get enabled(): boolean;
|
|
543
|
+
getDefaultPosition(): ControlPosition;
|
|
544
|
+
/**
|
|
545
|
+
* @description Switch floor by ordinal
|
|
546
|
+
* @param ordinal
|
|
547
|
+
* @param callback - **@deprecated** The optional parameter **'callback' will be removed soon**.
|
|
548
|
+
*/
|
|
549
|
+
switchByOrdinal(ordinal: string, callback?: VoidFunction): void;
|
|
550
|
+
setVisibility(visible: boolean): void;
|
|
551
|
+
/**
|
|
552
|
+
* @deprecated Use 'changePosition' instead.
|
|
553
|
+
* @param position
|
|
554
|
+
*/
|
|
555
|
+
setPosition(position: ControlPosition): void;
|
|
556
|
+
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
557
|
+
setStyle(style: Partial<IFloorSelectorStyle>): void;
|
|
558
|
+
private _bindEvents;
|
|
559
|
+
private _clearData;
|
|
560
|
+
private _render;
|
|
561
|
+
private _hide;
|
|
562
|
+
private _show;
|
|
563
|
+
private _createSelector;
|
|
564
|
+
private _$expandedSelector;
|
|
565
|
+
private _$foldedSelector;
|
|
566
|
+
private _clearSelector;
|
|
567
|
+
private _$createScrollButton;
|
|
568
|
+
private _$createFloors;
|
|
569
|
+
private _updateSelectorStatus;
|
|
570
|
+
private _resetArrowBtnStatus;
|
|
571
|
+
private _resetActiveFloor;
|
|
572
|
+
private _scrollCenterActiveFloor;
|
|
573
|
+
private _getScrollTop;
|
|
574
|
+
private _handleScroll;
|
|
575
|
+
private _expandSelector;
|
|
576
|
+
}
|
|
577
|
+
export declare class FloorSelectorHandler {
|
|
578
|
+
private _floorSelector;
|
|
579
|
+
private _isEnabled;
|
|
580
|
+
private _position;
|
|
581
|
+
constructor(floorSelector: FloorsControl);
|
|
582
|
+
enable(): void;
|
|
583
|
+
disable(): void;
|
|
584
|
+
/**
|
|
585
|
+
* Set the position of the floor selector control
|
|
586
|
+
* @param position
|
|
587
|
+
* @param index - The index of the control in the controls-container. Default at the last.
|
|
588
|
+
*/
|
|
589
|
+
setPosition(position: ControlPosition, index?: number): void;
|
|
590
|
+
get isEnabled(): boolean;
|
|
591
|
+
get position(): ControlPosition;
|
|
592
|
+
}
|
|
593
|
+
declare class Map$1 extends Evented {
|
|
594
|
+
private _map;
|
|
595
|
+
private _indoor;
|
|
596
|
+
private _poi;
|
|
368
597
|
private _floorsControl;
|
|
369
598
|
private _buildingFilterControl;
|
|
370
|
-
private _enableFloorControl;
|
|
371
|
-
private _enableBuildingSelector;
|
|
372
|
-
private _poi;
|
|
373
|
-
private _initialHiddenLayers;
|
|
374
599
|
private _attributionControl;
|
|
600
|
+
private _initialHiddenLayers;
|
|
601
|
+
private _language;
|
|
375
602
|
private _dispatch;
|
|
376
|
-
|
|
603
|
+
switchOutdoor: SwitchOutdoorHandler;
|
|
604
|
+
switchBuilding: SwitchBuildingHandler;
|
|
605
|
+
buildingSelector: BuildingSelectorHandler;
|
|
606
|
+
floorSelector: FloorSelectorHandler;
|
|
607
|
+
constructor(options: IMapOption);
|
|
377
608
|
/**
|
|
378
609
|
* @description This function will be called once the indoor source loaded.
|
|
379
610
|
* @param callback
|
|
@@ -386,48 +617,69 @@ export declare class Map extends Evented {
|
|
|
386
617
|
/**
|
|
387
618
|
* @description Get maplibre map instance.
|
|
388
619
|
*/
|
|
620
|
+
getMaplibre(): MaplibreMap;
|
|
621
|
+
/**
|
|
622
|
+
* @description Get maplibre map instance.
|
|
623
|
+
* @deprecated Use 'getMaplibre' instead.
|
|
624
|
+
*/
|
|
389
625
|
getMap(): MaplibreMap;
|
|
626
|
+
/**
|
|
627
|
+
* @description Get current selected floor info.
|
|
628
|
+
* @return {IFloor | null}
|
|
629
|
+
*/
|
|
630
|
+
get floor(): IFloor | null;
|
|
631
|
+
/**
|
|
632
|
+
* @description Get current selected building info.
|
|
633
|
+
* @return {MapGeoJSONFeature | null}
|
|
634
|
+
*/
|
|
635
|
+
get building(): MapGeoJSONFeature | null;
|
|
636
|
+
/**
|
|
637
|
+
* @description Get current selected venue info.
|
|
638
|
+
* @return {MapGeoJSONFeature | null}
|
|
639
|
+
*/
|
|
640
|
+
get venue(): MapGeoJSONFeature | null;
|
|
390
641
|
/**
|
|
391
642
|
* @description Translate POI name to the specified language.
|
|
643
|
+
* @deprecated Use 'setLanguage' instead.
|
|
392
644
|
* @param language Window.navigator.language.
|
|
393
645
|
*/
|
|
394
646
|
transformPoiTextFieldLanguage(language: string): void;
|
|
647
|
+
/**
|
|
648
|
+
* @description Set map language.
|
|
649
|
+
* @param language {PresetLanguage} convertBrowserLangToPresetLang(Window.navigator.language).
|
|
650
|
+
*/
|
|
651
|
+
setLanguage(language: PresetLanguage): void;
|
|
395
652
|
/**
|
|
396
653
|
* @description Turn on indoor-outdoor switching.
|
|
654
|
+
* @deprecated Use 'switchOutdoor.enable()' instead.
|
|
397
655
|
*/
|
|
398
656
|
enableSwitch(): this;
|
|
399
657
|
/**
|
|
400
658
|
* @description Turn off indoor-outdoor switching.
|
|
659
|
+
* @deprecated Use 'switchOutdoor.disable()' instead.
|
|
401
660
|
*/
|
|
402
661
|
disableSwitch(): this;
|
|
403
662
|
/**
|
|
404
663
|
* @description Turn on building-building switching.
|
|
664
|
+
* @deprecated Use 'switchBuilding.enable()' instead.
|
|
405
665
|
*/
|
|
406
666
|
enableSwitchBuilding(): this;
|
|
407
667
|
/**
|
|
408
668
|
* @description Turn off building-building switching.
|
|
669
|
+
* @deprecated Use 'switchBuilding.disable()' instead.
|
|
409
670
|
*/
|
|
410
671
|
disableSwitchBuilding(): this;
|
|
411
672
|
/**
|
|
412
673
|
* @description Set outdoor layer to be shown or hidden.
|
|
674
|
+
* @deprecated Use 'setOutdoorMapShown' instead.
|
|
413
675
|
* @param isHidden True is hidden, false is shown.
|
|
414
676
|
*/
|
|
415
677
|
setOutdoorLayerHidden(isHidden: boolean): void;
|
|
416
678
|
/**
|
|
417
|
-
* @description
|
|
418
|
-
* @
|
|
419
|
-
*/
|
|
420
|
-
get floor(): IFloor | null;
|
|
421
|
-
/**
|
|
422
|
-
* @description Get current selected building info.
|
|
423
|
-
* @return {MapGeoJSONFeature | null}
|
|
424
|
-
*/
|
|
425
|
-
get building(): MapGeoJSONFeature | null;
|
|
426
|
-
/**
|
|
427
|
-
* @description Get current selected venue info.
|
|
428
|
-
* @return {MapGeoJSONFeature | null}
|
|
679
|
+
* @description Set outdoor map to be shown or hidden.
|
|
680
|
+
* @param shown
|
|
429
681
|
*/
|
|
430
|
-
|
|
682
|
+
setOutdoorMapShown(shown: boolean): void;
|
|
431
683
|
/**
|
|
432
684
|
* @description Get feature in bbox by id.
|
|
433
685
|
* @deprecated Use 'getFeaturesById' instead.
|
|
@@ -456,19 +708,22 @@ export declare class Map extends Evented {
|
|
|
456
708
|
/**
|
|
457
709
|
* @description Select floor by id.
|
|
458
710
|
* @param floorId
|
|
459
|
-
* @param callback
|
|
711
|
+
* @param callback - **@deprecated** The optional parameter **'callback' will be removed soon**, you
|
|
712
|
+
* should use this method as `await selectFloorById(floorId)` or `selectFloorById(floorId).then()`
|
|
460
713
|
*/
|
|
461
714
|
selectFloorById(floorId: string, callback?: VoidFunction): Promise<void>;
|
|
462
715
|
/**
|
|
463
716
|
* @description Select building by id.
|
|
464
717
|
* @param buildingId
|
|
465
|
-
* @param callback
|
|
718
|
+
* @param callback - **@deprecated** The optional parameter **'callback' will be removed soon**, you
|
|
719
|
+
* should use this method as `await selectBuildingById(buildingId)` or `selectBuildingById(buildingId).then()`
|
|
466
720
|
*/
|
|
467
721
|
selectBuildingById(buildingId: string, callback?: VoidFunction): Promise<void>;
|
|
468
722
|
/**
|
|
469
723
|
* @description Select or exit venue by id.
|
|
470
724
|
* @param venueId 'venueId' can be string or null. Exit indoors if venueId is null.
|
|
471
|
-
* @param callback
|
|
725
|
+
* @param callback - **@deprecated** The optional parameter **'callback' will be removed soon**, you
|
|
726
|
+
* should use this method as `await selectVenueById(venueId)` or `selectVenueById(venueId).then()`
|
|
472
727
|
*/
|
|
473
728
|
selectVenueById(venueId: string | null, callback?: VoidFunction): Promise<void>;
|
|
474
729
|
/**
|
|
@@ -505,19 +760,23 @@ export declare class Map extends Evented {
|
|
|
505
760
|
};
|
|
506
761
|
/**
|
|
507
762
|
* @description Hide the FloorControl.
|
|
763
|
+
* @deprecated Use 'floorSelector.disable()' instead.
|
|
508
764
|
*/
|
|
509
765
|
disableFloorControl(): this;
|
|
510
766
|
/**
|
|
511
767
|
* @description Show the FloorControl.
|
|
768
|
+
* @deprecated Use 'floorSelector.enable()' instead.
|
|
512
769
|
* @param position
|
|
513
770
|
*/
|
|
514
771
|
enableFloorControl(position?: ControlPosition): this;
|
|
515
772
|
/**
|
|
516
773
|
* @description Hide the BuildingSelector.
|
|
774
|
+
* @deprecated Use 'buildingSelector.disable()' instead.
|
|
517
775
|
*/
|
|
518
776
|
disableBuildingSelector(): this;
|
|
519
777
|
/**
|
|
520
778
|
* @description Show the BuildingSelector.
|
|
779
|
+
* @deprecated Use 'buildingSelector.enable()' instead.
|
|
521
780
|
* @param position
|
|
522
781
|
*/
|
|
523
782
|
enableBuildingSelector(position?: ControlPosition): this;
|
|
@@ -528,23 +787,28 @@ export declare class Map extends Evented {
|
|
|
528
787
|
switchTheme(theme: string): void;
|
|
529
788
|
/**
|
|
530
789
|
* @description Set the floorsControl's style.
|
|
790
|
+
* @deprecated Use 'setFloorSelectorStyle' instead.
|
|
531
791
|
* @param style
|
|
532
792
|
*/
|
|
533
793
|
setFloorsControlStyle(style: IFloorsControlStyle): this;
|
|
534
794
|
/**
|
|
535
|
-
* @description Set the
|
|
795
|
+
* @description Set the FloorSelector's style.
|
|
796
|
+
* @param style
|
|
797
|
+
*/
|
|
798
|
+
setFloorSelectorStyle(style: IFloorSelectorStyle): this;
|
|
799
|
+
/**
|
|
800
|
+
* @description Set the SelectedBuildingBorder's style. If set to null, the border will be invisible.
|
|
536
801
|
* @param style {ISelectedBuildingBorderStyle | null}
|
|
537
802
|
*/
|
|
538
803
|
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): this;
|
|
539
|
-
private
|
|
804
|
+
private _getStyleUrl;
|
|
540
805
|
private _setIndoorFilter;
|
|
541
806
|
private _setStyle;
|
|
542
807
|
private _addControl;
|
|
543
808
|
private _selectPoiById;
|
|
544
809
|
private _getBuildingIdByVenueId;
|
|
545
|
-
private
|
|
810
|
+
private _resourceRequestTransform;
|
|
546
811
|
private _checkMapZoom;
|
|
547
|
-
private _setMapStyle;
|
|
548
812
|
private _clickEventsDispatcher;
|
|
549
813
|
private _hideIndoorLayers;
|
|
550
814
|
private _showIndoorLayers;
|
|
@@ -707,88 +971,7 @@ export declare class Poi {
|
|
|
707
971
|
private _initPoiClick;
|
|
708
972
|
private _getFloorDataByFloorId;
|
|
709
973
|
}
|
|
710
|
-
export
|
|
711
|
-
private _container;
|
|
712
|
-
private _indoor;
|
|
713
|
-
private _position;
|
|
714
|
-
private _floorNames;
|
|
715
|
-
private _ordinals;
|
|
716
|
-
private _buildingId;
|
|
717
|
-
private _selectorStyle;
|
|
718
|
-
private _$innerFloors;
|
|
719
|
-
private _$activeFloor;
|
|
720
|
-
private _centerSelectorIdx;
|
|
721
|
-
private _lastNormalScrollableIdx;
|
|
722
|
-
private _$arrowBtnUp;
|
|
723
|
-
private _$arrowBtnDown;
|
|
724
|
-
private _maxScrollTop;
|
|
725
|
-
private _$selectorExpanded;
|
|
726
|
-
private _$selectorFolded;
|
|
727
|
-
private _componentDidMount;
|
|
728
|
-
private _isShown;
|
|
729
|
-
constructor(indoor: Indoor);
|
|
730
|
-
onAdd(): HTMLElement;
|
|
731
|
-
onRemove(): void;
|
|
732
|
-
getDefaultPosition(): ControlPosition;
|
|
733
|
-
switchByOrdinal(ordinal: string, callback?: VoidFunction): void;
|
|
734
|
-
setVisibility(visible: boolean): void;
|
|
735
|
-
setPosition(position: ControlPosition): void;
|
|
736
|
-
setStyle(style: Partial<IFloorsControlStyle> | null): void;
|
|
737
|
-
private _bindEvents;
|
|
738
|
-
private _clearData;
|
|
739
|
-
private _render;
|
|
740
|
-
private _hide;
|
|
741
|
-
private _show;
|
|
742
|
-
private _createSelector;
|
|
743
|
-
private _$expandedSelector;
|
|
744
|
-
private _$foldedSelector;
|
|
745
|
-
private _clearSelector;
|
|
746
|
-
private _$createScrollButton;
|
|
747
|
-
private _$createFloors;
|
|
748
|
-
private _updateSelectorStatus;
|
|
749
|
-
private _resetArrowBtnStatus;
|
|
750
|
-
private _resetActiveFloor;
|
|
751
|
-
private _scrollCenterActiveFloor;
|
|
752
|
-
private _getScrollTop;
|
|
753
|
-
private _handleScroll;
|
|
754
|
-
private _expandSelector;
|
|
755
|
-
}
|
|
756
|
-
export declare class BuildingFilterControl implements IControl {
|
|
757
|
-
private _map;
|
|
758
|
-
private _indoor;
|
|
759
|
-
private _buildingId;
|
|
760
|
-
private _features;
|
|
761
|
-
private _container;
|
|
762
|
-
private _buildingNameLayout;
|
|
763
|
-
private _buildingNameList;
|
|
764
|
-
private _enableBuildingSelector;
|
|
765
|
-
private readonly _position;
|
|
766
|
-
constructor(map: Map, position?: ControlPosition);
|
|
767
|
-
onAdd(map: MaplibreMap): HTMLElement;
|
|
768
|
-
onRemove(): void;
|
|
769
|
-
get position(): ControlPosition;
|
|
770
|
-
get enabled(): boolean;
|
|
771
|
-
setLayoutHidden(isHidden: boolean): void;
|
|
772
|
-
moveBuildingFilter(from: ControlPosition, to: ControlPosition): void;
|
|
773
|
-
private _loadData;
|
|
774
|
-
private _init;
|
|
775
|
-
private _refresh;
|
|
776
|
-
private _select;
|
|
777
|
-
private _load;
|
|
778
|
-
private _buildingFilterIconCreate;
|
|
779
|
-
private _buildingNameListCreate;
|
|
780
|
-
private _buildingNameListUpdate;
|
|
781
|
-
private _buildingNameListClean;
|
|
782
|
-
private _buildingNameListHeight;
|
|
783
|
-
private _buildingNameCreate;
|
|
784
|
-
private _toggleList;
|
|
785
|
-
private _buildingNameClickEvent;
|
|
786
|
-
private _buildingToggleListEvent;
|
|
787
|
-
private _$showLayout;
|
|
788
|
-
private _$hideLayout;
|
|
789
|
-
}
|
|
790
|
-
export type TPresetLanguage = "en" | "zh-Hans" | "zh-Hant" | "ja" | "ko";
|
|
791
|
-
export interface IMultilingualName extends Partial<Record<TPresetLanguage, string>> {
|
|
974
|
+
export interface IMultilingualName extends Partial<Record<PresetLanguage, string>> {
|
|
792
975
|
default: string;
|
|
793
976
|
}
|
|
794
977
|
export type IMultilingualAddress = Record<keyof IMultilingualName, {
|
|
@@ -973,7 +1156,7 @@ export declare class BuildingsService {
|
|
|
973
1156
|
private _changedRes;
|
|
974
1157
|
}
|
|
975
1158
|
export interface IPoi {
|
|
976
|
-
accessibilityDetail:
|
|
1159
|
+
accessibilityDetail: IMultilingualName;
|
|
977
1160
|
buildingId: string;
|
|
978
1161
|
category: string[];
|
|
979
1162
|
distance: number;
|
|
@@ -985,7 +1168,9 @@ export interface IPoi {
|
|
|
985
1168
|
osmRefId: number;
|
|
986
1169
|
poiId: string;
|
|
987
1170
|
venueId: string;
|
|
1171
|
+
/** @deprecated 'description' will be removed soon */
|
|
988
1172
|
description?: string;
|
|
1173
|
+
descriptions?: IMultilingualName;
|
|
989
1174
|
email?: string;
|
|
990
1175
|
openingHours?: string;
|
|
991
1176
|
phone?: string;
|
|
@@ -1164,6 +1349,7 @@ export interface IPoiSearchByBoundsOptions extends ISearchKeywords {
|
|
|
1164
1349
|
}
|
|
1165
1350
|
export declare class PoisService {
|
|
1166
1351
|
private _api;
|
|
1352
|
+
private _apiV4;
|
|
1167
1353
|
private _categoriesV2;
|
|
1168
1354
|
private _request;
|
|
1169
1355
|
constructor();
|
|
@@ -1332,7 +1518,7 @@ export interface IRouteSearchOptions {
|
|
|
1332
1518
|
/**
|
|
1333
1519
|
* @description Language-specific response. Default is "en".
|
|
1334
1520
|
*/
|
|
1335
|
-
locale?:
|
|
1521
|
+
locale?: PresetLanguage;
|
|
1336
1522
|
/**
|
|
1337
1523
|
* @description Whether the end point of the route is at the door(otherwise in the room), default is "true".
|
|
1338
1524
|
* @deprecated
|
|
@@ -1442,7 +1628,25 @@ export declare class RoutePainter {
|
|
|
1442
1628
|
}
|
|
1443
1629
|
export declare const OFFSET: number;
|
|
1444
1630
|
export declare const PAGE: number;
|
|
1631
|
+
/**
|
|
1632
|
+
* @description Convert browser language to preset language
|
|
1633
|
+
* @param language {string} window.navigator.language
|
|
1634
|
+
*/
|
|
1635
|
+
export declare function convertBrowserLangToPresetLang(language: string): PresetLanguage | null;
|
|
1636
|
+
/**
|
|
1637
|
+
* @deprecated Use `VERSION` instead.
|
|
1638
|
+
*/
|
|
1445
1639
|
export declare const version: string;
|
|
1446
|
-
export
|
|
1640
|
+
export declare const VERSION: string;
|
|
1641
|
+
|
|
1642
|
+
export {
|
|
1643
|
+
ControlPosition,
|
|
1644
|
+
FilterSpecification,
|
|
1645
|
+
Map$1 as Map,
|
|
1646
|
+
MapGeoJSONFeature,
|
|
1647
|
+
MapLayerEventType,
|
|
1648
|
+
MaplibreMap,
|
|
1649
|
+
PointLike,
|
|
1650
|
+
};
|
|
1447
1651
|
|
|
1448
1652
|
export {};
|