@mapxus/mapxus-map-jp 7.5.0 → 7.7.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 +404 -199
- 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 {
|
|
@@ -150,61 +186,86 @@ export interface IFloor {
|
|
|
150
186
|
export declare class Indoor extends Evented {
|
|
151
187
|
private _map;
|
|
152
188
|
private _features;
|
|
189
|
+
private _allBuildings;
|
|
153
190
|
private _curBuildingId;
|
|
154
191
|
private _curBuildingFeature;
|
|
155
192
|
private _ordinal;
|
|
156
193
|
private _floorId;
|
|
157
194
|
private _floorName;
|
|
158
|
-
private
|
|
159
|
-
private
|
|
160
|
-
private
|
|
161
|
-
private
|
|
162
|
-
private _hasCustomLevelFill;
|
|
195
|
+
private _allowOutdoorSwitch;
|
|
196
|
+
private _allowBuildingSwitch;
|
|
197
|
+
private _outdoorMapShown;
|
|
198
|
+
private _originIndoorLayers;
|
|
163
199
|
private _curVenueId;
|
|
164
200
|
private _curVenueFeature;
|
|
165
|
-
private _ordinalHistory;
|
|
166
201
|
private _buildingHighlightStyle;
|
|
167
|
-
private readonly _floorSwitchMode;
|
|
168
|
-
private _maskNonSelectedAreas;
|
|
169
|
-
private _isSelectBuildingByClickMap;
|
|
170
|
-
private readonly _hiddenBuildings;
|
|
171
202
|
private _lowerLayers;
|
|
172
203
|
private _upperLayers;
|
|
173
204
|
private _commonLayers;
|
|
174
|
-
private _upperBuildingIds;
|
|
175
|
-
private _lowerBuildingIds;
|
|
176
|
-
private _upperLevelIds;
|
|
177
|
-
private _lowerLevelIds;
|
|
178
205
|
private _dispatch;
|
|
179
206
|
private readonly _fitBuildingBounds;
|
|
180
207
|
private readonly _boundsPadding;
|
|
181
|
-
private readonly
|
|
208
|
+
private readonly _startWithIndoorView;
|
|
182
209
|
private _maplibreMapLoaded;
|
|
183
210
|
private _indoorMapLoaded;
|
|
211
|
+
private readonly _isVenueMode;
|
|
212
|
+
private _isMaskMode;
|
|
213
|
+
private _upperBuildings;
|
|
214
|
+
private _lowerBuildings;
|
|
215
|
+
private readonly _hiddenBuildings;
|
|
216
|
+
private _upperLevels;
|
|
217
|
+
private _lowerLevels;
|
|
218
|
+
private _history;
|
|
219
|
+
private _dragPan;
|
|
220
|
+
private _featureIncomplete;
|
|
184
221
|
constructor(props: {
|
|
185
|
-
map:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
222
|
+
map: MaplibreMap;
|
|
223
|
+
floorSwitchMode?: FloorSwitchMode;
|
|
224
|
+
fitBuildingBounds?: boolean;
|
|
225
|
+
boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
|
|
226
|
+
maskNonSelectedAreas?: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* @deprecated Use 'startWithIndoorView' instead.
|
|
229
|
+
*/
|
|
230
|
+
isInitialIndoor?: boolean;
|
|
231
|
+
startWithIndoorView?: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* @deprecated Use 'outdoorMapShown' instead.
|
|
234
|
+
*/
|
|
235
|
+
isHiddenOutdoor?: boolean;
|
|
236
|
+
outdoorMapShown?: boolean;
|
|
237
|
+
selectedBuildingBorderStyle?: ISelectedBuildingBorderStyle;
|
|
191
238
|
});
|
|
192
239
|
/**
|
|
193
240
|
* @description Turn on indoor-outdoor switching.
|
|
241
|
+
* @deprecated Use 'setAllowOutdoorSwitch(true)' instead.
|
|
194
242
|
*/
|
|
195
243
|
enableSwitch(): this;
|
|
196
244
|
/**
|
|
197
245
|
* @description Turn off indoor-outdoor switching.
|
|
246
|
+
* @deprecated Use 'setAllowOutdoorSwitch(false)' instead.
|
|
198
247
|
*/
|
|
199
248
|
disableSwitch(): this;
|
|
249
|
+
/**
|
|
250
|
+
* @description Set whether to allow exiting building.
|
|
251
|
+
* @param allow
|
|
252
|
+
*/
|
|
253
|
+
setAllowOutdoorSwitch(allow: boolean): this;
|
|
200
254
|
/**
|
|
201
255
|
* @description Turn on building-building switching.
|
|
256
|
+
* @deprecated Use 'setAllowBuildingSwitch(true)' instead.
|
|
202
257
|
*/
|
|
203
258
|
enableSwitchBuilding(): this;
|
|
204
259
|
/**
|
|
205
260
|
* @description Turn off building-building switching.
|
|
261
|
+
* @deprecated Use 'setAllowBuildingSwitch(false)' instead.
|
|
206
262
|
*/
|
|
207
263
|
disableSwitchBuilding(): this;
|
|
264
|
+
/**
|
|
265
|
+
* @description Set whether to allow switching building.
|
|
266
|
+
* @param allow
|
|
267
|
+
*/
|
|
268
|
+
setAllowBuildingSwitch(allow: boolean): this;
|
|
208
269
|
/**
|
|
209
270
|
* @description Get the current floor's information.
|
|
210
271
|
*/
|
|
@@ -233,8 +294,12 @@ export declare class Indoor extends Evented {
|
|
|
233
294
|
/**
|
|
234
295
|
* @description Get features from bbox by id.
|
|
235
296
|
* @param id
|
|
297
|
+
* @param options
|
|
236
298
|
*/
|
|
237
|
-
getFeaturesById(id: string
|
|
299
|
+
getFeaturesById(id: string, options?: {
|
|
300
|
+
layerIds?: string[];
|
|
301
|
+
filter?: (feature: MapGeoJSONFeature) => boolean;
|
|
302
|
+
}): MapGeoJSONFeature[];
|
|
238
303
|
/**
|
|
239
304
|
* @description Get level feature at the point
|
|
240
305
|
* @param point
|
|
@@ -245,35 +310,34 @@ export declare class Indoor extends Evented {
|
|
|
245
310
|
* @description Map pan to the building center and select the building.
|
|
246
311
|
* @param buildingId
|
|
247
312
|
* @param floorId
|
|
248
|
-
* @param callback
|
|
313
|
+
* @param callback - **@deprecated** The optional parameter **'callback' will be removed soon**, you
|
|
314
|
+
* should use this method as `await panToBuilding(buildingId)` or `panToBuilding(buildingId).then()`
|
|
249
315
|
*/
|
|
250
316
|
panToBuilding(buildingId: string, floorId?: string, callback?: (feature: MapGeoJSONFeature) => void): Promise<void>;
|
|
251
317
|
/**
|
|
252
318
|
* @description Switch floor by ordinal.
|
|
253
319
|
* @param ordinal
|
|
254
320
|
*/
|
|
255
|
-
switchFloorByOrdinal(ordinal: string): void;
|
|
321
|
+
switchFloorByOrdinal(ordinal: string | null): void;
|
|
256
322
|
/**
|
|
257
323
|
* @description Hide the outdoor layer.
|
|
324
|
+
* @deprecated Use 'setOutdoorMapShown' instead.
|
|
258
325
|
* @param isHiddenOutdoor
|
|
259
326
|
*/
|
|
260
327
|
hiddenOutdoorLayer(isHiddenOutdoor: boolean): void;
|
|
328
|
+
setOutdoorMapShown(shown: boolean): void;
|
|
261
329
|
/**
|
|
262
330
|
* @description Update map layout.
|
|
263
331
|
*/
|
|
264
|
-
|
|
265
|
-
updateRendering(): void;
|
|
266
|
-
/**
|
|
267
|
-
* @description Filter indoor layers.
|
|
268
|
-
*/
|
|
269
|
-
setFloorsFilter(): void;
|
|
332
|
+
updateCustomLayers(): void;
|
|
270
333
|
/**
|
|
271
|
-
* @description Set the style of SelectedBuildingBorder.
|
|
334
|
+
* @description Set the style of SelectedBuildingBorder. If set to null, the border will be invisible.
|
|
272
335
|
* @param style {ISelectedBuildingBorderStyle | null}
|
|
273
336
|
*/
|
|
274
337
|
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): void;
|
|
275
338
|
/**
|
|
276
339
|
* @description Set whether to cover the unselected venues/buildings.
|
|
340
|
+
* @deprecated
|
|
277
341
|
* @param mask Default is false.
|
|
278
342
|
*/
|
|
279
343
|
setMaskNonSelectedAreas(mask: boolean): void;
|
|
@@ -291,59 +355,40 @@ export declare class Indoor extends Evented {
|
|
|
291
355
|
/**
|
|
292
356
|
* @description Select a building feature
|
|
293
357
|
* @param feature {MapGeoJSONFeature | null}
|
|
294
|
-
* @param floorId
|
|
358
|
+
* @param options {floorId?: string, dragPan?: boolean}
|
|
295
359
|
*/
|
|
296
|
-
selectBuilding(feature
|
|
360
|
+
selectBuilding(feature: MapGeoJSONFeature | null, options?: {
|
|
361
|
+
floorId?: string;
|
|
362
|
+
dragPan?: boolean;
|
|
363
|
+
featureIncomplete?: boolean;
|
|
364
|
+
}): Promise<void>;
|
|
365
|
+
updateRendering(): void;
|
|
297
366
|
private _getBuildingByPoint;
|
|
298
|
-
private _getConditionsExpression;
|
|
299
367
|
private _loadData;
|
|
300
368
|
private _init;
|
|
301
|
-
private _filter;
|
|
302
369
|
private _clear;
|
|
303
|
-
private
|
|
304
|
-
private _setPoiTextColor;
|
|
305
|
-
private _addTextHaloColor;
|
|
306
|
-
private _getFeatures;
|
|
370
|
+
private _getIndoorFeatures;
|
|
307
371
|
private _getBuildingFloorByOrdinal;
|
|
308
|
-
private _getBuildingFloorByFloorId;
|
|
309
|
-
private _getBuildingInitFloor;
|
|
310
372
|
private _isNotCurrentFeature;
|
|
311
|
-
private
|
|
373
|
+
private _setOutdoorVisibility;
|
|
312
374
|
private _addCustomLevelFillLayer;
|
|
313
|
-
private _setIndoorState;
|
|
314
375
|
private _setBuildingLineOpacity;
|
|
315
376
|
private _addBuildingHighlightLayer;
|
|
316
377
|
private _filterBuildingHighlight;
|
|
317
|
-
private
|
|
318
|
-
private
|
|
319
|
-
private
|
|
320
|
-
private _configMaskVenueMode;
|
|
321
|
-
private _configMaskBuildingMode;
|
|
322
|
-
private _configVenueMode;
|
|
323
|
-
private _configBuildingMode;
|
|
324
|
-
private _getVenueOriginOrdinal;
|
|
325
|
-
private _getBuildingOriginOrdinal;
|
|
326
|
-
private _isVenueMode;
|
|
327
|
-
private _setVenueOrdinalHistory;
|
|
328
|
-
private _getVenueOrdinalHistory;
|
|
329
|
-
private _setBuildingOrdinalHistory;
|
|
330
|
-
private _getBuildingOrdinalHistory;
|
|
331
|
-
private _getVenuesOfBbox;
|
|
378
|
+
private _handleBuildings;
|
|
379
|
+
private _getVenueDefaultOrdinal;
|
|
380
|
+
private _getBuildingDefaultOrdinal;
|
|
332
381
|
private _getBuildingsOfBbox;
|
|
333
382
|
private _copyOverlapLayers;
|
|
334
|
-
private
|
|
335
|
-
private
|
|
336
|
-
private
|
|
337
|
-
private
|
|
338
|
-
private
|
|
339
|
-
private
|
|
340
|
-
private
|
|
341
|
-
private
|
|
342
|
-
private
|
|
343
|
-
private _filterGroupLayers;
|
|
344
|
-
private _filterRestOriginLayers;
|
|
345
|
-
private _getNewFilter;
|
|
346
|
-
private static isFilterHasBeenReset;
|
|
383
|
+
private _layerDisplayedBuildings;
|
|
384
|
+
private _setDisplayedLevels;
|
|
385
|
+
private _filterTiles;
|
|
386
|
+
private _filterIndoorLayers;
|
|
387
|
+
private _updateIndoorState;
|
|
388
|
+
private _updateFloorState;
|
|
389
|
+
private _resetSelectedBuildingLevel;
|
|
390
|
+
private _checkAndPanToBuilding;
|
|
391
|
+
private _invisibleSelectedBuilding;
|
|
347
392
|
}
|
|
348
393
|
export interface IPoiEvent {
|
|
349
394
|
coordinate: LngLat;
|
|
@@ -362,18 +407,207 @@ export interface IMapClickEvent {
|
|
|
362
407
|
venue: MapGeoJSONFeature | null;
|
|
363
408
|
floor: IFloor;
|
|
364
409
|
}
|
|
365
|
-
export declare class
|
|
410
|
+
export declare class SwitchOutdoorHandler {
|
|
411
|
+
private _indoor;
|
|
412
|
+
private _isEnabled;
|
|
413
|
+
constructor(indoor: Indoor);
|
|
414
|
+
enable(): void;
|
|
415
|
+
disable(): void;
|
|
416
|
+
get isEnabled(): boolean;
|
|
417
|
+
}
|
|
418
|
+
export declare class SwitchBuildingHandler {
|
|
419
|
+
private _indoor;
|
|
420
|
+
private _isEnabled;
|
|
421
|
+
constructor(indoor: Indoor);
|
|
422
|
+
enable(): void;
|
|
423
|
+
disable(): void;
|
|
424
|
+
get isEnabled(): boolean;
|
|
425
|
+
}
|
|
426
|
+
export declare class BuildingFilterControl implements IControl {
|
|
427
|
+
private _map;
|
|
428
|
+
private _maplibre;
|
|
429
|
+
private _indoor;
|
|
430
|
+
private _buildingId;
|
|
431
|
+
private _features;
|
|
432
|
+
private _container;
|
|
433
|
+
private _buildingNameLayout;
|
|
434
|
+
private _buildingNameList;
|
|
435
|
+
private _listHeight;
|
|
436
|
+
private _visible;
|
|
437
|
+
private _position;
|
|
438
|
+
/**
|
|
439
|
+
* @param map
|
|
440
|
+
* @param position - **@deprecated** The optional parameter **'position' will be removed soon**.
|
|
441
|
+
* @param buildingSelectorEnabled
|
|
442
|
+
*/
|
|
443
|
+
constructor(map: Map$1, position?: ControlPosition, buildingSelectorEnabled?: boolean);
|
|
444
|
+
onAdd(map: MaplibreMap): HTMLElement;
|
|
445
|
+
onRemove(): void;
|
|
446
|
+
get position(): ControlPosition;
|
|
447
|
+
get enabled(): boolean;
|
|
448
|
+
getDefaultPosition(): ControlPosition;
|
|
449
|
+
/**
|
|
450
|
+
* @deprecated Use 'setVisibility' instead.
|
|
451
|
+
* @param isHidden
|
|
452
|
+
*/
|
|
453
|
+
setLayoutHidden(isHidden: boolean): void;
|
|
454
|
+
setVisibility(isVisible: boolean): void;
|
|
455
|
+
/**
|
|
456
|
+
* @deprecated Use 'changePosition' instead.
|
|
457
|
+
* @param from
|
|
458
|
+
* @param to
|
|
459
|
+
*/
|
|
460
|
+
moveBuildingFilter(from: ControlPosition, to: ControlPosition): void;
|
|
461
|
+
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
462
|
+
private _loadData;
|
|
463
|
+
private _init;
|
|
464
|
+
private _refresh;
|
|
465
|
+
private _select;
|
|
466
|
+
private _load;
|
|
467
|
+
private _buildingFilterIconCreate;
|
|
468
|
+
private _buildingNameListCreate;
|
|
469
|
+
private _buildingNameListUpdate;
|
|
470
|
+
private _buildingNameListClean;
|
|
471
|
+
private _setBuildingListHeight;
|
|
472
|
+
private _buildingNameCreate;
|
|
473
|
+
private _toggleList;
|
|
474
|
+
private _buildingNameClickEvent;
|
|
475
|
+
private _buildingToggleListEvent;
|
|
476
|
+
private _$showLayout;
|
|
477
|
+
private _$hideLayout;
|
|
478
|
+
private _updateBuildingListLayout;
|
|
479
|
+
}
|
|
480
|
+
export declare class BuildingSelectorHandler {
|
|
481
|
+
private _buildingSelector;
|
|
482
|
+
private _isEnabled;
|
|
483
|
+
private _position;
|
|
484
|
+
constructor(buildingSelector: BuildingFilterControl);
|
|
485
|
+
enable(): void;
|
|
486
|
+
disable(): void;
|
|
487
|
+
/**
|
|
488
|
+
* Set the position of the building selector control
|
|
489
|
+
* @param position
|
|
490
|
+
* @param index - The index of the control in the controls-container. Default at the last.
|
|
491
|
+
*/
|
|
492
|
+
setPosition(position: ControlPosition, index?: number): void;
|
|
493
|
+
get isEnabled(): boolean;
|
|
494
|
+
get position(): ControlPosition;
|
|
495
|
+
}
|
|
496
|
+
export interface IFloorSelectorOptions {
|
|
497
|
+
style?: IFloorSelectorStyle;
|
|
498
|
+
enabled?: boolean;
|
|
499
|
+
}
|
|
500
|
+
export declare class FloorsControl implements IControl {
|
|
501
|
+
private _container;
|
|
502
|
+
private _indoor;
|
|
503
|
+
private _maplibre;
|
|
504
|
+
private _position;
|
|
505
|
+
private _buildingId;
|
|
506
|
+
private _floorNames;
|
|
507
|
+
private _ordinals;
|
|
508
|
+
private _ordinal;
|
|
509
|
+
private _style;
|
|
510
|
+
private _$innerFloors;
|
|
511
|
+
private _$activeFloor;
|
|
512
|
+
private _centerSelectorIdx;
|
|
513
|
+
private _lastNormalScrollableIdx;
|
|
514
|
+
private _$arrowBtnUp;
|
|
515
|
+
private _$arrowBtnDown;
|
|
516
|
+
private _maxScrollTop;
|
|
517
|
+
private _$selectorExpanded;
|
|
518
|
+
private _$selectorFolded;
|
|
519
|
+
private _componentDidMount;
|
|
520
|
+
private _isEnabled;
|
|
521
|
+
private _visible;
|
|
522
|
+
private _dragPan;
|
|
523
|
+
/**
|
|
524
|
+
* @param indoor
|
|
525
|
+
* @param options
|
|
526
|
+
*/
|
|
527
|
+
constructor(indoor: Indoor, options: IFloorSelectorOptions);
|
|
528
|
+
onAdd(map: MaplibreMap): HTMLElement;
|
|
529
|
+
onRemove(): void;
|
|
530
|
+
get position(): ControlPosition;
|
|
531
|
+
get enabled(): boolean;
|
|
532
|
+
setEnabled(enabled: boolean): void;
|
|
533
|
+
getDefaultPosition(): ControlPosition;
|
|
534
|
+
/**
|
|
535
|
+
* @description Switch floor by ordinal
|
|
536
|
+
* @param ordinal
|
|
537
|
+
* @param callback - **@deprecated** The optional parameter **'callback' will be removed soon**.
|
|
538
|
+
*/
|
|
539
|
+
switchByOrdinal(ordinal: string, callback?: VoidFunction): void;
|
|
540
|
+
/**
|
|
541
|
+
* @deprecated
|
|
542
|
+
* @param visible
|
|
543
|
+
*/
|
|
544
|
+
setVisibility(visible: boolean): void;
|
|
545
|
+
/**
|
|
546
|
+
* @deprecated Use 'changePosition' instead.
|
|
547
|
+
* @param position
|
|
548
|
+
*/
|
|
549
|
+
setPosition(position: ControlPosition): void;
|
|
550
|
+
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
551
|
+
setStyle(style: Partial<IFloorSelectorStyle>): void;
|
|
552
|
+
private _setVisibility;
|
|
553
|
+
private _bindEvents;
|
|
554
|
+
private _addMapMoveEventListener;
|
|
555
|
+
private _mountFloors;
|
|
556
|
+
private _updateFloorSelector;
|
|
557
|
+
private _clearState;
|
|
558
|
+
private _render;
|
|
559
|
+
private _hide;
|
|
560
|
+
private _show;
|
|
561
|
+
private _createFloors;
|
|
562
|
+
private _$expandedSelector;
|
|
563
|
+
private _$foldedSelector;
|
|
564
|
+
private _clearFloors;
|
|
565
|
+
private _$createScrollButton;
|
|
566
|
+
private _$createFloors;
|
|
567
|
+
private _updateSelectorStatus;
|
|
568
|
+
private _resetArrowBtnStatus;
|
|
569
|
+
private _resetActiveFloor;
|
|
570
|
+
private _scrollCenterActiveFloor;
|
|
571
|
+
private _getScrollTop;
|
|
572
|
+
private _handleScroll;
|
|
573
|
+
private _expandSelector;
|
|
574
|
+
}
|
|
575
|
+
export declare class FloorSelectorHandler {
|
|
576
|
+
private _floorSelector;
|
|
577
|
+
private _isEnabled;
|
|
578
|
+
private _position;
|
|
579
|
+
constructor(floorSelector: FloorsControl);
|
|
580
|
+
enable(): void;
|
|
581
|
+
disable(): void;
|
|
582
|
+
/**
|
|
583
|
+
* Set the position of the floor selector control
|
|
584
|
+
* @param position
|
|
585
|
+
* @param index - The index of the control in the controls-container. Default at the last.
|
|
586
|
+
*/
|
|
587
|
+
setPosition(position: ControlPosition, index?: number): void;
|
|
588
|
+
setStyle(style: IFloorSelectorStyle): void;
|
|
589
|
+
get isEnabled(): boolean;
|
|
590
|
+
get position(): ControlPosition;
|
|
591
|
+
}
|
|
592
|
+
declare class Map$1 extends Evented {
|
|
366
593
|
private _map;
|
|
367
594
|
private _indoor;
|
|
595
|
+
private _poi;
|
|
368
596
|
private _floorsControl;
|
|
369
597
|
private _buildingFilterControl;
|
|
370
|
-
private _enableFloorControl;
|
|
371
|
-
private _enableBuildingSelector;
|
|
372
|
-
private _poi;
|
|
373
|
-
private _initialHiddenLayers;
|
|
374
598
|
private _attributionControl;
|
|
599
|
+
private _initialHiddenLayers;
|
|
600
|
+
private _language;
|
|
375
601
|
private _dispatch;
|
|
376
|
-
|
|
602
|
+
private _fitBuildingBounds;
|
|
603
|
+
private _boundsPadding;
|
|
604
|
+
private _buildingService;
|
|
605
|
+
private _venueService;
|
|
606
|
+
switchOutdoor: SwitchOutdoorHandler;
|
|
607
|
+
switchBuilding: SwitchBuildingHandler;
|
|
608
|
+
buildingSelector: BuildingSelectorHandler;
|
|
609
|
+
floorSelector: FloorSelectorHandler;
|
|
610
|
+
constructor(options: IMapOption);
|
|
377
611
|
/**
|
|
378
612
|
* @description This function will be called once the indoor source loaded.
|
|
379
613
|
* @param callback
|
|
@@ -386,48 +620,69 @@ export declare class Map extends Evented {
|
|
|
386
620
|
/**
|
|
387
621
|
* @description Get maplibre map instance.
|
|
388
622
|
*/
|
|
623
|
+
getMaplibre(): MaplibreMap;
|
|
624
|
+
/**
|
|
625
|
+
* @description Get maplibre map instance.
|
|
626
|
+
* @deprecated Use 'getMaplibre' instead.
|
|
627
|
+
*/
|
|
389
628
|
getMap(): MaplibreMap;
|
|
629
|
+
/**
|
|
630
|
+
* @description Get current selected floor info.
|
|
631
|
+
* @return {IFloor | null}
|
|
632
|
+
*/
|
|
633
|
+
get floor(): IFloor | null;
|
|
634
|
+
/**
|
|
635
|
+
* @description Get current selected building info.
|
|
636
|
+
* @return {MapGeoJSONFeature | null}
|
|
637
|
+
*/
|
|
638
|
+
get building(): MapGeoJSONFeature | null;
|
|
639
|
+
/**
|
|
640
|
+
* @description Get current selected venue info.
|
|
641
|
+
* @return {MapGeoJSONFeature | null}
|
|
642
|
+
*/
|
|
643
|
+
get venue(): MapGeoJSONFeature | null;
|
|
390
644
|
/**
|
|
391
645
|
* @description Translate POI name to the specified language.
|
|
646
|
+
* @deprecated Use 'setLanguage' instead.
|
|
392
647
|
* @param language Window.navigator.language.
|
|
393
648
|
*/
|
|
394
649
|
transformPoiTextFieldLanguage(language: string): void;
|
|
650
|
+
/**
|
|
651
|
+
* @description Set map language.
|
|
652
|
+
* @param language {PresetLanguage} convertBrowserLangToPresetLang(Window.navigator.language).
|
|
653
|
+
*/
|
|
654
|
+
setLanguage(language: PresetLanguage): void;
|
|
395
655
|
/**
|
|
396
656
|
* @description Turn on indoor-outdoor switching.
|
|
657
|
+
* @deprecated Use 'switchOutdoor.enable()' instead.
|
|
397
658
|
*/
|
|
398
659
|
enableSwitch(): this;
|
|
399
660
|
/**
|
|
400
661
|
* @description Turn off indoor-outdoor switching.
|
|
662
|
+
* @deprecated Use 'switchOutdoor.disable()' instead.
|
|
401
663
|
*/
|
|
402
664
|
disableSwitch(): this;
|
|
403
665
|
/**
|
|
404
666
|
* @description Turn on building-building switching.
|
|
667
|
+
* @deprecated Use 'switchBuilding.enable()' instead.
|
|
405
668
|
*/
|
|
406
669
|
enableSwitchBuilding(): this;
|
|
407
670
|
/**
|
|
408
671
|
* @description Turn off building-building switching.
|
|
672
|
+
* @deprecated Use 'switchBuilding.disable()' instead.
|
|
409
673
|
*/
|
|
410
674
|
disableSwitchBuilding(): this;
|
|
411
675
|
/**
|
|
412
676
|
* @description Set outdoor layer to be shown or hidden.
|
|
677
|
+
* @deprecated Use 'setOutdoorMapShown' instead.
|
|
413
678
|
* @param isHidden True is hidden, false is shown.
|
|
414
679
|
*/
|
|
415
680
|
setOutdoorLayerHidden(isHidden: boolean): void;
|
|
416
681
|
/**
|
|
417
|
-
* @description
|
|
418
|
-
* @
|
|
419
|
-
*/
|
|
420
|
-
get floor(): IFloor | null;
|
|
421
|
-
/**
|
|
422
|
-
* @description Get current selected building info.
|
|
423
|
-
* @return {MapGeoJSONFeature | null}
|
|
682
|
+
* @description Set outdoor map to be shown or hidden.
|
|
683
|
+
* @param shown
|
|
424
684
|
*/
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* @description Get current selected venue info.
|
|
428
|
-
* @return {MapGeoJSONFeature | null}
|
|
429
|
-
*/
|
|
430
|
-
get venue(): MapGeoJSONFeature | null;
|
|
685
|
+
setOutdoorMapShown(shown: boolean): void;
|
|
431
686
|
/**
|
|
432
687
|
* @description Get feature in bbox by id.
|
|
433
688
|
* @deprecated Use 'getFeaturesById' instead.
|
|
@@ -449,28 +704,39 @@ export declare class Map extends Evented {
|
|
|
449
704
|
level: MapGeoJSONFeature;
|
|
450
705
|
};
|
|
451
706
|
/**
|
|
452
|
-
* @description
|
|
707
|
+
* @description Query rendered features from bbox by id. One id may correspond to multiple features,
|
|
708
|
+
* coz of a feature may be multi-polygon(feature collection).
|
|
453
709
|
* @param id
|
|
710
|
+
* @param options {layerIds: string[], filter: (feature: MapGeoJSONFeature) => boolean}
|
|
454
711
|
*/
|
|
455
|
-
getFeaturesById(id: string
|
|
712
|
+
getFeaturesById(id: string, options?: {
|
|
713
|
+
layerIds?: string[];
|
|
714
|
+
filter?: (feature: MapGeoJSONFeature) => boolean;
|
|
715
|
+
}): MapGeoJSONFeature[];
|
|
456
716
|
/**
|
|
457
717
|
* @description Select floor by id.
|
|
458
718
|
* @param floorId
|
|
459
|
-
* @param
|
|
719
|
+
* @param options
|
|
460
720
|
*/
|
|
461
|
-
selectFloorById(floorId: string,
|
|
721
|
+
selectFloorById(floorId: string, options?: {
|
|
722
|
+
dragPan?: boolean;
|
|
723
|
+
}): Promise<void>;
|
|
462
724
|
/**
|
|
463
725
|
* @description Select building by id.
|
|
464
726
|
* @param buildingId
|
|
465
|
-
* @param
|
|
727
|
+
* @param options
|
|
466
728
|
*/
|
|
467
|
-
selectBuildingById(buildingId: string,
|
|
729
|
+
selectBuildingById(buildingId: string, options?: {
|
|
730
|
+
dragPan?: boolean;
|
|
731
|
+
}): Promise<void>;
|
|
468
732
|
/**
|
|
469
733
|
* @description Select or exit venue by id.
|
|
470
734
|
* @param venueId 'venueId' can be string or null. Exit indoors if venueId is null.
|
|
471
|
-
* @param
|
|
735
|
+
* @param options
|
|
472
736
|
*/
|
|
473
|
-
selectVenueById(venueId: string | null,
|
|
737
|
+
selectVenueById(venueId: string | null, options?: {
|
|
738
|
+
dragPan?: boolean;
|
|
739
|
+
}): Promise<void>;
|
|
474
740
|
/**
|
|
475
741
|
* @description Listen for mouse click events on the map.
|
|
476
742
|
* @param listener
|
|
@@ -503,21 +769,14 @@ export declare class Map extends Evented {
|
|
|
503
769
|
}) => void): {
|
|
504
770
|
unsubscribe: VoidFunction;
|
|
505
771
|
};
|
|
506
|
-
/**
|
|
507
|
-
* @description Hide the FloorControl.
|
|
508
|
-
*/
|
|
509
|
-
disableFloorControl(): this;
|
|
510
|
-
/**
|
|
511
|
-
* @description Show the FloorControl.
|
|
512
|
-
* @param position
|
|
513
|
-
*/
|
|
514
|
-
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,27 +787,33 @@ 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
|
+
* @deprecated Use 'map.floorSelector.setStyle()' instead.
|
|
797
|
+
* @param style
|
|
798
|
+
*/
|
|
799
|
+
setFloorSelectorStyle(style: IFloorSelectorStyle): this;
|
|
800
|
+
/**
|
|
801
|
+
* @description Set the SelectedBuildingBorder's style. If set to null, the border will be invisible.
|
|
536
802
|
* @param style {ISelectedBuildingBorderStyle | null}
|
|
537
803
|
*/
|
|
538
804
|
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): this;
|
|
539
|
-
private
|
|
805
|
+
private _getStyleUrl;
|
|
540
806
|
private _setIndoorFilter;
|
|
541
807
|
private _setStyle;
|
|
542
808
|
private _addControl;
|
|
543
809
|
private _selectPoiById;
|
|
544
|
-
private
|
|
545
|
-
private _tilesRequestTransform;
|
|
810
|
+
private _resourceRequestTransform;
|
|
546
811
|
private _checkMapZoom;
|
|
547
|
-
private _setMapStyle;
|
|
548
812
|
private _clickEventsDispatcher;
|
|
549
813
|
private _hideIndoorLayers;
|
|
550
814
|
private _showIndoorLayers;
|
|
551
815
|
private _updatePermission;
|
|
816
|
+
private _panToBuilding;
|
|
552
817
|
}
|
|
553
818
|
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
554
819
|
export interface IMarkerOptions {
|
|
@@ -707,88 +972,7 @@ export declare class Poi {
|
|
|
707
972
|
private _initPoiClick;
|
|
708
973
|
private _getFloorDataByFloorId;
|
|
709
974
|
}
|
|
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>> {
|
|
975
|
+
export interface IMultilingualName extends Partial<Record<PresetLanguage, string>> {
|
|
792
976
|
default: string;
|
|
793
977
|
}
|
|
794
978
|
export type IMultilingualAddress = Record<keyof IMultilingualName, {
|
|
@@ -973,7 +1157,7 @@ export declare class BuildingsService {
|
|
|
973
1157
|
private _changedRes;
|
|
974
1158
|
}
|
|
975
1159
|
export interface IPoi {
|
|
976
|
-
accessibilityDetail:
|
|
1160
|
+
accessibilityDetail: IMultilingualName;
|
|
977
1161
|
buildingId: string;
|
|
978
1162
|
category: string[];
|
|
979
1163
|
distance: number;
|
|
@@ -985,7 +1169,9 @@ export interface IPoi {
|
|
|
985
1169
|
osmRefId: number;
|
|
986
1170
|
poiId: string;
|
|
987
1171
|
venueId: string;
|
|
1172
|
+
/** @deprecated 'description' will be removed soon */
|
|
988
1173
|
description?: string;
|
|
1174
|
+
descriptions?: IMultilingualName;
|
|
989
1175
|
email?: string;
|
|
990
1176
|
openingHours?: string;
|
|
991
1177
|
phone?: string;
|
|
@@ -1164,6 +1350,7 @@ export interface IPoiSearchByBoundsOptions extends ISearchKeywords {
|
|
|
1164
1350
|
}
|
|
1165
1351
|
export declare class PoisService {
|
|
1166
1352
|
private _api;
|
|
1353
|
+
private _apiV4;
|
|
1167
1354
|
private _categoriesV2;
|
|
1168
1355
|
private _request;
|
|
1169
1356
|
constructor();
|
|
@@ -1332,7 +1519,7 @@ export interface IRouteSearchOptions {
|
|
|
1332
1519
|
/**
|
|
1333
1520
|
* @description Language-specific response. Default is "en".
|
|
1334
1521
|
*/
|
|
1335
|
-
locale?:
|
|
1522
|
+
locale?: PresetLanguage;
|
|
1336
1523
|
/**
|
|
1337
1524
|
* @description Whether the end point of the route is at the door(otherwise in the room), default is "true".
|
|
1338
1525
|
* @deprecated
|
|
@@ -1442,7 +1629,25 @@ export declare class RoutePainter {
|
|
|
1442
1629
|
}
|
|
1443
1630
|
export declare const OFFSET: number;
|
|
1444
1631
|
export declare const PAGE: number;
|
|
1632
|
+
/**
|
|
1633
|
+
* @description Convert browser language to preset language
|
|
1634
|
+
* @param language {string} window.navigator.language
|
|
1635
|
+
*/
|
|
1636
|
+
export declare function convertBrowserLangToPresetLang(language: string): PresetLanguage | null;
|
|
1637
|
+
/**
|
|
1638
|
+
* @deprecated Use `VERSION` instead.
|
|
1639
|
+
*/
|
|
1445
1640
|
export declare const version: string;
|
|
1446
|
-
export
|
|
1641
|
+
export declare const VERSION: string;
|
|
1642
|
+
|
|
1643
|
+
export {
|
|
1644
|
+
ControlPosition,
|
|
1645
|
+
FilterSpecification,
|
|
1646
|
+
Map$1 as Map,
|
|
1647
|
+
MapGeoJSONFeature,
|
|
1648
|
+
MapLayerEventType,
|
|
1649
|
+
MaplibreMap,
|
|
1650
|
+
PointLike,
|
|
1651
|
+
};
|
|
1447
1652
|
|
|
1448
1653
|
export {};
|