@mapxus/mapxus-map-jp 9.3.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/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,45 +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 FloorSwitchScope {
47
- VENUE = 0,
48
- GLOBAL = 1
49
- }
50
- export declare enum AccessControlOrigin {
51
- Access = "access_control",
52
- Map = "map"
53
- }
54
- export interface IBbox {
55
- maxLat: number;
56
- maxLon: number;
57
- minLat: number;
58
- minLon: number;
59
- }
60
- export type TPointFeature = GeoJSON.Feature<Point, GeoJsonProperties>;
61
- export type TLineStringFeature = GeoJSON.Feature<LineString, GeoJsonProperties>;
62
26
  export type TMultilingualString = Partial<Record<PresetLanguage, string>>;
63
27
  export interface IMultilingualName extends TMultilingualString {
64
28
  default: string;
@@ -73,756 +37,479 @@ export interface ISharedFloor {
73
37
  ordinal: string;
74
38
  name: IMultilingualName;
75
39
  }
76
- export interface IFloorSelectorStyle {
77
- fontColor?: string;
78
- activeFontColor?: string;
79
- backgroundColor?: string;
80
- activeBackgroundColor?: string;
81
- itemSize?: number;
82
- itemCount?: number;
83
- defaultFolded?: boolean;
84
- }
85
- export interface ILocation {
86
- lat: number;
87
- lon: number;
88
- }
89
- export type TResponseResult<T> = AxiosPromise<{
90
- code: number;
91
- message: string;
92
- result: T;
93
- }>;
94
- export type IMultilingualAddress = Record<keyof IMultilingualName, {
95
- housenumber: string;
96
- street: string;
97
- }>;
98
- export interface IBuildingBasicInfo {
99
- address: IMultilingualAddress;
100
- bbox: IBbox;
101
- city?: string;
102
- country: string;
103
- description: TMultilingualString;
104
- labelCenter: ILocation;
105
- name: IMultilingualName;
106
- region: string;
107
- type: string;
108
- }
109
- export interface IBusinessInfo {
110
- appUrl?: {
111
- android?: string;
112
- ios?: string;
113
- };
114
- businessStatus?: {
115
- status: "OPEN" | "TEMPORARILY_CLOSED";
116
- };
117
- email?: string;
118
- icon?: string;
119
- openingHours?: string;
120
- phone?: string;
121
- photos?: Array<IPhotoSpec>;
122
- publicData?: string[];
123
- totalPhotoCount?: number;
124
- website?: string;
125
- }
126
- export interface IMapServices {
127
- signalMap: boolean;
128
- visualMap: boolean;
129
- }
130
- export interface IFloorBase {
131
- id: string;
132
- ordinal: number;
133
- }
134
- export interface IBuildingInlineFloor extends IFloorBase, IMapServices {
135
- code: string;
136
- }
137
- export interface IBuilding extends IBuildingBasicInfo, IBusinessInfo, IMapServices {
138
- buildingId: string;
139
- buildingName: IMultilingualName;
140
- buildingOutlineId: number;
141
- defaultFloor?: string;
142
- floors: IBuildingInlineFloor[];
143
- groundFloor: string;
144
- isPrivate: "yes" | "no";
145
- organization: string;
146
- venueId: string;
147
- venueName: IMultilingualName;
148
- }
149
- export interface IResponseBuildings {
150
- buildings: IBuilding[];
151
- total: number;
152
- }
153
- export type TPromiseBuildings = TResponseResult<IResponseBuildings>;
154
- export declare enum DistanceSearchType {
155
- POINT = "Point",
156
- POLYGON = "Polygon"
157
- }
158
- export declare enum OrientationDistanceSearchType {
159
- POINT = "Point",
160
- POLYGON = "Polygon",
161
- GATE = "Gate"
162
- }
163
- export declare enum PoisOrderBy {
164
- DEFAULT_NAME = "DefaultName"
165
- }
166
- export declare enum PoisSortBy {
167
- ABSOLUTE_DISTANCE = "AbsoluteDistance",
168
- ACTUAL_DISTANCE = "ActualDistance"
40
+ export interface ISelectedHighlightStyle {
41
+ lineWidth?: number;
42
+ lineColor?: string;
43
+ lineOpacity?: number;
44
+ lineOffset?: number;
169
45
  }
170
- export interface ISection {
171
- category: string;
172
- id: string;
173
- sectionName: IMultilingualName;
174
- correlationId?: string;
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;
175
60
  }
176
- export interface IPoiCommonOptions {
177
- accessibilityDetail: IMultilingualName;
178
- category: string[];
179
- descriptions: IMultilingualName;
180
- distance?: number;
181
- id: string;
182
- location: ILocation;
183
- name: IMultilingualName;
184
- osmRefId: number;
185
- poiId: string;
186
- sections?: ISection[];
61
+ export interface IDisplayedLevel {
62
+ level: string;
63
+ overlap: string[] | null;
187
64
  venueId: string;
188
65
  }
189
- export interface IPoiFloor {
190
- floor: string;
191
- floorId: string;
192
- }
193
- export interface ISharedPoiFloor {
194
- sharedFloorId: string;
195
- sharedFloorNames: IMultilingualName;
196
- }
197
- export type TSizes = "original" | "thumbnail" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
198
- export type TPhotoSizeSpec = Partial<Record<TSizes, {
199
- pixelWidth: number;
200
- pixelHeight: number;
201
- url: string;
202
- }>>;
203
- export interface IPhotoSpec {
204
- aspectRatio: string;
205
- coordinates: {
206
- longitude: number;
207
- latitude: number;
208
- };
209
- dateAdded: string;
210
- id: string;
211
- photoBy: string;
212
- photoSizes: TPhotoSizeSpec;
213
- source: string;
214
- type: string;
215
- }
216
- export interface IPoi extends IPoiFloor, IPoiCommonOptions, IBusinessInfo {
217
- buildingId: string;
218
- }
219
- export interface ISharedPoi extends ISharedPoiFloor, IPoiCommonOptions {
220
- }
221
- export type TPromisePois<T> = TResponseResult<{
222
- pois: T[];
223
- total: number;
224
- }>;
225
- /** poi categories from searchCategories() */
226
- export interface IPoiCategory {
227
- category: string;
228
- description: string | null;
229
- id: string;
230
- title: TMultilingualString;
231
- }
232
- export interface ICategoryGroupItem extends IPoiCategory {
233
- count: number;
234
- featureType: string;
235
- parents: string[];
236
- venueId: string;
237
- venueName: TMultilingualString;
66
+ export interface ILayeredData {
67
+ displayedLevels: IDisplayedLevel[];
68
+ selectedLevelIds: string[];
69
+ alwaysDisplayedSharedLevelIds: string[];
70
+ maskBuildingIds: string[];
71
+ maskSharedFloorIds: string[];
238
72
  }
239
- export interface ICategoriesGroup {
240
- categoryGroups: ICategoryGroupItem[];
241
- total: number;
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[];
242
80
  }
243
- export type TPromiseCategories = TResponseResult<ICategoriesGroup>;
244
- /** pois response from searchByOrientation() */
245
- export interface IOrientationPoiCommonOptions {
246
- angle: number;
247
- category: string[];
248
- descriptions: IMultilingualName;
249
- distance: number;
250
- distanceSource: string;
251
- id: string;
252
- location: ILocation;
253
- name: IMultilingualName;
254
- osmRefId: number;
255
- poiId: string;
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;
256
95
  }
257
- export interface IOrientationNormalPoi extends IPoiFloor, IOrientationPoiCommonOptions, IBusinessInfo {
258
- buildingId: string;
259
- /** @deprecated "description" will be removed soon, use "descriptions" instead */
260
- description?: string;
261
- }
262
- export interface IOrientationSharedPoi extends ISharedPoiFloor, IOrientationPoiCommonOptions {
263
- }
264
- export type TOrientationPoi = IOrientationNormalPoi | IOrientationSharedPoi;
265
- export type TPromiseOrientationPois = TResponseResult<TOrientationPoi[]>;
266
- export interface IMapClickEvent {
267
- coordinate: LngLat;
268
- building: MapGeoJSONFeature | null;
269
- venue: MapGeoJSONFeature | null;
270
- floor: IFloor | ISharedFloor | null;
271
- }
272
- export interface IPoiClickEvent {
273
- coordinate: LngLat;
274
- poi: MapGeoJSONFeature;
275
- venue: MapGeoJSONFeature | null;
276
- floor: IFloor | ISharedFloor | null;
277
- building?: MapGeoJSONFeature | null;
278
- sections?: ISection[];
279
- }
280
- export interface IPointClickEvent {
281
- coordinate: LngLat;
282
- point: PointLike;
283
- }
284
- export interface IMapChangeEvent {
285
- venue: MapGeoJSONFeature | null;
286
- building: MapGeoJSONFeature | null;
287
- floor: IFloor | ISharedFloor | null;
288
- }
289
- export interface ISelectedHighlightStyle {
290
- lineWidth?: number;
291
- lineColor?: string;
292
- lineOpacity?: number;
293
- lineOffset?: number;
294
- }
295
- export interface IPlatformCommon {
296
- sdkVersion: string;
297
- identifier: string;
298
- }
299
- export interface IPlatformIos extends IPlatformCommon {
300
- bundleId: string;
301
- }
302
- export interface IPlatformAndroid extends IPlatformCommon {
303
- sha1: string;
304
- packageName: string;
305
- }
306
- export type TPlatform = IPlatformIos | IPlatformAndroid;
307
- export interface IMapOtherOptions {
308
- map: maplibregl$1.Map;
309
- floorSelectorEnabled?: boolean;
310
- buildingSelectorEnabled?: boolean;
311
- /**
312
- * 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
313
- * the priority is: poiId > floorId > buildingId > venueId.
314
- */
315
- venueId?: string;
316
- /**
317
- * 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
318
- * the priority is: poiId > floorId > buildingId > venueId.
319
- */
320
- buildingId?: string;
321
- /**
322
- * 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
323
- * the priority is: poiId > floorId > buildingId > venueId.
324
- */
325
- floorId?: string;
326
- sharedFloorId?: string;
327
- /**
328
- * Initialize the map with POI as the center point, use it with maplibregl.Map 'zoom' option.
329
- * 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
330
- * the priority is: poiId > floorId > buildingId > venueId.
331
- */
332
- poiId?: string;
333
- outdoorMapShown?: boolean;
334
- theme?: ThemeType | string;
335
- /** @deprecated 'collapseCopyright' will be removed soon. You'd not use it. */
336
- collapseCopyright?: boolean;
337
- selectedHighlightStyle?: ISelectedHighlightStyle;
338
- floorSelectorStyle?: IFloorSelectorStyle;
339
- /**
340
- * Whether unselected buildings are masked, default is false.
341
- */
342
- maskNonSelectedAreas?: boolean;
343
- /**
344
- * @deprecated use "fitBounds" instead.
345
- * Whether the boundary of the selected building fits the screen, default is false.
346
- * Can only be used for 'floorId', 'buildingId' and 'venueId' initialization, not for 'poiId'.
347
- * When it is true, the 'boundsPadding' option is valid, and the 'zoom' option of maplibregl.Map is invalid.
348
- */
349
- fitBuildingBounds?: boolean;
350
- fitBounds?: boolean;
351
- /**
352
- * The amount of padding in pixels to add to the given bounds, default is 30.
353
- * Requires 'fitBuildingBounds' to be 'true'.
354
- * Parameter value ref to: https://maplibre.org/maplibre-gl-js/docs/API/types/maplibregl.PaddingOptions/
355
- */
356
- boundsPadding?: number | maplibregl$1.PaddingOptions;
357
- language?: PresetLanguage;
358
- /** Auto Select Building by panning building to map center, default is false. */
359
- autoSelectBuilding?: boolean;
360
- transformRequest?: maplibregl$1.RequestTransformFunction | null;
361
- mapxusLogoEnabled?: boolean;
362
- enableIndoorClickSelection?: boolean;
363
- enableOutdoorClickSelection?: boolean;
364
- floorSwitchScope?: FloorSwitchScope;
365
- }
366
- export interface IMapAccessWithAppId {
367
- appId: string;
368
- secret: string;
369
- /**
370
- * get accessToken of the specific platform(ios or android), optional, default is web
371
- * @private
372
- */
373
- platform?: TPlatform;
374
- }
375
- export interface ITokenResponse {
376
- accessToken: string;
377
- /** timestamp */
378
- expiredTime: number;
379
- identifier?: string;
380
- sdkVersion?: string;
381
- }
382
- export type TAccessTokenGetter = () => Promise<ITokenResponse>;
383
- export interface IMapAccessWithToken {
384
- getTokenAsync: TAccessTokenGetter;
385
- }
386
- export type TMapKeys = IMapAccessWithAppId | IMapAccessWithToken;
387
- export type IMapOption = IMapOtherOptions & TMapKeys;
388
- export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
389
- export interface IMarkerOptions {
390
- lngLat: [
391
- number,
392
- number
393
- ];
394
- properties?: {
395
- [k: string]: string;
396
- };
397
- }
398
- export interface IMarkerOptionsWithFeatureId extends IMarkerOptions {
399
- featureId: number;
400
- }
401
- export interface ITokenInfo {
402
- "app:name": string;
403
- auth_time: number;
404
- "cognito:username": string;
405
- "custom:organization": string;
406
- exp: number;
407
- iat: number;
408
- organization: string;
409
- "organization:name": string;
410
- privatization_type: string;
411
- username: string;
412
- }
413
- export declare enum VehicleType {
414
- FOOT = "foot",
415
- WHEELCHAIR = "wheelchair",
416
- ESCALATOR = "escalator",
417
- EMERGENCY = "emergency"
418
- }
419
- export interface IRouteInfo {
420
- copyrights: string[];
421
- took: number;
422
- }
423
- export interface IInstruction {
424
- building_id: string;
425
- distance: number;
426
- floor_id: string;
427
- heading: number;
428
- interval: [
429
- number,
430
- number
431
- ];
432
- on_shared_floor: boolean;
433
- ordinal: number;
434
- sign: number;
435
- street_name: string;
436
- text: string;
437
- time: number;
438
- type: string | null;
439
- venue_id: string;
440
- }
441
- export interface IRoutePath {
442
- bbox: [
443
- number,
444
- number,
445
- number,
446
- number
447
- ];
448
- distance: number;
449
- instructions: IInstruction[];
450
- points: {
451
- coordinates: Array<[
452
- number,
453
- number
454
- ]>;
455
- type: string;
456
- };
457
- snapped_waypoints: {
458
- coordinates: Array<[
459
- number,
460
- number
461
- ]>;
462
- type: string;
463
- };
464
- time: number;
465
- }
466
- export interface IResponseRoute {
467
- infos: IRouteInfo | null;
468
- paths: IRoutePath[];
469
- }
470
- export type TPromiseRoute = TResponseResult<IResponseRoute>;
471
- export interface IRoutePoint {
472
- lat: number;
473
- lon: number;
474
- floorId?: string;
475
- }
476
- export interface IRouteSearchOptions {
477
- /**
478
- * Points are in order, from -> stops -> to.
479
- * The length of points must be: 1 < {points.length} < 6.
480
- */
481
- points: IRoutePoint[];
482
- /**
483
- * Default is "foot".
484
- */
485
- vehicle?: VehicleType;
486
- /**
487
- * Language-specific response. Default is "en".
488
- */
489
- locale?: PresetLanguage;
490
- }
491
- export interface IRouteMarkers {
492
- from: string | null;
493
- to: string | null;
494
- stops: Array<string | null> | null;
495
- }
496
- export interface IRouteStyle<T> {
497
- indoorLineColor?: string | ExpressionSpecification;
498
- outdoorLineColor?: string | ExpressionSpecification;
499
- dashedLineColor?: string | ExpressionSpecification;
500
- shuttleBusLineColor?: string | ExpressionSpecification;
501
- lineWidth?: number | ExpressionSpecification;
502
- dashedLineWidth?: number | ExpressionSpecification;
503
- disableDashedLine?: boolean;
504
- /** 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. */
505
- inactiveRouteOpacity?: number;
506
- /** 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. */
507
- outdoorLineOpacity?: number;
508
- markers?: T;
509
- markerIconSize?: number | ExpressionSpecification;
510
- lineSymbol?: {
511
- /**
512
- * Icon url or sprite name.
513
- */
514
- image?: string | null;
515
- size?: number | ExpressionSpecification;
516
- spacing?: number | ExpressionSpecification;
517
- };
518
- }
519
- export type TRouteStyleOptions = IRouteStyle<Partial<IRouteMarkers> | Array<string | null>>;
520
- export declare class RoutePainter {
521
- private readonly _maplibreMap;
522
- private _routeStyle;
523
- private _styleDiffs;
524
- private _filterBy;
525
- private _curVenue;
526
- private _curBuilding;
527
- private _curOrdinal;
528
- private _renderBoundaryLayer;
529
- constructor(maplibreMap: maplibregl$1.Map, routeStyle?: TRouteStyleOptions);
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;
530
156
  /**
531
- * Set the style of the route.
532
- * @param routeStyle {TRouteStyleOptions | null} When null, reset to the initial style.
157
+ * @deprecated
158
+ * Set whether to allow exiting building.
159
+ * @param allow
533
160
  */
534
- setStyle(routeStyle: TRouteStyleOptions | null): Promise<void>;
161
+ setAllowOutdoorSwitch(allow: boolean): this;
535
162
  /**
536
- * @deprecated Use 'setStyle' instead.
537
- * Set image[s] of the stop marker[s].
538
- * @param icons Array of sprite names or URLs, or the object with specifying icon.
539
- * Markers use images in order of icons array.
540
- * First is as from-marker, last is as to-marker, the middles are as stop-markers.
541
- * If icons array has only one element, all stop markers use this image.
542
- * Image file must be in png, webp, or jpg format.
543
- * Null means none image.
163
+ * @deprecated
164
+ * Set whether to allow switching building.
165
+ * @param allow
544
166
  */
545
- setMarkerIcons(icons: Array<string | null> | {
546
- from?: string | null;
547
- to?: string | null;
548
- stops?: Array<string | null> | null;
549
- }): Promise<void>;
167
+ setAllowBuildingSwitch(allow: boolean): this;
168
+ setAllowIndoorClickSelect(allow: boolean): void;
169
+ setAllowOutdoorClickSelect(allow: boolean): void;
170
+ setFloorSwitchScope(scope: FloorSwitchScope): void;
550
171
  /**
551
- * @deprecated Use 'setStyle' instead.
552
- * Set all icons scale.
553
- * @param size number in range [0, ∞), default is 1.
172
+ * Get the current floor's information.
554
173
  */
555
- setMarkerIconSize(size: number): this;
174
+ get floor(): IFloor | ISharedFloor | null;
556
175
  /**
557
- * @deprecated Use 'setStyle' instead.
558
- * Set the route color of the indoor part.
559
- * @param color The color type is a color in the sRGB color space.
560
- * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
561
- * Predefined HTML colors names, like yellow and blue, are also permitted.
176
+ * Get the current building's information.
177
+ * @returns {MapGeoJSONFeature | null}
562
178
  */
563
- setIndoorLineColor(color: string): this;
179
+ get building(): MapGeoJSONFeature | null;
564
180
  /**
565
- * @deprecated Use 'setStyle' instead.
566
- * Set the route color of the outdoor part.
567
- * @param color The color type is a color in the sRGB color space.
568
- * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
569
- * Predefined HTML colors names, like yellow and blue, are also permitted.
181
+ * Get the current venue's information.
182
+ * @returns {MapGeoJSONFeature | null}
570
183
  */
571
- setOutdoorLineColor(color: string): this;
184
+ get venue(): MapGeoJSONFeature | null;
572
185
  /**
573
- * @deprecated Use 'setStyle' instead.
574
- * Set color of dashed lines which connected the start and end markers.
575
- * @param color The color type is a color in the sRGB color space.
576
- * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
577
- * Predefined HTML colors names, like yellow and blue, are also permitted.
186
+ * Get the geo features of bbox.
578
187
  */
579
- setDashedLineColor(color: string): this;
188
+ get features(): MapGeoJSONFeature[];
580
189
  /**
581
- * @deprecated Use 'setStyle' instead.
582
- * Set color of shuttle bus line.
583
- * @param color The color type is a color in the sRGB color space.
584
- * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
585
- * Predefined HTML colors names, like yellow and blue, are also permitted.
190
+ * Get features from bbox by id.
191
+ * @param id
192
+ * @param options
586
193
  */
587
- setBusLineColor(color: string): this;
194
+ getFeaturesById(id: string, options?: {
195
+ layerIds?: string[];
196
+ filter?: (feature: MapGeoJSONFeature) => boolean;
197
+ }): MapGeoJSONFeature[];
588
198
  /**
589
- * Render route on the map.
590
- * @param path Route path from RouteService.search response.
591
- * @param markerLocations Coordinate([lng, lat]) array of markers, order from beginning to end.
199
+ * Switch floor by ordinal.
200
+ * @param ordinal
592
201
  */
593
- render(path: IRoutePath, markerLocations: Array<[
594
- number,
595
- number
596
- ]>): void;
202
+ switchFloorByOrdinal(ordinal: string | null): Promise<void>;
203
+ setOutdoorMapShown(shown: boolean): void;
597
204
  /**
598
- * Remove route from the map.
205
+ * Set the style of the selected floor border. If set to null, the border will be invisible.
206
+ * @param style {ISelectedHighlightStyle | null}
599
207
  */
600
- remove(): void;
208
+ setSelectedHighlightStyle(style: ISelectedHighlightStyle | null): void;
601
209
  /**
602
- * Filter paths' opacity by venue and ordinal.
603
- * @param venueId {string | null | undefined}
604
- * @param ordinal {string | null | undefined}
210
+ * Listen for the indoor map state, including the changes of venue, building and floor.
211
+ * @param listener
605
212
  */
606
- setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
213
+ onMapChange(listener: (params: {
214
+ venue: MapGeoJSONFeature | null;
215
+ building: MapGeoJSONFeature | null;
216
+ floor: IFloor;
217
+ }) => void): {
218
+ unsubscribe: VoidFunction;
219
+ };
607
220
  /**
608
- * Filter paths' opacity by building and ordinal.
609
- * @param buildingId {string | null | undefined}
610
- * @param ordinal {string | null | undefined}
221
+ * Select a building feature
222
+ * @param feature {MapGeoJSONFeature | null}
223
+ * @param options {floorId?: string, dragPan?: boolean}
611
224
  */
612
- setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
613
- private _classifyFeatures;
614
- private _createLineFeature;
615
- private _createIconFeature;
616
- private _renderSolidLines;
617
- private _renderDashedLines;
618
- private _renderConnectors;
619
- private _renderMarkers;
620
- private _addCollectionSource;
621
- private _addLineLayer;
622
- private _renderLineSymbols;
623
- private _addIconLayer;
624
- private _updateStyleProperties;
625
- private _loadMarkerIcons;
626
- private _updateLayers;
627
- private _filterRouteOpacity;
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;
270
+ }
271
+ export interface ILocation {
272
+ lat: number;
273
+ lon: number;
274
+ }
275
+ export interface IResponse<T> {
276
+ code: number;
277
+ message: string;
278
+ result: T;
279
+ }
280
+ export type IMultilingualAddress = Record<keyof IMultilingualName, {
281
+ housenumber: string;
282
+ street: string;
283
+ }>;
284
+ export interface IBbox {
285
+ maxLat: number;
286
+ maxLon: number;
287
+ minLat: number;
288
+ minLon: number;
289
+ }
290
+ export interface IBuildingBasicInfo {
291
+ address: IMultilingualAddress;
292
+ bbox: IBbox;
293
+ city?: string;
294
+ country: string;
295
+ description: TMultilingualString;
296
+ labelCenter: ILocation;
297
+ name: IMultilingualName;
298
+ region: string;
299
+ type: string;
300
+ }
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[];
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;
628
355
  }
629
- export interface IVenueInlineSharedFloor extends IFloorBase, IMapServices {
630
- name: IMultilingualName;
631
- refBuilding: Array<string>;
356
+ export interface IMapServices {
357
+ signalMap: boolean;
358
+ visualMap: boolean;
632
359
  }
633
- export interface IVenueInlineBuilding extends IMapServices {
360
+ export interface IFloorBase {
361
+ id: string;
362
+ ordinal: number;
363
+ }
364
+ export interface IBuildingInlineFloor extends IFloorBase, IMapServices {
365
+ code: string;
366
+ }
367
+ export interface IBuildingInternal extends IBuildingBasicInfo, IBusinessInfo, IMapServices {
368
+ buildingId: string;
634
369
  buildingName: IMultilingualName;
635
370
  buildingOutlineId: number;
636
371
  defaultFloor?: string;
637
372
  floors: IBuildingInlineFloor[];
638
- id: string;
639
- name: IMultilingualName;
640
- point: {
641
- type: string;
642
- coordinates: [
643
- number,
644
- number
645
- ];
646
- };
647
- }
648
- export interface IVenue extends IBuildingBasicInfo, IBusinessInfo, IMapServices {
649
- buildings: IVenueInlineBuilding[];
650
- defaultBuilding?: string;
651
- id: string;
652
- organization: string[];
653
- owner: string;
654
- restricted: boolean;
655
- sharedFloors: IVenueInlineSharedFloor[];
656
- venueOutlineId: number;
373
+ groundFloor: string;
374
+ isPrivate: "yes" | "no";
375
+ organization: string;
376
+ venueId: string;
377
+ venueName: IMultilingualName;
657
378
  }
658
- export interface IResponseVenues {
659
- venues: IVenue[];
379
+ export type TBuilding = Omit<IBuildingInternal, TOmittedBuildingKeys>;
380
+ export type TBuildingResponse<T> = IResponse<{
381
+ buildings: T[];
660
382
  total: number;
383
+ }>;
384
+ export declare enum DistanceSearchType {
385
+ POINT = "Point",
386
+ POLYGON = "Polygon"
661
387
  }
662
- export type TPromiseVenues = TResponseResult<IResponseVenues>;
663
- export interface IQuantitySpec {
664
- /**
665
- * The maximum value is 100, default is 10.
666
- */
667
- offset?: number;
668
- /**
669
- * Results for specified page number. Default is 1.
670
- */
671
- page?: number;
672
- }
673
- export interface IDistanceSpec {
674
- /**
675
- * The center of searching range, [lng, lat].
676
- */
677
- center: [
678
- number,
679
- number
680
- ];
681
- /**
682
- * Radius from center, unit: meter for POIs, kilometers for buildings and venues, cannot exceed 10,000.
683
- */
684
- distance: number;
685
- }
686
- export interface IOrientationSpec {
687
- /**
688
- * User's position, [lng, lat].
689
- */
690
- center: [
691
- number,
692
- number
693
- ];
694
- /**
695
- * The angle between the user's orientation and true north.
696
- */
697
- angle: number;
698
- /**
699
- * The radius with 'center' as the center of the circle.
700
- */
701
- distance: number;
702
- }
703
- export interface IBoundsSpec {
704
- /** An array of LngLat coordinates in [sw, ne] order */
705
- bounds: [
706
- [
707
- number,
708
- number
709
- ],
710
- [
711
- number,
712
- number
713
- ]
714
- ];
388
+ export declare enum OrientationDistanceSearchType {
389
+ POINT = "Point",
390
+ POLYGON = "Polygon",
391
+ GATE = "Gate"
715
392
  }
716
- export interface IKeywordSpec {
717
- keywords?: string;
393
+ export declare enum PoisOrderBy {
394
+ DEFAULT_NAME = "DefaultName"
718
395
  }
719
- export interface IOrderSpec {
720
- orderBy?: PoisOrderBy;
396
+ export declare enum PoisSortBy {
397
+ ABSOLUTE_DISTANCE = "AbsoluteDistance",
398
+ ACTUAL_DISTANCE = "ActualDistance"
721
399
  }
722
- export interface IBuildingSpec {
723
- buildingId: string;
400
+ export interface ISection {
401
+ category: string;
402
+ id: string;
403
+ sectionName: IMultilingualName;
404
+ correlationId?: string;
724
405
  }
725
- export interface IVenueSpec {
406
+ export interface IPoiCommonOptions {
407
+ accessibilityDetail: IMultilingualName;
408
+ category: string[];
409
+ descriptions: IMultilingualName;
410
+ distance?: number;
411
+ id: string;
412
+ location: ILocation;
413
+ name: IMultilingualName;
414
+ osmRefId: number;
415
+ poiId: string;
416
+ sections?: ISection[];
726
417
  venueId: string;
727
418
  }
728
- export interface IFloorSpec {
419
+ export interface IPoiFloor {
420
+ floor: string;
729
421
  floorId: string;
730
422
  }
731
- export interface ISharedFloorSpec {
423
+ export interface ISharedPoiFloor {
732
424
  sharedFloorId: string;
425
+ sharedFloorNames: IMultilingualName;
733
426
  }
734
- export interface IOrdinalSpec {
735
- ordinal: string;
736
- }
737
- export interface IOrientationSearchTypeSpec {
738
- /** The type of POI, default is 'Point' */
739
- distanceSearchType?: OrientationDistanceSearchType;
740
- }
741
- /** common search */
742
- export interface ISearchByKeywordsOptions extends IKeywordSpec, IQuantitySpec {
743
- }
744
- export interface ISearchByDistanceOptions extends IDistanceSpec, ISearchByKeywordsOptions {
745
- }
746
- export interface ISearchByBoundsOptions extends IBoundsSpec, ISearchByKeywordsOptions {
747
- }
748
- /** building/venue search */
749
- export interface IBuildingSearchCustomizedOptions {
750
- bounds?: [
751
- [
752
- number,
753
- number
754
- ],
755
- [
756
- number,
757
- number
758
- ]
759
- ];
760
- center?: [
761
- number,
762
- number
763
- ];
764
- distance?: number;
765
- keywords?: string;
766
- signal?: boolean;
767
- visual?: boolean;
768
- offset?: number;
769
- page?: number;
770
- }
771
- export interface IVenueSearchCustomizedOptions extends IBuildingSearchCustomizedOptions {
427
+ export interface IPoiInternal extends IPoiFloor, IPoiCommonOptions, IBusinessInfo {
428
+ buildingId: string;
772
429
  }
773
- /** poi search */
774
- export interface ISearchByCategoryOptions extends IDistanceSpec, IQuantitySpec {
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<{
447
+ pois: T[];
448
+ total: number;
449
+ }>;
450
+ /** poi categories from searchCategories() */
451
+ export interface IPoiCategory {
775
452
  category: string;
453
+ description: string | null;
454
+ id: string;
455
+ title: TMultilingualString;
776
456
  }
777
- export interface ISearchByExcludedCategoriesOptions extends IDistanceSpec, IQuantitySpec {
778
- excludedCategories: string | string[];
457
+ export interface ICategoryGroupItem extends IPoiCategory {
458
+ count: number;
459
+ featureType: string;
460
+ parents: string[];
461
+ venueId: string;
462
+ venueName: TMultilingualString;
779
463
  }
780
- export type TSearchByCategoryOptions = ISearchByCategoryOptions | ISearchByExcludedCategoriesOptions;
781
- export interface IPoiSearchByBoundsOptions extends ISearchByBoundsOptions, IOrderSpec {
464
+ export interface ICategoriesGroup {
465
+ categoryGroups: ICategoryGroupItem[];
466
+ total: number;
782
467
  }
783
- export interface ISearchByBuildingOptions extends IBuildingSpec, ISearchByKeywordsOptions, IOrderSpec {
468
+ export type TCategoriesResponse = IResponse<ICategoriesGroup>;
469
+ /** pois response from searchByOrientation() */
470
+ export interface IOrientationPoiCommonOptions {
471
+ angle: number;
472
+ category: string[];
473
+ descriptions: IMultilingualName;
474
+ distance: number;
475
+ distanceSource: string;
476
+ id: string;
477
+ location: ILocation;
478
+ name: IMultilingualName;
479
+ osmRefId: number;
480
+ poiId: string;
784
481
  }
785
- export interface ISearchByVenueOptions extends IVenueSpec, ISearchByKeywordsOptions, IOrderSpec {
482
+ export interface IOrientationNormalPoi extends IPoiFloor, IOrientationPoiCommonOptions, IBusinessInfo {
483
+ buildingId: string;
484
+ /** @deprecated "description" will be removed soon, use "descriptions" instead */
485
+ description?: string;
786
486
  }
787
- /** @deprecated */
788
- export type TSearchByFloorOptions = (IFloorSpec & ISearchByKeywordsOptions & IOrderSpec) | (ISharedFloorSpec & ISearchByKeywordsOptions & IOrderSpec);
789
- export type TSearchByFloorsOptions = ({
790
- floorIds: string[];
791
- } & ISearchByKeywordsOptions & IOrderSpec) | ({
792
- sharedFloorIds: string[];
793
- } & ISearchByKeywordsOptions & IOrderSpec);
794
- export type TSearchByOrientationOptions = (IOrdinalSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec) | (IFloorSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec) | (IBuildingSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec);
795
- export type TSearchCategoriesOptions = IVenueSpec | IBuildingSpec | IFloorSpec | ISharedFloorSpec | (IBoundsSpec & IKeywordSpec);
796
- export interface IPoiSearchCustomizedOptions {
797
- bounds?: [
798
- [
799
- number,
800
- number
801
- ],
802
- [
803
- number,
804
- number
805
- ]
806
- ];
807
- center?: [
808
- number,
809
- number
810
- ];
811
- distance?: number;
812
- category?: string;
813
- excludedCategories?: string | string[];
814
- /** @deprecated */
815
- floorId?: string;
816
- floorIds?: string[];
817
- sharedFloorIds?: string[];
818
- buildingId?: string;
819
- venueId?: string;
820
- keywords?: string;
821
- orderBy?: PoisOrderBy;
822
- sort?: PoisSortBy;
823
- distanceSearchType?: DistanceSearchType;
824
- offset?: number;
825
- page?: number;
487
+ export interface IOrientationSharedPoi extends ISharedPoiFloor, IOrientationPoiCommonOptions {
488
+ }
489
+ export type TOrientationPoi = IOrientationNormalPoi | IOrientationSharedPoi;
490
+ export type TOrientationPoisResponse = IResponse<TOrientationPoi[]>;
491
+ export interface IMapClickEvent {
492
+ coordinate: LngLat;
493
+ building: MapGeoJSONFeature | null;
494
+ venue: MapGeoJSONFeature | null;
495
+ floor: IFloor | ISharedFloor | null;
496
+ }
497
+ export interface IPoiClickEvent {
498
+ coordinate: LngLat;
499
+ poi: MapGeoJSONFeature;
500
+ venue: MapGeoJSONFeature | null;
501
+ floor: IFloor | ISharedFloor | null;
502
+ building?: MapGeoJSONFeature | null;
503
+ sections?: ISection[];
504
+ }
505
+ export interface IPointClickEvent {
506
+ coordinate: LngLat;
507
+ point: PointLike;
508
+ }
509
+ export interface IMapChangeEvent {
510
+ venue: MapGeoJSONFeature | null;
511
+ building: MapGeoJSONFeature | null;
512
+ floor: IFloor | ISharedFloor | null;
826
513
  }
827
514
  export declare class BuildingFilterControl implements IControl {
828
515
  private _map;
@@ -881,6 +568,15 @@ export declare class BuildingSelectorHandler {
881
568
  get isEnabled(): boolean;
882
569
  get position(): ControlPosition;
883
570
  }
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;
579
+ }
884
580
  export interface IFloorSelectorOptions {
885
581
  language: PresetLanguage;
886
582
  style?: IFloorSelectorStyle;
@@ -970,38 +666,6 @@ export declare class FloorSelectorHandler {
970
666
  get isEnabled(): boolean;
971
667
  get position(): ControlPosition;
972
668
  }
973
- export declare class SwitchBuildingHandler {
974
- private _indoor;
975
- private _isEnabled;
976
- constructor(indoor: Indoor);
977
- enable(): void;
978
- disable(): void;
979
- get isEnabled(): boolean;
980
- }
981
- export declare class SwitchOutdoorHandler {
982
- private _indoor;
983
- private _isEnabled;
984
- constructor(indoor: Indoor);
985
- enable(): void;
986
- disable(): void;
987
- get isEnabled(): boolean;
988
- }
989
- export declare class IndoorClickSelection {
990
- private _indoor;
991
- private _isEnabled;
992
- constructor(indoor: Indoor);
993
- enable(): void;
994
- disable(): void;
995
- get isEnabled(): boolean;
996
- }
997
- export declare class OutdoorClickSelection {
998
- private _indoor;
999
- private _isEnabled;
1000
- constructor(indoor: Indoor);
1001
- enable(): void;
1002
- disable(): void;
1003
- get isEnabled(): boolean;
1004
- }
1005
669
  export interface IPanToOptions {
1006
670
  dragPan?: boolean;
1007
671
  animate?: boolean;
@@ -1060,230 +724,119 @@ export interface IMapxusMap {
1060
724
  unsubscribe: VoidFunction;
1061
725
  };
1062
726
  }
1063
- export type TSelectedIndoorData = {
1064
- venue: MapGeoJSONFeature;
1065
- building: MapGeoJSONFeature;
1066
- floor?: IFloor;
1067
- } | {
1068
- sharedFloor: ISharedFloor;
1069
- venue: MapGeoJSONFeature;
1070
- } | null;
1071
- export type TFeatureMap = Map<string, MapGeoJSONFeature>;
1072
- export interface ILayeredOptions {
1073
- selectedVenueId: string | null;
1074
- venueMap: TFeatureMap;
1075
- buildingMap: TFeatureMap;
1076
- sharedFloorMap: TFeatureMap;
1077
- }
1078
- export interface IDisplayedLevel {
1079
- level: string;
1080
- overlap: string[] | null;
1081
- venueId: string;
1082
- }
1083
- export interface ILayeredData {
1084
- displayedLevels: IDisplayedLevel[];
1085
- selectedLevelIds: string[];
1086
- alwaysDisplayedSharedLevelIds: string[];
1087
- maskBuildingIds: string[];
1088
- maskSharedFloorIds: string[];
1089
- }
1090
- declare class FloorsLayeredHandler {
1091
- private _isMaskMode;
1092
- private _hiddenBuildings;
1093
- private _history;
1094
- constructor(maskMode: boolean);
1095
- getLayeredData(options: ILayeredOptions): ILayeredData;
1096
- getHiddenBuildings(): string[];
1097
- }
1098
- declare class DragPanHandler {
1099
- private _maplibre;
1100
- private _isAnimated;
1101
- private _bounds;
1102
- private _boundsPadding;
1103
- private _center;
1104
- private _fitBoundsTimer;
1105
- constructor(maplibre: maplibregl$1.Map, padding: number | PaddingOptions);
1106
- setAnimated(animated: boolean): void;
1107
- setBounds(bounds: LngLatBoundsLike | null): void;
1108
- getBounds(): LngLatBoundsLike | null;
1109
- setCenter(lnglat: LngLatLike | null): void;
1110
- fitBounds(): Promise<unknown>;
1111
- panToCenter(): void;
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"
1112
749
  }
1113
- export declare class Indoor extends TinyEmitter {
1114
- private _map;
1115
- private _features;
1116
- private _allVenuesMap;
1117
- private _allBuildingsMap;
1118
- private _allSharedLevelsMap;
1119
- private _curBuildingId;
1120
- private _curBuildingFeature;
1121
- private _curSharedLevelId;
1122
- private _floor;
1123
- private _sharedFloor;
1124
- private _outdoorMapShown;
1125
- private _originIndoorLayers;
1126
- private _outdoorLayers;
1127
- private _curVenueId;
1128
- private _curVenueFeature;
1129
- private _selectedHighlightStyle;
1130
- private _upperLayers;
1131
- private _commonPoiLayers;
1132
- private _sectionFillLineLayers;
1133
- private _sectionSymbolLayers;
1134
- private _middleLayers;
1135
- private _lowerLayers;
1136
- private _excludedPoisInMiddle;
1137
- private _dispatch;
1138
- private readonly _startWithIndoorView;
1139
- private _indoorMapLoaded;
1140
- private _isSelectSharedFloor;
1141
- private readonly _isMaskMode;
1142
- private _upperLevels;
1143
- private _middleLevels;
1144
- private _lowerLevels;
1145
- private _featureIncomplete;
1146
- private _fitBounds;
1147
- private _dragPan;
1148
- private _history;
1149
- private _maskBuildings;
1150
- private _maskSharedFloors;
1151
- private _enableIndoorClickSelection;
1152
- private _enableOutdoorClickSelection;
1153
- private _zIndexHistory;
1154
- private _floorSwitchScope;
1155
- private _isDestroyed;
1156
- private _abortQueryFeature;
1157
- private _debounceRendering;
1158
- layeredHandler: FloorsLayeredHandler;
1159
- dragPanHandler: DragPanHandler;
1160
- constructor(props: {
1161
- map: maplibregl$1.Map;
1162
- fitBounds: boolean;
1163
- boundsPadding: number | PaddingOptions;
1164
- maskNonSelectedAreas: boolean;
1165
- startWithIndoorView: boolean;
1166
- outdoorMapShown: boolean;
1167
- enableIndoorClickSelection: boolean;
1168
- enableOutdoorClickSelection: boolean;
1169
- floorSwitchScope: FloorSwitchScope;
1170
- selectedHighlightStyle?: ISelectedHighlightStyle;
1171
- });
1172
- destroy(): void;
1173
- /**
1174
- * @deprecated
1175
- * Set whether to allow exiting building.
1176
- * @param allow
1177
- */
1178
- setAllowOutdoorSwitch(allow: boolean): this;
1179
- /**
1180
- * @deprecated
1181
- * Set whether to allow switching building.
1182
- * @param allow
1183
- */
1184
- setAllowBuildingSwitch(allow: boolean): this;
1185
- setAllowIndoorClickSelect(allow: boolean): void;
1186
- setAllowOutdoorClickSelect(allow: boolean): void;
1187
- setFloorSwitchScope(scope: FloorSwitchScope): void;
1188
- /**
1189
- * Get the current floor's information.
1190
- */
1191
- get floor(): IFloor | ISharedFloor | null;
1192
- /**
1193
- * Get the current building's information.
1194
- * @returns {MapGeoJSONFeature | null}
1195
- */
1196
- get building(): MapGeoJSONFeature | null;
750
+ export interface IMapOption {
751
+ map: maplibregl$1.Map;
752
+ floorSelectorEnabled?: boolean;
753
+ buildingSelectorEnabled?: boolean;
1197
754
  /**
1198
- * Get the current venue's information.
1199
- * @returns {MapGeoJSONFeature | null}
755
+ * 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
756
+ * the priority is: poiId > floorId > buildingId > venueId.
1200
757
  */
1201
- get venue(): MapGeoJSONFeature | null;
758
+ venueId?: string;
1202
759
  /**
1203
- * Get the geo features of bbox.
760
+ * 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
761
+ * the priority is: poiId > floorId > buildingId > venueId.
1204
762
  */
1205
- get features(): MapGeoJSONFeature[];
763
+ buildingId?: string;
1206
764
  /**
1207
- * Get features from bbox by id.
1208
- * @param id
1209
- * @param options
765
+ * 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
766
+ * the priority is: poiId > floorId > buildingId > venueId.
1210
767
  */
1211
- getFeaturesById(id: string, options?: {
1212
- layerIds?: string[];
1213
- filter?: (feature: MapGeoJSONFeature) => boolean;
1214
- }): MapGeoJSONFeature[];
768
+ floorId?: string;
769
+ sharedFloorId?: string;
1215
770
  /**
1216
- * Switch floor by ordinal.
1217
- * @param ordinal
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.
1218
774
  */
1219
- switchFloorByOrdinal(ordinal: string | null): Promise<void>;
1220
- setOutdoorMapShown(shown: boolean): void;
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;
1221
782
  /**
1222
- * Set the style of the selected floor border. If set to null, the border will be invisible.
1223
- * @param style {ISelectedHighlightStyle | null}
783
+ * Whether unselected buildings are masked, default is false.
1224
784
  */
1225
- setSelectedHighlightStyle(style: ISelectedHighlightStyle | null): void;
785
+ maskNonSelectedAreas?: boolean;
1226
786
  /**
1227
- * Listen for the indoor map state, including the changes of venue, building and floor.
1228
- * @param listener
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.
1229
791
  */
1230
- onMapChange(listener: (params: {
1231
- venue: MapGeoJSONFeature | null;
1232
- building: MapGeoJSONFeature | null;
1233
- floor: IFloor;
1234
- }) => void): {
1235
- unsubscribe: VoidFunction;
1236
- };
792
+ fitBuildingBounds?: boolean;
793
+ fitBounds?: boolean;
1237
794
  /**
1238
- * Select a building feature
1239
- * @param feature {MapGeoJSONFeature | null}
1240
- * @param options {floorId?: string, dragPan?: boolean}
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/
1241
798
  */
1242
- selectBuilding(feature: MapGeoJSONFeature | null, options?: {
1243
- floorId?: string;
1244
- featureIncomplete?: boolean;
1245
- }): Promise<void>;
1246
- selectSharedFloor(sharedFloor: ISharedFloor, venue: MapGeoJSONFeature, options?: {
1247
- featureIncomplete?: boolean;
1248
- }): Promise<void>;
1249
- updateCustomLayers(): void;
1250
- updateRendering(): void;
1251
- panToBuildingCenter(): Promise<void>;
1252
- panToVenueCenter(): Promise<void>;
1253
- private _waitForFeatureLoaded;
1254
- setDragPan(dragPan: boolean | "restrict"): void;
1255
- setFitBounds(fitBounds: boolean): void;
1256
- queryIndoorFeaturesByClickPoint(point: PointLike): Promise<TSelectedIndoorData>;
1257
- selectByClickMap(data: TSelectedIndoorData): Promise<void>;
1258
- private _bindMaplibreEventListeners;
1259
- private _clear;
1260
- private _getIndoorFeatures;
1261
- private _getBuildingFloorByOrdinal;
1262
- private _isCurrentFeature;
1263
- private _setOutdoorVisibility;
1264
- private _addReserveFloorLayers;
1265
- private _addBuildingMaskLayer;
1266
- private _updateUnselectedMask;
1267
- private _addSelectedHighlightLayers;
1268
- private _filterSelectedHighlight;
1269
- private _copyOverlapLayers;
1270
- private _copySharedFloorBackgroundLayers;
1271
- private _updateFeatures;
1272
- private _calExcludedPoisInMiddle;
1273
- private _updateSelectedFeatures;
1274
- private _layerFloors;
1275
- private _layerSelectedLevels;
1276
- private _layerUnselectedLevels;
1277
- private _filterLayers;
1278
- private _filterIndoorLayers;
1279
- private _queryVenueFeature;
1280
- private _getBuildingDisplayedOrdinal;
1281
- private _updateFloorState;
1282
- private _checkAndPanToBuilding;
1283
- private _queryVisibleFeature;
1284
- private _queryRenderedFeatures;
1285
- private _dispatchIndoorMapLoaded;
1286
- private _changeOtherVenuesHistory;
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;
1287
840
  }
1288
841
  declare class Map$1 implements IMapxusMap {
1289
842
  private _map;
@@ -1299,7 +852,6 @@ declare class Map$1 implements IMapxusMap {
1299
852
  private _debounceHTTPErrorHandler;
1300
853
  private _transformRequestHandler;
1301
854
  private _tokenRefreshingPromise;
1302
- private _request;
1303
855
  private _cancelTokenChangedListener;
1304
856
  isDestroyed: boolean;
1305
857
  /** @deprecated Use "outdoorClickSelection" instead */
@@ -1326,153 +878,601 @@ declare class Map$1 implements IMapxusMap {
1326
878
  * Get map indoor instance.
1327
879
  * @deprecated indoor instance won't be provided publicly in the future.
1328
880
  */
1329
- getIndoor(): Indoor;
881
+ getIndoor(): Indoor;
882
+ /**
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 {
1330
1119
  /**
1331
- * Get maplibre map instance.
1120
+ * Points are in order, from -> stops -> to.
1121
+ * The length of points must be: 1 < {points.length} < 6.
1332
1122
  */
1333
- getMaplibre(): maplibregl$1.Map;
1123
+ points: IRoutePoint[];
1334
1124
  /**
1335
- * Get current selected floor info.
1336
- * @return {IFloor | ISharedFloor | null}
1125
+ * Default is "foot".
1337
1126
  */
1338
- get floor(): IFloor | ISharedFloor | null;
1127
+ vehicle?: VehicleType;
1339
1128
  /**
1340
- * Get current selected building info.
1341
- * @return {MapGeoJSONFeature | null}
1129
+ * Language-specific response. Default is "en".
1342
1130
  */
1343
- get building(): MapGeoJSONFeature | null;
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);
1344
1172
  /**
1345
- * Get current selected venue info.
1346
- * @return {MapGeoJSONFeature | null}
1173
+ * Set the style of the route.
1174
+ * @param routeStyle {TRouteStyleOptions | null} When null, reset to the initial style.
1347
1175
  */
1348
- get venue(): MapGeoJSONFeature | null;
1176
+ setStyle(routeStyle: TRouteStyleOptions | null): Promise<void>;
1349
1177
  /**
1350
- * Set map language.
1351
- * @param language {PresetLanguage} convertBrowserLangToPresetLang(Window.navigator.language).
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.
1352
1186
  */
1353
- setLanguage(language: PresetLanguage): void;
1187
+ setMarkerIcons(icons: Array<string | null> | {
1188
+ from?: string | null;
1189
+ to?: string | null;
1190
+ stops?: Array<string | null> | null;
1191
+ }): Promise<void>;
1354
1192
  /**
1355
- * Get map language.
1356
- * @return {PresetLanguage}
1193
+ * @deprecated Use 'setStyle' instead.
1194
+ * Set all icons scale.
1195
+ * @param size number in range [0, ∞), default is 1.
1357
1196
  */
1358
- getLanguage(): PresetLanguage;
1197
+ setMarkerIconSize(size: number): this;
1359
1198
  /**
1360
- * Set outdoor map to be shown or hidden.
1361
- * @param shown
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.
1362
1204
  */
1363
- setOutdoorMapShown(shown: boolean): void;
1364
- queryIndoorFeaturesByPoint(point: IScreenPoint): INormalLevelIndoorFeatures | ISharedLevelIndoorFeatures | null;
1205
+ setIndoorLineColor(color: string): this;
1365
1206
  /**
1366
- * Get features from bbox by coordinates [and ordinal].
1367
- * @deprecated Use "queryIndoorFeaturesByPoint()" instead.
1368
- * @param coordinates
1369
- * @param ordinal
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.
1370
1212
  */
1371
- getIndoorFeaturesByCoordinates(coordinates: {
1372
- lng: number;
1373
- lat: number;
1374
- }, ordinal?: number): {
1375
- venue: MapGeoJSONFeature | null;
1376
- building: MapGeoJSONFeature | null;
1377
- level: MapGeoJSONFeature | null;
1378
- };
1213
+ setOutdoorLineColor(color: string): this;
1379
1214
  /**
1380
- * Query rendered features from bbox by id. One id may correspond to multiple features,
1381
- * coz of a feature may be multi-polygon(feature collection).
1382
- * @param id
1383
- * @param options {layerIds: string[], filter: (feature: MapGeoJSONFeature) => boolean}
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.
1384
1220
  */
1385
- getFeaturesById(id: string, options?: IFeaturesFilterOptions): MapGeoJSONFeature[];
1221
+ setDashedLineColor(color: string): this;
1386
1222
  /**
1387
- * Switch floor by ordinal of current selected building.
1388
- * @param ordinal {string | null} The ordinal of the target floor.
1389
- * If ordinal is null, the map will exit indoor view.
1390
- * If current selected building has no the target ordinal, there's an error will be thrown.
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.
1391
1228
  */
1392
- switchFloorByOrdinal(ordinal: string | null): Promise<void>;
1229
+ setBusLineColor(color: string): this;
1393
1230
  /**
1394
- * Select indoor by locating the target floor.
1395
- * @param floorId
1396
- * @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
1397
- * 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.
1398
1234
  */
1399
- selectFloorById(floorId: string, options?: IPanToOptions): Promise<void>;
1400
- selectSharedFloorById(sharedFloorId: string, options?: IPanToOptions): Promise<void>;
1235
+ render(path: IRoutePath, markerLocations: Array<[
1236
+ number,
1237
+ number
1238
+ ]>): void;
1401
1239
  /**
1402
- * Select indoor by locating the target building.
1403
- * @param buildingId
1404
- * @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
1405
- * Default is true.
1240
+ * Remove route from the map.
1406
1241
  */
1407
- selectBuildingById(buildingId: string, options?: IPanToOptions): Promise<void>;
1242
+ remove(): void;
1408
1243
  /**
1409
- * Select indoor by locating the target venue.
1410
- * @param venueId 'venueId' can be string or null. Exit indoors if venueId is null.
1411
- * @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
1412
- * Default is true.
1244
+ * Filter paths' opacity by venue and ordinal.
1245
+ * @param venueId {string | null | undefined}
1246
+ * @param ordinal {string | null | undefined}
1413
1247
  */
1414
- selectVenueById(venueId: string | null, options?: IPanToOptions): Promise<void>;
1248
+ setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
1415
1249
  /**
1416
- * Listen for mouse click events on the map.
1417
- * @param listener
1250
+ * Filter paths' opacity by building and ordinal.
1251
+ * @param buildingId {string | null | undefined}
1252
+ * @param ordinal {string | null | undefined}
1418
1253
  */
1419
- onMapClickListener(listener: (param: IMapClickEvent) => void): {
1420
- unsubscribe: VoidFunction;
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
+ ];
1421
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 {
1422
1316
  /**
1423
- * Listen for mouse click events on indoor POI
1424
- * @param listener
1317
+ * The maximum value is 100, default is 10.
1425
1318
  */
1426
- onPoiClickListener(listener: (param: IPoiClickEvent) => void): {
1427
- unsubscribe: VoidFunction;
1428
- };
1319
+ offset?: number;
1429
1320
  /**
1430
- * Listen for mouse click events at a point.
1431
- * @param listener
1321
+ * Results for specified page number. Default is 1.
1432
1322
  */
1433
- onPointClickListener(listener: (param: IPointClickEvent) => void): {
1434
- unsubscribe: VoidFunction;
1435
- };
1323
+ page?: number;
1324
+ }
1325
+ export interface IDistanceSpec {
1436
1326
  /**
1437
- * Listen for the indoor map status, including the changes of venue, building and floor.
1438
- * @param listener
1327
+ * The center of searching range, [lng, lat].
1439
1328
  */
1440
- onMapChangeListener(listener: (param: IMapChangeEvent) => void): {
1441
- unsubscribe: VoidFunction;
1442
- };
1329
+ center: [
1330
+ number,
1331
+ number
1332
+ ];
1443
1333
  /**
1444
- * @deprecated Use "setTheme()" instead.
1445
- * Switch the map style
1446
- * @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.
1447
1335
  */
1448
- switchTheme(theme: string): void;
1449
- setTheme(theme: ThemeType | string): void;
1336
+ distance: number;
1337
+ }
1338
+ export interface IOrientationSpec {
1450
1339
  /**
1451
- * @deprecated Use 'setSelectedHighlightStyle' instead.
1452
- * Set the SelectedBuildingBorder's style. If set to null, the border will be invisible.
1453
- * @param style {ISelectedHighlightStyle | null}
1340
+ * User's position, [lng, lat].
1454
1341
  */
1455
- setSelectedBuildingBorderStyle(style: ISelectedHighlightStyle | null): this;
1456
- setSelectedHighlightStyle(style: ISelectedHighlightStyle | null): this;
1457
- setFloorSwitchScope(scope: FloorSwitchScope): void;
1458
- private _setup;
1459
- private _setStyle;
1460
- private _addControl;
1461
- private _selectPoiById;
1462
- private _resourceRequestTransform;
1463
- private _checkMapZoom;
1464
- private _updatePermission;
1465
- private _selectCenterBuilding;
1342
+ center: [
1343
+ number,
1344
+ number
1345
+ ];
1466
1346
  /**
1467
- * Query building features within the center rectangle(width: 1/2 width of map view, height: 1/2 height of map view) of map.
1468
- * @returns Map<buildingId, buildingFeature>
1347
+ * The angle between the user's orientation and true north.
1469
1348
  */
1470
- private _getCenterBuildingUnitsMap;
1471
- private _bindMapClickListener;
1472
- private _bindTokenChangedListener;
1473
- private _handleSearchError;
1474
- private _installRtlTextPlugin;
1475
- private _destroy;
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;
1476
1476
  }
1477
1477
  export declare class Marker {
1478
1478
  private readonly _maplibreMap;
@@ -1490,7 +1490,7 @@ export declare class Marker {
1490
1490
  setIcon(icon: string): Promise<void>;
1491
1491
  /**
1492
1492
  * Set marker image size.
1493
- * @param imageScale Default is 1.
1493
+ * @param imageScale Default is 0.75
1494
1494
  */
1495
1495
  setIconSize(imageScale: number): void;
1496
1496
  /**
@@ -1611,173 +1611,128 @@ export declare class Poi {
1611
1611
  private _queryIndoorFeaturesBySharedFloor;
1612
1612
  private _queryIndoorFeaturesByFloor;
1613
1613
  }
1614
- /**
1615
- * AccessControl class, for providing token and managing token lifecycle.
1616
- * Three events are emitted:
1617
- * - "updated": Emitted when the token is updated. Usage: accessControl.on("updated", ({ appId, token }) => {});
1618
- * - "error": Emitted when an error occurs during token update. Usage: accessControl.on("error", (error) => {});
1619
- * - "closed": Emitted when the access control is closed. Usage: accessControl.on("closed", () => {});
1620
- */
1621
- export declare class AccessControl extends TinyEmitter {
1622
- private readonly _appId;
1623
- private readonly _secret;
1624
- isClosed: boolean;
1625
- private _timeoutId;
1626
- private _isInitialized;
1627
- private _initializationPromise;
1628
- private _tokenManager;
1629
- private readonly _from;
1630
- constructor(appId: string, secret: string, origin?: AccessControlOrigin);
1631
- ready(): Promise<void>;
1632
- get appId(): string;
1633
- /**
1634
- * Get the token which is kept up-to-date automatically.
1635
- */
1636
- get token(): string;
1637
- /**
1638
- * Destroy the access_control instance, stop updating token.
1639
- */
1640
- close(): void;
1641
- /**
1642
- * For machine sleep for a long time, timer doesn't work, the token may be expired, so you can force update the token.
1643
- */
1644
- forceUpdateToken(): void;
1645
- private _initToken;
1646
- private _loopUpdateToken;
1647
- }
1648
1614
  export declare class VenuesService {
1649
1615
  private _api;
1650
- private _request;
1651
1616
  constructor();
1652
1617
  /**
1653
1618
  * Search venues by ids.
1654
1619
  * @param ids Single id string or string ids in array. The number of IDs cannot exceed 10.
1655
1620
  */
1656
- searchByIds(ids: string | string[]): TPromiseVenues;
1621
+ searchByIds(ids: string | string[]): Promise<TVenueResponse<TVenue>>;
1657
1622
  /**
1658
1623
  * Search venues by center and distance.
1659
1624
  * @param {ISearchByDistanceOptions} options
1660
1625
  */
1661
- searchByDistance(options: ISearchByDistanceOptions): TPromiseVenues;
1626
+ searchByDistance(options: ISearchByDistanceOptions): Promise<TVenueResponse<TVenue>>;
1662
1627
  /**
1663
1628
  * Search venues in a rectangular area.
1664
1629
  * @param {ISearchByBoundsOptions} options
1665
1630
  */
1666
- searchByBounds(options: ISearchByBoundsOptions): TPromiseVenues;
1631
+ searchByBounds(options: ISearchByBoundsOptions): Promise<TVenueResponse<TVenue>>;
1667
1632
  /**
1668
1633
  * Search venues by global.
1669
1634
  * @param {ISearchByKeywordsOptions} options
1670
1635
  */
1671
- searchByGlobal(options: ISearchByKeywordsOptions): TPromiseVenues;
1672
- searchBySharedFloorId(sharedFloorId: string): TPromiseVenues;
1673
- search(options: IVenueSearchCustomizedOptions): TPromiseVenues;
1674
- private _changedRes;
1636
+ searchByGlobal(options: ISearchByKeywordsOptions): Promise<TVenueResponse<TVenue>>;
1637
+ searchBySharedFloorId(sharedFloorId: string): Promise<TVenueResponse<TVenue>>;
1638
+ search(options: IVenueSearchCustomizedOptions): Promise<TVenueResponse<TVenue>>;
1639
+ private _filterVenueProperties;
1675
1640
  }
1676
1641
  export declare class BuildingsService {
1677
1642
  private _api;
1678
- private _request;
1679
1643
  constructor();
1680
1644
  /**
1681
1645
  * Search buildings by id[s].
1682
1646
  * @param ids Single id string or string ids in array. The number of IDs cannot exceed 10.
1683
1647
  */
1684
- searchByIds(ids: string | string[]): TPromiseBuildings;
1648
+ searchByIds(ids: string | string[]): Promise<TBuildingResponse<TBuilding>>;
1685
1649
  /**
1686
1650
  * Search buildings by center and distance.
1687
1651
  * @param {ISearchByDistanceOptions} options
1688
1652
  */
1689
- searchByDistance(options: ISearchByDistanceOptions): TPromiseBuildings;
1653
+ searchByDistance(options: ISearchByDistanceOptions): Promise<TBuildingResponse<TBuilding>>;
1690
1654
  /**
1691
1655
  * Search buildings in a rectangular area.
1692
1656
  * @param {ISearchByBoundsOptions} options
1693
1657
  */
1694
- searchByBounds(options: ISearchByBoundsOptions): TPromiseBuildings;
1658
+ searchByBounds(options: ISearchByBoundsOptions): Promise<TBuildingResponse<TBuilding>>;
1695
1659
  /**
1696
1660
  * Search buildings global.
1697
1661
  * @param {ISearchByKeywordsOptions} options
1698
1662
  */
1699
- searchByGlobal(options: ISearchByKeywordsOptions): TPromiseBuildings;
1663
+ searchByGlobal(options: ISearchByKeywordsOptions): Promise<TBuildingResponse<TBuilding>>;
1700
1664
  /**
1701
1665
  * Search building by floor id.
1702
1666
  * @param floorId
1703
1667
  */
1704
- searchByFloorId(floorId: string): TPromiseBuildings;
1705
- search(options: IBuildingSearchCustomizedOptions): TPromiseBuildings;
1706
- private _changedRes;
1668
+ searchByFloorId(floorId: string): Promise<TBuildingResponse<TBuilding>>;
1669
+ search(options: IBuildingSearchCustomizedOptions): Promise<TBuildingResponse<TBuilding>>;
1670
+ private _filterBuildingProperties;
1707
1671
  }
1708
1672
  export declare class PoisService {
1709
1673
  private _poisApi;
1710
1674
  private _categoriesGroupApi;
1711
- private _request;
1712
1675
  constructor();
1713
1676
  /**
1714
1677
  * Search POIs by id[s].
1715
1678
  * @param ids Single id string or string ids in array. The number of IDs cannot exceed 100.
1716
1679
  */
1717
- searchByIds(ids: string | string[]): TPromisePois<IPoi | ISharedPoi>;
1680
+ searchByIds(ids: string | string[]): Promise<TPoiResponse<TPoi | TSharedPoi>>;
1718
1681
  /**
1719
1682
  * Search POIs by radius distance of the center point.
1720
1683
  * @param options {ISearchByDistanceOptions}
1721
1684
  */
1722
- searchByDistance(options: ISearchByDistanceOptions): TPromisePois<IPoi | ISharedPoi>;
1685
+ searchByDistance(options: ISearchByDistanceOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
1723
1686
  /**
1724
1687
  * Search POIs in a rectangular area.
1725
1688
  * @param options {IPoiSearchByBoundsOptions}
1726
1689
  * 'orderBy' cannot be used with 'keywords'.
1727
1690
  */
1728
- searchByBounds(options: IPoiSearchByBoundsOptions): TPromisePois<IPoi | ISharedPoi>;
1691
+ searchByBounds(options: IPoiSearchByBoundsOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
1729
1692
  /**
1730
1693
  * Search POIs of a building.
1731
1694
  * @param options {ISearchByBuildingOptions}
1732
1695
  * 'orderBy' cannot be used with 'keywords'.
1733
1696
  */
1734
- searchByBuilding(options: ISearchByBuildingOptions): TPromisePois<IPoi>;
1697
+ searchByBuilding(options: ISearchByBuildingOptions): Promise<TPoiResponse<TPoi>>;
1735
1698
  /**
1736
1699
  * Search POIs of a venue.
1737
1700
  * @param options {ISearchByVenueOptions}
1738
1701
  * 'orderBy' cannot be used with 'keywords'.
1739
1702
  */
1740
- searchByVenue(options: ISearchByVenueOptions): TPromisePois<IPoi | ISharedPoi>;
1741
- /**
1742
- * @deprecated Use 'searchByFloors()' instead.
1743
- * Search POIs of a floor.
1744
- * @param options {TSearchByFloorOptions}
1745
- * 'orderBy' cannot be used with 'keywords'.
1746
- */
1747
- searchByFloor(options: TSearchByFloorOptions): TPromisePois<IPoi | ISharedPoi>;
1703
+ searchByVenue(options: ISearchByVenueOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
1748
1704
  /**
1749
1705
  * Search POIs of floors.
1750
1706
  * @param options {TSearchByFloorsOptions}
1751
1707
  * 'orderBy' cannot be used with 'keywords'.
1752
1708
  */
1753
- searchByFloors(options: TSearchByFloorsOptions): TPromisePois<IPoi | ISharedPoi>;
1709
+ searchByFloors(options: TSearchByFloorsOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
1754
1710
  /**
1755
1711
  * Search surrounding POIs based on the user's location and orientation.
1756
1712
  * @param {TSearchByOrientationOptions} options
1757
1713
  */
1758
- searchByOrientation(options: TSearchByOrientationOptions): TPromiseOrientationPois;
1714
+ searchByOrientation(options: TSearchByOrientationOptions): Promise<TOrientationPoisResponse>;
1759
1715
  /**
1760
1716
  * Search POIs by category or excluded categories.
1761
1717
  * @param {TSearchByCategoryOptions} options
1762
1718
  */
1763
- searchByCategory(options: TSearchByCategoryOptions): TPromisePois<IPoi | ISharedPoi>;
1719
+ searchByCategory(options: TSearchByCategoryOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
1764
1720
  /**
1765
1721
  * Search poi categories by venue id, building id, or floor id.
1766
1722
  * @param {TSearchCategoriesOptions} options
1767
1723
  */
1768
- searchCategories(options: TSearchCategoriesOptions): TPromiseCategories;
1769
- search(options: IPoiSearchCustomizedOptions): TPromisePois<IPoi | ISharedPoi>;
1770
- private _changedRes;
1724
+ searchCategories(options: TSearchCategoriesOptions): Promise<TCategoriesResponse>;
1725
+ search(options: IPoiSearchCustomizedOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
1726
+ private _filterPoiProperties;
1771
1727
  }
1772
1728
  export declare class RouteService {
1773
1729
  private _api;
1774
- private _request;
1775
1730
  constructor();
1776
1731
  /**
1777
1732
  * Search the route of two or more points.
1778
1733
  * @param options {IRouteSearchOptions}
1779
1734
  */
1780
- search(options: IRouteSearchOptions): TPromiseRoute;
1735
+ search(options: IRouteSearchOptions): Promise<IResponse<IResponseRoute>>;
1781
1736
  }
1782
1737
  export interface IMapxusLib {
1783
1738
  Map: typeof Map$1;
@@ -1787,8 +1742,6 @@ export interface IMapxusLib {
1787
1742
  Poi: typeof Poi;
1788
1743
  RoutePainter: typeof RoutePainter;
1789
1744
  /** @deprecated */
1790
- AccessControl: typeof AccessControl;
1791
- /** @deprecated */
1792
1745
  BuildingFilterControl: typeof BuildingFilterControl;
1793
1746
  BuildingSelectorHandler: typeof BuildingSelectorHandler;
1794
1747
  /** @deprecated */