@mapxus/mapxus-map-jp 9.2.0 → 10.0.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 +14 -12
- package/dist/index.umd.js +2 -19
- package/dist/utils.cjs +1 -13
- package/es/index.d.ts +1181 -1256
- package/es/index.mjs +2231 -4342
- package/es/languages-C5nRc9Ll.mjs +165 -0
- package/es/style.d.ts +4 -0
- package/es/utils/index.d.ts +49 -0
- package/es/utils/index.mjs +17 -33
- package/package.json +14 -11
- package/es/context-DcBNN51L.mjs +0 -8294
package/es/index.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
import { AxiosPromise } from 'axios';
|
|
4
3
|
import { GeoJsonProperties, LineString, Point } from 'geojson';
|
|
5
4
|
import maplibregl$1 from 'maplibre-gl';
|
|
6
5
|
import { ControlPosition, ExpressionSpecification, FilterSpecification, IControl, LngLat, LngLatBoundsLike, LngLatLike, MapGeoJSONFeature, MapLayerEventType, PaddingOptions, PointLike } from 'maplibre-gl';
|
|
7
6
|
import { TinyEmitter } from 'tiny-emitter';
|
|
8
7
|
|
|
8
|
+
export declare enum FloorSwitchScope {
|
|
9
|
+
VENUE = 0,
|
|
10
|
+
GLOBAL = 1
|
|
11
|
+
}
|
|
9
12
|
export declare enum PresetLanguage {
|
|
10
13
|
ENGLISH = "en",
|
|
11
14
|
CHINESE_SIMPLIFIED = "zh-Hans",
|
|
@@ -20,41 +23,6 @@ export declare enum PresetLanguage {
|
|
|
20
23
|
VIETNAMESE = "vi",
|
|
21
24
|
ARABIC = "ar"
|
|
22
25
|
}
|
|
23
|
-
export declare enum ThemeType {
|
|
24
|
-
/** @deprecated **/
|
|
25
|
-
CHRISTMAS = "christmas_mims2_v1",
|
|
26
|
-
/** @deprecated **/
|
|
27
|
-
HALLOWEEN = "halloween_mims2_v1",
|
|
28
|
-
/** @deprecated **/
|
|
29
|
-
MAPPY_BEE = "mappybee_mims2_v2",
|
|
30
|
-
/** @deprecated **/
|
|
31
|
-
MAPXUS = "mapxus_mims2_v1",
|
|
32
|
-
/** @deprecated **/
|
|
33
|
-
LANDS_D = "lands_d_mims2_v1",
|
|
34
|
-
/** @deprecated **/
|
|
35
|
-
COMMON = "common_mims2_v1",
|
|
36
|
-
/** @deprecated MAPXUS_V2 will be removed soon, please use MAPXUS_DEFAULT instead. */
|
|
37
|
-
MAPXUS_V2 = "mapxus_v2",
|
|
38
|
-
MAPXUS_DEFAULT = "mapxus_v8",
|
|
39
|
-
ROSE_TEA = "rose_tea",
|
|
40
|
-
PEAR_SORBET = "pear_sorbet",
|
|
41
|
-
CITY_WALK = "city_walk",
|
|
42
|
-
MOCHA_MOUSSE = "mocha_mousse",
|
|
43
|
-
SECTION_DISPLAY_BY_COLOR = "mapxus_v7_with_section_v2",
|
|
44
|
-
SECTION_DISPLAY_BY_CATEGORY = "mapxus_v7_with_section_v3"
|
|
45
|
-
}
|
|
46
|
-
export declare enum AccessControlOrigin {
|
|
47
|
-
Access = "access_control",
|
|
48
|
-
Map = "map"
|
|
49
|
-
}
|
|
50
|
-
export interface IBbox {
|
|
51
|
-
maxLat: number;
|
|
52
|
-
maxLon: number;
|
|
53
|
-
minLat: number;
|
|
54
|
-
minLon: number;
|
|
55
|
-
}
|
|
56
|
-
export type TPointFeature = GeoJSON.Feature<Point, GeoJsonProperties>;
|
|
57
|
-
export type TLineStringFeature = GeoJSON.Feature<LineString, GeoJsonProperties>;
|
|
58
26
|
export type TMultilingualString = Partial<Record<PresetLanguage, string>>;
|
|
59
27
|
export interface IMultilingualName extends TMultilingualString {
|
|
60
28
|
default: string;
|
|
@@ -69,28 +37,256 @@ export interface ISharedFloor {
|
|
|
69
37
|
ordinal: string;
|
|
70
38
|
name: IMultilingualName;
|
|
71
39
|
}
|
|
72
|
-
export interface
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
40
|
+
export interface ISelectedHighlightStyle {
|
|
41
|
+
lineWidth?: number;
|
|
42
|
+
lineColor?: string;
|
|
43
|
+
lineOpacity?: number;
|
|
44
|
+
lineOffset?: number;
|
|
45
|
+
}
|
|
46
|
+
export type TSelectedIndoorData = {
|
|
47
|
+
venue: MapGeoJSONFeature;
|
|
48
|
+
building: MapGeoJSONFeature;
|
|
49
|
+
floor?: IFloor;
|
|
50
|
+
} | {
|
|
51
|
+
sharedFloor: ISharedFloor;
|
|
52
|
+
venue: MapGeoJSONFeature;
|
|
53
|
+
} | null;
|
|
54
|
+
export type TFeatureMap = Map<string, MapGeoJSONFeature>;
|
|
55
|
+
export interface ILayeredOptions {
|
|
56
|
+
selectedVenueId: string | null;
|
|
57
|
+
venueMap: TFeatureMap;
|
|
58
|
+
buildingMap: TFeatureMap;
|
|
59
|
+
sharedFloorMap: TFeatureMap;
|
|
60
|
+
}
|
|
61
|
+
export interface IDisplayedLevel {
|
|
62
|
+
level: string;
|
|
63
|
+
overlap: string[] | null;
|
|
64
|
+
venueId: string;
|
|
65
|
+
}
|
|
66
|
+
export interface ILayeredData {
|
|
67
|
+
displayedLevels: IDisplayedLevel[];
|
|
68
|
+
selectedLevelIds: string[];
|
|
69
|
+
alwaysDisplayedSharedLevelIds: string[];
|
|
70
|
+
maskBuildingIds: string[];
|
|
71
|
+
maskSharedFloorIds: string[];
|
|
72
|
+
}
|
|
73
|
+
declare class FloorsLayeredHandler {
|
|
74
|
+
private _isMaskMode;
|
|
75
|
+
private _hiddenBuildings;
|
|
76
|
+
private _history;
|
|
77
|
+
constructor(maskMode: boolean);
|
|
78
|
+
getLayeredData(options: ILayeredOptions): ILayeredData;
|
|
79
|
+
getHiddenBuildings(): string[];
|
|
80
|
+
}
|
|
81
|
+
declare class DragPanHandler {
|
|
82
|
+
private _maplibre;
|
|
83
|
+
private _isAnimated;
|
|
84
|
+
private _bounds;
|
|
85
|
+
private _boundsPadding;
|
|
86
|
+
private _center;
|
|
87
|
+
private _fitBoundsTimer;
|
|
88
|
+
constructor(maplibre: maplibregl$1.Map, padding: number | PaddingOptions);
|
|
89
|
+
setAnimated(animated: boolean): void;
|
|
90
|
+
setBounds(bounds: LngLatBoundsLike | null): void;
|
|
91
|
+
getBounds(): LngLatBoundsLike | null;
|
|
92
|
+
setCenter(lnglat: LngLatLike | null): void;
|
|
93
|
+
fitBounds(): Promise<unknown>;
|
|
94
|
+
panToCenter(): void;
|
|
95
|
+
}
|
|
96
|
+
export declare class Indoor extends TinyEmitter {
|
|
97
|
+
private _map;
|
|
98
|
+
private _features;
|
|
99
|
+
private _allVenuesMap;
|
|
100
|
+
private _allBuildingsMap;
|
|
101
|
+
private _allSharedLevelsMap;
|
|
102
|
+
private _curBuildingId;
|
|
103
|
+
private _curBuildingFeature;
|
|
104
|
+
private _curSharedLevelId;
|
|
105
|
+
private _floor;
|
|
106
|
+
private _sharedFloor;
|
|
107
|
+
private _outdoorMapShown;
|
|
108
|
+
private _originIndoorLayers;
|
|
109
|
+
private _outdoorLayers;
|
|
110
|
+
private _curVenueId;
|
|
111
|
+
private _curVenueFeature;
|
|
112
|
+
private _selectedHighlightStyle;
|
|
113
|
+
private _upperLayers;
|
|
114
|
+
private _commonPoiLayers;
|
|
115
|
+
private _sectionFillLineLayers;
|
|
116
|
+
private _sectionSymbolLayers;
|
|
117
|
+
private _middleLayers;
|
|
118
|
+
private _lowerLayers;
|
|
119
|
+
private _excludedPoisInMiddle;
|
|
120
|
+
private _dispatch;
|
|
121
|
+
private readonly _startWithIndoorView;
|
|
122
|
+
private _indoorMapLoaded;
|
|
123
|
+
private _isSelectSharedFloor;
|
|
124
|
+
private readonly _isMaskMode;
|
|
125
|
+
private _upperLevels;
|
|
126
|
+
private _middleLevels;
|
|
127
|
+
private _lowerLevels;
|
|
128
|
+
private _featureIncomplete;
|
|
129
|
+
private _fitBounds;
|
|
130
|
+
private _dragPan;
|
|
131
|
+
private _history;
|
|
132
|
+
private _maskBuildings;
|
|
133
|
+
private _maskSharedFloors;
|
|
134
|
+
private _enableIndoorClickSelection;
|
|
135
|
+
private _enableOutdoorClickSelection;
|
|
136
|
+
private _zIndexHistory;
|
|
137
|
+
private _floorSwitchScope;
|
|
138
|
+
private _isDestroyed;
|
|
139
|
+
private _abortQueryFeature;
|
|
140
|
+
private _debounceRendering;
|
|
141
|
+
layeredHandler: FloorsLayeredHandler;
|
|
142
|
+
dragPanHandler: DragPanHandler;
|
|
143
|
+
constructor(props: {
|
|
144
|
+
map: maplibregl$1.Map;
|
|
145
|
+
fitBounds: boolean;
|
|
146
|
+
boundsPadding: number | PaddingOptions;
|
|
147
|
+
maskNonSelectedAreas: boolean;
|
|
148
|
+
startWithIndoorView: boolean;
|
|
149
|
+
outdoorMapShown: boolean;
|
|
150
|
+
enableIndoorClickSelection: boolean;
|
|
151
|
+
enableOutdoorClickSelection: boolean;
|
|
152
|
+
floorSwitchScope: FloorSwitchScope;
|
|
153
|
+
selectedHighlightStyle?: ISelectedHighlightStyle;
|
|
154
|
+
});
|
|
155
|
+
destroy(): void;
|
|
156
|
+
/**
|
|
157
|
+
* @deprecated
|
|
158
|
+
* Set whether to allow exiting building.
|
|
159
|
+
* @param allow
|
|
160
|
+
*/
|
|
161
|
+
setAllowOutdoorSwitch(allow: boolean): this;
|
|
162
|
+
/**
|
|
163
|
+
* @deprecated
|
|
164
|
+
* Set whether to allow switching building.
|
|
165
|
+
* @param allow
|
|
166
|
+
*/
|
|
167
|
+
setAllowBuildingSwitch(allow: boolean): this;
|
|
168
|
+
setAllowIndoorClickSelect(allow: boolean): void;
|
|
169
|
+
setAllowOutdoorClickSelect(allow: boolean): void;
|
|
170
|
+
setFloorSwitchScope(scope: FloorSwitchScope): void;
|
|
171
|
+
/**
|
|
172
|
+
* Get the current floor's information.
|
|
173
|
+
*/
|
|
174
|
+
get floor(): IFloor | ISharedFloor | null;
|
|
175
|
+
/**
|
|
176
|
+
* Get the current building's information.
|
|
177
|
+
* @returns {MapGeoJSONFeature | null}
|
|
178
|
+
*/
|
|
179
|
+
get building(): MapGeoJSONFeature | null;
|
|
180
|
+
/**
|
|
181
|
+
* Get the current venue's information.
|
|
182
|
+
* @returns {MapGeoJSONFeature | null}
|
|
183
|
+
*/
|
|
184
|
+
get venue(): MapGeoJSONFeature | null;
|
|
185
|
+
/**
|
|
186
|
+
* Get the geo features of bbox.
|
|
187
|
+
*/
|
|
188
|
+
get features(): MapGeoJSONFeature[];
|
|
189
|
+
/**
|
|
190
|
+
* Get features from bbox by id.
|
|
191
|
+
* @param id
|
|
192
|
+
* @param options
|
|
193
|
+
*/
|
|
194
|
+
getFeaturesById(id: string, options?: {
|
|
195
|
+
layerIds?: string[];
|
|
196
|
+
filter?: (feature: MapGeoJSONFeature) => boolean;
|
|
197
|
+
}): MapGeoJSONFeature[];
|
|
198
|
+
/**
|
|
199
|
+
* Switch floor by ordinal.
|
|
200
|
+
* @param ordinal
|
|
201
|
+
*/
|
|
202
|
+
switchFloorByOrdinal(ordinal: string | null): Promise<void>;
|
|
203
|
+
setOutdoorMapShown(shown: boolean): void;
|
|
204
|
+
/**
|
|
205
|
+
* Set the style of the selected floor border. If set to null, the border will be invisible.
|
|
206
|
+
* @param style {ISelectedHighlightStyle | null}
|
|
207
|
+
*/
|
|
208
|
+
setSelectedHighlightStyle(style: ISelectedHighlightStyle | null): void;
|
|
209
|
+
/**
|
|
210
|
+
* Listen for the indoor map state, including the changes of venue, building and floor.
|
|
211
|
+
* @param listener
|
|
212
|
+
*/
|
|
213
|
+
onMapChange(listener: (params: {
|
|
214
|
+
venue: MapGeoJSONFeature | null;
|
|
215
|
+
building: MapGeoJSONFeature | null;
|
|
216
|
+
floor: IFloor;
|
|
217
|
+
}) => void): {
|
|
218
|
+
unsubscribe: VoidFunction;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Select a building feature
|
|
222
|
+
* @param feature {MapGeoJSONFeature | null}
|
|
223
|
+
* @param options {floorId?: string, dragPan?: boolean}
|
|
224
|
+
*/
|
|
225
|
+
selectBuilding(feature: MapGeoJSONFeature | null, options?: {
|
|
226
|
+
floorId?: string;
|
|
227
|
+
featureIncomplete?: boolean;
|
|
228
|
+
}): Promise<void>;
|
|
229
|
+
selectSharedFloor(sharedFloor: ISharedFloor, venue: MapGeoJSONFeature, options?: {
|
|
230
|
+
featureIncomplete?: boolean;
|
|
231
|
+
}): Promise<void>;
|
|
232
|
+
updateCustomLayers(): void;
|
|
233
|
+
updateRendering(): void;
|
|
234
|
+
panToBuildingCenter(): Promise<void>;
|
|
235
|
+
panToVenueCenter(): Promise<void>;
|
|
236
|
+
private _waitForFeatureLoaded;
|
|
237
|
+
setDragPan(dragPan: boolean | "restrict"): void;
|
|
238
|
+
setFitBounds(fitBounds: boolean): void;
|
|
239
|
+
queryIndoorFeaturesByClickPoint(point: PointLike): Promise<TSelectedIndoorData>;
|
|
240
|
+
selectByClickMap(data: TSelectedIndoorData): Promise<void>;
|
|
241
|
+
private _bindMaplibreEventListeners;
|
|
242
|
+
private _clear;
|
|
243
|
+
private _getIndoorFeatures;
|
|
244
|
+
private _getBuildingFloorByOrdinal;
|
|
245
|
+
private _isCurrentFeature;
|
|
246
|
+
private _setOutdoorVisibility;
|
|
247
|
+
private _addReserveFloorLayers;
|
|
248
|
+
private _addBuildingMaskLayer;
|
|
249
|
+
private _updateUnselectedMask;
|
|
250
|
+
private _addSelectedHighlightLayers;
|
|
251
|
+
private _filterSelectedHighlight;
|
|
252
|
+
private _copyOverlapLayers;
|
|
253
|
+
private _copySharedFloorBackgroundLayers;
|
|
254
|
+
private _updateFeatures;
|
|
255
|
+
private _calExcludedPoisInMiddle;
|
|
256
|
+
private _updateSelectedFeatures;
|
|
257
|
+
private _layerFloors;
|
|
258
|
+
private _layerSelectedLevels;
|
|
259
|
+
private _layerUnselectedLevels;
|
|
260
|
+
private _filterLayers;
|
|
261
|
+
private _filterIndoorLayers;
|
|
262
|
+
private _queryVenueFeature;
|
|
263
|
+
private _getBuildingDisplayedOrdinal;
|
|
264
|
+
private _updateFloorState;
|
|
265
|
+
private _checkAndPanToBuilding;
|
|
266
|
+
private _queryVisibleFeature;
|
|
267
|
+
private _queryRenderedFeatures;
|
|
268
|
+
private _dispatchIndoorMapLoaded;
|
|
269
|
+
private _changeOtherVenuesHistory;
|
|
80
270
|
}
|
|
81
271
|
export interface ILocation {
|
|
82
272
|
lat: number;
|
|
83
273
|
lon: number;
|
|
84
274
|
}
|
|
85
|
-
export
|
|
275
|
+
export interface IResponse<T> {
|
|
86
276
|
code: number;
|
|
87
277
|
message: string;
|
|
88
278
|
result: T;
|
|
89
|
-
}
|
|
279
|
+
}
|
|
90
280
|
export type IMultilingualAddress = Record<keyof IMultilingualName, {
|
|
91
281
|
housenumber: string;
|
|
92
282
|
street: string;
|
|
93
283
|
}>;
|
|
284
|
+
export interface IBbox {
|
|
285
|
+
maxLat: number;
|
|
286
|
+
maxLon: number;
|
|
287
|
+
minLat: number;
|
|
288
|
+
minLon: number;
|
|
289
|
+
}
|
|
94
290
|
export interface IBuildingBasicInfo {
|
|
95
291
|
address: IMultilingualAddress;
|
|
96
292
|
bbox: IBbox;
|
|
@@ -102,22 +298,60 @@ export interface IBuildingBasicInfo {
|
|
|
102
298
|
region: string;
|
|
103
299
|
type: string;
|
|
104
300
|
}
|
|
105
|
-
export
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
301
|
+
export declare const omittedBuildingProps: readonly [
|
|
302
|
+
"specialHours",
|
|
303
|
+
"businessStatus",
|
|
304
|
+
"serviceHours",
|
|
305
|
+
"keywords",
|
|
306
|
+
"siteCode",
|
|
307
|
+
"refPhotoId",
|
|
308
|
+
"totalPhotoCount",
|
|
309
|
+
"photos",
|
|
310
|
+
"description"
|
|
311
|
+
];
|
|
312
|
+
export type TOmittedBuildingKeys = (typeof omittedBuildingProps)[number];
|
|
313
|
+
export type TSizes = "original" | "thumbnail" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
314
|
+
export type TPhotoSizeSpec = Partial<Record<TSizes, {
|
|
315
|
+
pixelWidth: number;
|
|
316
|
+
pixelHeight: number;
|
|
317
|
+
url: string;
|
|
318
|
+
}>>;
|
|
319
|
+
export interface IPhotoSpec {
|
|
320
|
+
aspectRatio: string;
|
|
321
|
+
coordinates: {
|
|
322
|
+
longitude: number;
|
|
323
|
+
latitude: number;
|
|
324
|
+
};
|
|
325
|
+
dateAdded: string;
|
|
326
|
+
id: string;
|
|
327
|
+
photoBy: string;
|
|
328
|
+
photoSizes: TPhotoSizeSpec;
|
|
329
|
+
source: string;
|
|
330
|
+
type: string;
|
|
331
|
+
}
|
|
332
|
+
export interface IBusinessInfo {
|
|
333
|
+
appUrl?: {
|
|
334
|
+
android?: string;
|
|
335
|
+
ios?: string;
|
|
336
|
+
};
|
|
337
|
+
email?: string;
|
|
338
|
+
openingHours?: string;
|
|
339
|
+
phone?: string;
|
|
340
|
+
publicData?: string[];
|
|
120
341
|
website?: string;
|
|
342
|
+
specialHours?: string;
|
|
343
|
+
businessStatus?: {
|
|
344
|
+
status: "OPEN" | "TEMPORARILY_CLOSED";
|
|
345
|
+
};
|
|
346
|
+
serviceHours?: string;
|
|
347
|
+
keywords?: string;
|
|
348
|
+
siteCode?: string;
|
|
349
|
+
refPhotoId?: string;
|
|
350
|
+
totalPhotoCount?: number;
|
|
351
|
+
photos?: Array<IPhotoSpec>;
|
|
352
|
+
icon?: string;
|
|
353
|
+
opening_hours?: string;
|
|
354
|
+
appURL?: string;
|
|
121
355
|
}
|
|
122
356
|
export interface IMapServices {
|
|
123
357
|
signalMap: boolean;
|
|
@@ -130,7 +364,7 @@ export interface IFloorBase {
|
|
|
130
364
|
export interface IBuildingInlineFloor extends IFloorBase, IMapServices {
|
|
131
365
|
code: string;
|
|
132
366
|
}
|
|
133
|
-
export interface
|
|
367
|
+
export interface IBuildingInternal extends IBuildingBasicInfo, IBusinessInfo, IMapServices {
|
|
134
368
|
buildingId: string;
|
|
135
369
|
buildingName: IMultilingualName;
|
|
136
370
|
buildingOutlineId: number;
|
|
@@ -142,11 +376,11 @@ export interface IBuilding extends IBuildingBasicInfo, IBusinessInfo, IMapServic
|
|
|
142
376
|
venueId: string;
|
|
143
377
|
venueName: IMultilingualName;
|
|
144
378
|
}
|
|
145
|
-
export
|
|
146
|
-
|
|
379
|
+
export type TBuilding = Omit<IBuildingInternal, TOmittedBuildingKeys>;
|
|
380
|
+
export type TBuildingResponse<T> = IResponse<{
|
|
381
|
+
buildings: T[];
|
|
147
382
|
total: number;
|
|
148
|
-
}
|
|
149
|
-
export type TPromiseBuildings = TResponseResult<IResponseBuildings>;
|
|
383
|
+
}>;
|
|
150
384
|
export declare enum DistanceSearchType {
|
|
151
385
|
POINT = "Point",
|
|
152
386
|
POLYGON = "Polygon"
|
|
@@ -190,31 +424,26 @@ export interface ISharedPoiFloor {
|
|
|
190
424
|
sharedFloorId: string;
|
|
191
425
|
sharedFloorNames: IMultilingualName;
|
|
192
426
|
}
|
|
193
|
-
export
|
|
194
|
-
export type TPhotoSizeSpec = Partial<Record<TSizes, {
|
|
195
|
-
pixelWidth: number;
|
|
196
|
-
pixelHeight: number;
|
|
197
|
-
url: string;
|
|
198
|
-
}>>;
|
|
199
|
-
export interface IPhotoSpec {
|
|
200
|
-
aspectRatio: string;
|
|
201
|
-
coordinates: {
|
|
202
|
-
longitude: number;
|
|
203
|
-
latitude: number;
|
|
204
|
-
};
|
|
205
|
-
dateAdded: string;
|
|
206
|
-
id: string;
|
|
207
|
-
photoBy: string;
|
|
208
|
-
photoSizes: TPhotoSizeSpec;
|
|
209
|
-
source: string;
|
|
210
|
-
type: string;
|
|
211
|
-
}
|
|
212
|
-
export interface IPoi extends IPoiFloor, IPoiCommonOptions, IBusinessInfo {
|
|
427
|
+
export interface IPoiInternal extends IPoiFloor, IPoiCommonOptions, IBusinessInfo {
|
|
213
428
|
buildingId: string;
|
|
214
429
|
}
|
|
215
|
-
export interface
|
|
216
|
-
}
|
|
217
|
-
export
|
|
430
|
+
export interface ISharedPoiInternal extends ISharedPoiFloor, IPoiCommonOptions, IBusinessInfo {
|
|
431
|
+
}
|
|
432
|
+
export declare const omittedPoiProps: readonly [
|
|
433
|
+
"specialHours",
|
|
434
|
+
"businessStatus",
|
|
435
|
+
"serviceHours",
|
|
436
|
+
"keywords",
|
|
437
|
+
"siteCode",
|
|
438
|
+
"refPhotoId",
|
|
439
|
+
"totalPhotoCount",
|
|
440
|
+
"photos",
|
|
441
|
+
"icon"
|
|
442
|
+
];
|
|
443
|
+
export type TOmittedKeys = (typeof omittedPoiProps)[number];
|
|
444
|
+
export type TPoi = Omit<IPoiInternal, TOmittedKeys>;
|
|
445
|
+
export type TSharedPoi = Omit<ISharedPoiInternal, TOmittedKeys>;
|
|
446
|
+
export type TPoiResponse<T> = IResponse<{
|
|
218
447
|
pois: T[];
|
|
219
448
|
total: number;
|
|
220
449
|
}>;
|
|
@@ -236,7 +465,7 @@ export interface ICategoriesGroup {
|
|
|
236
465
|
categoryGroups: ICategoryGroupItem[];
|
|
237
466
|
total: number;
|
|
238
467
|
}
|
|
239
|
-
export type
|
|
468
|
+
export type TCategoriesResponse = IResponse<ICategoriesGroup>;
|
|
240
469
|
/** pois response from searchByOrientation() */
|
|
241
470
|
export interface IOrientationPoiCommonOptions {
|
|
242
471
|
angle: number;
|
|
@@ -258,7 +487,7 @@ export interface IOrientationNormalPoi extends IPoiFloor, IOrientationPoiCommonO
|
|
|
258
487
|
export interface IOrientationSharedPoi extends ISharedPoiFloor, IOrientationPoiCommonOptions {
|
|
259
488
|
}
|
|
260
489
|
export type TOrientationPoi = IOrientationNormalPoi | IOrientationSharedPoi;
|
|
261
|
-
export type
|
|
490
|
+
export type TOrientationPoisResponse = IResponse<TOrientationPoi[]>;
|
|
262
491
|
export interface IMapClickEvent {
|
|
263
492
|
coordinate: LngLat;
|
|
264
493
|
building: MapGeoJSONFeature | null;
|
|
@@ -282,582 +511,160 @@ export interface IMapChangeEvent {
|
|
|
282
511
|
building: MapGeoJSONFeature | null;
|
|
283
512
|
floor: IFloor | ISharedFloor | null;
|
|
284
513
|
}
|
|
285
|
-
export
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
514
|
+
export declare class BuildingFilterControl implements IControl {
|
|
515
|
+
private _map;
|
|
516
|
+
private _maplibre;
|
|
517
|
+
private _buildingId;
|
|
518
|
+
private _features;
|
|
519
|
+
private _$container;
|
|
520
|
+
private _$listContainer;
|
|
521
|
+
private _$buildingList;
|
|
522
|
+
private _listHeight;
|
|
523
|
+
private _language;
|
|
524
|
+
private _visible;
|
|
525
|
+
private _position;
|
|
526
|
+
private _isMobileMode;
|
|
527
|
+
private _isListShown;
|
|
528
|
+
constructor(map: any, buildingSelectorEnabled?: boolean);
|
|
529
|
+
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
530
|
+
onRemove(): void;
|
|
531
|
+
get position(): ControlPosition;
|
|
532
|
+
get enabled(): boolean;
|
|
533
|
+
getDefaultPosition(): ControlPosition;
|
|
534
|
+
setVisibility(isVisible: boolean): void;
|
|
535
|
+
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
536
|
+
private _bindEvents;
|
|
537
|
+
private _init;
|
|
538
|
+
private _refresh;
|
|
539
|
+
private _load;
|
|
540
|
+
private _buildingFilterIconCreate;
|
|
541
|
+
private _buildingNameListCreate;
|
|
542
|
+
private _buildingNameListUpdate;
|
|
543
|
+
private _buildingNameListClean;
|
|
544
|
+
private _setBuildingListHeight;
|
|
545
|
+
private _buildingNameCreate;
|
|
546
|
+
private _toggleList;
|
|
547
|
+
private _buildingNameClickEvent;
|
|
548
|
+
private _bindMouseOnEvents;
|
|
549
|
+
private _bindMobileTouchEvents;
|
|
550
|
+
private _$showLayout;
|
|
551
|
+
private _$hideLayout;
|
|
552
|
+
private _updateBuildingListLayout;
|
|
553
|
+
private _detectDeviceMode;
|
|
290
554
|
}
|
|
291
|
-
export
|
|
292
|
-
|
|
293
|
-
|
|
555
|
+
export declare class BuildingSelectorHandler {
|
|
556
|
+
private _buildingSelector;
|
|
557
|
+
private _isEnabled;
|
|
558
|
+
private _position;
|
|
559
|
+
constructor(buildingSelector: BuildingFilterControl);
|
|
560
|
+
enable(): void;
|
|
561
|
+
disable(): void;
|
|
562
|
+
/**
|
|
563
|
+
* Set the position of the building selector control
|
|
564
|
+
* @param position
|
|
565
|
+
* @param index - The index of the control in the controls-container. Default at the last.
|
|
566
|
+
*/
|
|
567
|
+
setPosition(position: ControlPosition, index?: number): void;
|
|
568
|
+
get isEnabled(): boolean;
|
|
569
|
+
get position(): ControlPosition;
|
|
294
570
|
}
|
|
295
|
-
export interface
|
|
296
|
-
|
|
571
|
+
export interface IFloorSelectorStyle {
|
|
572
|
+
fontColor?: string;
|
|
573
|
+
activeFontColor?: string;
|
|
574
|
+
backgroundColor?: string;
|
|
575
|
+
activeBackgroundColor?: string;
|
|
576
|
+
itemSize?: number;
|
|
577
|
+
itemCount?: number;
|
|
578
|
+
defaultFolded?: boolean;
|
|
297
579
|
}
|
|
298
|
-
export interface
|
|
299
|
-
|
|
300
|
-
|
|
580
|
+
export interface IFloorSelectorOptions {
|
|
581
|
+
language: PresetLanguage;
|
|
582
|
+
style?: IFloorSelectorStyle;
|
|
583
|
+
enabled?: boolean;
|
|
301
584
|
}
|
|
302
|
-
export
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* @description Whether unselected buildings are masked, default is false.
|
|
337
|
-
*/
|
|
338
|
-
maskNonSelectedAreas?: boolean;
|
|
339
|
-
/**
|
|
340
|
-
* @deprecated use "fitBounds" instead.
|
|
341
|
-
* @description Whether the boundary of the selected building fits the screen, default is false.
|
|
342
|
-
* Can only be used for 'floorId', 'buildingId' and 'venueId' initialization, not for 'poiId'.
|
|
343
|
-
* When it is true, the 'boundsPadding' option is valid, and the 'zoom' option of maplibregl.Map is invalid.
|
|
344
|
-
*/
|
|
345
|
-
fitBuildingBounds?: boolean;
|
|
346
|
-
fitBounds?: boolean;
|
|
585
|
+
export declare class FloorsControl implements IControl {
|
|
586
|
+
private _container;
|
|
587
|
+
private _indoor;
|
|
588
|
+
private _maplibre;
|
|
589
|
+
private _position;
|
|
590
|
+
private _buildingId;
|
|
591
|
+
private _floorNames;
|
|
592
|
+
private _ordinals;
|
|
593
|
+
private _ordinal;
|
|
594
|
+
private _style;
|
|
595
|
+
private _$innerFloors;
|
|
596
|
+
private _$activeFloor;
|
|
597
|
+
private _centerSelectorIdx;
|
|
598
|
+
private _lastNormalScrollableIdx;
|
|
599
|
+
private _$arrowBtnUp;
|
|
600
|
+
private _$arrowBtnDown;
|
|
601
|
+
private _maxScrollTop;
|
|
602
|
+
private _$selectorExpanded;
|
|
603
|
+
private _$selectorFolded;
|
|
604
|
+
private _componentDidMount;
|
|
605
|
+
private _visible;
|
|
606
|
+
private _isEnabled;
|
|
607
|
+
private _dragPan;
|
|
608
|
+
private _language;
|
|
609
|
+
private _debounceScroll;
|
|
610
|
+
private _clearScrollEventListener;
|
|
611
|
+
constructor(indoor: Indoor, options: IFloorSelectorOptions);
|
|
612
|
+
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
613
|
+
onRemove(): void;
|
|
614
|
+
get position(): ControlPosition;
|
|
615
|
+
get enabled(): boolean;
|
|
616
|
+
setEnabled(enabled: boolean): void;
|
|
617
|
+
getDefaultPosition(): ControlPosition;
|
|
347
618
|
/**
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
619
|
+
* Switch floor by ordinal
|
|
620
|
+
* @param ordinal
|
|
621
|
+
* @param dragPan
|
|
351
622
|
*/
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
623
|
+
switchByOrdinal(ordinal: string, dragPan?: boolean): Promise<void>;
|
|
624
|
+
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
625
|
+
setStyle(style: Partial<IFloorSelectorStyle>): void;
|
|
626
|
+
private _setVisibility;
|
|
627
|
+
private _addIndoorEventListeners;
|
|
628
|
+
private _updatePrepared;
|
|
629
|
+
private _renderBuildingFloors;
|
|
630
|
+
private _renderSharedLevelFloor;
|
|
631
|
+
private _checkIfShowFloorSelector;
|
|
632
|
+
private _addMapMoveEventListener;
|
|
633
|
+
private _clearState;
|
|
634
|
+
private _calcSelectorLayout;
|
|
635
|
+
private _render;
|
|
636
|
+
private _hide;
|
|
637
|
+
private _show;
|
|
638
|
+
private _createFloors;
|
|
639
|
+
private _$expandedSelector;
|
|
640
|
+
private _$foldedSelector;
|
|
641
|
+
private _clearFloors;
|
|
642
|
+
private _$createScrollButton;
|
|
643
|
+
private _$createFloors;
|
|
644
|
+
private _updateSelectorStatus;
|
|
645
|
+
private _resetArrowBtnStatus;
|
|
646
|
+
private _resetActiveFloor;
|
|
647
|
+
private _scrollCenterActiveFloor;
|
|
648
|
+
private _getScrollTop;
|
|
649
|
+
private _handleScroll;
|
|
650
|
+
private _expandSelector;
|
|
360
651
|
}
|
|
361
|
-
export
|
|
362
|
-
|
|
363
|
-
|
|
652
|
+
export declare class FloorSelectorHandler {
|
|
653
|
+
private _floorSelector;
|
|
654
|
+
private _isEnabled;
|
|
655
|
+
private _position;
|
|
656
|
+
constructor(floorSelector: FloorsControl);
|
|
657
|
+
enable(): void;
|
|
658
|
+
disable(): void;
|
|
364
659
|
/**
|
|
365
|
-
*
|
|
366
|
-
* @
|
|
660
|
+
* Set the position of the floor selector control
|
|
661
|
+
* @param position
|
|
662
|
+
* @param index - The index of the control in the controls-container. Default at the last.
|
|
367
663
|
*/
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
/** timestamp */
|
|
373
|
-
expiredTime: number;
|
|
374
|
-
identifier?: string;
|
|
375
|
-
sdkVersion?: string;
|
|
376
|
-
}
|
|
377
|
-
export type TAccessTokenGetter = () => Promise<ITokenResponse>;
|
|
378
|
-
export interface IMapAccessWithToken {
|
|
379
|
-
getTokenAsync: TAccessTokenGetter;
|
|
380
|
-
}
|
|
381
|
-
export type TMapKeys = IMapAccessWithAppId | IMapAccessWithToken;
|
|
382
|
-
export type IMapOption = IMapOtherOptions & TMapKeys;
|
|
383
|
-
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
384
|
-
export interface IMarkerOptions {
|
|
385
|
-
lngLat: [
|
|
386
|
-
number,
|
|
387
|
-
number
|
|
388
|
-
];
|
|
389
|
-
properties?: {
|
|
390
|
-
[k: string]: string;
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
export interface IMarkerOptionsWithFeatureId extends IMarkerOptions {
|
|
394
|
-
featureId: number;
|
|
395
|
-
}
|
|
396
|
-
export interface ITokenInfo {
|
|
397
|
-
"app:name": string;
|
|
398
|
-
auth_time: number;
|
|
399
|
-
"cognito:username": string;
|
|
400
|
-
"custom:organization": string;
|
|
401
|
-
exp: number;
|
|
402
|
-
iat: number;
|
|
403
|
-
organization: string;
|
|
404
|
-
"organization:name": string;
|
|
405
|
-
privatization_type: string;
|
|
406
|
-
username: string;
|
|
407
|
-
}
|
|
408
|
-
export declare enum VehicleType {
|
|
409
|
-
FOOT = "foot",
|
|
410
|
-
WHEELCHAIR = "wheelchair",
|
|
411
|
-
ESCALATOR = "escalator",
|
|
412
|
-
EMERGENCY = "emergency"
|
|
413
|
-
}
|
|
414
|
-
export interface IRouteInfo {
|
|
415
|
-
copyrights: string[];
|
|
416
|
-
took: number;
|
|
417
|
-
}
|
|
418
|
-
export interface IInstruction {
|
|
419
|
-
building_id: string;
|
|
420
|
-
distance: number;
|
|
421
|
-
floor_id: string;
|
|
422
|
-
heading: number;
|
|
423
|
-
interval: [
|
|
424
|
-
number,
|
|
425
|
-
number
|
|
426
|
-
];
|
|
427
|
-
on_shared_floor: boolean;
|
|
428
|
-
ordinal: number;
|
|
429
|
-
sign: number;
|
|
430
|
-
street_name: string;
|
|
431
|
-
text: string;
|
|
432
|
-
time: number;
|
|
433
|
-
type: string | null;
|
|
434
|
-
venue_id: string;
|
|
435
|
-
}
|
|
436
|
-
export interface IRoutePath {
|
|
437
|
-
bbox: [
|
|
438
|
-
number,
|
|
439
|
-
number,
|
|
440
|
-
number,
|
|
441
|
-
number
|
|
442
|
-
];
|
|
443
|
-
distance: number;
|
|
444
|
-
instructions: IInstruction[];
|
|
445
|
-
points: {
|
|
446
|
-
coordinates: Array<[
|
|
447
|
-
number,
|
|
448
|
-
number
|
|
449
|
-
]>;
|
|
450
|
-
type: string;
|
|
451
|
-
};
|
|
452
|
-
snapped_waypoints: {
|
|
453
|
-
coordinates: Array<[
|
|
454
|
-
number,
|
|
455
|
-
number
|
|
456
|
-
]>;
|
|
457
|
-
type: string;
|
|
458
|
-
};
|
|
459
|
-
time: number;
|
|
460
|
-
}
|
|
461
|
-
export interface IResponseRoute {
|
|
462
|
-
infos: IRouteInfo | null;
|
|
463
|
-
paths: IRoutePath[];
|
|
464
|
-
}
|
|
465
|
-
export type TPromiseRoute = TResponseResult<IResponseRoute>;
|
|
466
|
-
export interface IRoutePoint {
|
|
467
|
-
lat: number;
|
|
468
|
-
lon: number;
|
|
469
|
-
floorId?: string;
|
|
470
|
-
}
|
|
471
|
-
export interface IRouteSearchOptions {
|
|
472
|
-
/**
|
|
473
|
-
* @description Points are in order, from -> stops -> to.
|
|
474
|
-
* The length of points must be: 1 < {points.length} < 6.
|
|
475
|
-
*/
|
|
476
|
-
points: IRoutePoint[];
|
|
477
|
-
/**
|
|
478
|
-
* @description Default is "foot".
|
|
479
|
-
*/
|
|
480
|
-
vehicle?: VehicleType;
|
|
481
|
-
/**
|
|
482
|
-
* @description Language-specific response. Default is "en".
|
|
483
|
-
*/
|
|
484
|
-
locale?: PresetLanguage;
|
|
485
|
-
}
|
|
486
|
-
export interface IVenueInlineSharedFloor extends IFloorBase, IMapServices {
|
|
487
|
-
name: IMultilingualName;
|
|
488
|
-
refBuilding: Array<string>;
|
|
489
|
-
}
|
|
490
|
-
export interface IVenueInlineBuilding extends IMapServices {
|
|
491
|
-
buildingName: IMultilingualName;
|
|
492
|
-
buildingOutlineId: number;
|
|
493
|
-
defaultFloor?: string;
|
|
494
|
-
floors: IBuildingInlineFloor[];
|
|
495
|
-
id: string;
|
|
496
|
-
name: IMultilingualName;
|
|
497
|
-
point: {
|
|
498
|
-
type: string;
|
|
499
|
-
coordinates: [
|
|
500
|
-
number,
|
|
501
|
-
number
|
|
502
|
-
];
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
export interface IVenue extends IBuildingBasicInfo, IBusinessInfo, IMapServices {
|
|
506
|
-
buildings: IVenueInlineBuilding[];
|
|
507
|
-
defaultBuilding?: string;
|
|
508
|
-
id: string;
|
|
509
|
-
organization: string[];
|
|
510
|
-
owner: string;
|
|
511
|
-
restricted: boolean;
|
|
512
|
-
sharedFloors: IVenueInlineSharedFloor[];
|
|
513
|
-
venueOutlineId: number;
|
|
514
|
-
}
|
|
515
|
-
export interface IResponseVenues {
|
|
516
|
-
venues: IVenue[];
|
|
517
|
-
total: number;
|
|
518
|
-
}
|
|
519
|
-
export type TPromiseVenues = TResponseResult<IResponseVenues>;
|
|
520
|
-
export interface IQuantitySpec {
|
|
521
|
-
/**
|
|
522
|
-
* The maximum value is 100, default is 10.
|
|
523
|
-
*/
|
|
524
|
-
offset?: number;
|
|
525
|
-
/**
|
|
526
|
-
* Results for specified page number. Default is 1.
|
|
527
|
-
*/
|
|
528
|
-
page?: number;
|
|
529
|
-
}
|
|
530
|
-
export interface IDistanceSpec {
|
|
531
|
-
/**
|
|
532
|
-
* The center of searching range, [lng, lat].
|
|
533
|
-
*/
|
|
534
|
-
center: [
|
|
535
|
-
number,
|
|
536
|
-
number
|
|
537
|
-
];
|
|
538
|
-
/**
|
|
539
|
-
* Radius from center, unit: meter for POIs, kilometers for buildings and venues, cannot exceed 10,000.
|
|
540
|
-
*/
|
|
541
|
-
distance: number;
|
|
542
|
-
}
|
|
543
|
-
export interface IOrientationSpec {
|
|
544
|
-
/**
|
|
545
|
-
* User's position, [lng, lat].
|
|
546
|
-
*/
|
|
547
|
-
center: [
|
|
548
|
-
number,
|
|
549
|
-
number
|
|
550
|
-
];
|
|
551
|
-
/**
|
|
552
|
-
* The angle between the user's orientation and true north.
|
|
553
|
-
*/
|
|
554
|
-
angle: number;
|
|
555
|
-
/**
|
|
556
|
-
* The radius with 'center' as the center of the circle.
|
|
557
|
-
*/
|
|
558
|
-
distance: number;
|
|
559
|
-
}
|
|
560
|
-
export interface IBoundsSpec {
|
|
561
|
-
/** An array of LngLat coordinates in [sw, ne] order */
|
|
562
|
-
bounds: [
|
|
563
|
-
[
|
|
564
|
-
number,
|
|
565
|
-
number
|
|
566
|
-
],
|
|
567
|
-
[
|
|
568
|
-
number,
|
|
569
|
-
number
|
|
570
|
-
]
|
|
571
|
-
];
|
|
572
|
-
}
|
|
573
|
-
export interface IKeywordSpec {
|
|
574
|
-
keywords?: string;
|
|
575
|
-
}
|
|
576
|
-
export interface IOrderSpec {
|
|
577
|
-
orderBy?: PoisOrderBy;
|
|
578
|
-
}
|
|
579
|
-
export interface IBuildingSpec {
|
|
580
|
-
buildingId: string;
|
|
581
|
-
}
|
|
582
|
-
export interface IVenueSpec {
|
|
583
|
-
venueId: string;
|
|
584
|
-
}
|
|
585
|
-
export interface IFloorSpec {
|
|
586
|
-
floorId: string;
|
|
587
|
-
}
|
|
588
|
-
export interface ISharedFloorSpec {
|
|
589
|
-
sharedFloorId: string;
|
|
590
|
-
}
|
|
591
|
-
export interface IOrdinalSpec {
|
|
592
|
-
ordinal: string;
|
|
593
|
-
}
|
|
594
|
-
export interface IOrientationSearchTypeSpec {
|
|
595
|
-
/** The type of POI, default is 'Point' */
|
|
596
|
-
distanceSearchType?: OrientationDistanceSearchType;
|
|
597
|
-
}
|
|
598
|
-
/** common search */
|
|
599
|
-
export interface ISearchByKeywordsOptions extends IKeywordSpec, IQuantitySpec {
|
|
600
|
-
}
|
|
601
|
-
export interface ISearchByDistanceOptions extends IDistanceSpec, ISearchByKeywordsOptions {
|
|
602
|
-
}
|
|
603
|
-
export interface ISearchByBoundsOptions extends IBoundsSpec, ISearchByKeywordsOptions {
|
|
604
|
-
}
|
|
605
|
-
/** building/venue search */
|
|
606
|
-
export interface IBuildingSearchCustomizedOptions {
|
|
607
|
-
bounds?: [
|
|
608
|
-
[
|
|
609
|
-
number,
|
|
610
|
-
number
|
|
611
|
-
],
|
|
612
|
-
[
|
|
613
|
-
number,
|
|
614
|
-
number
|
|
615
|
-
]
|
|
616
|
-
];
|
|
617
|
-
center?: [
|
|
618
|
-
number,
|
|
619
|
-
number
|
|
620
|
-
];
|
|
621
|
-
distance?: number;
|
|
622
|
-
keywords?: string;
|
|
623
|
-
signal?: boolean;
|
|
624
|
-
visual?: boolean;
|
|
625
|
-
offset?: number;
|
|
626
|
-
page?: number;
|
|
627
|
-
}
|
|
628
|
-
export interface IVenueSearchCustomizedOptions extends IBuildingSearchCustomizedOptions {
|
|
629
|
-
}
|
|
630
|
-
/** poi search */
|
|
631
|
-
export interface ISearchByCategoryOptions extends IDistanceSpec, IQuantitySpec {
|
|
632
|
-
category: string;
|
|
633
|
-
}
|
|
634
|
-
export interface ISearchByExcludedCategoriesOptions extends IDistanceSpec, IQuantitySpec {
|
|
635
|
-
excludedCategories: string | string[];
|
|
636
|
-
}
|
|
637
|
-
export type TSearchByCategoryOptions = ISearchByCategoryOptions | ISearchByExcludedCategoriesOptions;
|
|
638
|
-
export interface IPoiSearchByBoundsOptions extends ISearchByBoundsOptions, IOrderSpec {
|
|
639
|
-
}
|
|
640
|
-
export interface ISearchByBuildingOptions extends IBuildingSpec, ISearchByKeywordsOptions, IOrderSpec {
|
|
641
|
-
}
|
|
642
|
-
export interface ISearchByVenueOptions extends IVenueSpec, ISearchByKeywordsOptions, IOrderSpec {
|
|
643
|
-
}
|
|
644
|
-
/** @deprecated */
|
|
645
|
-
export type TSearchByFloorOptions = (IFloorSpec & ISearchByKeywordsOptions & IOrderSpec) | (ISharedFloorSpec & ISearchByKeywordsOptions & IOrderSpec);
|
|
646
|
-
export type TSearchByFloorsOptions = ({
|
|
647
|
-
floorIds: string[];
|
|
648
|
-
} & ISearchByKeywordsOptions & IOrderSpec) | ({
|
|
649
|
-
sharedFloorIds: string[];
|
|
650
|
-
} & ISearchByKeywordsOptions & IOrderSpec);
|
|
651
|
-
export type TSearchByOrientationOptions = (IOrdinalSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec) | (IFloorSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec) | (IBuildingSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec);
|
|
652
|
-
export type TSearchCategoriesOptions = IVenueSpec | IBuildingSpec | IFloorSpec | ISharedFloorSpec | (IBoundsSpec & IKeywordSpec);
|
|
653
|
-
export interface IPoiSearchCustomizedOptions {
|
|
654
|
-
bounds?: [
|
|
655
|
-
[
|
|
656
|
-
number,
|
|
657
|
-
number
|
|
658
|
-
],
|
|
659
|
-
[
|
|
660
|
-
number,
|
|
661
|
-
number
|
|
662
|
-
]
|
|
663
|
-
];
|
|
664
|
-
center?: [
|
|
665
|
-
number,
|
|
666
|
-
number
|
|
667
|
-
];
|
|
668
|
-
distance?: number;
|
|
669
|
-
category?: string;
|
|
670
|
-
excludedCategories?: string | string[];
|
|
671
|
-
/** @deprecated */
|
|
672
|
-
floorId?: string;
|
|
673
|
-
floorIds?: string[];
|
|
674
|
-
sharedFloorIds?: string[];
|
|
675
|
-
buildingId?: string;
|
|
676
|
-
venueId?: string;
|
|
677
|
-
keywords?: string;
|
|
678
|
-
orderBy?: PoisOrderBy;
|
|
679
|
-
sort?: PoisSortBy;
|
|
680
|
-
distanceSearchType?: DistanceSearchType;
|
|
681
|
-
offset?: number;
|
|
682
|
-
page?: number;
|
|
683
|
-
}
|
|
684
|
-
export declare class BuildingFilterControl implements IControl {
|
|
685
|
-
private _map;
|
|
686
|
-
private _maplibre;
|
|
687
|
-
private _buildingId;
|
|
688
|
-
private _features;
|
|
689
|
-
private _$container;
|
|
690
|
-
private _$listContainer;
|
|
691
|
-
private _$buildingList;
|
|
692
|
-
private _listHeight;
|
|
693
|
-
private _language;
|
|
694
|
-
private _visible;
|
|
695
|
-
private _position;
|
|
696
|
-
private _isMobileMode;
|
|
697
|
-
private _isListShown;
|
|
698
|
-
constructor(map: any, buildingSelectorEnabled?: boolean);
|
|
699
|
-
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
700
|
-
onRemove(): void;
|
|
701
|
-
get position(): ControlPosition;
|
|
702
|
-
get enabled(): boolean;
|
|
703
|
-
getDefaultPosition(): ControlPosition;
|
|
704
|
-
setVisibility(isVisible: boolean): void;
|
|
705
|
-
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
706
|
-
private _bindEvents;
|
|
707
|
-
private _init;
|
|
708
|
-
private _refresh;
|
|
709
|
-
private _load;
|
|
710
|
-
private _buildingFilterIconCreate;
|
|
711
|
-
private _buildingNameListCreate;
|
|
712
|
-
private _buildingNameListUpdate;
|
|
713
|
-
private _buildingNameListClean;
|
|
714
|
-
private _setBuildingListHeight;
|
|
715
|
-
private _buildingNameCreate;
|
|
716
|
-
private _toggleList;
|
|
717
|
-
private _buildingNameClickEvent;
|
|
718
|
-
private _bindMouseOnEvents;
|
|
719
|
-
private _bindMobileTouchEvents;
|
|
720
|
-
private _$showLayout;
|
|
721
|
-
private _$hideLayout;
|
|
722
|
-
private _updateBuildingListLayout;
|
|
723
|
-
private _detectDeviceMode;
|
|
724
|
-
}
|
|
725
|
-
export declare class BuildingSelectorHandler {
|
|
726
|
-
private _buildingSelector;
|
|
727
|
-
private _isEnabled;
|
|
728
|
-
private _position;
|
|
729
|
-
constructor(buildingSelector: BuildingFilterControl);
|
|
730
|
-
enable(): void;
|
|
731
|
-
disable(): void;
|
|
732
|
-
/**
|
|
733
|
-
* Set the position of the building selector control
|
|
734
|
-
* @param position
|
|
735
|
-
* @param index - The index of the control in the controls-container. Default at the last.
|
|
736
|
-
*/
|
|
737
|
-
setPosition(position: ControlPosition, index?: number): void;
|
|
738
|
-
get isEnabled(): boolean;
|
|
739
|
-
get position(): ControlPosition;
|
|
740
|
-
}
|
|
741
|
-
export interface IFloorSelectorOptions {
|
|
742
|
-
language: PresetLanguage;
|
|
743
|
-
style?: IFloorSelectorStyle;
|
|
744
|
-
enabled?: boolean;
|
|
745
|
-
}
|
|
746
|
-
export declare class FloorsControl implements IControl {
|
|
747
|
-
private _container;
|
|
748
|
-
private _indoor;
|
|
749
|
-
private _maplibre;
|
|
750
|
-
private _position;
|
|
751
|
-
private _buildingId;
|
|
752
|
-
private _floorNames;
|
|
753
|
-
private _ordinals;
|
|
754
|
-
private _ordinal;
|
|
755
|
-
private _style;
|
|
756
|
-
private _$innerFloors;
|
|
757
|
-
private _$activeFloor;
|
|
758
|
-
private _centerSelectorIdx;
|
|
759
|
-
private _lastNormalScrollableIdx;
|
|
760
|
-
private _$arrowBtnUp;
|
|
761
|
-
private _$arrowBtnDown;
|
|
762
|
-
private _maxScrollTop;
|
|
763
|
-
private _$selectorExpanded;
|
|
764
|
-
private _$selectorFolded;
|
|
765
|
-
private _componentDidMount;
|
|
766
|
-
private _visible;
|
|
767
|
-
private _isEnabled;
|
|
768
|
-
private _dragPan;
|
|
769
|
-
private _language;
|
|
770
|
-
private _debounceScroll;
|
|
771
|
-
private _clearScrollEventListener;
|
|
772
|
-
constructor(indoor: Indoor, options: IFloorSelectorOptions);
|
|
773
|
-
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
774
|
-
onRemove(): void;
|
|
775
|
-
get position(): ControlPosition;
|
|
776
|
-
get enabled(): boolean;
|
|
777
|
-
setEnabled(enabled: boolean): void;
|
|
778
|
-
getDefaultPosition(): ControlPosition;
|
|
779
|
-
/**
|
|
780
|
-
* @description Switch floor by ordinal
|
|
781
|
-
* @param ordinal
|
|
782
|
-
* @param dragPan
|
|
783
|
-
*/
|
|
784
|
-
switchByOrdinal(ordinal: string, dragPan?: boolean): Promise<void>;
|
|
785
|
-
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
786
|
-
setStyle(style: Partial<IFloorSelectorStyle>): void;
|
|
787
|
-
private _setVisibility;
|
|
788
|
-
private _addIndoorEventListeners;
|
|
789
|
-
private _updatePrepared;
|
|
790
|
-
private _renderBuildingFloors;
|
|
791
|
-
private _renderSharedLevelFloor;
|
|
792
|
-
private _checkIfShowFloorSelector;
|
|
793
|
-
private _addMapMoveEventListener;
|
|
794
|
-
private _clearState;
|
|
795
|
-
private _calcSelectorLayout;
|
|
796
|
-
private _render;
|
|
797
|
-
private _hide;
|
|
798
|
-
private _show;
|
|
799
|
-
private _createFloors;
|
|
800
|
-
private _$expandedSelector;
|
|
801
|
-
private _$foldedSelector;
|
|
802
|
-
private _clearFloors;
|
|
803
|
-
private _$createScrollButton;
|
|
804
|
-
private _$createFloors;
|
|
805
|
-
private _updateSelectorStatus;
|
|
806
|
-
private _resetArrowBtnStatus;
|
|
807
|
-
private _resetActiveFloor;
|
|
808
|
-
private _scrollCenterActiveFloor;
|
|
809
|
-
private _getScrollTop;
|
|
810
|
-
private _handleScroll;
|
|
811
|
-
private _expandSelector;
|
|
812
|
-
}
|
|
813
|
-
export declare class FloorSelectorHandler {
|
|
814
|
-
private _floorSelector;
|
|
815
|
-
private _isEnabled;
|
|
816
|
-
private _position;
|
|
817
|
-
constructor(floorSelector: FloorsControl);
|
|
818
|
-
enable(): void;
|
|
819
|
-
disable(): void;
|
|
820
|
-
/**
|
|
821
|
-
* Set the position of the floor selector control
|
|
822
|
-
* @param position
|
|
823
|
-
* @param index - The index of the control in the controls-container. Default at the last.
|
|
824
|
-
*/
|
|
825
|
-
setPosition(position: ControlPosition, index?: number): void;
|
|
826
|
-
setStyle(style: IFloorSelectorStyle): void;
|
|
827
|
-
get isEnabled(): boolean;
|
|
828
|
-
get position(): ControlPosition;
|
|
829
|
-
}
|
|
830
|
-
export declare class SwitchBuildingHandler {
|
|
831
|
-
private _indoor;
|
|
832
|
-
private _isEnabled;
|
|
833
|
-
constructor(indoor: Indoor);
|
|
834
|
-
enable(): void;
|
|
835
|
-
disable(): void;
|
|
836
|
-
get isEnabled(): boolean;
|
|
837
|
-
}
|
|
838
|
-
export declare class SwitchOutdoorHandler {
|
|
839
|
-
private _indoor;
|
|
840
|
-
private _isEnabled;
|
|
841
|
-
constructor(indoor: Indoor);
|
|
842
|
-
enable(): void;
|
|
843
|
-
disable(): void;
|
|
844
|
-
get isEnabled(): boolean;
|
|
845
|
-
}
|
|
846
|
-
export declare class IndoorClickSelection {
|
|
847
|
-
private _indoor;
|
|
848
|
-
private _isEnabled;
|
|
849
|
-
constructor(indoor: Indoor);
|
|
850
|
-
enable(): void;
|
|
851
|
-
disable(): void;
|
|
852
|
-
get isEnabled(): boolean;
|
|
853
|
-
}
|
|
854
|
-
export declare class OutdoorClickSelection {
|
|
855
|
-
private _indoor;
|
|
856
|
-
private _isEnabled;
|
|
857
|
-
constructor(indoor: Indoor);
|
|
858
|
-
enable(): void;
|
|
859
|
-
disable(): void;
|
|
860
|
-
get isEnabled(): boolean;
|
|
664
|
+
setPosition(position: ControlPosition, index?: number): void;
|
|
665
|
+
setStyle(style: IFloorSelectorStyle): void;
|
|
666
|
+
get isEnabled(): boolean;
|
|
667
|
+
get position(): ControlPosition;
|
|
861
668
|
}
|
|
862
669
|
export interface IPanToOptions {
|
|
863
670
|
dragPan?: boolean;
|
|
@@ -917,204 +724,119 @@ export interface IMapxusMap {
|
|
|
917
724
|
unsubscribe: VoidFunction;
|
|
918
725
|
};
|
|
919
726
|
}
|
|
920
|
-
export
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
727
|
+
export declare enum ThemeType {
|
|
728
|
+
/** @deprecated **/
|
|
729
|
+
CHRISTMAS = "christmas_mims2_v1",
|
|
730
|
+
/** @deprecated **/
|
|
731
|
+
HALLOWEEN = "halloween_mims2_v1",
|
|
732
|
+
/** @deprecated **/
|
|
733
|
+
MAPPY_BEE = "mappybee_mims2_v2",
|
|
734
|
+
/** @deprecated **/
|
|
735
|
+
MAPXUS = "mapxus_mims2_v1",
|
|
736
|
+
/** @deprecated **/
|
|
737
|
+
LANDS_D = "lands_d_mims2_v1",
|
|
738
|
+
/** @deprecated **/
|
|
739
|
+
COMMON = "common_mims2_v1",
|
|
740
|
+
/** @deprecated MAPXUS_V2 will be removed soon, please use MAPXUS_DEFAULT instead. */
|
|
741
|
+
MAPXUS_V2 = "mapxus_v2",
|
|
742
|
+
MAPXUS_DEFAULT = "mapxus_v8",
|
|
743
|
+
ROSE_TEA = "rose_tea",
|
|
744
|
+
PEAR_SORBET = "pear_sorbet",
|
|
745
|
+
CITY_WALK = "city_walk",
|
|
746
|
+
MOCHA_MOUSSE = "mocha_mousse",
|
|
747
|
+
SECTION_DISPLAY_BY_COLOR = "mapxus_v7_with_section_v2",
|
|
748
|
+
SECTION_DISPLAY_BY_CATEGORY = "mapxus_v7_with_section_v3"
|
|
942
749
|
}
|
|
943
|
-
export
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
private _allBuildingsMap;
|
|
948
|
-
private _allSharedLevelsMap;
|
|
949
|
-
private _curBuildingId;
|
|
950
|
-
private _curBuildingFeature;
|
|
951
|
-
private _curSharedLevelId;
|
|
952
|
-
private _floor;
|
|
953
|
-
private _sharedFloor;
|
|
954
|
-
private _outdoorMapShown;
|
|
955
|
-
private _originIndoorLayers;
|
|
956
|
-
private _outdoorLayers;
|
|
957
|
-
private _curVenueId;
|
|
958
|
-
private _curVenueFeature;
|
|
959
|
-
private _selectedHighlightStyle;
|
|
960
|
-
private _upperLayers;
|
|
961
|
-
private _commonPoiLayers;
|
|
962
|
-
private _sectionFillLineLayers;
|
|
963
|
-
private _sectionSymbolLayers;
|
|
964
|
-
private _middleLayers;
|
|
965
|
-
private _lowerLayers;
|
|
966
|
-
private _excludedPoisInMiddle;
|
|
967
|
-
private _dispatch;
|
|
968
|
-
private readonly _startWithIndoorView;
|
|
969
|
-
private _indoorMapLoaded;
|
|
970
|
-
private _isSelectSharedFloor;
|
|
971
|
-
private readonly _isMaskMode;
|
|
972
|
-
private _upperLevels;
|
|
973
|
-
private _middleLevels;
|
|
974
|
-
private _lowerLevels;
|
|
975
|
-
private _featureIncomplete;
|
|
976
|
-
private _fitBounds;
|
|
977
|
-
private _dragPan;
|
|
978
|
-
private _history;
|
|
979
|
-
private _hiddenBuildings;
|
|
980
|
-
private _maskBuildings;
|
|
981
|
-
private _maskSharedFloors;
|
|
982
|
-
private _enableIndoorClickSelection;
|
|
983
|
-
private _enableOutdoorClickSelection;
|
|
984
|
-
private _zIndexHistory;
|
|
985
|
-
private _isDestroyed;
|
|
986
|
-
private _abortQueryFeature;
|
|
987
|
-
private _debounceRendering;
|
|
988
|
-
dragPanHandler: DragPanHandler;
|
|
989
|
-
constructor(props: {
|
|
990
|
-
map: maplibregl$1.Map;
|
|
991
|
-
fitBounds: boolean;
|
|
992
|
-
boundsPadding: number | PaddingOptions;
|
|
993
|
-
maskNonSelectedAreas: boolean;
|
|
994
|
-
startWithIndoorView: boolean;
|
|
995
|
-
outdoorMapShown: boolean;
|
|
996
|
-
enableIndoorClickSelection: boolean;
|
|
997
|
-
enableOutdoorClickSelection: boolean;
|
|
998
|
-
selectedHighlightStyle?: ISelectedHighlightStyle;
|
|
999
|
-
});
|
|
1000
|
-
destroy(): void;
|
|
1001
|
-
/**
|
|
1002
|
-
* @deprecated
|
|
1003
|
-
* @description Set whether to allow exiting building.
|
|
1004
|
-
* @param allow
|
|
1005
|
-
*/
|
|
1006
|
-
setAllowOutdoorSwitch(allow: boolean): this;
|
|
1007
|
-
/**
|
|
1008
|
-
* @deprecated
|
|
1009
|
-
* @description Set whether to allow switching building.
|
|
1010
|
-
* @param allow
|
|
1011
|
-
*/
|
|
1012
|
-
setAllowBuildingSwitch(allow: boolean): this;
|
|
1013
|
-
setAllowIndoorClickSelect(allow: boolean): void;
|
|
1014
|
-
setAllowOutdoorClickSelect(allow: boolean): void;
|
|
1015
|
-
/**
|
|
1016
|
-
* @description Get the current floor's information.
|
|
1017
|
-
*/
|
|
1018
|
-
get floor(): IFloor | ISharedFloor | null;
|
|
1019
|
-
/**
|
|
1020
|
-
* @description Get the current building's information.
|
|
1021
|
-
* @returns {MapGeoJSONFeature | null}
|
|
1022
|
-
*/
|
|
1023
|
-
get building(): MapGeoJSONFeature | null;
|
|
750
|
+
export interface IMapOption {
|
|
751
|
+
map: maplibregl$1.Map;
|
|
752
|
+
floorSelectorEnabled?: boolean;
|
|
753
|
+
buildingSelectorEnabled?: boolean;
|
|
1024
754
|
/**
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
755
|
+
* 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
756
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
1027
757
|
*/
|
|
1028
|
-
|
|
758
|
+
venueId?: string;
|
|
1029
759
|
/**
|
|
1030
|
-
*
|
|
760
|
+
* 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
761
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
1031
762
|
*/
|
|
1032
|
-
|
|
763
|
+
buildingId?: string;
|
|
1033
764
|
/**
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1036
|
-
* @param options
|
|
765
|
+
* 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
766
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
1037
767
|
*/
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
filter?: (feature: MapGeoJSONFeature) => boolean;
|
|
1041
|
-
}): MapGeoJSONFeature[];
|
|
768
|
+
floorId?: string;
|
|
769
|
+
sharedFloorId?: string;
|
|
1042
770
|
/**
|
|
1043
|
-
*
|
|
1044
|
-
*
|
|
771
|
+
* Initialize the map with POI as the center point, use it with maplibregl.Map 'zoom' option.
|
|
772
|
+
* 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
773
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
1045
774
|
*/
|
|
1046
|
-
|
|
1047
|
-
|
|
775
|
+
poiId?: string;
|
|
776
|
+
outdoorMapShown?: boolean;
|
|
777
|
+
theme?: ThemeType | string;
|
|
778
|
+
/** @deprecated 'collapseCopyright' will be removed soon. You'd not use it. */
|
|
779
|
+
collapseCopyright?: boolean;
|
|
780
|
+
selectedHighlightStyle?: ISelectedHighlightStyle;
|
|
781
|
+
floorSelectorStyle?: IFloorSelectorStyle;
|
|
1048
782
|
/**
|
|
1049
|
-
*
|
|
1050
|
-
* @param style {ISelectedHighlightStyle | null}
|
|
783
|
+
* Whether unselected buildings are masked, default is false.
|
|
1051
784
|
*/
|
|
1052
|
-
|
|
785
|
+
maskNonSelectedAreas?: boolean;
|
|
1053
786
|
/**
|
|
1054
|
-
* @
|
|
1055
|
-
*
|
|
787
|
+
* @deprecated use "fitBounds" instead.
|
|
788
|
+
* Whether the boundary of the selected building fits the screen, default is false.
|
|
789
|
+
* Can only be used for 'floorId', 'buildingId' and 'venueId' initialization, not for 'poiId'.
|
|
790
|
+
* When it is true, the 'boundsPadding' option is valid, and the 'zoom' option of maplibregl.Map is invalid.
|
|
1056
791
|
*/
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
building: MapGeoJSONFeature | null;
|
|
1060
|
-
floor: IFloor;
|
|
1061
|
-
}) => void): {
|
|
1062
|
-
unsubscribe: VoidFunction;
|
|
1063
|
-
};
|
|
792
|
+
fitBuildingBounds?: boolean;
|
|
793
|
+
fitBounds?: boolean;
|
|
1064
794
|
/**
|
|
1065
|
-
*
|
|
1066
|
-
*
|
|
1067
|
-
*
|
|
1068
|
-
*/
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
private
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
private
|
|
1089
|
-
private
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
private
|
|
1097
|
-
private
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
private
|
|
1105
|
-
private
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
private _queryVenueFeature;
|
|
1111
|
-
private _getBuildingDisplayedOrdinal;
|
|
1112
|
-
private _updateFloorState;
|
|
1113
|
-
private _resetSelectedDisplayedLevel;
|
|
1114
|
-
private _checkAndPanToBuilding;
|
|
1115
|
-
private _queryVisibleFeature;
|
|
1116
|
-
private _queryRenderedFeatures;
|
|
1117
|
-
private _dispatchIndoorMapLoaded;
|
|
795
|
+
* The amount of padding in pixels to add to the given bounds, default is 30.
|
|
796
|
+
* Requires 'fitBuildingBounds' to be 'true'.
|
|
797
|
+
* Parameter value ref to: https://maplibre.org/maplibre-gl-js/docs/API/types/maplibregl.PaddingOptions/
|
|
798
|
+
*/
|
|
799
|
+
boundsPadding?: number | maplibregl$1.PaddingOptions;
|
|
800
|
+
language?: PresetLanguage;
|
|
801
|
+
/** Auto Select Building by panning building to map center, default is false. */
|
|
802
|
+
autoSelectBuilding?: boolean;
|
|
803
|
+
transformRequest?: maplibregl$1.RequestTransformFunction | null;
|
|
804
|
+
mapxusLogoEnabled?: boolean;
|
|
805
|
+
enableIndoorClickSelection?: boolean;
|
|
806
|
+
enableOutdoorClickSelection?: boolean;
|
|
807
|
+
floorSwitchScope?: FloorSwitchScope;
|
|
808
|
+
}
|
|
809
|
+
export declare class SwitchBuildingHandler {
|
|
810
|
+
private _indoor;
|
|
811
|
+
private _isEnabled;
|
|
812
|
+
constructor(indoor: Indoor);
|
|
813
|
+
enable(): void;
|
|
814
|
+
disable(): void;
|
|
815
|
+
get isEnabled(): boolean;
|
|
816
|
+
}
|
|
817
|
+
export declare class SwitchOutdoorHandler {
|
|
818
|
+
private _indoor;
|
|
819
|
+
private _isEnabled;
|
|
820
|
+
constructor(indoor: Indoor);
|
|
821
|
+
enable(): void;
|
|
822
|
+
disable(): void;
|
|
823
|
+
get isEnabled(): boolean;
|
|
824
|
+
}
|
|
825
|
+
export declare class IndoorClickSelection {
|
|
826
|
+
private _indoor;
|
|
827
|
+
private _isEnabled;
|
|
828
|
+
constructor(indoor: Indoor);
|
|
829
|
+
enable(): void;
|
|
830
|
+
disable(): void;
|
|
831
|
+
get isEnabled(): boolean;
|
|
832
|
+
}
|
|
833
|
+
export declare class OutdoorClickSelection {
|
|
834
|
+
private _indoor;
|
|
835
|
+
private _isEnabled;
|
|
836
|
+
constructor(indoor: Indoor);
|
|
837
|
+
enable(): void;
|
|
838
|
+
disable(): void;
|
|
839
|
+
get isEnabled(): boolean;
|
|
1118
840
|
}
|
|
1119
841
|
declare class Map$1 implements IMapxusMap {
|
|
1120
842
|
private _map;
|
|
@@ -1127,11 +849,9 @@ declare class Map$1 implements IMapxusMap {
|
|
|
1127
849
|
private _dispatch;
|
|
1128
850
|
private _fitBounds;
|
|
1129
851
|
private _history;
|
|
1130
|
-
private _hiddenBuildings;
|
|
1131
852
|
private _debounceHTTPErrorHandler;
|
|
1132
853
|
private _transformRequestHandler;
|
|
1133
854
|
private _tokenRefreshingPromise;
|
|
1134
|
-
private _request;
|
|
1135
855
|
private _cancelTokenChangedListener;
|
|
1136
856
|
isDestroyed: boolean;
|
|
1137
857
|
/** @deprecated Use "outdoorClickSelection" instead */
|
|
@@ -1144,7 +864,7 @@ declare class Map$1 implements IMapxusMap {
|
|
|
1144
864
|
floorSelector: FloorSelectorHandler;
|
|
1145
865
|
constructor(options: IMapOption);
|
|
1146
866
|
/**
|
|
1147
|
-
*
|
|
867
|
+
* This function will be called once the indoor source loaded.
|
|
1148
868
|
* @param callback
|
|
1149
869
|
*/
|
|
1150
870
|
renderComplete(callback: VoidFunction): void;
|
|
@@ -1155,156 +875,604 @@ declare class Map$1 implements IMapxusMap {
|
|
|
1155
875
|
*/
|
|
1156
876
|
setTransformRequest(handler: maplibregl$1.RequestTransformFunction): void;
|
|
1157
877
|
/**
|
|
1158
|
-
*
|
|
878
|
+
* Get map indoor instance.
|
|
1159
879
|
* @deprecated indoor instance won't be provided publicly in the future.
|
|
1160
880
|
*/
|
|
1161
881
|
getIndoor(): Indoor;
|
|
1162
882
|
/**
|
|
1163
|
-
*
|
|
883
|
+
* Get maplibre map instance.
|
|
884
|
+
*/
|
|
885
|
+
getMaplibre(): maplibregl$1.Map;
|
|
886
|
+
/**
|
|
887
|
+
* Get current selected floor info.
|
|
888
|
+
* @return {IFloor | ISharedFloor | null}
|
|
889
|
+
*/
|
|
890
|
+
get floor(): IFloor | ISharedFloor | null;
|
|
891
|
+
/**
|
|
892
|
+
* Get current selected building info.
|
|
893
|
+
* @return {MapGeoJSONFeature | null}
|
|
894
|
+
*/
|
|
895
|
+
get building(): MapGeoJSONFeature | null;
|
|
896
|
+
/**
|
|
897
|
+
* Get current selected venue info.
|
|
898
|
+
* @return {MapGeoJSONFeature | null}
|
|
899
|
+
*/
|
|
900
|
+
get venue(): MapGeoJSONFeature | null;
|
|
901
|
+
/**
|
|
902
|
+
* Set map language.
|
|
903
|
+
* @param language {PresetLanguage} convertBrowserLangToPresetLang(Window.navigator.language).
|
|
904
|
+
*/
|
|
905
|
+
setLanguage(language: PresetLanguage): void;
|
|
906
|
+
/**
|
|
907
|
+
* Get map language.
|
|
908
|
+
* @return {PresetLanguage}
|
|
909
|
+
*/
|
|
910
|
+
getLanguage(): PresetLanguage;
|
|
911
|
+
/**
|
|
912
|
+
* Set outdoor map to be shown or hidden.
|
|
913
|
+
* @param shown
|
|
914
|
+
*/
|
|
915
|
+
setOutdoorMapShown(shown: boolean): void;
|
|
916
|
+
queryIndoorFeaturesByPoint(point: IScreenPoint): INormalLevelIndoorFeatures | ISharedLevelIndoorFeatures | null;
|
|
917
|
+
/**
|
|
918
|
+
* Get features from bbox by coordinates [and ordinal].
|
|
919
|
+
* @deprecated Use "queryIndoorFeaturesByPoint()" instead.
|
|
920
|
+
* @param coordinates
|
|
921
|
+
* @param ordinal
|
|
922
|
+
*/
|
|
923
|
+
getIndoorFeaturesByCoordinates(coordinates: {
|
|
924
|
+
lng: number;
|
|
925
|
+
lat: number;
|
|
926
|
+
}, ordinal?: number): {
|
|
927
|
+
venue: MapGeoJSONFeature | null;
|
|
928
|
+
building: MapGeoJSONFeature | null;
|
|
929
|
+
level: MapGeoJSONFeature | null;
|
|
930
|
+
};
|
|
931
|
+
/**
|
|
932
|
+
* Query rendered features from bbox by id. One id may correspond to multiple features,
|
|
933
|
+
* coz of a feature may be multi-polygon(feature collection).
|
|
934
|
+
* @param id
|
|
935
|
+
* @param options {layerIds: string[], filter: (feature: MapGeoJSONFeature) => boolean}
|
|
936
|
+
*/
|
|
937
|
+
getFeaturesById(id: string, options?: IFeaturesFilterOptions): MapGeoJSONFeature[];
|
|
938
|
+
/**
|
|
939
|
+
* Switch floor by ordinal of current selected building.
|
|
940
|
+
* @param ordinal {string | null} The ordinal of the target floor.
|
|
941
|
+
* If ordinal is null, the map will exit indoor view.
|
|
942
|
+
* If current selected building has no the target ordinal, there's an error will be thrown.
|
|
943
|
+
*/
|
|
944
|
+
switchFloorByOrdinal(ordinal: string | null): Promise<void>;
|
|
945
|
+
/**
|
|
946
|
+
* Select indoor by locating the target floor.
|
|
947
|
+
* @param floorId
|
|
948
|
+
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
949
|
+
* Default is true.
|
|
950
|
+
*/
|
|
951
|
+
selectFloorById(floorId: string, options?: IPanToOptions): Promise<void>;
|
|
952
|
+
selectSharedFloorById(sharedFloorId: string, options?: IPanToOptions): Promise<void>;
|
|
953
|
+
/**
|
|
954
|
+
* Select indoor by locating the target building.
|
|
955
|
+
* @param buildingId
|
|
956
|
+
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
957
|
+
* Default is true.
|
|
958
|
+
*/
|
|
959
|
+
selectBuildingById(buildingId: string, options?: IPanToOptions): Promise<void>;
|
|
960
|
+
/**
|
|
961
|
+
* Select indoor by locating the target venue.
|
|
962
|
+
* @param venueId 'venueId' can be string or null. Exit indoors if venueId is null.
|
|
963
|
+
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
964
|
+
* Default is true.
|
|
965
|
+
*/
|
|
966
|
+
selectVenueById(venueId: string | null, options?: IPanToOptions): Promise<void>;
|
|
967
|
+
/**
|
|
968
|
+
* Listen for mouse click events on the map.
|
|
969
|
+
* @param listener
|
|
970
|
+
*/
|
|
971
|
+
onMapClickListener(listener: (param: IMapClickEvent) => void): {
|
|
972
|
+
unsubscribe: VoidFunction;
|
|
973
|
+
};
|
|
974
|
+
/**
|
|
975
|
+
* Listen for mouse click events on indoor POI
|
|
976
|
+
* @param listener
|
|
977
|
+
*/
|
|
978
|
+
onPoiClickListener(listener: (param: IPoiClickEvent) => void): {
|
|
979
|
+
unsubscribe: VoidFunction;
|
|
980
|
+
};
|
|
981
|
+
/**
|
|
982
|
+
* Listen for mouse click events at a point.
|
|
983
|
+
* @param listener
|
|
984
|
+
*/
|
|
985
|
+
onPointClickListener(listener: (param: IPointClickEvent) => void): {
|
|
986
|
+
unsubscribe: VoidFunction;
|
|
987
|
+
};
|
|
988
|
+
/**
|
|
989
|
+
* Listen for the indoor map status, including the changes of venue, building and floor.
|
|
990
|
+
* @param listener
|
|
991
|
+
*/
|
|
992
|
+
onMapChangeListener(listener: (param: IMapChangeEvent) => void): {
|
|
993
|
+
unsubscribe: VoidFunction;
|
|
994
|
+
};
|
|
995
|
+
/**
|
|
996
|
+
* @deprecated Use "setTheme()" instead.
|
|
997
|
+
* Switch the map style
|
|
998
|
+
* @param theme ThemeType | string(customized map style file name)
|
|
999
|
+
*/
|
|
1000
|
+
switchTheme(theme: string): void;
|
|
1001
|
+
setTheme(theme: ThemeType | string): void;
|
|
1002
|
+
/**
|
|
1003
|
+
* @deprecated Use 'setSelectedHighlightStyle' instead.
|
|
1004
|
+
* Set the SelectedBuildingBorder's style. If set to null, the border will be invisible.
|
|
1005
|
+
* @param style {ISelectedHighlightStyle | null}
|
|
1006
|
+
*/
|
|
1007
|
+
setSelectedBuildingBorderStyle(style: ISelectedHighlightStyle | null): this;
|
|
1008
|
+
setSelectedHighlightStyle(style: ISelectedHighlightStyle | null): this;
|
|
1009
|
+
setFloorSwitchScope(scope: FloorSwitchScope): void;
|
|
1010
|
+
private _setup;
|
|
1011
|
+
private _setStyle;
|
|
1012
|
+
private _addControl;
|
|
1013
|
+
private _selectPoiById;
|
|
1014
|
+
private _resourceRequestTransform;
|
|
1015
|
+
private _checkMapZoom;
|
|
1016
|
+
private _updatePermission;
|
|
1017
|
+
private _selectCenterBuilding;
|
|
1018
|
+
/**
|
|
1019
|
+
* Query building features within the center rectangle(width: 1/2 width of map view, height: 1/2 height of map view) of map.
|
|
1020
|
+
* @returns Map<buildingId, buildingFeature>
|
|
1021
|
+
*/
|
|
1022
|
+
private _getCenterBuildingUnitsMap;
|
|
1023
|
+
private _bindMapClickListener;
|
|
1024
|
+
private _dispatchErrorGlobal;
|
|
1025
|
+
private _installRtlTextPlugin;
|
|
1026
|
+
private _permissionCheck;
|
|
1027
|
+
private _destroy;
|
|
1028
|
+
}
|
|
1029
|
+
export type TPointFeature = GeoJSON.Feature<Point, GeoJsonProperties>;
|
|
1030
|
+
export type TLineStringFeature = GeoJSON.Feature<LineString, GeoJsonProperties>;
|
|
1031
|
+
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1032
|
+
export interface IMarkerOptions {
|
|
1033
|
+
lngLat: [
|
|
1034
|
+
number,
|
|
1035
|
+
number
|
|
1036
|
+
];
|
|
1037
|
+
properties?: {
|
|
1038
|
+
[k: string]: string;
|
|
1039
|
+
};
|
|
1040
|
+
}
|
|
1041
|
+
export interface IMarkerOptionsWithFeatureId extends IMarkerOptions {
|
|
1042
|
+
featureId: number;
|
|
1043
|
+
}
|
|
1044
|
+
export interface ITokenInfo {
|
|
1045
|
+
"app:name": string;
|
|
1046
|
+
auth_time: number;
|
|
1047
|
+
"cognito:username": string;
|
|
1048
|
+
"custom:organization": string;
|
|
1049
|
+
exp: number;
|
|
1050
|
+
iat: number;
|
|
1051
|
+
organization: string;
|
|
1052
|
+
"organization:name": string;
|
|
1053
|
+
privatization_type: string;
|
|
1054
|
+
username: string;
|
|
1055
|
+
}
|
|
1056
|
+
export declare enum VehicleType {
|
|
1057
|
+
FOOT = "foot",
|
|
1058
|
+
WHEELCHAIR = "wheelchair",
|
|
1059
|
+
ESCALATOR = "escalator",
|
|
1060
|
+
EMERGENCY = "emergency"
|
|
1061
|
+
}
|
|
1062
|
+
export interface IRouteInfo {
|
|
1063
|
+
copyrights: string[];
|
|
1064
|
+
took: number;
|
|
1065
|
+
}
|
|
1066
|
+
export interface IInstruction {
|
|
1067
|
+
building_id: string;
|
|
1068
|
+
distance: number;
|
|
1069
|
+
floor_id: string;
|
|
1070
|
+
heading: number;
|
|
1071
|
+
interval: [
|
|
1072
|
+
number,
|
|
1073
|
+
number
|
|
1074
|
+
];
|
|
1075
|
+
on_shared_floor: boolean;
|
|
1076
|
+
ordinal: number;
|
|
1077
|
+
sign: number;
|
|
1078
|
+
street_name: string;
|
|
1079
|
+
text: string;
|
|
1080
|
+
time: number;
|
|
1081
|
+
type: string | null;
|
|
1082
|
+
venue_id: string;
|
|
1083
|
+
}
|
|
1084
|
+
export interface IRoutePath {
|
|
1085
|
+
bbox: [
|
|
1086
|
+
number,
|
|
1087
|
+
number,
|
|
1088
|
+
number,
|
|
1089
|
+
number
|
|
1090
|
+
];
|
|
1091
|
+
distance: number;
|
|
1092
|
+
instructions: IInstruction[];
|
|
1093
|
+
points: {
|
|
1094
|
+
coordinates: Array<[
|
|
1095
|
+
number,
|
|
1096
|
+
number
|
|
1097
|
+
]>;
|
|
1098
|
+
type: string;
|
|
1099
|
+
};
|
|
1100
|
+
snapped_waypoints: {
|
|
1101
|
+
coordinates: Array<[
|
|
1102
|
+
number,
|
|
1103
|
+
number
|
|
1104
|
+
]>;
|
|
1105
|
+
type: string;
|
|
1106
|
+
};
|
|
1107
|
+
time: number;
|
|
1108
|
+
}
|
|
1109
|
+
export interface IResponseRoute {
|
|
1110
|
+
infos: IRouteInfo | null;
|
|
1111
|
+
paths: IRoutePath[];
|
|
1112
|
+
}
|
|
1113
|
+
export interface IRoutePoint {
|
|
1114
|
+
lat: number;
|
|
1115
|
+
lon: number;
|
|
1116
|
+
floorId?: string;
|
|
1117
|
+
}
|
|
1118
|
+
export interface IRouteSearchOptions {
|
|
1119
|
+
/**
|
|
1120
|
+
* Points are in order, from -> stops -> to.
|
|
1121
|
+
* The length of points must be: 1 < {points.length} < 6.
|
|
1164
1122
|
*/
|
|
1165
|
-
|
|
1123
|
+
points: IRoutePoint[];
|
|
1166
1124
|
/**
|
|
1167
|
-
*
|
|
1168
|
-
* @return {IFloor | ISharedFloor | null}
|
|
1125
|
+
* Default is "foot".
|
|
1169
1126
|
*/
|
|
1170
|
-
|
|
1127
|
+
vehicle?: VehicleType;
|
|
1171
1128
|
/**
|
|
1172
|
-
*
|
|
1173
|
-
* @return {MapGeoJSONFeature | null}
|
|
1129
|
+
* Language-specific response. Default is "en".
|
|
1174
1130
|
*/
|
|
1175
|
-
|
|
1131
|
+
locale?: PresetLanguage;
|
|
1132
|
+
}
|
|
1133
|
+
export interface IRouteMarkers {
|
|
1134
|
+
from: string | null;
|
|
1135
|
+
to: string | null;
|
|
1136
|
+
stops: Array<string | null> | null;
|
|
1137
|
+
}
|
|
1138
|
+
export interface IRouteStyle<T> {
|
|
1139
|
+
indoorLineColor?: string | ExpressionSpecification;
|
|
1140
|
+
outdoorLineColor?: string | ExpressionSpecification;
|
|
1141
|
+
dashedLineColor?: string | ExpressionSpecification;
|
|
1142
|
+
shuttleBusLineColor?: string | ExpressionSpecification;
|
|
1143
|
+
lineWidth?: number | ExpressionSpecification;
|
|
1144
|
+
dashedLineWidth?: number | ExpressionSpecification;
|
|
1145
|
+
disableDashedLine?: boolean;
|
|
1146
|
+
/** Optional number in range [0, 1]. Defaults to 0.5. "inactiveRouteOpacity" will be 1 if the parameter is greater than 1, and it will be 0 if the parameter is less than 0. */
|
|
1147
|
+
inactiveRouteOpacity?: number;
|
|
1148
|
+
/** Optional number in range [0, 1]. Defaults to 1. "outdoorLineOpacity" will be 1 if the parameter is greater than 1, and it will be 0 if the parameter is less than 0. */
|
|
1149
|
+
outdoorLineOpacity?: number;
|
|
1150
|
+
markers?: T;
|
|
1151
|
+
markerIconSize?: number | ExpressionSpecification;
|
|
1152
|
+
lineSymbol?: {
|
|
1153
|
+
/**
|
|
1154
|
+
* Icon url or sprite name.
|
|
1155
|
+
*/
|
|
1156
|
+
image?: string | null;
|
|
1157
|
+
size?: number | ExpressionSpecification;
|
|
1158
|
+
spacing?: number | ExpressionSpecification;
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
export type TRouteStyleOptions = IRouteStyle<Partial<IRouteMarkers> | Array<string | null>>;
|
|
1162
|
+
export declare class RoutePainter {
|
|
1163
|
+
private readonly _maplibreMap;
|
|
1164
|
+
private _routeStyle;
|
|
1165
|
+
private _styleDiffs;
|
|
1166
|
+
private _filterBy;
|
|
1167
|
+
private _curVenue;
|
|
1168
|
+
private _curBuilding;
|
|
1169
|
+
private _curOrdinal;
|
|
1170
|
+
private _renderBoundaryLayer;
|
|
1171
|
+
constructor(maplibreMap: maplibregl$1.Map, routeStyle?: TRouteStyleOptions);
|
|
1176
1172
|
/**
|
|
1177
|
-
*
|
|
1178
|
-
* @
|
|
1173
|
+
* Set the style of the route.
|
|
1174
|
+
* @param routeStyle {TRouteStyleOptions | null} When null, reset to the initial style.
|
|
1179
1175
|
*/
|
|
1180
|
-
|
|
1176
|
+
setStyle(routeStyle: TRouteStyleOptions | null): Promise<void>;
|
|
1181
1177
|
/**
|
|
1182
|
-
* @
|
|
1183
|
-
*
|
|
1178
|
+
* @deprecated Use 'setStyle' instead.
|
|
1179
|
+
* Set image[s] of the stop marker[s].
|
|
1180
|
+
* @param icons Array of sprite names or URLs, or the object with specifying icon.
|
|
1181
|
+
* Markers use images in order of icons array.
|
|
1182
|
+
* First is as from-marker, last is as to-marker, the middles are as stop-markers.
|
|
1183
|
+
* If icons array has only one element, all stop markers use this image.
|
|
1184
|
+
* Image file must be in png, webp, or jpg format.
|
|
1185
|
+
* Null means none image.
|
|
1184
1186
|
*/
|
|
1185
|
-
|
|
1187
|
+
setMarkerIcons(icons: Array<string | null> | {
|
|
1188
|
+
from?: string | null;
|
|
1189
|
+
to?: string | null;
|
|
1190
|
+
stops?: Array<string | null> | null;
|
|
1191
|
+
}): Promise<void>;
|
|
1186
1192
|
/**
|
|
1187
|
-
* @
|
|
1188
|
-
*
|
|
1193
|
+
* @deprecated Use 'setStyle' instead.
|
|
1194
|
+
* Set all icons scale.
|
|
1195
|
+
* @param size number in range [0, ∞), default is 1.
|
|
1189
1196
|
*/
|
|
1190
|
-
|
|
1197
|
+
setMarkerIconSize(size: number): this;
|
|
1191
1198
|
/**
|
|
1192
|
-
* @
|
|
1193
|
-
*
|
|
1199
|
+
* @deprecated Use 'setStyle' instead.
|
|
1200
|
+
* Set the route color of the indoor part.
|
|
1201
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1202
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1203
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1194
1204
|
*/
|
|
1195
|
-
|
|
1196
|
-
queryIndoorFeaturesByPoint(point: IScreenPoint): INormalLevelIndoorFeatures | ISharedLevelIndoorFeatures | null;
|
|
1205
|
+
setIndoorLineColor(color: string): this;
|
|
1197
1206
|
/**
|
|
1198
|
-
* @
|
|
1199
|
-
*
|
|
1200
|
-
* @param
|
|
1201
|
-
*
|
|
1207
|
+
* @deprecated Use 'setStyle' instead.
|
|
1208
|
+
* Set the route color of the outdoor part.
|
|
1209
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1210
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1211
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1202
1212
|
*/
|
|
1203
|
-
|
|
1204
|
-
lng: number;
|
|
1205
|
-
lat: number;
|
|
1206
|
-
}, ordinal?: number): {
|
|
1207
|
-
venue: MapGeoJSONFeature | null;
|
|
1208
|
-
building: MapGeoJSONFeature | null;
|
|
1209
|
-
level: MapGeoJSONFeature | null;
|
|
1210
|
-
};
|
|
1213
|
+
setOutdoorLineColor(color: string): this;
|
|
1211
1214
|
/**
|
|
1212
|
-
* @
|
|
1213
|
-
*
|
|
1214
|
-
* @param
|
|
1215
|
-
*
|
|
1215
|
+
* @deprecated Use 'setStyle' instead.
|
|
1216
|
+
* Set color of dashed lines which connected the start and end markers.
|
|
1217
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1218
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1219
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1216
1220
|
*/
|
|
1217
|
-
|
|
1221
|
+
setDashedLineColor(color: string): this;
|
|
1218
1222
|
/**
|
|
1219
|
-
* @
|
|
1220
|
-
*
|
|
1221
|
-
*
|
|
1222
|
-
*
|
|
1223
|
+
* @deprecated Use 'setStyle' instead.
|
|
1224
|
+
* Set color of shuttle bus line.
|
|
1225
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1226
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1227
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1223
1228
|
*/
|
|
1224
|
-
|
|
1229
|
+
setBusLineColor(color: string): this;
|
|
1225
1230
|
/**
|
|
1226
|
-
*
|
|
1227
|
-
* @param
|
|
1228
|
-
* @param
|
|
1229
|
-
* Default is true.
|
|
1231
|
+
* Render route on the map.
|
|
1232
|
+
* @param path Route path from RouteService.search response.
|
|
1233
|
+
* @param markerLocations Coordinate([lng, lat]) array of markers, order from beginning to end.
|
|
1230
1234
|
*/
|
|
1231
|
-
|
|
1232
|
-
|
|
1235
|
+
render(path: IRoutePath, markerLocations: Array<[
|
|
1236
|
+
number,
|
|
1237
|
+
number
|
|
1238
|
+
]>): void;
|
|
1233
1239
|
/**
|
|
1234
|
-
*
|
|
1235
|
-
* @param buildingId
|
|
1236
|
-
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1237
|
-
* Default is true.
|
|
1240
|
+
* Remove route from the map.
|
|
1238
1241
|
*/
|
|
1239
|
-
|
|
1242
|
+
remove(): void;
|
|
1240
1243
|
/**
|
|
1241
|
-
*
|
|
1242
|
-
* @param venueId
|
|
1243
|
-
* @param
|
|
1244
|
-
* Default is true.
|
|
1244
|
+
* Filter paths' opacity by venue and ordinal.
|
|
1245
|
+
* @param venueId {string | null | undefined}
|
|
1246
|
+
* @param ordinal {string | null | undefined}
|
|
1245
1247
|
*/
|
|
1246
|
-
|
|
1248
|
+
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1247
1249
|
/**
|
|
1248
|
-
*
|
|
1249
|
-
* @param
|
|
1250
|
+
* Filter paths' opacity by building and ordinal.
|
|
1251
|
+
* @param buildingId {string | null | undefined}
|
|
1252
|
+
* @param ordinal {string | null | undefined}
|
|
1250
1253
|
*/
|
|
1251
|
-
|
|
1252
|
-
|
|
1254
|
+
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1255
|
+
private _classifyFeatures;
|
|
1256
|
+
private _createLineFeature;
|
|
1257
|
+
private _createIconFeature;
|
|
1258
|
+
private _renderSolidLines;
|
|
1259
|
+
private _renderDashedLines;
|
|
1260
|
+
private _renderConnectors;
|
|
1261
|
+
private _renderMarkers;
|
|
1262
|
+
private _addCollectionSource;
|
|
1263
|
+
private _addLineLayer;
|
|
1264
|
+
private _renderLineSymbols;
|
|
1265
|
+
private _addIconLayer;
|
|
1266
|
+
private _updateStyleProperties;
|
|
1267
|
+
private _loadMarkerIcons;
|
|
1268
|
+
private _updateLayers;
|
|
1269
|
+
private _filterRouteOpacity;
|
|
1270
|
+
}
|
|
1271
|
+
export interface IVenueInlineSharedFloor extends IFloorBase, IMapServices {
|
|
1272
|
+
name: IMultilingualName;
|
|
1273
|
+
refBuilding: Array<string>;
|
|
1274
|
+
}
|
|
1275
|
+
export interface IVenueInlineBuilding extends IMapServices {
|
|
1276
|
+
buildingName: IMultilingualName;
|
|
1277
|
+
buildingOutlineId: number;
|
|
1278
|
+
defaultFloor?: string;
|
|
1279
|
+
floors: IBuildingInlineFloor[];
|
|
1280
|
+
id: string;
|
|
1281
|
+
name: IMultilingualName;
|
|
1282
|
+
point: {
|
|
1283
|
+
type: string;
|
|
1284
|
+
coordinates: [
|
|
1285
|
+
number,
|
|
1286
|
+
number
|
|
1287
|
+
];
|
|
1253
1288
|
};
|
|
1289
|
+
}
|
|
1290
|
+
export interface IVenueInternal extends IBuildingBasicInfo, IBusinessInfo, IMapServices {
|
|
1291
|
+
buildings: IVenueInlineBuilding[];
|
|
1292
|
+
defaultBuilding?: string;
|
|
1293
|
+
id: string;
|
|
1294
|
+
organization: string[];
|
|
1295
|
+
owner: string;
|
|
1296
|
+
restricted: boolean;
|
|
1297
|
+
sharedFloors: IVenueInlineSharedFloor[];
|
|
1298
|
+
venueOutlineId: number;
|
|
1299
|
+
}
|
|
1300
|
+
export declare const omittedVenueKeys: readonly [
|
|
1301
|
+
"opening_hours",
|
|
1302
|
+
"description",
|
|
1303
|
+
"phone",
|
|
1304
|
+
"website",
|
|
1305
|
+
"email",
|
|
1306
|
+
"appURL",
|
|
1307
|
+
"icon"
|
|
1308
|
+
];
|
|
1309
|
+
export type TOmittedVenueKeys = (typeof omittedVenueKeys)[number];
|
|
1310
|
+
export type TVenue = Omit<IVenueInternal, TOmittedVenueKeys>;
|
|
1311
|
+
export type TVenueResponse<T> = IResponse<{
|
|
1312
|
+
venues: T[];
|
|
1313
|
+
total: number;
|
|
1314
|
+
}>;
|
|
1315
|
+
export interface IQuantitySpec {
|
|
1254
1316
|
/**
|
|
1255
|
-
*
|
|
1256
|
-
* @param listener
|
|
1317
|
+
* The maximum value is 100, default is 10.
|
|
1257
1318
|
*/
|
|
1258
|
-
|
|
1259
|
-
unsubscribe: VoidFunction;
|
|
1260
|
-
};
|
|
1319
|
+
offset?: number;
|
|
1261
1320
|
/**
|
|
1262
|
-
*
|
|
1263
|
-
* @param listener
|
|
1321
|
+
* Results for specified page number. Default is 1.
|
|
1264
1322
|
*/
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1323
|
+
page?: number;
|
|
1324
|
+
}
|
|
1325
|
+
export interface IDistanceSpec {
|
|
1268
1326
|
/**
|
|
1269
|
-
*
|
|
1270
|
-
* @param listener
|
|
1327
|
+
* The center of searching range, [lng, lat].
|
|
1271
1328
|
*/
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1329
|
+
center: [
|
|
1330
|
+
number,
|
|
1331
|
+
number
|
|
1332
|
+
];
|
|
1275
1333
|
/**
|
|
1276
|
-
*
|
|
1277
|
-
* @description Switch the map style
|
|
1278
|
-
* @param theme ThemeType | string(customized map style file name)
|
|
1334
|
+
* Radius from center, unit: meter for POIs, kilometers for buildings and venues, cannot exceed 10,000.
|
|
1279
1335
|
*/
|
|
1280
|
-
|
|
1281
|
-
|
|
1336
|
+
distance: number;
|
|
1337
|
+
}
|
|
1338
|
+
export interface IOrientationSpec {
|
|
1282
1339
|
/**
|
|
1283
|
-
*
|
|
1284
|
-
* @description Set the SelectedBuildingBorder's style. If set to null, the border will be invisible.
|
|
1285
|
-
* @param style {ISelectedHighlightStyle | null}
|
|
1340
|
+
* User's position, [lng, lat].
|
|
1286
1341
|
*/
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
private _setStyle;
|
|
1292
|
-
private _addControl;
|
|
1293
|
-
private _selectPoiById;
|
|
1294
|
-
private _resourceRequestTransform;
|
|
1295
|
-
private _checkMapZoom;
|
|
1296
|
-
private _updatePermission;
|
|
1297
|
-
private _selectCenterBuilding;
|
|
1342
|
+
center: [
|
|
1343
|
+
number,
|
|
1344
|
+
number
|
|
1345
|
+
];
|
|
1298
1346
|
/**
|
|
1299
|
-
*
|
|
1300
|
-
* @returns Map<buildingId, buildingFeature>
|
|
1347
|
+
* The angle between the user's orientation and true north.
|
|
1301
1348
|
*/
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1349
|
+
angle: number;
|
|
1350
|
+
/**
|
|
1351
|
+
* The radius with 'center' as the center of the circle.
|
|
1352
|
+
*/
|
|
1353
|
+
distance: number;
|
|
1354
|
+
}
|
|
1355
|
+
export interface IBoundsSpec {
|
|
1356
|
+
/** An array of LngLat coordinates in [sw, ne] order */
|
|
1357
|
+
bounds: [
|
|
1358
|
+
[
|
|
1359
|
+
number,
|
|
1360
|
+
number
|
|
1361
|
+
],
|
|
1362
|
+
[
|
|
1363
|
+
number,
|
|
1364
|
+
number
|
|
1365
|
+
]
|
|
1366
|
+
];
|
|
1367
|
+
}
|
|
1368
|
+
export interface IKeywordSpec {
|
|
1369
|
+
keywords?: string;
|
|
1370
|
+
}
|
|
1371
|
+
export interface IOrderSpec {
|
|
1372
|
+
orderBy?: PoisOrderBy;
|
|
1373
|
+
}
|
|
1374
|
+
export interface IBuildingSpec {
|
|
1375
|
+
buildingId: string;
|
|
1376
|
+
}
|
|
1377
|
+
export interface IVenueSpec {
|
|
1378
|
+
venueId: string;
|
|
1379
|
+
}
|
|
1380
|
+
export interface IFloorSpec {
|
|
1381
|
+
floorId: string;
|
|
1382
|
+
}
|
|
1383
|
+
export interface ISharedFloorSpec {
|
|
1384
|
+
sharedFloorId: string;
|
|
1385
|
+
}
|
|
1386
|
+
export interface IOrdinalSpec {
|
|
1387
|
+
ordinal: string;
|
|
1388
|
+
}
|
|
1389
|
+
export interface IOrientationSearchTypeSpec {
|
|
1390
|
+
/** The type of POI, default is 'Point' */
|
|
1391
|
+
distanceSearchType?: OrientationDistanceSearchType;
|
|
1392
|
+
}
|
|
1393
|
+
/** common search */
|
|
1394
|
+
export interface ISearchByKeywordsOptions extends IKeywordSpec, IQuantitySpec {
|
|
1395
|
+
}
|
|
1396
|
+
export interface ISearchByDistanceOptions extends IDistanceSpec, ISearchByKeywordsOptions {
|
|
1397
|
+
}
|
|
1398
|
+
export interface ISearchByBoundsOptions extends IBoundsSpec, ISearchByKeywordsOptions {
|
|
1399
|
+
}
|
|
1400
|
+
/** building/venue search */
|
|
1401
|
+
export interface IBuildingSearchCustomizedOptions {
|
|
1402
|
+
bounds?: [
|
|
1403
|
+
[
|
|
1404
|
+
number,
|
|
1405
|
+
number
|
|
1406
|
+
],
|
|
1407
|
+
[
|
|
1408
|
+
number,
|
|
1409
|
+
number
|
|
1410
|
+
]
|
|
1411
|
+
];
|
|
1412
|
+
center?: [
|
|
1413
|
+
number,
|
|
1414
|
+
number
|
|
1415
|
+
];
|
|
1416
|
+
distance?: number;
|
|
1417
|
+
keywords?: string;
|
|
1418
|
+
signal?: boolean;
|
|
1419
|
+
visual?: boolean;
|
|
1420
|
+
offset?: number;
|
|
1421
|
+
page?: number;
|
|
1422
|
+
}
|
|
1423
|
+
export interface IVenueSearchCustomizedOptions extends IBuildingSearchCustomizedOptions {
|
|
1424
|
+
}
|
|
1425
|
+
/** poi search */
|
|
1426
|
+
export interface ISearchByCategoryOptions extends IDistanceSpec, IQuantitySpec {
|
|
1427
|
+
category: string;
|
|
1428
|
+
}
|
|
1429
|
+
export interface ISearchByExcludedCategoriesOptions extends IDistanceSpec, IQuantitySpec {
|
|
1430
|
+
excludedCategories: string | string[];
|
|
1431
|
+
}
|
|
1432
|
+
export type TSearchByCategoryOptions = ISearchByCategoryOptions | ISearchByExcludedCategoriesOptions;
|
|
1433
|
+
export interface IPoiSearchByBoundsOptions extends ISearchByBoundsOptions, IOrderSpec {
|
|
1434
|
+
}
|
|
1435
|
+
export interface ISearchByBuildingOptions extends IBuildingSpec, ISearchByKeywordsOptions, IOrderSpec {
|
|
1436
|
+
}
|
|
1437
|
+
export interface ISearchByVenueOptions extends IVenueSpec, ISearchByKeywordsOptions, IOrderSpec {
|
|
1438
|
+
}
|
|
1439
|
+
export type TSearchByFloorsOptions = ({
|
|
1440
|
+
floorIds: string[];
|
|
1441
|
+
} & ISearchByKeywordsOptions & IOrderSpec) | ({
|
|
1442
|
+
sharedFloorIds: string[];
|
|
1443
|
+
} & ISearchByKeywordsOptions & IOrderSpec);
|
|
1444
|
+
export type TSearchByOrientationOptions = (IOrdinalSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec) | (IFloorSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec) | (IBuildingSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec);
|
|
1445
|
+
export type TSearchCategoriesOptions = IVenueSpec | IBuildingSpec | IFloorSpec | ISharedFloorSpec | (IBoundsSpec & IKeywordSpec);
|
|
1446
|
+
export interface IPoiSearchCustomizedOptions {
|
|
1447
|
+
bounds?: [
|
|
1448
|
+
[
|
|
1449
|
+
number,
|
|
1450
|
+
number
|
|
1451
|
+
],
|
|
1452
|
+
[
|
|
1453
|
+
number,
|
|
1454
|
+
number
|
|
1455
|
+
]
|
|
1456
|
+
];
|
|
1457
|
+
center?: [
|
|
1458
|
+
number,
|
|
1459
|
+
number
|
|
1460
|
+
];
|
|
1461
|
+
distance?: number;
|
|
1462
|
+
category?: string;
|
|
1463
|
+
excludedCategories?: string | string[];
|
|
1464
|
+
/** @deprecated */
|
|
1465
|
+
floorId?: string;
|
|
1466
|
+
floorIds?: string[];
|
|
1467
|
+
sharedFloorIds?: string[];
|
|
1468
|
+
buildingId?: string;
|
|
1469
|
+
venueId?: string;
|
|
1470
|
+
keywords?: string;
|
|
1471
|
+
orderBy?: PoisOrderBy;
|
|
1472
|
+
sort?: PoisSortBy;
|
|
1473
|
+
distanceSearchType?: DistanceSearchType;
|
|
1474
|
+
offset?: number;
|
|
1475
|
+
page?: number;
|
|
1308
1476
|
}
|
|
1309
1477
|
export declare class Marker {
|
|
1310
1478
|
private readonly _maplibreMap;
|
|
@@ -1315,37 +1483,37 @@ export declare class Marker {
|
|
|
1315
1483
|
private _iconAnchor;
|
|
1316
1484
|
constructor(maplibreMap: maplibregl$1.Map);
|
|
1317
1485
|
/**
|
|
1318
|
-
*
|
|
1486
|
+
* Set custom marker image.
|
|
1319
1487
|
* @param icon Sprite name in map style or the URL of the image file.
|
|
1320
1488
|
* Image file must be in png, webp, or jpg format.
|
|
1321
1489
|
*/
|
|
1322
1490
|
setIcon(icon: string): Promise<void>;
|
|
1323
1491
|
/**
|
|
1324
|
-
*
|
|
1325
|
-
* @param imageScale Default is
|
|
1492
|
+
* Set marker image size.
|
|
1493
|
+
* @param imageScale Default is 0.75
|
|
1326
1494
|
*/
|
|
1327
1495
|
setIconSize(imageScale: number): void;
|
|
1328
1496
|
/**
|
|
1329
|
-
*
|
|
1497
|
+
* Set marker image anchor. Part of the icon placed closest to the anchor.
|
|
1330
1498
|
* @param anchor
|
|
1331
1499
|
*/
|
|
1332
1500
|
setIconAnchor(anchor: TAnchorPosition): void;
|
|
1333
1501
|
/**
|
|
1334
|
-
*
|
|
1502
|
+
* Marker layer id getter.
|
|
1335
1503
|
*/
|
|
1336
1504
|
get layerId(): string;
|
|
1337
1505
|
/**
|
|
1338
|
-
*
|
|
1506
|
+
* Marker source id getter.
|
|
1339
1507
|
*/
|
|
1340
1508
|
get sourceId(): string;
|
|
1341
1509
|
/**
|
|
1342
|
-
*
|
|
1510
|
+
* Draw marker[s] on map.
|
|
1343
1511
|
* @param array {IMarkerOptions | IMarkerOptionsWithFeatureId[]} Coordinate and properties arrays of marker[s].
|
|
1344
1512
|
* If you need to use updateData(), the parameter must be IMarkerOptionsWithFeatureId[].
|
|
1345
1513
|
*/
|
|
1346
1514
|
create(array: Array<IMarkerOptions | IMarkerOptionsWithFeatureId>): void;
|
|
1347
1515
|
/**
|
|
1348
|
-
*
|
|
1516
|
+
* Add, delete or update features of this marker layer.
|
|
1349
1517
|
* This approach requires unique IDs for every feature in the source!!! Including create() parameters.
|
|
1350
1518
|
* @param diff {remove: number[], add: IMarkerOptionsWithFeatureId[], update: IMarkerOptionsWithFeatureId[]}
|
|
1351
1519
|
* remove: Array of feature IDs to remove.
|
|
@@ -1358,11 +1526,11 @@ export declare class Marker {
|
|
|
1358
1526
|
update?: IMarkerOptionsWithFeatureId[];
|
|
1359
1527
|
}): void;
|
|
1360
1528
|
/**
|
|
1361
|
-
*
|
|
1529
|
+
* Remove marker[s] layer and source.
|
|
1362
1530
|
*/
|
|
1363
1531
|
remove(): void;
|
|
1364
1532
|
/**
|
|
1365
|
-
*
|
|
1533
|
+
* Add marker event listener.
|
|
1366
1534
|
* @param eventKey
|
|
1367
1535
|
* @param callback
|
|
1368
1536
|
*/
|
|
@@ -1370,14 +1538,14 @@ export declare class Marker {
|
|
|
1370
1538
|
off: () => void;
|
|
1371
1539
|
};
|
|
1372
1540
|
/**
|
|
1373
|
-
*
|
|
1541
|
+
* Filter marker by custom properties.
|
|
1374
1542
|
* @param filterExpression A expression specifying conditions on source features.
|
|
1375
1543
|
* Only features that match the filter are displayed. Refer:
|
|
1376
1544
|
* https://maplibre.org/maplibre-style-spec/expressions/
|
|
1377
1545
|
*/
|
|
1378
1546
|
setFilter(filterExpression: FilterSpecification): void;
|
|
1379
1547
|
/**
|
|
1380
|
-
*
|
|
1548
|
+
* Filter marker by venueId and ordinal.
|
|
1381
1549
|
* Required 'venueId' and 'ordinal' in properties.
|
|
1382
1550
|
* Markers not matched 'venueId' and 'ordinal' would be hidden;
|
|
1383
1551
|
* Outdoor markers always are shown.
|
|
@@ -1386,7 +1554,7 @@ export declare class Marker {
|
|
|
1386
1554
|
*/
|
|
1387
1555
|
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1388
1556
|
/**
|
|
1389
|
-
*
|
|
1557
|
+
* Filter marker by buildingId and ordinal.
|
|
1390
1558
|
* Required 'buildingId' and 'ordinal' in properties.
|
|
1391
1559
|
* Markers not matched 'buildingId' and 'ordinal' would be hidden;
|
|
1392
1560
|
* Outdoor markers always are shown.
|
|
@@ -1395,14 +1563,14 @@ export declare class Marker {
|
|
|
1395
1563
|
*/
|
|
1396
1564
|
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1397
1565
|
/**
|
|
1398
|
-
*
|
|
1566
|
+
* Set marker's icon-opacity by custom properties.
|
|
1399
1567
|
* @param filterExpression A expression specifying conditions on source features.
|
|
1400
1568
|
* Only features that match the filter are displayed. Refer:
|
|
1401
1569
|
* https://maplibre.org/maplibre-style-spec/expressions/
|
|
1402
1570
|
*/
|
|
1403
1571
|
setOpacity(filterExpression: FilterSpecification): void;
|
|
1404
1572
|
/**
|
|
1405
|
-
*
|
|
1573
|
+
* Set marker's icon-opacity by venueId and ordinal.
|
|
1406
1574
|
* Required 'venueId' and 'ordinal' in properties.
|
|
1407
1575
|
* Opacities of markers matched 'venueId' and 'ordinal' are 1, others are 0.5.
|
|
1408
1576
|
* Outdoor markers' opacity always are 1.
|
|
@@ -1412,7 +1580,7 @@ export declare class Marker {
|
|
|
1412
1580
|
*/
|
|
1413
1581
|
setOpacityByVenue(venueId: string | null | undefined, ordinal: string | null | undefined, inactiveOpacity?: number): void;
|
|
1414
1582
|
/**
|
|
1415
|
-
*
|
|
1583
|
+
* Set marker's icon-opacity by buildingId and ordinal.
|
|
1416
1584
|
* Required 'buildingId' and 'ordinal' in properties.
|
|
1417
1585
|
* Opacities of markers matched 'buildingId' and 'ordinal' are 1, others are 0.5.
|
|
1418
1586
|
* Outdoor markers' opacity always are 1.
|
|
@@ -1443,321 +1611,129 @@ export declare class Poi {
|
|
|
1443
1611
|
private _queryIndoorFeaturesBySharedFloor;
|
|
1444
1612
|
private _queryIndoorFeaturesByFloor;
|
|
1445
1613
|
}
|
|
1446
|
-
export interface IRouteMarkers {
|
|
1447
|
-
from: string | null;
|
|
1448
|
-
to: string | null;
|
|
1449
|
-
stops: Array<string | null> | null;
|
|
1450
|
-
}
|
|
1451
|
-
export interface IRouteStyle<T> {
|
|
1452
|
-
indoorLineColor?: string | ExpressionSpecification;
|
|
1453
|
-
outdoorLineColor?: string | ExpressionSpecification;
|
|
1454
|
-
dashedLineColor?: string | ExpressionSpecification;
|
|
1455
|
-
shuttleBusLineColor?: string | ExpressionSpecification;
|
|
1456
|
-
lineWidth?: number | ExpressionSpecification;
|
|
1457
|
-
dashedLineWidth?: number | ExpressionSpecification;
|
|
1458
|
-
disableDashedLine?: boolean;
|
|
1459
|
-
/** Optional number in range [0, 1]. Defaults to 0.5. "inactiveRouteOpacity" will be 1 if the parameter is greater than 1, and it will be 0 if the parameter is less than 0. */
|
|
1460
|
-
inactiveRouteOpacity?: number;
|
|
1461
|
-
/** Optional number in range [0, 1]. Defaults to 1. "outdoorLineOpacity" will be 1 if the parameter is greater than 1, and it will be 0 if the parameter is less than 0. */
|
|
1462
|
-
outdoorLineOpacity?: number;
|
|
1463
|
-
markers?: T;
|
|
1464
|
-
markerIconSize?: number | ExpressionSpecification;
|
|
1465
|
-
lineSymbol?: {
|
|
1466
|
-
/**
|
|
1467
|
-
* @description Icon url or sprite name.
|
|
1468
|
-
*/
|
|
1469
|
-
image?: string | null;
|
|
1470
|
-
size?: number | ExpressionSpecification;
|
|
1471
|
-
spacing?: number | ExpressionSpecification;
|
|
1472
|
-
};
|
|
1473
|
-
}
|
|
1474
|
-
export type TRouteStyleOptions = IRouteStyle<Partial<IRouteMarkers> | Array<string | null>>;
|
|
1475
|
-
export declare class RoutePainter {
|
|
1476
|
-
private readonly _maplibreMap;
|
|
1477
|
-
private _routeStyle;
|
|
1478
|
-
private _styleDiffs;
|
|
1479
|
-
private _filterBy;
|
|
1480
|
-
private _curVenue;
|
|
1481
|
-
private _curBuilding;
|
|
1482
|
-
private _curOrdinal;
|
|
1483
|
-
private _renderBoundaryLayer;
|
|
1484
|
-
constructor(maplibreMap: maplibregl$1.Map, routeStyle?: TRouteStyleOptions);
|
|
1485
|
-
/**
|
|
1486
|
-
* @description Set the style of the route.
|
|
1487
|
-
* @param routeStyle {TRouteStyleOptions | null} When null, reset to the initial style.
|
|
1488
|
-
*/
|
|
1489
|
-
setStyle(routeStyle: TRouteStyleOptions | null): Promise<void>;
|
|
1490
|
-
/**
|
|
1491
|
-
* @deprecated Use 'setStyle' instead.
|
|
1492
|
-
* @description Set image[s] of the stop marker[s].
|
|
1493
|
-
* @param icons {**Array<string | null> | {from?: string | null; to?: string | null; stops?: Array<string | null> | null;}**}
|
|
1494
|
-
* Array of sprite names or URLs, or the object with specifying icon.
|
|
1495
|
-
* Markers use images in order of icons array.
|
|
1496
|
-
* First is as from-marker, last is as to-marker, the middles are as stop-markers.
|
|
1497
|
-
* If icons array has only one element, all stop markers use this image.
|
|
1498
|
-
* Image file must be in png, webp, or jpg format.
|
|
1499
|
-
* Null means none image.
|
|
1500
|
-
*/
|
|
1501
|
-
setMarkerIcons(icons: Array<string | null> | {
|
|
1502
|
-
from?: string | null;
|
|
1503
|
-
to?: string | null;
|
|
1504
|
-
stops?: Array<string | null> | null;
|
|
1505
|
-
}): Promise<void>;
|
|
1506
|
-
/**
|
|
1507
|
-
* @deprecated Use 'setStyle' instead.
|
|
1508
|
-
* @description Set all icons scale.
|
|
1509
|
-
* @param size number in range [0, ∞), default is 1.
|
|
1510
|
-
*/
|
|
1511
|
-
setMarkerIconSize(size: number): this;
|
|
1512
|
-
/**
|
|
1513
|
-
* @deprecated Use 'setStyle' instead.
|
|
1514
|
-
* @description Set the route color of the indoor part.
|
|
1515
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1516
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1517
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1518
|
-
*/
|
|
1519
|
-
setIndoorLineColor(color: string): this;
|
|
1520
|
-
/**
|
|
1521
|
-
* @deprecated Use 'setStyle' instead.
|
|
1522
|
-
* @description Set the route color of the outdoor part.
|
|
1523
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1524
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1525
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1526
|
-
*/
|
|
1527
|
-
setOutdoorLineColor(color: string): this;
|
|
1528
|
-
/**
|
|
1529
|
-
* @deprecated Use 'setStyle' instead.
|
|
1530
|
-
* @description Set color of dashed lines which connected the start and end markers.
|
|
1531
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1532
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1533
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1534
|
-
*/
|
|
1535
|
-
setDashedLineColor(color: string): this;
|
|
1536
|
-
/**
|
|
1537
|
-
* @deprecated Use 'setStyle' instead.
|
|
1538
|
-
* @description Set color of shuttle bus line.
|
|
1539
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1540
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1541
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1542
|
-
*/
|
|
1543
|
-
setBusLineColor(color: string): this;
|
|
1544
|
-
/**
|
|
1545
|
-
* @description Render route on the map.
|
|
1546
|
-
* @param path Route path from RouteService.search response.
|
|
1547
|
-
* @param markerLocations Coordinate([lng, lat]) array of markers, order from beginning to end.
|
|
1548
|
-
*/
|
|
1549
|
-
render(path: IRoutePath, markerLocations: Array<[
|
|
1550
|
-
number,
|
|
1551
|
-
number
|
|
1552
|
-
]>): void;
|
|
1553
|
-
/**
|
|
1554
|
-
* @description Remove route from the map.
|
|
1555
|
-
*/
|
|
1556
|
-
remove(): void;
|
|
1557
|
-
/**
|
|
1558
|
-
* @description Filter paths' opacity by venue and ordinal.
|
|
1559
|
-
* @param venueId {string | null | undefined}
|
|
1560
|
-
* @param ordinal {string | null | undefined}
|
|
1561
|
-
*/
|
|
1562
|
-
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1563
|
-
/**
|
|
1564
|
-
* @description Filter paths' opacity by building and ordinal.
|
|
1565
|
-
* @param buildingId {string | null | undefined}
|
|
1566
|
-
* @param ordinal {string | null | undefined}
|
|
1567
|
-
*/
|
|
1568
|
-
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1569
|
-
private _classifyFeatures;
|
|
1570
|
-
private _createLineFeature;
|
|
1571
|
-
private _createIconFeature;
|
|
1572
|
-
private _renderSolidLines;
|
|
1573
|
-
private _renderDashedLines;
|
|
1574
|
-
private _renderConnectors;
|
|
1575
|
-
private _renderMarkers;
|
|
1576
|
-
private _addCollectionSource;
|
|
1577
|
-
private _addLineLayer;
|
|
1578
|
-
private _renderLineSymbols;
|
|
1579
|
-
private _addIconLayer;
|
|
1580
|
-
private _updateStyleProperties;
|
|
1581
|
-
private _loadMarkerIcons;
|
|
1582
|
-
private _updateLayers;
|
|
1583
|
-
private _filterRouteOpacity;
|
|
1584
|
-
}
|
|
1585
|
-
/**
|
|
1586
|
-
* AccessControl class, for providing token and managing token lifecycle.
|
|
1587
|
-
* Three events are emitted:
|
|
1588
|
-
* - "updated": Emitted when the token is updated. Usage: accessControl.on("updated", ({ appId, token }) => {});
|
|
1589
|
-
* - "error": Emitted when an error occurs during token update. Usage: accessControl.on("error", (error) => {});
|
|
1590
|
-
* - "closed": Emitted when the access control is closed. Usage: accessControl.on("closed", () => {});
|
|
1591
|
-
*/
|
|
1592
|
-
export declare class AccessControl extends TinyEmitter {
|
|
1593
|
-
private readonly _appId;
|
|
1594
|
-
private readonly _secret;
|
|
1595
|
-
isClosed: boolean;
|
|
1596
|
-
private _timeoutId;
|
|
1597
|
-
private _isInitialized;
|
|
1598
|
-
private _initializationPromise;
|
|
1599
|
-
private _tokenManager;
|
|
1600
|
-
private readonly _from;
|
|
1601
|
-
constructor(appId: string, secret: string, origin?: AccessControlOrigin);
|
|
1602
|
-
ready(): Promise<void>;
|
|
1603
|
-
get appId(): string;
|
|
1604
|
-
/**
|
|
1605
|
-
* Get the token which is kept up-to-date automatically.
|
|
1606
|
-
*/
|
|
1607
|
-
get token(): string;
|
|
1608
|
-
/**
|
|
1609
|
-
* Destroy the access_control instance, stop updating token.
|
|
1610
|
-
*/
|
|
1611
|
-
close(): void;
|
|
1612
|
-
/**
|
|
1613
|
-
* For machine sleep for a long time, timer doesn't work, the token may be expired, so you can force update the token.
|
|
1614
|
-
*/
|
|
1615
|
-
forceUpdateToken(): void;
|
|
1616
|
-
private _initToken;
|
|
1617
|
-
private _loopUpdateToken;
|
|
1618
|
-
}
|
|
1619
1614
|
export declare class VenuesService {
|
|
1620
1615
|
private _api;
|
|
1621
|
-
private _request;
|
|
1622
1616
|
constructor();
|
|
1623
1617
|
/**
|
|
1624
|
-
*
|
|
1618
|
+
* Search venues by ids.
|
|
1625
1619
|
* @param ids Single id string or string ids in array. The number of IDs cannot exceed 10.
|
|
1626
1620
|
*/
|
|
1627
|
-
searchByIds(ids: string | string[]):
|
|
1621
|
+
searchByIds(ids: string | string[]): Promise<TVenueResponse<TVenue>>;
|
|
1628
1622
|
/**
|
|
1629
|
-
*
|
|
1623
|
+
* Search venues by center and distance.
|
|
1630
1624
|
* @param {ISearchByDistanceOptions} options
|
|
1631
1625
|
*/
|
|
1632
|
-
searchByDistance(options: ISearchByDistanceOptions):
|
|
1626
|
+
searchByDistance(options: ISearchByDistanceOptions): Promise<TVenueResponse<TVenue>>;
|
|
1633
1627
|
/**
|
|
1634
|
-
*
|
|
1628
|
+
* Search venues in a rectangular area.
|
|
1635
1629
|
* @param {ISearchByBoundsOptions} options
|
|
1636
1630
|
*/
|
|
1637
|
-
searchByBounds(options: ISearchByBoundsOptions):
|
|
1631
|
+
searchByBounds(options: ISearchByBoundsOptions): Promise<TVenueResponse<TVenue>>;
|
|
1638
1632
|
/**
|
|
1639
|
-
*
|
|
1633
|
+
* Search venues by global.
|
|
1640
1634
|
* @param {ISearchByKeywordsOptions} options
|
|
1641
1635
|
*/
|
|
1642
|
-
searchByGlobal(options: ISearchByKeywordsOptions):
|
|
1643
|
-
searchBySharedFloorId(sharedFloorId: string):
|
|
1644
|
-
search(options: IVenueSearchCustomizedOptions):
|
|
1645
|
-
private
|
|
1636
|
+
searchByGlobal(options: ISearchByKeywordsOptions): Promise<TVenueResponse<TVenue>>;
|
|
1637
|
+
searchBySharedFloorId(sharedFloorId: string): Promise<TVenueResponse<TVenue>>;
|
|
1638
|
+
search(options: IVenueSearchCustomizedOptions): Promise<TVenueResponse<TVenue>>;
|
|
1639
|
+
private _filterVenueProperties;
|
|
1646
1640
|
}
|
|
1647
1641
|
export declare class BuildingsService {
|
|
1648
1642
|
private _api;
|
|
1649
|
-
private _request;
|
|
1650
1643
|
constructor();
|
|
1651
1644
|
/**
|
|
1652
|
-
*
|
|
1645
|
+
* Search buildings by id[s].
|
|
1653
1646
|
* @param ids Single id string or string ids in array. The number of IDs cannot exceed 10.
|
|
1654
1647
|
*/
|
|
1655
|
-
searchByIds(ids: string | string[]):
|
|
1648
|
+
searchByIds(ids: string | string[]): Promise<TBuildingResponse<TBuilding>>;
|
|
1656
1649
|
/**
|
|
1657
|
-
*
|
|
1650
|
+
* Search buildings by center and distance.
|
|
1658
1651
|
* @param {ISearchByDistanceOptions} options
|
|
1659
1652
|
*/
|
|
1660
|
-
searchByDistance(options: ISearchByDistanceOptions):
|
|
1653
|
+
searchByDistance(options: ISearchByDistanceOptions): Promise<TBuildingResponse<TBuilding>>;
|
|
1661
1654
|
/**
|
|
1662
|
-
*
|
|
1655
|
+
* Search buildings in a rectangular area.
|
|
1663
1656
|
* @param {ISearchByBoundsOptions} options
|
|
1664
1657
|
*/
|
|
1665
|
-
searchByBounds(options: ISearchByBoundsOptions):
|
|
1658
|
+
searchByBounds(options: ISearchByBoundsOptions): Promise<TBuildingResponse<TBuilding>>;
|
|
1666
1659
|
/**
|
|
1667
|
-
*
|
|
1660
|
+
* Search buildings global.
|
|
1668
1661
|
* @param {ISearchByKeywordsOptions} options
|
|
1669
1662
|
*/
|
|
1670
|
-
searchByGlobal(options: ISearchByKeywordsOptions):
|
|
1663
|
+
searchByGlobal(options: ISearchByKeywordsOptions): Promise<TBuildingResponse<TBuilding>>;
|
|
1671
1664
|
/**
|
|
1672
|
-
*
|
|
1665
|
+
* Search building by floor id.
|
|
1673
1666
|
* @param floorId
|
|
1674
1667
|
*/
|
|
1675
|
-
searchByFloorId(floorId: string):
|
|
1676
|
-
search(options: IBuildingSearchCustomizedOptions):
|
|
1677
|
-
private
|
|
1668
|
+
searchByFloorId(floorId: string): Promise<TBuildingResponse<TBuilding>>;
|
|
1669
|
+
search(options: IBuildingSearchCustomizedOptions): Promise<TBuildingResponse<TBuilding>>;
|
|
1670
|
+
private _filterBuildingProperties;
|
|
1678
1671
|
}
|
|
1679
1672
|
export declare class PoisService {
|
|
1680
1673
|
private _poisApi;
|
|
1681
1674
|
private _categoriesGroupApi;
|
|
1682
|
-
private _request;
|
|
1683
1675
|
constructor();
|
|
1684
1676
|
/**
|
|
1685
|
-
*
|
|
1677
|
+
* Search POIs by id[s].
|
|
1686
1678
|
* @param ids Single id string or string ids in array. The number of IDs cannot exceed 100.
|
|
1687
1679
|
*/
|
|
1688
|
-
searchByIds(ids: string | string[]):
|
|
1680
|
+
searchByIds(ids: string | string[]): Promise<TPoiResponse<TPoi | TSharedPoi>>;
|
|
1689
1681
|
/**
|
|
1690
|
-
*
|
|
1682
|
+
* Search POIs by radius distance of the center point.
|
|
1691
1683
|
* @param options {ISearchByDistanceOptions}
|
|
1692
1684
|
*/
|
|
1693
|
-
searchByDistance(options: ISearchByDistanceOptions):
|
|
1685
|
+
searchByDistance(options: ISearchByDistanceOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
|
|
1694
1686
|
/**
|
|
1695
|
-
*
|
|
1687
|
+
* Search POIs in a rectangular area.
|
|
1696
1688
|
* @param options {IPoiSearchByBoundsOptions}
|
|
1697
1689
|
* 'orderBy' cannot be used with 'keywords'.
|
|
1698
1690
|
*/
|
|
1699
|
-
searchByBounds(options: IPoiSearchByBoundsOptions):
|
|
1691
|
+
searchByBounds(options: IPoiSearchByBoundsOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
|
|
1700
1692
|
/**
|
|
1701
|
-
*
|
|
1693
|
+
* Search POIs of a building.
|
|
1702
1694
|
* @param options {ISearchByBuildingOptions}
|
|
1703
1695
|
* 'orderBy' cannot be used with 'keywords'.
|
|
1704
1696
|
*/
|
|
1705
|
-
searchByBuilding(options: ISearchByBuildingOptions):
|
|
1697
|
+
searchByBuilding(options: ISearchByBuildingOptions): Promise<TPoiResponse<TPoi>>;
|
|
1706
1698
|
/**
|
|
1707
|
-
*
|
|
1699
|
+
* Search POIs of a venue.
|
|
1708
1700
|
* @param options {ISearchByVenueOptions}
|
|
1709
1701
|
* 'orderBy' cannot be used with 'keywords'.
|
|
1710
1702
|
*/
|
|
1711
|
-
searchByVenue(options: ISearchByVenueOptions):
|
|
1712
|
-
/**
|
|
1713
|
-
* @deprecated Use 'searchByFloors()' instead.
|
|
1714
|
-
* @description Search POIs of a floor.
|
|
1715
|
-
* @param options {TSearchByFloorOptions}
|
|
1716
|
-
* 'orderBy' cannot be used with 'keywords'.
|
|
1717
|
-
*/
|
|
1718
|
-
searchByFloor(options: TSearchByFloorOptions): TPromisePois<IPoi | ISharedPoi>;
|
|
1703
|
+
searchByVenue(options: ISearchByVenueOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
|
|
1719
1704
|
/**
|
|
1720
1705
|
* Search POIs of floors.
|
|
1721
1706
|
* @param options {TSearchByFloorsOptions}
|
|
1722
1707
|
* 'orderBy' cannot be used with 'keywords'.
|
|
1723
1708
|
*/
|
|
1724
|
-
searchByFloors(options: TSearchByFloorsOptions):
|
|
1709
|
+
searchByFloors(options: TSearchByFloorsOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
|
|
1725
1710
|
/**
|
|
1726
|
-
*
|
|
1711
|
+
* Search surrounding POIs based on the user's location and orientation.
|
|
1727
1712
|
* @param {TSearchByOrientationOptions} options
|
|
1728
1713
|
*/
|
|
1729
|
-
searchByOrientation(options: TSearchByOrientationOptions):
|
|
1714
|
+
searchByOrientation(options: TSearchByOrientationOptions): Promise<TOrientationPoisResponse>;
|
|
1730
1715
|
/**
|
|
1731
|
-
*
|
|
1716
|
+
* Search POIs by category or excluded categories.
|
|
1732
1717
|
* @param {TSearchByCategoryOptions} options
|
|
1733
1718
|
*/
|
|
1734
|
-
searchByCategory(options: TSearchByCategoryOptions):
|
|
1719
|
+
searchByCategory(options: TSearchByCategoryOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
|
|
1735
1720
|
/**
|
|
1736
|
-
*
|
|
1721
|
+
* Search poi categories by venue id, building id, or floor id.
|
|
1737
1722
|
* @param {TSearchCategoriesOptions} options
|
|
1738
1723
|
*/
|
|
1739
|
-
searchCategories(options: TSearchCategoriesOptions):
|
|
1740
|
-
search(options: IPoiSearchCustomizedOptions):
|
|
1741
|
-
private
|
|
1724
|
+
searchCategories(options: TSearchCategoriesOptions): Promise<TCategoriesResponse>;
|
|
1725
|
+
search(options: IPoiSearchCustomizedOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
|
|
1726
|
+
private _filterPoiProperties;
|
|
1742
1727
|
}
|
|
1743
1728
|
export declare class RouteService {
|
|
1744
1729
|
private _api;
|
|
1745
|
-
private _request;
|
|
1746
1730
|
constructor();
|
|
1747
1731
|
/**
|
|
1748
|
-
*
|
|
1732
|
+
* Search the route of two or more points.
|
|
1749
1733
|
* @param options {IRouteSearchOptions}
|
|
1750
1734
|
*/
|
|
1751
|
-
search(options: IRouteSearchOptions):
|
|
1735
|
+
search(options: IRouteSearchOptions): Promise<IResponse<IResponseRoute>>;
|
|
1752
1736
|
}
|
|
1753
|
-
export type InputProduct = "UI_SDK" | "ANYWHERE";
|
|
1754
|
-
/**
|
|
1755
|
-
* @private
|
|
1756
|
-
* This method is internal and should not be exposed in the documentation.
|
|
1757
|
-
*/
|
|
1758
|
-
export declare const __internal: {
|
|
1759
|
-
[x: symbol]: (names: InputProduct[]) => void;
|
|
1760
|
-
};
|
|
1761
1737
|
export interface IMapxusLib {
|
|
1762
1738
|
Map: typeof Map$1;
|
|
1763
1739
|
/** @deprecated */
|
|
@@ -1766,8 +1742,6 @@ export interface IMapxusLib {
|
|
|
1766
1742
|
Poi: typeof Poi;
|
|
1767
1743
|
RoutePainter: typeof RoutePainter;
|
|
1768
1744
|
/** @deprecated */
|
|
1769
|
-
AccessControl: typeof AccessControl;
|
|
1770
|
-
/** @deprecated */
|
|
1771
1745
|
BuildingFilterControl: typeof BuildingFilterControl;
|
|
1772
1746
|
BuildingSelectorHandler: typeof BuildingSelectorHandler;
|
|
1773
1747
|
/** @deprecated */
|
|
@@ -1784,60 +1758,11 @@ export interface IMapxusLib {
|
|
|
1784
1758
|
PoisService: typeof PoisService;
|
|
1785
1759
|
RouteService: typeof RouteService;
|
|
1786
1760
|
}
|
|
1787
|
-
|
|
1788
|
-
convertBrowserLangToPresetLang: (lang: string) => PresetLanguage | null;
|
|
1789
|
-
getAccessToken: (appId: string, secret: string, platform?: TPlatform, origin?: string) => Promise<{
|
|
1790
|
-
accessToken: string;
|
|
1791
|
-
expiredTime: number;
|
|
1792
|
-
}>;
|
|
1793
|
-
getIdentifier: () => Promise<string>;
|
|
1794
|
-
setGetTokenAsync: (fn: TAccessTokenGetter) => void;
|
|
1795
|
-
setupTokenManager: () => Promise<void>;
|
|
1796
|
-
VERSION: string;
|
|
1797
|
-
OFFSET: number;
|
|
1798
|
-
PAGE: number;
|
|
1799
|
-
ERRORS: readonly [
|
|
1800
|
-
"unauthorized",
|
|
1801
|
-
"initError"
|
|
1802
|
-
];
|
|
1803
|
-
ASSISTANT_LAYER_INDOOR_FLOORS: string;
|
|
1804
|
-
ASSISTANT_LAYER_SHARED_FLOORS: string;
|
|
1805
|
-
__internal: {
|
|
1806
|
-
[x: symbol]: (names: InputProduct[]) => void;
|
|
1807
|
-
};
|
|
1808
|
-
}
|
|
1809
|
-
export declare const VERSION: string;
|
|
1810
|
-
export declare const OFFSET: number;
|
|
1811
|
-
export declare const PAGE: number;
|
|
1812
|
-
export declare const ERRORS: readonly [
|
|
1813
|
-
"unauthorized",
|
|
1814
|
-
"initError"
|
|
1815
|
-
];
|
|
1816
|
-
/**
|
|
1817
|
-
* @description Convert browser language to preset language
|
|
1818
|
-
* @param language {string} window.navigator.language
|
|
1819
|
-
*/
|
|
1820
|
-
export declare function convertBrowserLangToPresetLang(language: string): PresetLanguage | null;
|
|
1821
|
-
/**
|
|
1822
|
-
* Get access token
|
|
1823
|
-
* @param appId
|
|
1824
|
-
* @param secret
|
|
1825
|
-
* @param platform get accessToken of the specific platform(ios or android), optional
|
|
1826
|
-
* @param origin the reference of appId, optional
|
|
1827
|
-
* @returns {accessToken: string; expiresIn: number;} expiresIn means the valid time of accessToken
|
|
1828
|
-
*/
|
|
1829
|
-
export declare function getAccessToken(appId: string, secret: string, platform?: TPlatform, origin?: string): Promise<{
|
|
1830
|
-
accessToken: string;
|
|
1831
|
-
expiredTime: number;
|
|
1832
|
-
}>;
|
|
1833
|
-
export declare const ASSISTANT_LAYER_INDOOR_FLOORS = "reserve_mapxus-level-fill";
|
|
1834
|
-
export declare const ASSISTANT_LAYER_SHARED_FLOORS = "reserve_mapxus-shared-level-fill";
|
|
1835
|
-
export declare function getIdentifier(): Promise<string>;
|
|
1836
|
-
export declare function setGetTokenAsync(fn: TAccessTokenGetter): void;
|
|
1837
|
-
export declare function setupTokenManager(): Promise<void>;
|
|
1761
|
+
declare const mapxusLib: IMapxusLib;
|
|
1838
1762
|
|
|
1839
1763
|
export {
|
|
1840
1764
|
Map$1 as Map,
|
|
1765
|
+
mapxusLib as default,
|
|
1841
1766
|
};
|
|
1842
1767
|
|
|
1843
1768
|
export {};
|