@mapxus/mapxus-map-jp 7.4.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/README.md +5 -2
- package/index.d.ts +689 -305
- 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;
|
|
61
|
-
|
|
91
|
+
outdoorMapShown?: boolean;
|
|
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,29 +787,46 @@ 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;
|
|
551
815
|
private _updatePermission;
|
|
552
816
|
}
|
|
553
817
|
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
818
|
+
export interface IMarkerOptions {
|
|
819
|
+
lngLat: [
|
|
820
|
+
number,
|
|
821
|
+
number
|
|
822
|
+
];
|
|
823
|
+
properties?: {
|
|
824
|
+
[k: string]: string;
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
export interface IMarkerOptionsWithFeatureId extends IMarkerOptions {
|
|
828
|
+
featureId: number;
|
|
829
|
+
}
|
|
554
830
|
export declare class Marker {
|
|
555
831
|
private readonly _maplibreMap;
|
|
556
832
|
private readonly _layerId;
|
|
@@ -560,19 +836,11 @@ export declare class Marker {
|
|
|
560
836
|
private _iconAnchor;
|
|
561
837
|
constructor(maplibreMap: MaplibreMap);
|
|
562
838
|
/**
|
|
563
|
-
* @description Set marker
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
* @param callback Called when the image(from an external URL) has loaded
|
|
567
|
-
* or with an error argument if there is an error.
|
|
839
|
+
* @description Set custom marker image.
|
|
840
|
+
* @param icon Sprite name in map style or the URL of the image file.
|
|
841
|
+
* Image file must be in png, webp, or jpg format.
|
|
568
842
|
*/
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* @description Set marker by image url.
|
|
572
|
-
* @deprecated Use 'setIconImage' instead.
|
|
573
|
-
* @param imageUrl Network url, png format.
|
|
574
|
-
*/
|
|
575
|
-
setIconImageUrl(imageUrl: string): void;
|
|
843
|
+
setIcon(icon: string): Promise<void>;
|
|
576
844
|
/**
|
|
577
845
|
* @description Set marker image size.
|
|
578
846
|
* @param imageScale Default is 1.
|
|
@@ -592,30 +860,45 @@ export declare class Marker {
|
|
|
592
860
|
*/
|
|
593
861
|
get sourceId(): string;
|
|
594
862
|
/**
|
|
595
|
-
* @description
|
|
596
|
-
* @param array Coordinate and properties arrays of marker[s].
|
|
863
|
+
* @description Draw marker[s] on map.
|
|
864
|
+
* @param array {IMarkerOptions | IMarkerOptionsWithFeatureId[]} Coordinate and properties arrays of marker[s].
|
|
865
|
+
* If you need to use updateData(), the parameter must be IMarkerOptionsWithFeatureId[].
|
|
597
866
|
*/
|
|
598
|
-
create(array: Array<
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
867
|
+
create(array: Array<IMarkerOptions | IMarkerOptionsWithFeatureId>): void;
|
|
868
|
+
/**
|
|
869
|
+
* @description Add, delete or update features of this marker layer.
|
|
870
|
+
* This approach requires unique IDs for every feature in the source!!! Including create() parameters.
|
|
871
|
+
* @param diff {remove: number[], add: IMarkerOptionsWithFeatureId[], update: IMarkerOptionsWithFeatureId[]}
|
|
872
|
+
* remove: Array of feature IDs to remove.
|
|
873
|
+
* add: Array of new features to add.
|
|
874
|
+
* update: Array of features to update, the new properties will replace the old ones.
|
|
875
|
+
*/
|
|
876
|
+
updateData(diff: {
|
|
877
|
+
remove?: number[];
|
|
878
|
+
add?: IMarkerOptionsWithFeatureId[];
|
|
879
|
+
update?: IMarkerOptionsWithFeatureId[];
|
|
880
|
+
}): void;
|
|
607
881
|
/**
|
|
608
882
|
* @description Remove marker[s] layer and source.
|
|
609
883
|
*/
|
|
610
884
|
remove(): void;
|
|
611
885
|
/**
|
|
612
886
|
* @description Add marker event listener.
|
|
887
|
+
* @deprecated Use 'on' method instead.
|
|
613
888
|
* @param eventKey
|
|
614
889
|
* @param callback
|
|
615
890
|
*/
|
|
616
891
|
onEventListener(eventKey: keyof MapLayerEventType, callback: (marker: MapGeoJSONFeature) => void): {
|
|
617
892
|
offEventListener: VoidFunction;
|
|
618
893
|
};
|
|
894
|
+
/**
|
|
895
|
+
* @description Add marker event listener.
|
|
896
|
+
* @param eventKey
|
|
897
|
+
* @param callback
|
|
898
|
+
*/
|
|
899
|
+
on(eventKey: keyof MapLayerEventType, callback: (marker: MapGeoJSONFeature) => void): {
|
|
900
|
+
off: () => MaplibreMap;
|
|
901
|
+
};
|
|
619
902
|
/**
|
|
620
903
|
* @description Filter marker by custom properties.
|
|
621
904
|
* @param filterExpression A expression specifying conditions on source features.
|
|
@@ -688,175 +971,107 @@ export declare class Poi {
|
|
|
688
971
|
private _initPoiClick;
|
|
689
972
|
private _getFloorDataByFloorId;
|
|
690
973
|
}
|
|
691
|
-
export
|
|
692
|
-
private _container;
|
|
693
|
-
private _indoor;
|
|
694
|
-
private _position;
|
|
695
|
-
private _floorNames;
|
|
696
|
-
private _ordinals;
|
|
697
|
-
private _buildingId;
|
|
698
|
-
private _selectorStyle;
|
|
699
|
-
private _$innerFloors;
|
|
700
|
-
private _$activeFloor;
|
|
701
|
-
private _centerSelectorIdx;
|
|
702
|
-
private _lastNormalScrollableIdx;
|
|
703
|
-
private _$arrowBtnUp;
|
|
704
|
-
private _$arrowBtnDown;
|
|
705
|
-
private _maxScrollTop;
|
|
706
|
-
private _$selectorExpanded;
|
|
707
|
-
private _$selectorFolded;
|
|
708
|
-
private _componentDidMount;
|
|
709
|
-
private _isShown;
|
|
710
|
-
constructor(indoor: Indoor);
|
|
711
|
-
onAdd(): HTMLElement;
|
|
712
|
-
onRemove(): void;
|
|
713
|
-
getDefaultPosition(): ControlPosition;
|
|
714
|
-
switchByOrdinal(ordinal: string, callback?: VoidFunction): void;
|
|
715
|
-
setVisibility(visible: boolean): void;
|
|
716
|
-
setPosition(position: ControlPosition): void;
|
|
717
|
-
setStyle(style: Partial<IFloorsControlStyle> | null): void;
|
|
718
|
-
private _bindEvents;
|
|
719
|
-
private _clearData;
|
|
720
|
-
private _render;
|
|
721
|
-
private _hide;
|
|
722
|
-
private _show;
|
|
723
|
-
private _createSelector;
|
|
724
|
-
private _$expandedSelector;
|
|
725
|
-
private _$foldedSelector;
|
|
726
|
-
private _clearSelector;
|
|
727
|
-
private _$createScrollButton;
|
|
728
|
-
private _$createFloors;
|
|
729
|
-
private _updateSelectorStatus;
|
|
730
|
-
private _resetArrowBtnStatus;
|
|
731
|
-
private _resetActiveFloor;
|
|
732
|
-
private _scrollCenterActiveFloor;
|
|
733
|
-
private _getScrollTop;
|
|
734
|
-
private _handleScroll;
|
|
735
|
-
private _expandSelector;
|
|
736
|
-
}
|
|
737
|
-
export declare class BuildingFilterControl implements IControl {
|
|
738
|
-
private _map;
|
|
739
|
-
private _indoor;
|
|
740
|
-
private _buildingId;
|
|
741
|
-
private _features;
|
|
742
|
-
private _container;
|
|
743
|
-
private _buildingNameLayout;
|
|
744
|
-
private _buildingNameList;
|
|
745
|
-
private _enableBuildingSelector;
|
|
746
|
-
private readonly _position;
|
|
747
|
-
constructor(map: Map, position?: ControlPosition);
|
|
748
|
-
onAdd(map: MaplibreMap): HTMLElement;
|
|
749
|
-
onRemove(): void;
|
|
750
|
-
get position(): ControlPosition;
|
|
751
|
-
get enabled(): boolean;
|
|
752
|
-
setLayoutHidden(isHidden: boolean): void;
|
|
753
|
-
moveBuildingFilter(from: ControlPosition, to: ControlPosition): void;
|
|
754
|
-
private _loadData;
|
|
755
|
-
private _init;
|
|
756
|
-
private _refresh;
|
|
757
|
-
private _select;
|
|
758
|
-
private _load;
|
|
759
|
-
private _buildingFilterIconCreate;
|
|
760
|
-
private _buildingNameListCreate;
|
|
761
|
-
private _buildingNameListUpdate;
|
|
762
|
-
private _buildingNameListClean;
|
|
763
|
-
private _buildingNameListHeight;
|
|
764
|
-
private _buildingNameCreate;
|
|
765
|
-
private _toggleList;
|
|
766
|
-
private _buildingNameClickEvent;
|
|
767
|
-
private _buildingToggleListEvent;
|
|
768
|
-
private _$showLayout;
|
|
769
|
-
private _$hideLayout;
|
|
770
|
-
}
|
|
771
|
-
export interface IResponse<T> {
|
|
772
|
-
code: number;
|
|
773
|
-
message: string;
|
|
774
|
-
result: T;
|
|
775
|
-
}
|
|
776
|
-
export type IPresetLanguage = "en" | "zh-Hans" | "zh-Hant" | "ja" | "ko";
|
|
777
|
-
export interface IMultiLangName extends Partial<Record<IPresetLanguage, string>> {
|
|
974
|
+
export interface IMultilingualName extends Partial<Record<PresetLanguage, string>> {
|
|
778
975
|
default: string;
|
|
779
976
|
}
|
|
780
|
-
export type
|
|
977
|
+
export type IMultilingualAddress = Record<keyof IMultilingualName, {
|
|
781
978
|
housenumber: string;
|
|
782
979
|
street: string;
|
|
783
980
|
}>;
|
|
981
|
+
export interface ILocation {
|
|
982
|
+
lat: number;
|
|
983
|
+
lon: number;
|
|
984
|
+
}
|
|
784
985
|
export interface IBbox {
|
|
785
986
|
maxLat: number;
|
|
786
987
|
maxLon: number;
|
|
787
988
|
minLat: number;
|
|
788
989
|
minLon: number;
|
|
789
990
|
}
|
|
790
|
-
export interface
|
|
791
|
-
|
|
792
|
-
|
|
991
|
+
export interface IResponse<T> {
|
|
992
|
+
code: number;
|
|
993
|
+
message: string;
|
|
994
|
+
result: T;
|
|
793
995
|
}
|
|
794
|
-
export interface
|
|
795
|
-
id: string;
|
|
996
|
+
export interface IBuildingInlineFloor {
|
|
796
997
|
code: string;
|
|
998
|
+
id: string;
|
|
797
999
|
ordinal: number;
|
|
798
|
-
visualMap: boolean;
|
|
799
1000
|
signalMap: boolean;
|
|
1001
|
+
visualMap: boolean;
|
|
800
1002
|
}
|
|
801
1003
|
export interface IBuilding {
|
|
802
|
-
address:
|
|
1004
|
+
address: IMultilingualAddress;
|
|
803
1005
|
bbox: IBbox;
|
|
804
1006
|
buildingId: string;
|
|
805
1007
|
buildingOutlineId: number;
|
|
806
1008
|
city?: string;
|
|
807
1009
|
country: string;
|
|
808
|
-
|
|
1010
|
+
defaultFloor?: string;
|
|
1011
|
+
floors: IBuildingInlineFloor[];
|
|
809
1012
|
groundFloor: string;
|
|
810
1013
|
isPrivate: "yes" | "no";
|
|
811
|
-
labelCenter:
|
|
812
|
-
name:
|
|
1014
|
+
labelCenter: ILocation;
|
|
1015
|
+
name: IMultilingualName;
|
|
813
1016
|
organization: string;
|
|
814
1017
|
region: string;
|
|
815
1018
|
signalMap: boolean;
|
|
816
1019
|
type: string;
|
|
817
1020
|
venueId: string;
|
|
818
|
-
venueName:
|
|
819
|
-
|
|
1021
|
+
venueName: IMultilingualName;
|
|
1022
|
+
visualMap: boolean;
|
|
820
1023
|
}
|
|
821
|
-
export interface
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
number,
|
|
825
|
-
number
|
|
826
|
-
];
|
|
1024
|
+
export interface IResponseBuildings {
|
|
1025
|
+
buildings: IBuilding[];
|
|
1026
|
+
total: number;
|
|
827
1027
|
}
|
|
1028
|
+
export type TPromiseBuildings = AxiosPromise<IResponse<IResponseBuildings>>;
|
|
828
1029
|
export interface IVenueInlineBuilding {
|
|
829
|
-
id: string;
|
|
830
|
-
name: IMultiLangName;
|
|
831
1030
|
buildingOutlineId: number;
|
|
832
|
-
|
|
833
|
-
floors:
|
|
834
|
-
|
|
1031
|
+
defaultFloor?: string;
|
|
1032
|
+
floors: IBuildingInlineFloor[];
|
|
1033
|
+
id: string;
|
|
1034
|
+
labelCenter: ILocation;
|
|
1035
|
+
name: IMultilingualName;
|
|
1036
|
+
point: {
|
|
1037
|
+
type: string;
|
|
1038
|
+
coordinates: [
|
|
1039
|
+
number,
|
|
1040
|
+
number
|
|
1041
|
+
];
|
|
1042
|
+
};
|
|
835
1043
|
signalMap: boolean;
|
|
1044
|
+
visualMap: boolean;
|
|
836
1045
|
}
|
|
837
1046
|
export interface IVenue {
|
|
838
|
-
|
|
839
|
-
name: IMultiLangName;
|
|
840
|
-
address: IMultiLangAddress;
|
|
841
|
-
type: string;
|
|
842
|
-
venueOutlineId: number;
|
|
1047
|
+
address: IMultilingualAddress;
|
|
843
1048
|
bbox: IBbox;
|
|
844
|
-
|
|
845
|
-
|
|
1049
|
+
buildings: IVenueInlineBuilding[];
|
|
1050
|
+
businessStatus?: {
|
|
1051
|
+
status: string;
|
|
1052
|
+
};
|
|
1053
|
+
country: string;
|
|
1054
|
+
defaultBuilding?: string;
|
|
1055
|
+
id: string;
|
|
1056
|
+
labelCenter: ILocation;
|
|
1057
|
+
name: IMultilingualName;
|
|
846
1058
|
organization: string[];
|
|
847
|
-
restricted: boolean;
|
|
848
1059
|
owner: string;
|
|
849
|
-
|
|
1060
|
+
publicData?: string[];
|
|
1061
|
+
photos?: object[];
|
|
850
1062
|
region: string;
|
|
851
|
-
|
|
852
|
-
visualMap: boolean;
|
|
1063
|
+
restricted: boolean;
|
|
853
1064
|
signalMap: boolean;
|
|
854
|
-
|
|
1065
|
+
totalPhotoCount?: number;
|
|
1066
|
+
type: string;
|
|
1067
|
+
venueOutlineId: number;
|
|
1068
|
+
visualMap: boolean;
|
|
855
1069
|
}
|
|
856
1070
|
export interface IResponseVenues {
|
|
857
1071
|
venues: IVenue[];
|
|
858
1072
|
total: number;
|
|
859
1073
|
}
|
|
1074
|
+
export type TPromiseVenues = AxiosPromise<IResponse<IResponseVenues>>;
|
|
860
1075
|
export declare class VenuesService {
|
|
861
1076
|
private _api;
|
|
862
1077
|
private _request;
|
|
@@ -865,7 +1080,7 @@ export declare class VenuesService {
|
|
|
865
1080
|
* @description Search venues by ids.
|
|
866
1081
|
* @param ids The number of IDs cannot exceed 10.
|
|
867
1082
|
*/
|
|
868
|
-
searchByIds(ids: string | string[]):
|
|
1083
|
+
searchByIds(ids: string | string[]): TPromiseVenues;
|
|
869
1084
|
/**
|
|
870
1085
|
* @description Search venues by center and distance.
|
|
871
1086
|
* @param keywords
|
|
@@ -877,7 +1092,7 @@ export declare class VenuesService {
|
|
|
877
1092
|
searchByDistance(keywords: string, center: [
|
|
878
1093
|
number,
|
|
879
1094
|
number
|
|
880
|
-
], distance: number, offset?: number, page?: number):
|
|
1095
|
+
], distance: number, offset?: number, page?: number): TPromiseVenues;
|
|
881
1096
|
/**
|
|
882
1097
|
* @description Search venues in specified bbox.
|
|
883
1098
|
* @param keywords
|
|
@@ -890,20 +1105,16 @@ export declare class VenuesService {
|
|
|
890
1105
|
number,
|
|
891
1106
|
number,
|
|
892
1107
|
number
|
|
893
|
-
], offset?: number, page?: number):
|
|
1108
|
+
], offset?: number, page?: number): TPromiseVenues;
|
|
894
1109
|
/**
|
|
895
1110
|
* @description Search venues by global.
|
|
896
1111
|
* @param keywords
|
|
897
1112
|
* @param offset The maximum value is 100, default is 10.
|
|
898
1113
|
* @param page Default is 1.
|
|
899
1114
|
*/
|
|
900
|
-
searchByGlobal(keywords: string, offset?: number, page?: number):
|
|
1115
|
+
searchByGlobal(keywords: string, offset?: number, page?: number): TPromiseVenues;
|
|
901
1116
|
private _changedRes;
|
|
902
1117
|
}
|
|
903
|
-
export interface IResponseBuildings {
|
|
904
|
-
buildings: IBuilding[];
|
|
905
|
-
total: number;
|
|
906
|
-
}
|
|
907
1118
|
export declare class BuildingsService {
|
|
908
1119
|
private _api;
|
|
909
1120
|
private _request;
|
|
@@ -912,7 +1123,7 @@ export declare class BuildingsService {
|
|
|
912
1123
|
* @description Search buildings by id[s].
|
|
913
1124
|
* @param ids Single id string or id string array. The number of IDs cannot exceed 10.
|
|
914
1125
|
*/
|
|
915
|
-
searchByIds(ids: string | string[]):
|
|
1126
|
+
searchByIds(ids: string | string[]): TPromiseBuildings;
|
|
916
1127
|
/**
|
|
917
1128
|
* @description Search buildings by center and distance.
|
|
918
1129
|
* @param keywords
|
|
@@ -921,7 +1132,7 @@ export declare class BuildingsService {
|
|
|
921
1132
|
* @param offset The maximum value is 100, default is 10.
|
|
922
1133
|
* @param page Default is 1.
|
|
923
1134
|
*/
|
|
924
|
-
searchByDistance(keywords: string, center: number[], distance: number, offset?: number, page?: number):
|
|
1135
|
+
searchByDistance(keywords: string, center: number[], distance: number, offset?: number, page?: number): TPromiseBuildings;
|
|
925
1136
|
/**
|
|
926
1137
|
* @description Search buildings in specified bbox.
|
|
927
1138
|
* @param keywords
|
|
@@ -929,38 +1140,37 @@ export declare class BuildingsService {
|
|
|
929
1140
|
* @param offset The maximum value is 100, default is 10.
|
|
930
1141
|
* @param page Default is 1.
|
|
931
1142
|
*/
|
|
932
|
-
searchByBbox(keywords: string, bbox: number[], offset?: number, page?: number):
|
|
1143
|
+
searchByBbox(keywords: string, bbox: number[], offset?: number, page?: number): TPromiseBuildings;
|
|
933
1144
|
/**
|
|
934
1145
|
* @description Search buildings global.
|
|
935
1146
|
* @param keywords
|
|
936
1147
|
* @param offset The maximum value is 100, default is 10.
|
|
937
1148
|
* @param page Default is 1.
|
|
938
1149
|
*/
|
|
939
|
-
searchByGlobal(keywords: string, offset?: number, page?: number):
|
|
1150
|
+
searchByGlobal(keywords: string, offset?: number, page?: number): TPromiseBuildings;
|
|
940
1151
|
/**
|
|
941
1152
|
* @description Search building by floor id.
|
|
942
1153
|
* @param floorId
|
|
943
1154
|
*/
|
|
944
|
-
searchByFloorId(floorId: string):
|
|
1155
|
+
searchByFloorId(floorId: string): TPromiseBuildings;
|
|
945
1156
|
private _changedRes;
|
|
946
1157
|
}
|
|
947
|
-
export interface ILocation {
|
|
948
|
-
lat: number;
|
|
949
|
-
lon: number;
|
|
950
|
-
}
|
|
951
1158
|
export interface IPoi {
|
|
952
|
-
accessibilityDetail:
|
|
1159
|
+
accessibilityDetail: IMultilingualName;
|
|
953
1160
|
buildingId: string;
|
|
954
1161
|
category: string[];
|
|
1162
|
+
distance: number;
|
|
955
1163
|
floor: string;
|
|
956
1164
|
floorId: string;
|
|
957
1165
|
id: string;
|
|
958
1166
|
location: ILocation;
|
|
959
|
-
name:
|
|
1167
|
+
name: IMultilingualName;
|
|
960
1168
|
osmRefId: number;
|
|
961
1169
|
poiId: string;
|
|
962
1170
|
venueId: string;
|
|
1171
|
+
/** @deprecated 'description' will be removed soon */
|
|
963
1172
|
description?: string;
|
|
1173
|
+
descriptions?: IMultilingualName;
|
|
964
1174
|
email?: string;
|
|
965
1175
|
openingHours?: string;
|
|
966
1176
|
phone?: string;
|
|
@@ -970,6 +1180,9 @@ export interface IResponsePois {
|
|
|
970
1180
|
pois: IPoi[];
|
|
971
1181
|
total: number;
|
|
972
1182
|
}
|
|
1183
|
+
export type TPromisePois = AxiosPromise<IResponse<IResponsePois>>;
|
|
1184
|
+
export type TPromiseCategories = AxiosPromise<IResponse<IPoiCategory[]>>;
|
|
1185
|
+
export type TPromiseOrientationPois = AxiosPromise<IResponse<IOrientationPoi[]>>;
|
|
973
1186
|
export declare enum DistanceSearchType {
|
|
974
1187
|
POINT = "Point",
|
|
975
1188
|
POLYGON = "Polygon",
|
|
@@ -977,9 +1190,9 @@ export declare enum DistanceSearchType {
|
|
|
977
1190
|
}
|
|
978
1191
|
export interface IPoiCategory {
|
|
979
1192
|
category: string;
|
|
980
|
-
description: string;
|
|
1193
|
+
description: string | null;
|
|
981
1194
|
id: string;
|
|
982
|
-
title: Partial<Record<keyof
|
|
1195
|
+
title: Partial<Record<keyof IMultilingualName, string>>;
|
|
983
1196
|
}
|
|
984
1197
|
export interface IOrientationPoi {
|
|
985
1198
|
angle: number;
|
|
@@ -991,12 +1204,152 @@ export interface IOrientationPoi {
|
|
|
991
1204
|
floorId: string;
|
|
992
1205
|
id: string;
|
|
993
1206
|
location: ILocation;
|
|
994
|
-
name:
|
|
1207
|
+
name: IMultilingualName;
|
|
995
1208
|
osmRefId: number;
|
|
996
1209
|
poiId: string;
|
|
1210
|
+
description?: string;
|
|
1211
|
+
email?: string;
|
|
1212
|
+
openingHours?: string;
|
|
1213
|
+
phone?: string;
|
|
1214
|
+
website?: string;
|
|
1215
|
+
}
|
|
1216
|
+
export interface ISearchDistance {
|
|
1217
|
+
/**
|
|
1218
|
+
* The center of searching range, [lng, lat].
|
|
1219
|
+
*/
|
|
1220
|
+
center: [
|
|
1221
|
+
number,
|
|
1222
|
+
number
|
|
1223
|
+
];
|
|
1224
|
+
/**
|
|
1225
|
+
* Radius from center, unit is meter, cannot exceed 10,000.
|
|
1226
|
+
*/
|
|
1227
|
+
distance: number;
|
|
1228
|
+
/**
|
|
1229
|
+
* The maximum value is 100, default is 10.
|
|
1230
|
+
*/
|
|
1231
|
+
offset?: number;
|
|
1232
|
+
/**
|
|
1233
|
+
* Results for specified page number. Default is 1.
|
|
1234
|
+
*/
|
|
1235
|
+
page?: number;
|
|
1236
|
+
}
|
|
1237
|
+
export interface IPoiSearchByCategoryOptions extends ISearchDistance {
|
|
1238
|
+
category: string;
|
|
1239
|
+
}
|
|
1240
|
+
export interface IPoiSearchByExcludedCategoriesOptions extends ISearchDistance {
|
|
1241
|
+
excludedCategories: string | string[];
|
|
1242
|
+
}
|
|
1243
|
+
export type TPoiSearchByCategoryOptions = IPoiSearchByCategoryOptions | IPoiSearchByExcludedCategoriesOptions;
|
|
1244
|
+
export interface IPoiSearchByDistanceOptions extends ISearchDistance {
|
|
1245
|
+
/**
|
|
1246
|
+
* Keywords of POI name.
|
|
1247
|
+
*/
|
|
1248
|
+
keywords?: string;
|
|
1249
|
+
}
|
|
1250
|
+
export interface ISearchOrientation {
|
|
1251
|
+
/**
|
|
1252
|
+
* User's position, [lng, lat].
|
|
1253
|
+
*/
|
|
1254
|
+
center: [
|
|
1255
|
+
number,
|
|
1256
|
+
number
|
|
1257
|
+
];
|
|
1258
|
+
/**
|
|
1259
|
+
* The angle between the user's orientation and true north.
|
|
1260
|
+
*/
|
|
1261
|
+
angle: number;
|
|
1262
|
+
/**
|
|
1263
|
+
* The radius with 'center' as the center of the circle.
|
|
1264
|
+
*/
|
|
1265
|
+
distance: number;
|
|
1266
|
+
/**
|
|
1267
|
+
* The type of POI, default is 'Point'.
|
|
1268
|
+
*/
|
|
1269
|
+
distanceSearchType?: DistanceSearchType;
|
|
1270
|
+
}
|
|
1271
|
+
export interface IPoiSearchByOrientationAndBuildingOptions extends ISearchOrientation {
|
|
1272
|
+
buildingId: string;
|
|
1273
|
+
}
|
|
1274
|
+
export interface IPoiSearchByOrientationAndFloorOptions extends ISearchOrientation {
|
|
1275
|
+
floorId: string;
|
|
1276
|
+
}
|
|
1277
|
+
export interface IPoiSearchByOrientationAndOrdinalOptions extends ISearchOrientation {
|
|
1278
|
+
ordinal: string;
|
|
1279
|
+
}
|
|
1280
|
+
export type TPoiSearchByOrientationOptions = IPoiSearchByOrientationAndBuildingOptions | IPoiSearchByOrientationAndFloorOptions | IPoiSearchByOrientationAndOrdinalOptions;
|
|
1281
|
+
export interface IPoiSearchOrientationOptions {
|
|
1282
|
+
/**
|
|
1283
|
+
* User's current position, [lng, lat].
|
|
1284
|
+
*/
|
|
1285
|
+
center: [
|
|
1286
|
+
number,
|
|
1287
|
+
number
|
|
1288
|
+
];
|
|
1289
|
+
/**
|
|
1290
|
+
* The angle between cellphone's orientation and the north.
|
|
1291
|
+
*/
|
|
1292
|
+
angle: number;
|
|
1293
|
+
/**
|
|
1294
|
+
* Radius.
|
|
1295
|
+
*/
|
|
1296
|
+
distance: number;
|
|
1297
|
+
buildingId?: string;
|
|
1298
|
+
floorId?: string;
|
|
1299
|
+
/**
|
|
1300
|
+
* Floor order in physical space, e.g. '-1', '0'(ground floor), '1'...
|
|
1301
|
+
*/
|
|
1302
|
+
ordinal?: string;
|
|
1303
|
+
/**
|
|
1304
|
+
* Search type.
|
|
1305
|
+
*/
|
|
1306
|
+
distanceSearchType?: DistanceSearchType;
|
|
1307
|
+
}
|
|
1308
|
+
export declare enum PoisOrderBy {
|
|
1309
|
+
DEFAULT_NAME = "DefaultName"
|
|
1310
|
+
}
|
|
1311
|
+
export interface ISearchKeywords {
|
|
1312
|
+
keywords?: string;
|
|
1313
|
+
/**
|
|
1314
|
+
* Quantity per page, the maximum is 100, default is 10.
|
|
1315
|
+
*/
|
|
1316
|
+
offset?: number;
|
|
1317
|
+
/**
|
|
1318
|
+
* Results for specified page number. Default is 1.
|
|
1319
|
+
*/
|
|
1320
|
+
page?: number;
|
|
1321
|
+
}
|
|
1322
|
+
export interface IPoiSearchByBuildingOptions extends ISearchKeywords {
|
|
1323
|
+
buildingId: string;
|
|
1324
|
+
orderBy?: PoisOrderBy;
|
|
1325
|
+
}
|
|
1326
|
+
export interface IPoiSearchByVenueOptions extends ISearchKeywords {
|
|
1327
|
+
venueId: string;
|
|
1328
|
+
orderBy?: PoisOrderBy;
|
|
1329
|
+
}
|
|
1330
|
+
export interface IPoiSearchByFloorOptions extends ISearchKeywords {
|
|
1331
|
+
floorId: string;
|
|
1332
|
+
orderBy?: PoisOrderBy;
|
|
1333
|
+
}
|
|
1334
|
+
export interface IPoiSearchByBoundsOptions extends ISearchKeywords {
|
|
1335
|
+
/**
|
|
1336
|
+
* An array of LngLat coordinates in [sw, ne] order
|
|
1337
|
+
*/
|
|
1338
|
+
bounds: [
|
|
1339
|
+
[
|
|
1340
|
+
number,
|
|
1341
|
+
number
|
|
1342
|
+
],
|
|
1343
|
+
[
|
|
1344
|
+
number,
|
|
1345
|
+
number
|
|
1346
|
+
]
|
|
1347
|
+
];
|
|
1348
|
+
orderBy?: PoisOrderBy;
|
|
997
1349
|
}
|
|
998
1350
|
export declare class PoisService {
|
|
999
1351
|
private _api;
|
|
1352
|
+
private _apiV4;
|
|
1000
1353
|
private _categoriesV2;
|
|
1001
1354
|
private _request;
|
|
1002
1355
|
constructor();
|
|
@@ -1004,40 +1357,63 @@ export declare class PoisService {
|
|
|
1004
1357
|
* @description Search POIs by id[s].
|
|
1005
1358
|
* @param ids Single id string or id string array. The number of IDs cannot exceed 100.
|
|
1006
1359
|
*/
|
|
1007
|
-
searchByIds(ids: string | string[]):
|
|
1360
|
+
searchByIds(ids: string | string[]): TPromisePois;
|
|
1008
1361
|
/**
|
|
1009
1362
|
* @description Search POIs by radius distance of the center point.
|
|
1010
|
-
* @param
|
|
1011
|
-
* @param center
|
|
1012
|
-
* @param distance Radius from center, unit is meter, cannot exceed 10,000.
|
|
1013
|
-
* @param offset The maximum value is 100, default is 10.
|
|
1014
|
-
* @param page Default is 1.
|
|
1363
|
+
* @param options {IPoiSearchByDistanceOptions}
|
|
1015
1364
|
*/
|
|
1016
|
-
searchByDistance(
|
|
1365
|
+
searchByDistance(options: IPoiSearchByDistanceOptions): TPromisePois;
|
|
1017
1366
|
/**
|
|
1018
1367
|
* @description Search POIs in a bbox.
|
|
1368
|
+
* @deprecated Use searchByBounds instead.
|
|
1019
1369
|
* @param keywords
|
|
1020
1370
|
* @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
|
|
1021
1371
|
* @param offset The maximum value is 100, default is 10.
|
|
1022
1372
|
* @param page Default is 1.
|
|
1023
1373
|
*/
|
|
1024
|
-
searchByBbox(keywords: string, bbox: number[], offset?: number, page?: number):
|
|
1374
|
+
searchByBbox(keywords: string, bbox: number[], offset?: number, page?: number): TPromisePois;
|
|
1375
|
+
/**
|
|
1376
|
+
* @description Search POIs in a rectangular area.
|
|
1377
|
+
* @param options {IPoiSearchByBoundsOptions}
|
|
1378
|
+
* 'orderBy' cannot be used with 'keywords'.
|
|
1379
|
+
*/
|
|
1380
|
+
searchByBounds(options: IPoiSearchByBoundsOptions): TPromisePois;
|
|
1025
1381
|
/**
|
|
1026
1382
|
* @description Search POIs of a building.
|
|
1383
|
+
* @deprecated Use searchByBuilding instead.
|
|
1027
1384
|
* @param keywords
|
|
1028
1385
|
* @param buildingId
|
|
1029
1386
|
* @param offset The maximum value is 100, default is 10.
|
|
1030
1387
|
* @param page Default is 1.
|
|
1031
1388
|
*/
|
|
1032
|
-
searchByBuildingId(keywords: string, buildingId: string, offset?: number, page?: number):
|
|
1389
|
+
searchByBuildingId(keywords: string, buildingId: string, offset?: number, page?: number): TPromisePois;
|
|
1390
|
+
/**
|
|
1391
|
+
* @description Search POIs of a building.
|
|
1392
|
+
* @param options {IPoiSearchByBuildingOptions}
|
|
1393
|
+
* 'orderBy' cannot be used with 'keywords'.
|
|
1394
|
+
*/
|
|
1395
|
+
searchByBuilding(options: IPoiSearchByBuildingOptions): TPromisePois;
|
|
1033
1396
|
/**
|
|
1034
1397
|
* @description Search POIs of a venue.
|
|
1398
|
+
* @deprecated Use searchByVenue instead.
|
|
1035
1399
|
* @param keywords
|
|
1036
1400
|
* @param venueId
|
|
1037
1401
|
* @param offset
|
|
1038
1402
|
* @param page
|
|
1039
1403
|
*/
|
|
1040
|
-
searchByVenueId(keywords: string, venueId: string, offset?: number, page?: number):
|
|
1404
|
+
searchByVenueId(keywords: string, venueId: string, offset?: number, page?: number): TPromisePois;
|
|
1405
|
+
/**
|
|
1406
|
+
* @description Search POIs of a venue.
|
|
1407
|
+
* @param options {IPoiSearchByVenueOptions}
|
|
1408
|
+
* 'orderBy' cannot be used with 'keywords'.
|
|
1409
|
+
*/
|
|
1410
|
+
searchByVenue(options: IPoiSearchByVenueOptions): TPromisePois;
|
|
1411
|
+
/**
|
|
1412
|
+
* @description Search POIs of a floor.
|
|
1413
|
+
* @param options {IPoiSearchByFloorOptions}
|
|
1414
|
+
* 'orderBy' cannot be used with 'keywords'.
|
|
1415
|
+
*/
|
|
1416
|
+
searchByFloor(options: IPoiSearchByFloorOptions): TPromisePois;
|
|
1041
1417
|
/**
|
|
1042
1418
|
* @description Search poi categories by venue id, building id, or floor id.
|
|
1043
1419
|
* Search scope priority: floorId > buildingId > venueId.
|
|
@@ -1047,44 +1423,31 @@ export declare class PoisService {
|
|
|
1047
1423
|
venueId?: string;
|
|
1048
1424
|
buildingId?: string;
|
|
1049
1425
|
floorId?: string;
|
|
1050
|
-
}):
|
|
1426
|
+
}): TPromiseCategories;
|
|
1051
1427
|
/**
|
|
1052
|
-
* @description Search
|
|
1428
|
+
* @description Search surrounding POIs based on the user's location and orientation.
|
|
1053
1429
|
* BuildingId, floorId and ordinal are mutually exclusive, priority: ordinal > floorId > buildingId.
|
|
1054
|
-
* @
|
|
1430
|
+
* @deprecated Use searchByOrientation instead.
|
|
1431
|
+
* @param options
|
|
1055
1432
|
*/
|
|
1056
|
-
searchOrientation(
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
angle: number;
|
|
1068
|
-
/**
|
|
1069
|
-
* Radius.
|
|
1070
|
-
*/
|
|
1071
|
-
distance: number;
|
|
1072
|
-
buildingId?: string;
|
|
1073
|
-
floorId?: string;
|
|
1074
|
-
/**
|
|
1075
|
-
* Floor order in physical space, e.g. '-1', '0'(ground floor), '1'...
|
|
1076
|
-
*/
|
|
1077
|
-
ordinal?: string;
|
|
1078
|
-
/**
|
|
1079
|
-
* Search type.
|
|
1080
|
-
*/
|
|
1081
|
-
distanceSearchType?: DistanceSearchType;
|
|
1082
|
-
}): AxiosPromise<IResponse<IOrientationPoi[]>>;
|
|
1433
|
+
searchOrientation(options: IPoiSearchOrientationOptions): TPromiseOrientationPois;
|
|
1434
|
+
/**
|
|
1435
|
+
* @description Search surrounding POIs based on the user's location and orientation.
|
|
1436
|
+
* @param options {TPoiSearchByOrientationOptions}
|
|
1437
|
+
*/
|
|
1438
|
+
searchByOrientation(options: TPoiSearchByOrientationOptions): TPromiseOrientationPois;
|
|
1439
|
+
/**
|
|
1440
|
+
* @description Search POIs by category or excluded categories.
|
|
1441
|
+
* @param options {TPoiSearchByCategoryOptions}
|
|
1442
|
+
*/
|
|
1443
|
+
searchByCategory(options: TPoiSearchByCategoryOptions): TPromisePois;
|
|
1083
1444
|
private _changedRes;
|
|
1084
1445
|
}
|
|
1085
|
-
export
|
|
1086
|
-
|
|
1087
|
-
|
|
1446
|
+
export declare enum VehicleType {
|
|
1447
|
+
FOOT = "foot",
|
|
1448
|
+
WHEELCHAIR = "wheelchair",
|
|
1449
|
+
ESCALATOR = "escalator",
|
|
1450
|
+
EMERGENCY = "emergency"
|
|
1088
1451
|
}
|
|
1089
1452
|
export interface IRouteInfo {
|
|
1090
1453
|
copyrights: string[];
|
|
@@ -1132,60 +1495,67 @@ export interface IRoutePath {
|
|
|
1132
1495
|
};
|
|
1133
1496
|
time: number;
|
|
1134
1497
|
}
|
|
1135
|
-
export
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1498
|
+
export interface IResponseRoute {
|
|
1499
|
+
infos: IRouteInfo | null;
|
|
1500
|
+
paths: IRoutePath[];
|
|
1501
|
+
}
|
|
1502
|
+
export type TPromiseRoute = AxiosPromise<IResponse<IResponseRoute>>;
|
|
1503
|
+
export interface IRouteSearchOptions {
|
|
1504
|
+
/**
|
|
1505
|
+
* @description Points are in order, from -> stops -> to.
|
|
1506
|
+
* The length of points must be: 1 < {points.length} < 6.
|
|
1507
|
+
*/
|
|
1508
|
+
points: Array<{
|
|
1509
|
+
lat: number;
|
|
1510
|
+
lon: number;
|
|
1511
|
+
buildingId?: string;
|
|
1512
|
+
floorId?: string;
|
|
1513
|
+
}>;
|
|
1514
|
+
/**
|
|
1515
|
+
* @description Default is "foot".
|
|
1516
|
+
*/
|
|
1517
|
+
vehicle?: VehicleType;
|
|
1518
|
+
/**
|
|
1519
|
+
* @description Language-specific response. Default is "en".
|
|
1520
|
+
*/
|
|
1521
|
+
locale?: PresetLanguage;
|
|
1522
|
+
/**
|
|
1523
|
+
* @description Whether the end point of the route is at the door(otherwise in the room), default is "true".
|
|
1524
|
+
* @deprecated
|
|
1525
|
+
*/
|
|
1526
|
+
toDoor?: boolean;
|
|
1139
1527
|
}
|
|
1140
1528
|
export declare class RouteService {
|
|
1141
1529
|
private _api;
|
|
1142
1530
|
private _request;
|
|
1143
1531
|
constructor();
|
|
1144
1532
|
/**
|
|
1145
|
-
* @description Search the route of
|
|
1146
|
-
* @param
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
* @param toFloorId {string | null}
|
|
1150
|
-
* @param fromBuildingId {string | null}
|
|
1151
|
-
* @param toBuildingId {string | null}
|
|
1152
|
-
* @param vehicle
|
|
1153
|
-
* @param locale Language-specific response.
|
|
1154
|
-
* @param toDoor Whether the end point of the route is in the room(otherwise at the door), default is "true".
|
|
1155
|
-
*/
|
|
1156
|
-
search(fromCoordinate: [
|
|
1157
|
-
number,
|
|
1158
|
-
number
|
|
1159
|
-
], toCoordinate: [
|
|
1160
|
-
number,
|
|
1161
|
-
number
|
|
1162
|
-
], fromFloorId: string | null, toFloorId: string | null, fromBuildingId: string | null, toBuildingId: string | null, vehicle?: WayFindingVehicleType, locale?: string, toDoor?: boolean): AxiosPromise<IResponse<IResponseRoute>>;
|
|
1533
|
+
* @description Search the route of two or more points.
|
|
1534
|
+
* @param options {IRouteSearchOptions}
|
|
1535
|
+
*/
|
|
1536
|
+
search(options: IRouteSearchOptions): TPromiseRoute;
|
|
1163
1537
|
}
|
|
1164
1538
|
export declare class RoutePainter {
|
|
1165
1539
|
private readonly _maplibreMap;
|
|
1166
|
-
private _fromCoordinate;
|
|
1167
|
-
private _toCoordinate;
|
|
1168
1540
|
private _fromMarkerIcon;
|
|
1169
1541
|
private _toMarkerIcon;
|
|
1542
|
+
private _stopMarkerIcons;
|
|
1170
1543
|
private _markerIconSize;
|
|
1171
1544
|
private _paintProperties;
|
|
1172
1545
|
constructor(maplibreMap: MaplibreMap);
|
|
1173
1546
|
/**
|
|
1174
|
-
* @description Set image of the
|
|
1175
|
-
*
|
|
1176
|
-
*
|
|
1177
|
-
*
|
|
1178
|
-
*
|
|
1179
|
-
|
|
1180
|
-
setFromMarkerIcon(icon: string, callback?: VoidFunction): void;
|
|
1181
|
-
/**
|
|
1182
|
-
* @description Set image of the end marker. This method must be called after map style loaded.
|
|
1183
|
-
* This method must be called after map style loaded if you set an external URL.
|
|
1184
|
-
* @param icon Sprite name in map style or the image url, png format.
|
|
1185
|
-
* @param callback Called when the image(from an external URL) has loaded
|
|
1186
|
-
* or with an error argument if there is an error.
|
|
1547
|
+
* @description Set image[s] of the stop marker[s].
|
|
1548
|
+
* @param icons Array of sprite names or URLs, or the object with specifying icon.
|
|
1549
|
+
* Markers use images in order of icons array.
|
|
1550
|
+
* First is as from-marker, last is as to-marker, the middles are as stop-markers.
|
|
1551
|
+
* If icons array has only one element, all stop markers use this image.
|
|
1552
|
+
* Image file must be in png, webp, or jpg format.
|
|
1187
1553
|
*/
|
|
1188
|
-
|
|
1554
|
+
setMarkerIcons(icons: string[] | {
|
|
1555
|
+
from?: string;
|
|
1556
|
+
to?: string;
|
|
1557
|
+
stops?: string[];
|
|
1558
|
+
}): Promise<void>;
|
|
1189
1559
|
/**
|
|
1190
1560
|
* @description Set image icon scale.
|
|
1191
1561
|
* @param size Default is 1.
|
|
@@ -1222,16 +1592,12 @@ export declare class RoutePainter {
|
|
|
1222
1592
|
/**
|
|
1223
1593
|
* @description Render route on the map.
|
|
1224
1594
|
* @param path Route path from RouteService.search response.
|
|
1225
|
-
* @param
|
|
1226
|
-
* @param toCoordinate Coordinate [lng, lat] of end point.
|
|
1595
|
+
* @param markerLocations Coordinate([lng, lat]) array of markers, order from beginning to end.
|
|
1227
1596
|
*/
|
|
1228
|
-
render(path: IRoutePath,
|
|
1597
|
+
render(path: IRoutePath, markerLocations: Array<[
|
|
1229
1598
|
number,
|
|
1230
1599
|
number
|
|
1231
|
-
]
|
|
1232
|
-
number,
|
|
1233
|
-
number
|
|
1234
|
-
]): void;
|
|
1600
|
+
]>): void;
|
|
1235
1601
|
/**
|
|
1236
1602
|
* @description Remove route from the map.
|
|
1237
1603
|
*/
|
|
@@ -1254,7 +1620,7 @@ export declare class RoutePainter {
|
|
|
1254
1620
|
private _renderSolidLines;
|
|
1255
1621
|
private _renderDashedLines;
|
|
1256
1622
|
private _renderConnectors;
|
|
1257
|
-
private
|
|
1623
|
+
private _renderMarkers;
|
|
1258
1624
|
private _addCollectionSource;
|
|
1259
1625
|
private _addLineLayer;
|
|
1260
1626
|
private _addTriangleLayer;
|
|
@@ -1262,7 +1628,25 @@ export declare class RoutePainter {
|
|
|
1262
1628
|
}
|
|
1263
1629
|
export declare const OFFSET: number;
|
|
1264
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
|
+
*/
|
|
1265
1639
|
export declare const version: string;
|
|
1266
|
-
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
|
+
};
|
|
1267
1651
|
|
|
1268
1652
|
export {};
|