@mapxus/mapxus-map-jp 7.7.2 → 7.9.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.
@@ -1,8 +1,25 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
3
  import { AxiosPromise } from 'axios';
4
- import { ControlPosition, FilterSpecification, IControl, LngLat, Map as MaplibreMap, MapGeoJSONFeature, MapLayerEventType, PaddingOptions, PointLike, RequireAtLeastOne } from 'maplibre-gl';
4
+ import { GeoJsonProperties, LineString, Point } from 'geojson';
5
+ import maplibregl$1 from 'maplibre-gl';
6
+ import { ControlPosition, FilterSpecification, IControl, LngLat, MapGeoJSONFeature, MapLayerEventType, PaddingOptions, PointLike, RequireAtLeastOne } from 'maplibre-gl';
5
7
 
8
+ export declare enum FloorSwitchMode {
9
+ SWITCHED_BY_BUILDING = 0,
10
+ SWITCHED_BY_VENUE = 1
11
+ }
12
+ /**
13
+ * @deprecated Use enum `PresetLanguage` instead.
14
+ */
15
+ export type TPresetLanguage = "en" | "zh-Hans" | "zh-Hant" | "ja" | "ko";
16
+ export declare enum PresetLanguage {
17
+ ENGLISH = "en",
18
+ CHINESE_SIMPLIFIED = "zh-Hans",
19
+ CHINESE_TRADITIONAL = "zh-Hant",
20
+ JAPANESE = "ja",
21
+ KOREAN = "ko"
22
+ }
6
23
  export declare enum ThemeType {
7
24
  CHRISTMAS = "christmas",
8
25
  HALLOWEEN = "halloween",
@@ -12,10 +29,72 @@ export declare enum ThemeType {
12
29
  COMMON = "common",
13
30
  MAPXUS_V2 = "mapxus_v2"
14
31
  }
15
- export interface ISelectedBuildingBorderStyle {
16
- lineWidth?: number;
17
- lineColor?: string;
18
- lineOpacity?: number;
32
+ export interface IBbox {
33
+ maxLat: number;
34
+ maxLon: number;
35
+ minLat: number;
36
+ minLon: number;
37
+ }
38
+ export interface IBuildingChangedOptions {
39
+ buildingId: string | null;
40
+ ordinal: string | null;
41
+ dragPan: boolean | "restrict";
42
+ }
43
+ export interface IMultilingualName extends Partial<Record<PresetLanguage, string>> {
44
+ default: string;
45
+ }
46
+ export type IMultilingualAddress = Record<keyof IMultilingualName, {
47
+ housenumber: string;
48
+ street: string;
49
+ }>;
50
+ export interface ILocation {
51
+ lat: number;
52
+ lon: number;
53
+ }
54
+ export interface IResponse<T> {
55
+ code: number;
56
+ message: string;
57
+ result: T;
58
+ }
59
+ export interface IBuildingInlineFloor {
60
+ code: string;
61
+ id: string;
62
+ ordinal: number;
63
+ signalMap: boolean;
64
+ visualMap: boolean;
65
+ }
66
+ export interface IBuilding {
67
+ address: IMultilingualAddress;
68
+ bbox: IBbox;
69
+ buildingId: string;
70
+ buildingOutlineId: number;
71
+ city?: string;
72
+ country: string;
73
+ defaultFloor?: string;
74
+ floors: IBuildingInlineFloor[];
75
+ groundFloor: string;
76
+ isPrivate: "yes" | "no";
77
+ labelCenter: ILocation;
78
+ name: IMultilingualName;
79
+ organization: string;
80
+ region: string;
81
+ signalMap: boolean;
82
+ type: string;
83
+ venueId: string;
84
+ venueName: IMultilingualName;
85
+ visualMap: boolean;
86
+ }
87
+ export interface IResponseBuildings {
88
+ buildings: IBuilding[];
89
+ total: number;
90
+ }
91
+ export type TPromiseBuildings = AxiosPromise<IResponse<IResponseBuildings>>;
92
+ export type TPointFeature = GeoJSON.Feature<Point, GeoJsonProperties>;
93
+ export type TLineStringFeature = GeoJSON.Feature<LineString, GeoJsonProperties>;
94
+ export interface IFloor {
95
+ code: string | null;
96
+ id: string | null;
97
+ ordinal: string | null;
19
98
  }
20
99
  /**
21
100
  * @deprecated Use 'IFloorSelectorStyle' instead.
@@ -38,23 +117,19 @@ export interface IFloorSelectorStyle {
38
117
  itemCount?: number;
39
118
  defaultFolded?: boolean;
40
119
  }
41
- export declare enum FloorSwitchMode {
42
- SWITCHED_BY_BUILDING = 0,
43
- SWITCHED_BY_VENUE = 1
120
+ export interface IMapClickEvent {
121
+ coordinate: LngLat;
122
+ building: MapGeoJSONFeature | null;
123
+ venue: MapGeoJSONFeature | null;
124
+ floor: IFloor;
44
125
  }
45
- /**
46
- * @deprecated Use enum `PresetLanguage` instead.
47
- */
48
- export type TPresetLanguage = "en" | "zh-Hans" | "zh-Hant" | "ja" | "ko";
49
- export declare enum PresetLanguage {
50
- ENGLISH = "en",
51
- CHINESE_SIMPLIFIED = "zh-Hans",
52
- CHINESE_TRADITIONAL = "zh-Hant",
53
- JAPANESE = "ja",
54
- KOREAN = "ko"
126
+ export interface ISelectedBuildingBorderStyle {
127
+ lineWidth?: number;
128
+ lineColor?: string;
129
+ lineOpacity?: number;
55
130
  }
56
131
  export interface IMapOption {
57
- map: MaplibreMap;
132
+ map: maplibregl$1.Map;
58
133
  appId: string;
59
134
  secret: string;
60
135
  /** @deprecated Use 'floorSelectorEnabled' instead */
@@ -118,75 +193,425 @@ export interface IMapOption {
118
193
  */
119
194
  boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
120
195
  language?: PresetLanguage;
196
+ /** @description Auto Select Building by panning building to map center, default is false. */
197
+ autoSelectBuilding?: boolean;
121
198
  }
122
- export type Listener = (param: Object) => any;
123
- declare class DefinedEvent {
124
- private _type;
125
- private _target;
126
- constructor(type: string, data?: Object);
127
- get type(): string;
128
- set type(type: string);
129
- get target(): Evented;
130
- set target(target: Evented);
199
+ export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
200
+ export interface IMarkerOptions {
201
+ lngLat: [
202
+ number,
203
+ number
204
+ ];
205
+ properties?: {
206
+ [k: string]: string;
207
+ };
131
208
  }
132
- /**
133
- * Methods mixed in to other classes for event capabilities.
134
- *
135
- * @mixin Evented
136
- */
137
- export declare class Evented {
138
- private _listeners;
139
- private _oneTimeListeners;
140
- private _eventedParent;
141
- private _eventedParentData;
209
+ export interface IMarkerOptionsWithFeatureId extends IMarkerOptions {
210
+ featureId: number;
211
+ }
212
+ export interface IPoiEvent {
213
+ coordinate: LngLat;
214
+ poi: MapGeoJSONFeature;
215
+ building: MapGeoJSONFeature | null;
216
+ venue: MapGeoJSONFeature | null;
217
+ floor: IFloor;
218
+ }
219
+ export interface IPointEvent {
220
+ coordinate: LngLat;
221
+ point: PointLike;
222
+ }
223
+ export interface IPoi {
224
+ accessibilityDetail: IMultilingualName;
225
+ buildingId: string;
226
+ category: string[];
227
+ distance: number;
228
+ floor: string;
229
+ floorId: string;
230
+ id: string;
231
+ location: ILocation;
232
+ name: IMultilingualName;
233
+ osmRefId: number;
234
+ poiId: string;
235
+ venueId: string;
236
+ /** @deprecated 'description' will be removed soon */
237
+ description?: string;
238
+ descriptions?: IMultilingualName;
239
+ email?: string;
240
+ openingHours?: string;
241
+ phone?: string;
242
+ website?: string;
243
+ }
244
+ export interface IResponsePois {
245
+ pois: IPoi[];
246
+ total: number;
247
+ }
248
+ export type TPromisePois = AxiosPromise<IResponse<IResponsePois>>;
249
+ export type TPromiseCategories = AxiosPromise<IResponse<IPoiCategory[]>>;
250
+ export type TPromiseOrientationPois = AxiosPromise<IResponse<IOrientationPoi[]>>;
251
+ export declare enum DistanceSearchType {
252
+ POINT = "Point",
253
+ POLYGON = "Polygon",
254
+ GATE = "Gate"
255
+ }
256
+ export interface IPoiCategory {
257
+ category: string;
258
+ description: string | null;
259
+ id: string;
260
+ title: Partial<Record<keyof IMultilingualName, string>>;
261
+ }
262
+ export interface IOrientationPoi {
263
+ angle: number;
264
+ buildingId: string;
265
+ category: string[];
266
+ distance: number;
267
+ distanceSource: string;
268
+ floor: string;
269
+ floorId: string;
270
+ id: string;
271
+ location: ILocation;
272
+ name: IMultilingualName;
273
+ osmRefId: number;
274
+ poiId: string;
275
+ description?: string;
276
+ email?: string;
277
+ openingHours?: string;
278
+ phone?: string;
279
+ website?: string;
280
+ }
281
+ export interface ISearchDistance {
142
282
  /**
143
- * @description Register a new event listener
144
- * @param type name of the event(a unique string)
145
- * @param listener event handler, it will be called when the event is fired
283
+ * The center of searching range, [lng, lat].
146
284
  */
147
- on(type: string, listener: Listener): this;
285
+ center: [
286
+ number,
287
+ number
288
+ ];
148
289
  /**
149
- * @description Remove a registered event listener
150
- * @param type name of the event
151
- * @param listener event handler
290
+ * Radius from center, unit is meter, cannot exceed 10,000.
152
291
  */
153
- off(type: string, listener: Listener): this;
292
+ distance: number;
154
293
  /**
155
- * Adds a listener that will be called only once to a specified event type.
156
- *
157
- * The listener will be called first time the event fires after the listener is registered.
158
- *
159
- * @param {string} type The event type to listen for.
160
- * @param {Function} listener The function to be called when the event is fired the first time.
161
- * @returns {Object} `this`
294
+ * The maximum value is 100, default is 10.
162
295
  */
163
- once(type: string, listener: Listener): this;
164
- fire(event: DefinedEvent): this;
296
+ offset?: number;
165
297
  /**
166
- * Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.
167
- *
168
- * @param {string} type The event type
169
- * @returns {boolean} `true` if there is at least one registered listener for specified event type, `false` otherwise
170
- * @private
298
+ * Results for specified page number. Default is 1.
171
299
  */
172
- listens(type: string): boolean;
300
+ page?: number;
301
+ }
302
+ export interface IPoiSearchByCategoryOptions extends ISearchDistance {
303
+ category: string;
304
+ }
305
+ export interface IPoiSearchByExcludedCategoriesOptions extends ISearchDistance {
306
+ excludedCategories: string | string[];
307
+ }
308
+ export type TPoiSearchByCategoryOptions = IPoiSearchByCategoryOptions | IPoiSearchByExcludedCategoriesOptions;
309
+ export interface IPoiSearchByDistanceOptions extends ISearchDistance {
173
310
  /**
174
- * Bubble all events fired by this instance of Evented to this parent instance of Evented.
175
- *
176
- * @returns {Object} `this`
177
- * @private
311
+ * Keywords of POI name.
178
312
  */
179
- setEventedParent(parent: Evented, data?: Object | (() => Object)): this;
180
- }
181
- export interface IFloor {
182
- code: string | null;
183
- id: string | null;
184
- ordinal: string | null;
313
+ keywords?: string;
185
314
  }
186
- export declare class Indoor extends Evented {
187
- private _map;
188
- private _features;
189
- private _allBuildings;
315
+ export interface ISearchOrientation {
316
+ /**
317
+ * User's position, [lng, lat].
318
+ */
319
+ center: [
320
+ number,
321
+ number
322
+ ];
323
+ /**
324
+ * The angle between the user's orientation and true north.
325
+ */
326
+ angle: number;
327
+ /**
328
+ * The radius with 'center' as the center of the circle.
329
+ */
330
+ distance: number;
331
+ /**
332
+ * The type of POI, default is 'Point'.
333
+ */
334
+ distanceSearchType?: DistanceSearchType;
335
+ }
336
+ export interface IPoiSearchByOrientationAndBuildingOptions extends ISearchOrientation {
337
+ buildingId: string;
338
+ }
339
+ export interface IPoiSearchByOrientationAndFloorOptions extends ISearchOrientation {
340
+ floorId: string;
341
+ }
342
+ export interface IPoiSearchByOrientationAndOrdinalOptions extends ISearchOrientation {
343
+ ordinal: string;
344
+ }
345
+ export type TPoiSearchByOrientationOptions = IPoiSearchByOrientationAndBuildingOptions | IPoiSearchByOrientationAndFloorOptions | IPoiSearchByOrientationAndOrdinalOptions;
346
+ export interface IPoiSearchOrientationOptions {
347
+ /**
348
+ * User's current position, [lng, lat].
349
+ */
350
+ center: [
351
+ number,
352
+ number
353
+ ];
354
+ /**
355
+ * The angle between cellphone's orientation and the north.
356
+ */
357
+ angle: number;
358
+ /**
359
+ * Radius.
360
+ */
361
+ distance: number;
362
+ buildingId?: string;
363
+ floorId?: string;
364
+ /**
365
+ * Floor order in physical space, e.g. '-1', '0'(ground floor), '1'...
366
+ */
367
+ ordinal?: string;
368
+ /**
369
+ * Search type.
370
+ */
371
+ distanceSearchType?: DistanceSearchType;
372
+ }
373
+ export declare enum PoisOrderBy {
374
+ DEFAULT_NAME = "DefaultName"
375
+ }
376
+ export interface ISearchKeywords {
377
+ keywords?: string;
378
+ /**
379
+ * Quantity per page, the maximum is 100, default is 10.
380
+ */
381
+ offset?: number;
382
+ /**
383
+ * Results for specified page number. Default is 1.
384
+ */
385
+ page?: number;
386
+ }
387
+ export interface IPoiSearchByBuildingOptions extends ISearchKeywords {
388
+ buildingId: string;
389
+ orderBy?: PoisOrderBy;
390
+ }
391
+ export interface IPoiSearchByVenueOptions extends ISearchKeywords {
392
+ venueId: string;
393
+ orderBy?: PoisOrderBy;
394
+ }
395
+ export interface IPoiSearchByFloorOptions extends ISearchKeywords {
396
+ floorId: string;
397
+ orderBy?: PoisOrderBy;
398
+ }
399
+ export interface IPoiSearchByBoundsOptions extends ISearchKeywords {
400
+ /**
401
+ * An array of LngLat coordinates in [sw, ne] order
402
+ */
403
+ bounds: [
404
+ [
405
+ number,
406
+ number
407
+ ],
408
+ [
409
+ number,
410
+ number
411
+ ]
412
+ ];
413
+ orderBy?: PoisOrderBy;
414
+ }
415
+ export interface ITokenInfo {
416
+ "app:name": string;
417
+ auth_time: number;
418
+ "cognito:username": string;
419
+ "custom:organization": string;
420
+ exp: number;
421
+ iat: number;
422
+ organization: string;
423
+ "organization:name": string;
424
+ privatization_type: string;
425
+ username: string;
426
+ }
427
+ export declare enum VehicleType {
428
+ FOOT = "foot",
429
+ WHEELCHAIR = "wheelchair",
430
+ ESCALATOR = "escalator",
431
+ EMERGENCY = "emergency"
432
+ }
433
+ export interface IRouteInfo {
434
+ copyrights: string[];
435
+ took: number;
436
+ }
437
+ export interface IInstruction {
438
+ building_id: string;
439
+ distance: number;
440
+ floor_id: string;
441
+ heading: number;
442
+ interval: [
443
+ number,
444
+ number
445
+ ];
446
+ ordinal: number;
447
+ sign: number;
448
+ street_name: string;
449
+ text: string;
450
+ time: number;
451
+ type: string | null;
452
+ venue_id: string;
453
+ }
454
+ export interface IRoutePath {
455
+ bbox: [
456
+ number,
457
+ number,
458
+ number,
459
+ number
460
+ ];
461
+ distance: number;
462
+ instructions: IInstruction[];
463
+ points: {
464
+ coordinates: Array<[
465
+ number,
466
+ number
467
+ ]>;
468
+ type: string;
469
+ };
470
+ snapped_waypoints: {
471
+ coordinates: Array<[
472
+ number,
473
+ number
474
+ ]>;
475
+ type: string;
476
+ };
477
+ time: number;
478
+ }
479
+ export interface IResponseRoute {
480
+ infos: IRouteInfo | null;
481
+ paths: IRoutePath[];
482
+ }
483
+ export type TPromiseRoute = AxiosPromise<IResponse<IResponseRoute>>;
484
+ export interface IRouteSearchOptions {
485
+ /**
486
+ * @description Points are in order, from -> stops -> to.
487
+ * The length of points must be: 1 < {points.length} < 6.
488
+ */
489
+ points: Array<{
490
+ lat: number;
491
+ lon: number;
492
+ /** @deprecated 'buildingId' will be removed in future versions */
493
+ buildingId?: string;
494
+ floorId?: string;
495
+ }>;
496
+ /**
497
+ * @description Default is "foot".
498
+ */
499
+ vehicle?: VehicleType;
500
+ /**
501
+ * @description Language-specific response. Default is "en".
502
+ */
503
+ locale?: PresetLanguage;
504
+ /**
505
+ * @description Whether the end point of the route is at the door(otherwise in the room), default is "true".
506
+ * @deprecated
507
+ */
508
+ toDoor?: boolean;
509
+ }
510
+ export interface IVenueInlineBuilding {
511
+ buildingOutlineId: number;
512
+ defaultFloor?: string;
513
+ floors: IBuildingInlineFloor[];
514
+ id: string;
515
+ labelCenter: ILocation;
516
+ name: IMultilingualName;
517
+ point: {
518
+ type: string;
519
+ coordinates: [
520
+ number,
521
+ number
522
+ ];
523
+ };
524
+ signalMap: boolean;
525
+ visualMap: boolean;
526
+ }
527
+ export interface IVenue {
528
+ address: IMultilingualAddress;
529
+ bbox: IBbox;
530
+ buildings: IVenueInlineBuilding[];
531
+ businessStatus?: {
532
+ status: string;
533
+ };
534
+ country: string;
535
+ defaultBuilding?: string;
536
+ id: string;
537
+ labelCenter: ILocation;
538
+ name: IMultilingualName;
539
+ organization: string[];
540
+ owner: string;
541
+ publicData?: string[];
542
+ photos?: object[];
543
+ region: string;
544
+ restricted: boolean;
545
+ signalMap: boolean;
546
+ totalPhotoCount?: number;
547
+ type: string;
548
+ venueOutlineId: number;
549
+ visualMap: boolean;
550
+ }
551
+ export interface IResponseVenues {
552
+ venues: IVenue[];
553
+ total: number;
554
+ }
555
+ export type TPromiseVenues = AxiosPromise<IResponse<IResponseVenues>>;
556
+ export type Listener = (param: any) => any;
557
+ declare class Event$1 {
558
+ private _type;
559
+ private _target;
560
+ constructor(type: string, data?: Object);
561
+ get type(): string;
562
+ set type(type: string);
563
+ get target(): Evented;
564
+ set target(target: Evented);
565
+ }
566
+ /** MixedEvent class */
567
+ export declare class Evented {
568
+ private _listeners;
569
+ private _oneTimeListeners;
570
+ private _eventedParent;
571
+ private _eventedParentData;
572
+ /**
573
+ * @description Register a new event listener
574
+ * @param type name of the event(a unique string)
575
+ * @param listener event handler, it will be called when the event is fired
576
+ */
577
+ on(type: string, listener: Listener): this;
578
+ /**
579
+ * @description Remove a registered event listener
580
+ * @param type name of the event
581
+ * @param listener event handler
582
+ */
583
+ off(type: string, listener: Listener): this;
584
+ /**
585
+ * Adds a listener that will be called only once to a specified event type.
586
+ *
587
+ * The listener will be called first time the event fires after the listener is registered.
588
+ *
589
+ * @param {string} type The event type to listen for.
590
+ * @param {Function} listener The function to be called when the event is fired the first time.
591
+ * @returns {Object} `this`
592
+ */
593
+ once(type: string, listener: Listener): this;
594
+ fire(event: Event$1): this;
595
+ /**
596
+ * Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.
597
+ *
598
+ * @param {string} type The event type
599
+ * @returns {boolean} `true` if there is at least one registered listener for specified event type, `false` otherwise
600
+ * @private
601
+ */
602
+ listens(type: string): boolean;
603
+ /**
604
+ * Bubble all events fired by this instance of Evented to this parent instance of Evented.
605
+ *
606
+ * @returns {Object} `this`
607
+ * @private
608
+ */
609
+ setEventedParent(parent: Evented, data?: Object | (() => Object)): this;
610
+ }
611
+ export declare class Indoor extends Evented {
612
+ private _map;
613
+ private _features;
614
+ private _allBuildings;
190
615
  private _curBuildingId;
191
616
  private _curBuildingFeature;
192
617
  private _ordinal;
@@ -210,16 +635,19 @@ export declare class Indoor extends Evented {
210
635
  private _indoorMapLoaded;
211
636
  private readonly _isVenueMode;
212
637
  private _isMaskMode;
213
- private _upperBuildings;
214
- private _lowerBuildings;
215
- private readonly _hiddenBuildings;
216
638
  private _upperLevels;
217
639
  private _lowerLevels;
218
- private _history;
219
640
  private _featureIncomplete;
220
- private _isSwitchBuildingByClickMap;
641
+ private _dragPan;
642
+ private _isNewBuilding;
643
+ private _buildingBounds;
644
+ private _history;
645
+ private _layerBuildings;
646
+ private _upperBuildings;
647
+ private _lowerBuildings;
648
+ private readonly _hiddenBuildings;
221
649
  constructor(props: {
222
- map: MaplibreMap;
650
+ map: maplibregl$1.Map;
223
651
  floorSwitchMode?: FloorSwitchMode;
224
652
  fitBuildingBounds?: boolean;
225
653
  boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
@@ -302,24 +730,16 @@ export declare class Indoor extends Evented {
302
730
  }): MapGeoJSONFeature[];
303
731
  /**
304
732
  * @description Get level feature at the point
733
+ * @deprecated
305
734
  * @param point
306
735
  * @return {MapGeoJSONFeature | null}
307
736
  */
308
737
  getLevelByPoint(point: PointLike): MapGeoJSONFeature | null;
309
- /**
310
- * @description Map pan to the building center and select the building.
311
- * @param buildingId
312
- * @param floorId
313
- * @param callback - **@deprecated** The optional parameter **'callback' will be removed soon**, you
314
- * should use this method as `await panToBuilding(buildingId)` or `panToBuilding(buildingId).then()`
315
- */
316
- panToBuilding(buildingId: string, floorId?: string, callback?: (feature: MapGeoJSONFeature) => void): Promise<void>;
317
738
  /**
318
739
  * @description Switch floor by ordinal.
319
740
  * @param ordinal
320
- * @param dragPan
321
741
  */
322
- switchFloorByOrdinal(ordinal: string | null, dragPan?: boolean): void;
742
+ switchFloorByOrdinal(ordinal: string | null): Promise<void>;
323
743
  /**
324
744
  * @description Hide the outdoor layer.
325
745
  * @deprecated Use 'setOutdoorMapShown' instead.
@@ -363,7 +783,20 @@ export declare class Indoor extends Evented {
363
783
  featureIncomplete?: boolean;
364
784
  }): Promise<void>;
365
785
  updateRendering(): void;
366
- private _getBuildingByPoint;
786
+ panToBuildingCenter(): Promise<unknown>;
787
+ fitBuildingBbox(): void;
788
+ setDragPan(dragPan: boolean | "restrict"): void;
789
+ setBuildingBounds(bounds: [
790
+ [
791
+ number,
792
+ number
793
+ ],
794
+ [
795
+ number,
796
+ number
797
+ ]
798
+ ]): void;
799
+ selectBuildingByClickMap(point: PointLike): Promise<void>;
367
800
  private _loadData;
368
801
  private _init;
369
802
  private _clear;
@@ -380,6 +813,7 @@ export declare class Indoor extends Evented {
380
813
  private _getBuildingDefaultOrdinal;
381
814
  private _getBuildingsOfBbox;
382
815
  private _copyOverlapLayers;
816
+ private _updateFeatures;
383
817
  private _layerDisplayedBuildings;
384
818
  private _setDisplayedLevels;
385
819
  private _filterTiles;
@@ -390,48 +824,14 @@ export declare class Indoor extends Evented {
390
824
  private _checkAndPanToBuilding;
391
825
  private _invisibleSelectedBuilding;
392
826
  }
393
- export interface IPoiEvent {
394
- coordinate: LngLat;
395
- poi: MapGeoJSONFeature;
396
- building: MapGeoJSONFeature | null;
397
- venue: MapGeoJSONFeature | null;
398
- floor: IFloor;
399
- }
400
- export interface IPointEvent {
401
- coordinate: LngLat;
402
- point: PointLike;
403
- }
404
- export interface IMapClickEvent {
405
- coordinate: LngLat;
406
- building: MapGeoJSONFeature | null;
407
- venue: MapGeoJSONFeature | null;
408
- floor: IFloor;
409
- }
410
- export declare class SwitchOutdoorHandler {
411
- private _indoor;
412
- private _isEnabled;
413
- constructor(indoor: Indoor);
414
- enable(): void;
415
- disable(): void;
416
- get isEnabled(): boolean;
417
- }
418
- export declare class SwitchBuildingHandler {
419
- private _indoor;
420
- private _isEnabled;
421
- constructor(indoor: Indoor);
422
- enable(): void;
423
- disable(): void;
424
- get isEnabled(): boolean;
425
- }
426
827
  export declare class BuildingFilterControl implements IControl {
427
828
  private _map;
428
829
  private _maplibre;
429
- private _indoor;
430
830
  private _buildingId;
431
831
  private _features;
432
- private _container;
433
- private _buildingNameLayout;
434
- private _buildingNameList;
832
+ private _$container;
833
+ private _$listContainer;
834
+ private _$buildingList;
435
835
  private _listHeight;
436
836
  private _visible;
437
837
  private _position;
@@ -441,7 +841,7 @@ export declare class BuildingFilterControl implements IControl {
441
841
  * @param buildingSelectorEnabled
442
842
  */
443
843
  constructor(map: Map$1, position?: ControlPosition, buildingSelectorEnabled?: boolean);
444
- onAdd(map: MaplibreMap): HTMLElement;
844
+ onAdd(map: maplibregl$1.Map): HTMLElement;
445
845
  onRemove(): void;
446
846
  get position(): ControlPosition;
447
847
  get enabled(): boolean;
@@ -462,36 +862,19 @@ export declare class BuildingFilterControl implements IControl {
462
862
  private _loadData;
463
863
  private _init;
464
864
  private _refresh;
465
- private _select;
466
865
  private _load;
467
866
  private _buildingFilterIconCreate;
468
867
  private _buildingNameListCreate;
469
- private _buildingNameListUpdate;
470
- private _buildingNameListClean;
471
- private _setBuildingListHeight;
472
- private _buildingNameCreate;
473
- private _toggleList;
474
- private _buildingNameClickEvent;
475
- private _buildingToggleListEvent;
476
- private _$showLayout;
477
- private _$hideLayout;
478
- private _updateBuildingListLayout;
479
- }
480
- export declare class BuildingSelectorHandler {
481
- private _buildingSelector;
482
- private _isEnabled;
483
- private _position;
484
- constructor(buildingSelector: BuildingFilterControl);
485
- enable(): void;
486
- disable(): void;
487
- /**
488
- * Set the position of the building selector control
489
- * @param position
490
- * @param index - The index of the control in the controls-container. Default at the last.
491
- */
492
- setPosition(position: ControlPosition, index?: number): void;
493
- get isEnabled(): boolean;
494
- get position(): ControlPosition;
868
+ private _buildingNameListUpdate;
869
+ private _buildingNameListClean;
870
+ private _setBuildingListHeight;
871
+ private _buildingNameCreate;
872
+ private _toggleList;
873
+ private _buildingNameClickEvent;
874
+ private _buildingToggleListEvent;
875
+ private _$showLayout;
876
+ private _$hideLayout;
877
+ private _updateBuildingListLayout;
495
878
  }
496
879
  export interface IFloorSelectorOptions {
497
880
  style?: IFloorSelectorStyle;
@@ -525,7 +908,7 @@ export declare class FloorsControl implements IControl {
525
908
  * @param options
526
909
  */
527
910
  constructor(indoor: Indoor, options: IFloorSelectorOptions);
528
- onAdd(map: MaplibreMap): HTMLElement;
911
+ onAdd(map: maplibregl$1.Map): HTMLElement;
529
912
  onRemove(): void;
530
913
  get position(): ControlPosition;
531
914
  get enabled(): boolean;
@@ -534,8 +917,9 @@ export declare class FloorsControl implements IControl {
534
917
  /**
535
918
  * @description Switch floor by ordinal
536
919
  * @param ordinal
920
+ * @param dragPan
537
921
  */
538
- switchByOrdinal(ordinal: string): void;
922
+ switchByOrdinal(ordinal: string, dragPan?: boolean): void;
539
923
  /**
540
924
  * @deprecated
541
925
  * @param visible
@@ -548,7 +932,6 @@ export declare class FloorsControl implements IControl {
548
932
  setPosition(position: ControlPosition): void;
549
933
  changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
550
934
  setStyle(style: Partial<IFloorSelectorStyle>): void;
551
- setDragPan(dragPan: boolean | undefined): void;
552
935
  private _setVisibility;
553
936
  private _bindEvents;
554
937
  private _addMapMoveEventListener;
@@ -572,6 +955,22 @@ export declare class FloorsControl implements IControl {
572
955
  private _handleScroll;
573
956
  private _expandSelector;
574
957
  }
958
+ export declare class BuildingSelectorHandler {
959
+ private _buildingSelector;
960
+ private _isEnabled;
961
+ private _position;
962
+ constructor(buildingSelector: BuildingFilterControl);
963
+ enable(): void;
964
+ disable(): void;
965
+ /**
966
+ * Set the position of the building selector control
967
+ * @param position
968
+ * @param index - The index of the control in the controls-container. Default at the last.
969
+ */
970
+ setPosition(position: ControlPosition, index?: number): void;
971
+ get isEnabled(): boolean;
972
+ get position(): ControlPosition;
973
+ }
575
974
  export declare class FloorSelectorHandler {
576
975
  private _floorSelector;
577
976
  private _isEnabled;
@@ -589,6 +988,22 @@ export declare class FloorSelectorHandler {
589
988
  get isEnabled(): boolean;
590
989
  get position(): ControlPosition;
591
990
  }
991
+ export declare class SwitchBuildingHandler {
992
+ private _indoor;
993
+ private _isEnabled;
994
+ constructor(indoor: Indoor);
995
+ enable(): void;
996
+ disable(): void;
997
+ get isEnabled(): boolean;
998
+ }
999
+ export declare class SwitchOutdoorHandler {
1000
+ private _indoor;
1001
+ private _isEnabled;
1002
+ constructor(indoor: Indoor);
1003
+ enable(): void;
1004
+ disable(): void;
1005
+ get isEnabled(): boolean;
1006
+ }
592
1007
  declare class Map$1 extends Evented {
593
1008
  private _map;
594
1009
  private _indoor;
@@ -600,9 +1015,8 @@ declare class Map$1 extends Evented {
600
1015
  private _language;
601
1016
  private _dispatch;
602
1017
  private _fitBuildingBounds;
603
- private _boundsPadding;
604
- private _buildingService;
605
- private _venueService;
1018
+ private _history;
1019
+ private _hiddenBuildings;
606
1020
  switchOutdoor: SwitchOutdoorHandler;
607
1021
  switchBuilding: SwitchBuildingHandler;
608
1022
  buildingSelector: BuildingSelectorHandler;
@@ -620,12 +1034,12 @@ declare class Map$1 extends Evented {
620
1034
  /**
621
1035
  * @description Get maplibre map instance.
622
1036
  */
623
- getMaplibre(): MaplibreMap;
1037
+ getMaplibre(): maplibregl$1.Map;
624
1038
  /**
625
1039
  * @description Get maplibre map instance.
626
1040
  * @deprecated Use 'getMaplibre' instead.
627
1041
  */
628
- getMap(): MaplibreMap;
1042
+ getMap(): maplibregl$1.Map;
629
1043
  /**
630
1044
  * @description Get current selected floor info.
631
1045
  * @return {IFloor | null}
@@ -714,7 +1128,7 @@ declare class Map$1 extends Evented {
714
1128
  filter?: (feature: MapGeoJSONFeature) => boolean;
715
1129
  }): MapGeoJSONFeature[];
716
1130
  /**
717
- * @description Select floor by id.
1131
+ * @description Select indoor by locating the target floor.
718
1132
  * @param floorId
719
1133
  * @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
720
1134
  * Default is true.
@@ -723,7 +1137,7 @@ declare class Map$1 extends Evented {
723
1137
  dragPan?: boolean;
724
1138
  }): Promise<void>;
725
1139
  /**
726
- * @description Select building by id.
1140
+ * @description Select indoor by locating the target building.
727
1141
  * @param buildingId
728
1142
  * @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
729
1143
  * Default is true.
@@ -732,7 +1146,7 @@ declare class Map$1 extends Evented {
732
1146
  dragPan?: boolean;
733
1147
  }): Promise<void>;
734
1148
  /**
735
- * @description Select or exit venue by id.
1149
+ * @description Select indoor by locating the target venue.
736
1150
  * @param venueId 'venueId' can be string or null. Exit indoors if venueId is null.
737
1151
  * @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
738
1152
  * Default is true.
@@ -812,24 +1226,15 @@ declare class Map$1 extends Evented {
812
1226
  private _selectPoiById;
813
1227
  private _resourceRequestTransform;
814
1228
  private _checkMapZoom;
815
- private _clickEventsDispatcher;
816
1229
  private _hideIndoorLayers;
817
1230
  private _showIndoorLayers;
818
1231
  private _updatePermission;
819
- private _panToBuilding;
820
- }
821
- export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
822
- export interface IMarkerOptions {
823
- lngLat: [
824
- number,
825
- number
826
- ];
827
- properties?: {
828
- [k: string]: string;
829
- };
830
- }
831
- export interface IMarkerOptionsWithFeatureId extends IMarkerOptions {
832
- featureId: number;
1232
+ private _selectCenterBuilding;
1233
+ /**
1234
+ * @description Query building features within the center rectangle(width: 1/2 width of map view, height: 1/2 height of map view) of map.
1235
+ * @returns Map<buildingId, buildingFeature>
1236
+ */
1237
+ private _getCenterBuildingsMap;
833
1238
  }
834
1239
  export declare class Marker {
835
1240
  private readonly _maplibreMap;
@@ -838,7 +1243,7 @@ export declare class Marker {
838
1243
  private _imageName;
839
1244
  private _imageSize;
840
1245
  private _iconAnchor;
841
- constructor(maplibreMap: MaplibreMap);
1246
+ constructor(maplibreMap: maplibregl$1.Map);
842
1247
  /**
843
1248
  * @description Set custom marker image.
844
1249
  * @param icon Sprite name in map style or the URL of the image file.
@@ -901,7 +1306,7 @@ export declare class Marker {
901
1306
  * @param callback
902
1307
  */
903
1308
  on(eventKey: keyof MapLayerEventType, callback: (marker: MapGeoJSONFeature) => void): {
904
- off: () => MaplibreMap;
1309
+ off: () => maplibregl$1.Map;
905
1310
  };
906
1311
  /**
907
1312
  * @description Filter marker by custom properties.
@@ -927,429 +1332,229 @@ export declare class Marker {
927
1332
  * @param buildingId {string | null | undefined} null | undefined will be treated as ''.
928
1333
  * @param ordinal {string | null | undefined} null | undefined will be treated as ''.
929
1334
  */
930
- setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
931
- /**
932
- * @description Set marker's icon-opacity by custom properties.
933
- * @param filterExpression A expression specifying conditions on source features.
934
- * Only features that match the filter are displayed. Refer:
935
- * https://maplibre.org/maplibre-style-spec/expressions/
936
- */
937
- setOpacity(filterExpression: FilterSpecification): void;
938
- /**
939
- * @description Set marker's icon-opacity by venueId and ordinal.
940
- * Required 'venueId' and 'ordinal' in properties.
941
- * Opacities of markers matched 'venueId' and 'ordinal' are 1, others are 0.5.
942
- * Outdoor markers' opacity always are 1.
943
- * @param venueId {string | null | undefined} null | undefined will be treated as ''.
944
- * @param ordinal {string | null | undefined} null | undefined will be treated as ''.
945
- */
946
- setOpacityByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
947
- /**
948
- * @description Set marker's icon-opacity by buildingId and ordinal.
949
- * Required 'buildingId' and 'ordinal' in properties.
950
- * Opacities of markers matched 'buildingId' and 'ordinal' are 1, others are 0.5.
951
- * Outdoor markers' opacity always are 1.
952
- * @param buildingId {string | null | undefined} null | undefined will be treated as ''.
953
- * @param ordinal {string | null | undefined} null | undefined will be treated as ''.
954
- */
955
- setOpacityByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
956
- private _createIconFeature;
957
- private _addIconSource;
958
- private _addIconLayer;
959
- private _handleEventListener;
960
- }
961
- export declare class Poi {
962
- private _map;
963
- private _layerIds;
964
- private _dispatch;
965
- constructor(map: MaplibreMap);
966
- /**
967
- * @description Listen for POI click events.
968
- * @param listener
969
- */
970
- onPoiClick(listener: (param: IPoiEvent) => void): {
971
- unsubscribe: VoidFunction;
972
- };
973
- private _bindEvents;
974
- private _init;
975
- private _initPoiClick;
976
- private _getFloorDataByFloorId;
977
- }
978
- export interface IMultilingualName extends Partial<Record<PresetLanguage, string>> {
979
- default: string;
980
- }
981
- export type IMultilingualAddress = Record<keyof IMultilingualName, {
982
- housenumber: string;
983
- street: string;
984
- }>;
985
- export interface ILocation {
986
- lat: number;
987
- lon: number;
988
- }
989
- export interface IBbox {
990
- maxLat: number;
991
- maxLon: number;
992
- minLat: number;
993
- minLon: number;
994
- }
995
- export interface IResponse<T> {
996
- code: number;
997
- message: string;
998
- result: T;
999
- }
1000
- export interface IBuildingInlineFloor {
1001
- code: string;
1002
- id: string;
1003
- ordinal: number;
1004
- signalMap: boolean;
1005
- visualMap: boolean;
1006
- }
1007
- export interface IBuilding {
1008
- address: IMultilingualAddress;
1009
- bbox: IBbox;
1010
- buildingId: string;
1011
- buildingOutlineId: number;
1012
- city?: string;
1013
- country: string;
1014
- defaultFloor?: string;
1015
- floors: IBuildingInlineFloor[];
1016
- groundFloor: string;
1017
- isPrivate: "yes" | "no";
1018
- labelCenter: ILocation;
1019
- name: IMultilingualName;
1020
- organization: string;
1021
- region: string;
1022
- signalMap: boolean;
1023
- type: string;
1024
- venueId: string;
1025
- venueName: IMultilingualName;
1026
- visualMap: boolean;
1027
- }
1028
- export interface IResponseBuildings {
1029
- buildings: IBuilding[];
1030
- total: number;
1031
- }
1032
- export type TPromiseBuildings = AxiosPromise<IResponse<IResponseBuildings>>;
1033
- export interface IVenueInlineBuilding {
1034
- buildingOutlineId: number;
1035
- defaultFloor?: string;
1036
- floors: IBuildingInlineFloor[];
1037
- id: string;
1038
- labelCenter: ILocation;
1039
- name: IMultilingualName;
1040
- point: {
1041
- type: string;
1042
- coordinates: [
1043
- number,
1044
- number
1045
- ];
1046
- };
1047
- signalMap: boolean;
1048
- visualMap: boolean;
1049
- }
1050
- export interface IVenue {
1051
- address: IMultilingualAddress;
1052
- bbox: IBbox;
1053
- buildings: IVenueInlineBuilding[];
1054
- businessStatus?: {
1055
- status: string;
1056
- };
1057
- country: string;
1058
- defaultBuilding?: string;
1059
- id: string;
1060
- labelCenter: ILocation;
1061
- name: IMultilingualName;
1062
- organization: string[];
1063
- owner: string;
1064
- publicData?: string[];
1065
- photos?: object[];
1066
- region: string;
1067
- restricted: boolean;
1068
- signalMap: boolean;
1069
- totalPhotoCount?: number;
1070
- type: string;
1071
- venueOutlineId: number;
1072
- visualMap: boolean;
1073
- }
1074
- export interface IResponseVenues {
1075
- venues: IVenue[];
1076
- total: number;
1077
- }
1078
- export type TPromiseVenues = AxiosPromise<IResponse<IResponseVenues>>;
1079
- export declare class VenuesService {
1080
- private _api;
1081
- private _request;
1082
- constructor();
1083
- /**
1084
- * @description Search venues by ids.
1085
- * @param ids The number of IDs cannot exceed 10.
1086
- */
1087
- searchByIds(ids: string | string[]): TPromiseVenues;
1088
- /**
1089
- * @description Search venues by center and distance.
1090
- * @param keywords
1091
- * @param center
1092
- * @param distance Radius from center, unit is kilometers.
1093
- * @param offset The maximum value is 100, default is 10.
1094
- * @param page Default is 1.
1095
- */
1096
- searchByDistance(keywords: string, center: [
1097
- number,
1098
- number
1099
- ], distance: number, offset?: number, page?: number): TPromiseVenues;
1100
- /**
1101
- * @description Search venues in specified bbox.
1102
- * @param keywords
1103
- * @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
1104
- * @param offset The maximum value is 100, default is 10.
1105
- * @param page Default is 1.
1106
- */
1107
- searchByBbox(keywords: string, bbox: [
1108
- number,
1109
- number,
1110
- number,
1111
- number
1112
- ], offset?: number, page?: number): TPromiseVenues;
1113
- /**
1114
- * @description Search venues by global.
1115
- * @param keywords
1116
- * @param offset The maximum value is 100, default is 10.
1117
- * @param page Default is 1.
1118
- */
1119
- searchByGlobal(keywords: string, offset?: number, page?: number): TPromiseVenues;
1120
- private _changedRes;
1121
- }
1122
- export declare class BuildingsService {
1123
- private _api;
1124
- private _request;
1125
- constructor();
1126
- /**
1127
- * @description Search buildings by id[s].
1128
- * @param ids Single id string or id string array. The number of IDs cannot exceed 10.
1129
- */
1130
- searchByIds(ids: string | string[]): TPromiseBuildings;
1335
+ setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
1131
1336
  /**
1132
- * @description Search buildings by center and distance.
1133
- * @param keywords
1134
- * @param center
1135
- * @param distance Radius from center, unit is kilometers.
1136
- * @param offset The maximum value is 100, default is 10.
1137
- * @param page Default is 1.
1337
+ * @description Set marker's icon-opacity by custom properties.
1338
+ * @param filterExpression A expression specifying conditions on source features.
1339
+ * Only features that match the filter are displayed. Refer:
1340
+ * https://maplibre.org/maplibre-style-spec/expressions/
1138
1341
  */
1139
- searchByDistance(keywords: string, center: number[], distance: number, offset?: number, page?: number): TPromiseBuildings;
1342
+ setOpacity(filterExpression: FilterSpecification): void;
1140
1343
  /**
1141
- * @description Search buildings in specified bbox.
1142
- * @param keywords
1143
- * @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
1144
- * @param offset The maximum value is 100, default is 10.
1145
- * @param page Default is 1.
1344
+ * @description Set marker's icon-opacity by venueId and ordinal.
1345
+ * Required 'venueId' and 'ordinal' in properties.
1346
+ * Opacities of markers matched 'venueId' and 'ordinal' are 1, others are 0.5.
1347
+ * Outdoor markers' opacity always are 1.
1348
+ * @param venueId {string | null | undefined} null | undefined will be treated as ''.
1349
+ * @param ordinal {string | null | undefined} null | undefined will be treated as ''.
1146
1350
  */
1147
- searchByBbox(keywords: string, bbox: number[], offset?: number, page?: number): TPromiseBuildings;
1351
+ setOpacityByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
1148
1352
  /**
1149
- * @description Search buildings global.
1150
- * @param keywords
1151
- * @param offset The maximum value is 100, default is 10.
1152
- * @param page Default is 1.
1353
+ * @description Set marker's icon-opacity by buildingId and ordinal.
1354
+ * Required 'buildingId' and 'ordinal' in properties.
1355
+ * Opacities of markers matched 'buildingId' and 'ordinal' are 1, others are 0.5.
1356
+ * Outdoor markers' opacity always are 1.
1357
+ * @param buildingId {string | null | undefined} null | undefined will be treated as ''.
1358
+ * @param ordinal {string | null | undefined} null | undefined will be treated as ''.
1153
1359
  */
1154
- searchByGlobal(keywords: string, offset?: number, page?: number): TPromiseBuildings;
1360
+ setOpacityByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
1361
+ private _createIconFeature;
1362
+ private _addIconSource;
1363
+ private _addIconLayer;
1364
+ private _handleEventListener;
1365
+ }
1366
+ export declare class Poi {
1367
+ private _map;
1368
+ private _layerIds;
1369
+ private _dispatch;
1370
+ constructor(map: maplibregl$1.Map);
1155
1371
  /**
1156
- * @description Search building by floor id.
1157
- * @param floorId
1372
+ * @description Listen for POI click events.
1373
+ * @param listener
1158
1374
  */
1159
- searchByFloorId(floorId: string): TPromiseBuildings;
1160
- private _changedRes;
1161
- }
1162
- export interface IPoi {
1163
- accessibilityDetail: IMultilingualName;
1164
- buildingId: string;
1165
- category: string[];
1166
- distance: number;
1167
- floor: string;
1168
- floorId: string;
1169
- id: string;
1170
- location: ILocation;
1171
- name: IMultilingualName;
1172
- osmRefId: number;
1173
- poiId: string;
1174
- venueId: string;
1175
- /** @deprecated 'description' will be removed soon */
1176
- description?: string;
1177
- descriptions?: IMultilingualName;
1178
- email?: string;
1179
- openingHours?: string;
1180
- phone?: string;
1181
- website?: string;
1182
- }
1183
- export interface IResponsePois {
1184
- pois: IPoi[];
1185
- total: number;
1186
- }
1187
- export type TPromisePois = AxiosPromise<IResponse<IResponsePois>>;
1188
- export type TPromiseCategories = AxiosPromise<IResponse<IPoiCategory[]>>;
1189
- export type TPromiseOrientationPois = AxiosPromise<IResponse<IOrientationPoi[]>>;
1190
- export declare enum DistanceSearchType {
1191
- POINT = "Point",
1192
- POLYGON = "Polygon",
1193
- GATE = "Gate"
1194
- }
1195
- export interface IPoiCategory {
1196
- category: string;
1197
- description: string | null;
1198
- id: string;
1199
- title: Partial<Record<keyof IMultilingualName, string>>;
1200
- }
1201
- export interface IOrientationPoi {
1202
- angle: number;
1203
- buildingId: string;
1204
- category: string[];
1205
- distance: number;
1206
- distanceSource: string;
1207
- floor: string;
1208
- floorId: string;
1209
- id: string;
1210
- location: ILocation;
1211
- name: IMultilingualName;
1212
- osmRefId: number;
1213
- poiId: string;
1214
- description?: string;
1215
- email?: string;
1216
- openingHours?: string;
1217
- phone?: string;
1218
- website?: string;
1375
+ onPoiClick(listener: (param: IPoiEvent) => void): {
1376
+ unsubscribe: VoidFunction;
1377
+ };
1378
+ private _bindEvents;
1379
+ private _init;
1380
+ private _initPoiClick;
1381
+ private _getFloorDataByFloorId;
1219
1382
  }
1220
- export interface ISearchDistance {
1383
+ export declare class RoutePainter {
1384
+ private readonly _maplibreMap;
1385
+ private _fromMarkerIcon;
1386
+ private _toMarkerIcon;
1387
+ private _stopMarkerIcons;
1388
+ private _markerIconSize;
1389
+ private _paintProperties;
1390
+ constructor(maplibreMap: maplibregl$1.Map);
1221
1391
  /**
1222
- * The center of searching range, [lng, lat].
1392
+ * @description Set image[s] of the stop marker[s].
1393
+ * @param icons {**Array<string | null> | {from?: string | null; to?: string | null; stops?: Array<string | null> | null;}**}
1394
+ * Array of sprite names or URLs, or the object with specifying icon.
1395
+ * Markers use images in order of icons array.
1396
+ * First is as from-marker, last is as to-marker, the middles are as stop-markers.
1397
+ * If icons array has only one element, all stop markers use this image.
1398
+ * Image file must be in png, webp, or jpg format.
1399
+ * Null means none image.
1223
1400
  */
1224
- center: [
1225
- number,
1226
- number
1227
- ];
1401
+ setMarkerIcons(icons: Array<string | null> | {
1402
+ from?: string | null;
1403
+ to?: string | null;
1404
+ stops?: Array<string | null> | null;
1405
+ }): Promise<void>;
1228
1406
  /**
1229
- * Radius from center, unit is meter, cannot exceed 10,000.
1407
+ * @description Set image icon scale.
1408
+ * @param size Default is 1.
1230
1409
  */
1231
- distance: number;
1410
+ setMarkerIconSize(size: number): this;
1232
1411
  /**
1233
- * The maximum value is 100, default is 10.
1412
+ * @description Set the route color of the indoor part.
1413
+ * @param color The color type is a color in the sRGB color space.
1414
+ * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
1415
+ * Predefined HTML colors names, like yellow and blue, are also permitted.
1234
1416
  */
1235
- offset?: number;
1417
+ setIndoorLineColor(color: string): this;
1236
1418
  /**
1237
- * Results for specified page number. Default is 1.
1419
+ * @description Set the route color of the outdoor part.
1420
+ * @param color The color type is a color in the sRGB color space.
1421
+ * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
1422
+ * Predefined HTML colors names, like yellow and blue, are also permitted.
1238
1423
  */
1239
- page?: number;
1240
- }
1241
- export interface IPoiSearchByCategoryOptions extends ISearchDistance {
1242
- category: string;
1243
- }
1244
- export interface IPoiSearchByExcludedCategoriesOptions extends ISearchDistance {
1245
- excludedCategories: string | string[];
1246
- }
1247
- export type TPoiSearchByCategoryOptions = IPoiSearchByCategoryOptions | IPoiSearchByExcludedCategoriesOptions;
1248
- export interface IPoiSearchByDistanceOptions extends ISearchDistance {
1424
+ setOutdoorLineColor(color: string): this;
1249
1425
  /**
1250
- * Keywords of POI name.
1426
+ * @description Set color of dashed lines which connected the start and end markers.
1427
+ * @param color The color type is a color in the sRGB color space.
1428
+ * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
1429
+ * Predefined HTML colors names, like yellow and blue, are also permitted.
1251
1430
  */
1252
- keywords?: string;
1253
- }
1254
- export interface ISearchOrientation {
1431
+ setDashedLineColor(color: string): this;
1255
1432
  /**
1256
- * User's position, [lng, lat].
1433
+ * @description Set color of shuttle bus line.
1434
+ * @param color The color type is a color in the sRGB color space.
1435
+ * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
1436
+ * Predefined HTML colors names, like yellow and blue, are also permitted.
1257
1437
  */
1258
- center: [
1438
+ setBusLineColor(color: string): this;
1439
+ /**
1440
+ * @description Render route on the map.
1441
+ * @param path Route path from RouteService.search response.
1442
+ * @param markerLocations Coordinate([lng, lat]) array of markers, order from beginning to end.
1443
+ */
1444
+ render(path: IRoutePath, markerLocations: Array<[
1259
1445
  number,
1260
1446
  number
1261
- ];
1447
+ ]>): void;
1262
1448
  /**
1263
- * The angle between the user's orientation and true north.
1449
+ * @description Remove route from the map.
1264
1450
  */
1265
- angle: number;
1451
+ remove(): void;
1266
1452
  /**
1267
- * The radius with 'center' as the center of the circle.
1453
+ * @description Filter paths' opacity by venue and ordinal.
1454
+ * @param venueId {string | null | undefined}
1455
+ * @param ordinal {string | null | undefined}
1268
1456
  */
1269
- distance: number;
1457
+ setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
1270
1458
  /**
1271
- * The type of POI, default is 'Point'.
1459
+ * @description Filter paths' opacity by building and ordinal.
1460
+ * @param buildingId {string | null | undefined}
1461
+ * @param ordinal {string | null | undefined}
1272
1462
  */
1273
- distanceSearchType?: DistanceSearchType;
1274
- }
1275
- export interface IPoiSearchByOrientationAndBuildingOptions extends ISearchOrientation {
1276
- buildingId: string;
1277
- }
1278
- export interface IPoiSearchByOrientationAndFloorOptions extends ISearchOrientation {
1279
- floorId: string;
1280
- }
1281
- export interface IPoiSearchByOrientationAndOrdinalOptions extends ISearchOrientation {
1282
- ordinal: string;
1463
+ setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
1464
+ private _classifyFeatures;
1465
+ private _createLineFeature;
1466
+ private _createIconFeature;
1467
+ private _renderSolidLines;
1468
+ private _renderDashedLines;
1469
+ private _renderConnectors;
1470
+ private _renderMarkers;
1471
+ private _addCollectionSource;
1472
+ private _addLineLayer;
1473
+ private _addTriangleLayer;
1474
+ private _addIconLayer;
1283
1475
  }
1284
- export type TPoiSearchByOrientationOptions = IPoiSearchByOrientationAndBuildingOptions | IPoiSearchByOrientationAndFloorOptions | IPoiSearchByOrientationAndOrdinalOptions;
1285
- export interface IPoiSearchOrientationOptions {
1476
+ export declare class VenuesService {
1477
+ private _api;
1478
+ private _request;
1479
+ constructor();
1286
1480
  /**
1287
- * User's current position, [lng, lat].
1481
+ * @description Search venues by ids.
1482
+ * @param ids Single id string or string ids in array. The number of IDs cannot exceed 10.
1288
1483
  */
1289
- center: [
1484
+ searchByIds(ids: string | string[]): TPromiseVenues;
1485
+ /**
1486
+ * @description Search venues by center and distance.
1487
+ * @param keywords
1488
+ * @param center
1489
+ * @param distance Radius from center, unit is kilometers.
1490
+ * @param offset The maximum value is 100, default is 10.
1491
+ * @param page Default is 1.
1492
+ */
1493
+ searchByDistance(keywords: string, center: [
1494
+ number,
1495
+ number
1496
+ ], distance: number, offset?: number, page?: number): TPromiseVenues;
1497
+ /**
1498
+ * @description Search venues in specified bbox.
1499
+ * @param keywords
1500
+ * @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
1501
+ * @param offset The maximum value is 100, default is 10.
1502
+ * @param page Default is 1.
1503
+ */
1504
+ searchByBbox(keywords: string, bbox: [
1505
+ number,
1506
+ number,
1290
1507
  number,
1291
1508
  number
1292
- ];
1293
- /**
1294
- * The angle between cellphone's orientation and the north.
1295
- */
1296
- angle: number;
1509
+ ], offset?: number, page?: number): TPromiseVenues;
1297
1510
  /**
1298
- * Radius.
1511
+ * @description Search venues by global.
1512
+ * @param keywords
1513
+ * @param offset The maximum value is 100, default is 10.
1514
+ * @param page Default is 1.
1299
1515
  */
1300
- distance: number;
1301
- buildingId?: string;
1302
- floorId?: string;
1516
+ searchByGlobal(keywords: string, offset?: number, page?: number): TPromiseVenues;
1517
+ private _changedRes;
1518
+ }
1519
+ export declare class BuildingsService {
1520
+ private _api;
1521
+ private _request;
1522
+ constructor();
1303
1523
  /**
1304
- * Floor order in physical space, e.g. '-1', '0'(ground floor), '1'...
1524
+ * @description Search buildings by id[s].
1525
+ * @param ids Single id string or string ids in array. The number of IDs cannot exceed 10.
1305
1526
  */
1306
- ordinal?: string;
1527
+ searchByIds(ids: string | string[]): TPromiseBuildings;
1307
1528
  /**
1308
- * Search type.
1529
+ * @description Search buildings by center and distance.
1530
+ * @param keywords
1531
+ * @param center
1532
+ * @param distance Radius from center, unit is kilometers.
1533
+ * @param offset The maximum value is 100, default is 10.
1534
+ * @param page Default is 1.
1309
1535
  */
1310
- distanceSearchType?: DistanceSearchType;
1311
- }
1312
- export declare enum PoisOrderBy {
1313
- DEFAULT_NAME = "DefaultName"
1314
- }
1315
- export interface ISearchKeywords {
1316
- keywords?: string;
1536
+ searchByDistance(keywords: string, center: number[], distance: number, offset?: number, page?: number): TPromiseBuildings;
1317
1537
  /**
1318
- * Quantity per page, the maximum is 100, default is 10.
1538
+ * @description Search buildings in specified bbox.
1539
+ * @param keywords
1540
+ * @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
1541
+ * @param offset The maximum value is 100, default is 10.
1542
+ * @param page Default is 1.
1319
1543
  */
1320
- offset?: number;
1544
+ searchByBbox(keywords: string, bbox: number[], offset?: number, page?: number): TPromiseBuildings;
1321
1545
  /**
1322
- * Results for specified page number. Default is 1.
1546
+ * @description Search buildings global.
1547
+ * @param keywords
1548
+ * @param offset The maximum value is 100, default is 10.
1549
+ * @param page Default is 1.
1323
1550
  */
1324
- page?: number;
1325
- }
1326
- export interface IPoiSearchByBuildingOptions extends ISearchKeywords {
1327
- buildingId: string;
1328
- orderBy?: PoisOrderBy;
1329
- }
1330
- export interface IPoiSearchByVenueOptions extends ISearchKeywords {
1331
- venueId: string;
1332
- orderBy?: PoisOrderBy;
1333
- }
1334
- export interface IPoiSearchByFloorOptions extends ISearchKeywords {
1335
- floorId: string;
1336
- orderBy?: PoisOrderBy;
1337
- }
1338
- export interface IPoiSearchByBoundsOptions extends ISearchKeywords {
1551
+ searchByGlobal(keywords: string, offset?: number, page?: number): TPromiseBuildings;
1339
1552
  /**
1340
- * An array of LngLat coordinates in [sw, ne] order
1553
+ * @description Search building by floor id.
1554
+ * @param floorId
1341
1555
  */
1342
- bounds: [
1343
- [
1344
- number,
1345
- number
1346
- ],
1347
- [
1348
- number,
1349
- number
1350
- ]
1351
- ];
1352
- orderBy?: PoisOrderBy;
1556
+ searchByFloorId(floorId: string): TPromiseBuildings;
1557
+ private _changedRes;
1353
1558
  }
1354
1559
  export declare class PoisService {
1355
1560
  private _api;
@@ -1359,7 +1564,7 @@ export declare class PoisService {
1359
1564
  constructor();
1360
1565
  /**
1361
1566
  * @description Search POIs by id[s].
1362
- * @param ids Single id string or id string array. The number of IDs cannot exceed 100.
1567
+ * @param ids Single id string or string ids in array. The number of IDs cannot exceed 100.
1363
1568
  */
1364
1569
  searchByIds(ids: string | string[]): TPromisePois;
1365
1570
  /**
@@ -1447,88 +1652,6 @@ export declare class PoisService {
1447
1652
  searchByCategory(options: TPoiSearchByCategoryOptions): TPromisePois;
1448
1653
  private _changedRes;
1449
1654
  }
1450
- export declare enum VehicleType {
1451
- FOOT = "foot",
1452
- WHEELCHAIR = "wheelchair",
1453
- ESCALATOR = "escalator",
1454
- EMERGENCY = "emergency"
1455
- }
1456
- export interface IRouteInfo {
1457
- copyrights: string[];
1458
- took: number;
1459
- }
1460
- export interface IInstruction {
1461
- building_id: string;
1462
- distance: number;
1463
- floor_id: string;
1464
- heading: number;
1465
- interval: [
1466
- number,
1467
- number
1468
- ];
1469
- ordinal: number;
1470
- sign: number;
1471
- street_name: string;
1472
- text: string;
1473
- time: number;
1474
- type: string | null;
1475
- venue_id: string;
1476
- }
1477
- export interface IRoutePath {
1478
- bbox: [
1479
- number,
1480
- number,
1481
- number,
1482
- number
1483
- ];
1484
- distance: number;
1485
- instructions: IInstruction[];
1486
- points: {
1487
- coordinates: Array<[
1488
- number,
1489
- number
1490
- ]>;
1491
- type: string;
1492
- };
1493
- snapped_waypoints: {
1494
- coordinates: Array<[
1495
- number,
1496
- number
1497
- ]>;
1498
- type: string;
1499
- };
1500
- time: number;
1501
- }
1502
- export interface IResponseRoute {
1503
- infos: IRouteInfo | null;
1504
- paths: IRoutePath[];
1505
- }
1506
- export type TPromiseRoute = AxiosPromise<IResponse<IResponseRoute>>;
1507
- export interface IRouteSearchOptions {
1508
- /**
1509
- * @description Points are in order, from -> stops -> to.
1510
- * The length of points must be: 1 < {points.length} < 6.
1511
- */
1512
- points: Array<{
1513
- lat: number;
1514
- lon: number;
1515
- buildingId?: string;
1516
- floorId?: string;
1517
- }>;
1518
- /**
1519
- * @description Default is "foot".
1520
- */
1521
- vehicle?: VehicleType;
1522
- /**
1523
- * @description Language-specific response. Default is "en".
1524
- */
1525
- locale?: PresetLanguage;
1526
- /**
1527
- * @description Whether the end point of the route is at the door(otherwise in the room), default is "true".
1528
- * @deprecated
1529
- */
1530
- toDoor?: boolean;
1531
- }
1532
1655
  export declare class RouteService {
1533
1656
  private _api;
1534
1657
  private _request;
@@ -1539,97 +1662,6 @@ export declare class RouteService {
1539
1662
  */
1540
1663
  search(options: IRouteSearchOptions): TPromiseRoute;
1541
1664
  }
1542
- export declare class RoutePainter {
1543
- private readonly _maplibreMap;
1544
- private _fromMarkerIcon;
1545
- private _toMarkerIcon;
1546
- private _stopMarkerIcons;
1547
- private _markerIconSize;
1548
- private _paintProperties;
1549
- constructor(maplibreMap: MaplibreMap);
1550
- /**
1551
- * @description Set image[s] of the stop marker[s].
1552
- * @param icons Array of sprite names or URLs, or the object with specifying icon.
1553
- * Markers use images in order of icons array.
1554
- * First is as from-marker, last is as to-marker, the middles are as stop-markers.
1555
- * If icons array has only one element, all stop markers use this image.
1556
- * Image file must be in png, webp, or jpg format.
1557
- */
1558
- setMarkerIcons(icons: string[] | {
1559
- from?: string;
1560
- to?: string;
1561
- stops?: string[];
1562
- }): Promise<void>;
1563
- /**
1564
- * @description Set image icon scale.
1565
- * @param size Default is 1.
1566
- */
1567
- setMarkerIconSize(size: number): this;
1568
- /**
1569
- * @description Set the route color of the indoor part.
1570
- * @param color The color type is a color in the sRGB color space.
1571
- * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
1572
- * Predefined HTML colors names, like yellow and blue, are also permitted.
1573
- */
1574
- setIndoorLineColor(color: string): this;
1575
- /**
1576
- * @description Set the route color of the outdoor part.
1577
- * @param color The color type is a color in the sRGB color space.
1578
- * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
1579
- * Predefined HTML colors names, like yellow and blue, are also permitted.
1580
- */
1581
- setOutdoorLineColor(color: string): this;
1582
- /**
1583
- * @description Set color of dashed lines which connected the start and end markers.
1584
- * @param color The color type is a color in the sRGB color space.
1585
- * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
1586
- * Predefined HTML colors names, like yellow and blue, are also permitted.
1587
- */
1588
- setDashedLineColor(color: string): this;
1589
- /**
1590
- * @description Set color of shuttle bus line.
1591
- * @param color The color type is a color in the sRGB color space.
1592
- * Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
1593
- * Predefined HTML colors names, like yellow and blue, are also permitted.
1594
- */
1595
- setBusLineColor(color: string): this;
1596
- /**
1597
- * @description Render route on the map.
1598
- * @param path Route path from RouteService.search response.
1599
- * @param markerLocations Coordinate([lng, lat]) array of markers, order from beginning to end.
1600
- */
1601
- render(path: IRoutePath, markerLocations: Array<[
1602
- number,
1603
- number
1604
- ]>): void;
1605
- /**
1606
- * @description Remove route from the map.
1607
- */
1608
- remove(): void;
1609
- /**
1610
- * @description Filter paths' opacity by venue and ordinal.
1611
- * @param venueId {string | null | undefined}
1612
- * @param ordinal {string | null | undefined}
1613
- */
1614
- setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
1615
- /**
1616
- * @description Filter paths' opacity by building and ordinal.
1617
- * @param buildingId {string | null | undefined}
1618
- * @param ordinal {string | null | undefined}
1619
- */
1620
- setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
1621
- private _classifyFeatures;
1622
- private _createLineFeature;
1623
- private _createIconFeature;
1624
- private _renderSolidLines;
1625
- private _renderDashedLines;
1626
- private _renderConnectors;
1627
- private _renderMarkers;
1628
- private _addCollectionSource;
1629
- private _addLineLayer;
1630
- private _addTriangleLayer;
1631
- private _addIconLayer;
1632
- }
1633
1665
  export declare const OFFSET: number;
1634
1666
  export declare const PAGE: number;
1635
1667
  /**
@@ -1637,20 +1669,12 @@ export declare const PAGE: number;
1637
1669
  * @param language {string} window.navigator.language
1638
1670
  */
1639
1671
  export declare function convertBrowserLangToPresetLang(language: string): PresetLanguage | null;
1640
- /**
1641
- * @deprecated Use `VERSION` instead.
1642
- */
1672
+ /** @deprecated Use `VERSION` instead. */
1643
1673
  export declare const version: string;
1644
1674
  export declare const VERSION: string;
1645
1675
 
1646
1676
  export {
1647
- ControlPosition,
1648
- FilterSpecification,
1649
1677
  Map$1 as Map,
1650
- MapGeoJSONFeature,
1651
- MapLayerEventType,
1652
- MaplibreMap,
1653
- PointLike,
1654
1678
  };
1655
1679
 
1656
1680
  export {};