@mapxus/mapxus-map-jp 7.1.0 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/index.d.ts +196 -247
- package/index.js +3 -3
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v6.13.0
|
|
2
2
|
|
|
3
3
|
import { AxiosPromise } from 'axios';
|
|
4
|
-
import { ControlPosition, FilterSpecification,
|
|
4
|
+
import { ControlPosition, FilterSpecification, IControl, LngLat, Map as MaplibreMap, Map as maplibreMap, MapGeoJSONFeature, MapLayerEventType, PaddingOptions, PointLike, RequireAtLeastOne } from 'maplibre-gl';
|
|
5
5
|
|
|
6
6
|
export declare enum ThemeType {
|
|
7
7
|
CHRISTMAS = "christmas",
|
|
@@ -36,20 +36,52 @@ export interface IMapOption {
|
|
|
36
36
|
secret: string;
|
|
37
37
|
enableFloorControl?: boolean;
|
|
38
38
|
enableBuildingSelector?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @description 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
41
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
42
|
+
*/
|
|
39
43
|
venueId?: string;
|
|
44
|
+
/**
|
|
45
|
+
* @description 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
46
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
47
|
+
*/
|
|
40
48
|
buildingId?: string;
|
|
49
|
+
/**
|
|
50
|
+
* @description 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
51
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
52
|
+
*/
|
|
41
53
|
floorId?: string;
|
|
42
54
|
/**
|
|
43
|
-
* @
|
|
55
|
+
* @description Initialize the map with POI as the center point, use it with maplibregl.Map 'zoom' option.
|
|
56
|
+
* 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
57
|
+
* the priority is: poiId > floorId > buildingId > venueId.
|
|
44
58
|
*/
|
|
45
|
-
floor?: string;
|
|
46
59
|
poiId?: string;
|
|
47
60
|
hiddenOutdoor?: boolean;
|
|
48
61
|
theme?: ThemeType;
|
|
49
62
|
collapseCopyright?: boolean;
|
|
50
63
|
selectedBuildingBorderStyle?: ISelectedBuildingBorderStyle;
|
|
51
64
|
floorsControlStyle?: IFloorsControlStyle;
|
|
65
|
+
/**
|
|
66
|
+
* @description Switch floors by venue/building, default by venue.
|
|
67
|
+
*/
|
|
52
68
|
floorSwitchMode?: FloorSwitchMode;
|
|
69
|
+
/**
|
|
70
|
+
* @description Whether unselected buildings are masked, default is false.
|
|
71
|
+
*/
|
|
72
|
+
maskNonSelectedAreas?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* @description Whether the boundary of the selected building fits the screen, default is false.
|
|
75
|
+
* Can only be used for 'floorId', 'buildingId' and 'venueId' initialization, not for 'poiId'.
|
|
76
|
+
* When it is true, the 'boundsPadding' option is valid, and the 'zoom' option of maplibregl.Map is invalid.
|
|
77
|
+
*/
|
|
78
|
+
fitBuildingBounds?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @description The amount of padding in pixels to add to the given bounds, default is 30.
|
|
81
|
+
* Requires 'fitBuildingBounds' to be 'true'.
|
|
82
|
+
* Parameter value ref to: https://maplibre.org/maplibre-gl-js/docs/API/types/maplibregl.PaddingOptions/
|
|
83
|
+
*/
|
|
84
|
+
boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
|
|
53
85
|
}
|
|
54
86
|
export type Listener = (param: Object) => any;
|
|
55
87
|
declare class DefinedEvent {
|
|
@@ -123,8 +155,6 @@ export declare class Indoor extends Evented {
|
|
|
123
155
|
private _ordinal;
|
|
124
156
|
private _floorId;
|
|
125
157
|
private _floorName;
|
|
126
|
-
private _buildingFloors;
|
|
127
|
-
private _buildingOrdinals;
|
|
128
158
|
private _enableSwitch;
|
|
129
159
|
private _enableSwitchBuilding;
|
|
130
160
|
private _isHiddenOutdoor;
|
|
@@ -132,16 +162,23 @@ export declare class Indoor extends Evented {
|
|
|
132
162
|
private _hasCustomLevelFill;
|
|
133
163
|
private _curVenueId;
|
|
134
164
|
private _curVenueFeature;
|
|
135
|
-
private
|
|
136
|
-
private readonly _displayLevelSet;
|
|
137
|
-
private _curVenueLevelMap;
|
|
138
|
-
private _curBuildingLevelMap;
|
|
139
|
-
private _isSelectBuildingByClickMap;
|
|
165
|
+
private _ordinalHistory;
|
|
140
166
|
private _buildingHighlightStyle;
|
|
141
167
|
private readonly _floorSwitchMode;
|
|
142
|
-
private
|
|
168
|
+
private _maskNonSelectedAreas;
|
|
169
|
+
private _isSelectBuildingByClickMap;
|
|
170
|
+
private readonly _hiddenBuildings;
|
|
171
|
+
private _lowerLayers;
|
|
172
|
+
private _upperLayers;
|
|
173
|
+
private _commonLayers;
|
|
174
|
+
private _upperBuildingIds;
|
|
175
|
+
private _lowerBuildingIds;
|
|
176
|
+
private _upperLevelIds;
|
|
177
|
+
private _lowerLevelIds;
|
|
143
178
|
private _dispatch;
|
|
144
|
-
|
|
179
|
+
private readonly _fitBuildingBounds;
|
|
180
|
+
private readonly _boundsPadding;
|
|
181
|
+
constructor(map: maplibreMap, isHiddenOutdoor: boolean, floorSwitchMode: FloorSwitchMode, fitBuildingBounds: boolean, boundsPadding: number | RequireAtLeastOne<PaddingOptions>);
|
|
145
182
|
/**
|
|
146
183
|
* @description Turn on indoor-outdoor switching.
|
|
147
184
|
*/
|
|
@@ -158,48 +195,6 @@ export declare class Indoor extends Evented {
|
|
|
158
195
|
* @description Turn off building-building switching.
|
|
159
196
|
*/
|
|
160
197
|
disableSwitchBuilding(): this;
|
|
161
|
-
/**
|
|
162
|
-
* @description Get a list of floors of the selected building
|
|
163
|
-
* @deprecated You can use "indoor.building" instead
|
|
164
|
-
* @returns {string[]}
|
|
165
|
-
*/
|
|
166
|
-
get floors(): string[];
|
|
167
|
-
/**
|
|
168
|
-
* @description Get the selected building's ordinal list
|
|
169
|
-
* @deprecated You can use "indoor.building" instead
|
|
170
|
-
* @return {string[]}
|
|
171
|
-
*/
|
|
172
|
-
get ordinals(): string[];
|
|
173
|
-
/**
|
|
174
|
-
* @description Get the selected building's id
|
|
175
|
-
* @deprecated You can use "indoor.building" instead
|
|
176
|
-
* @returns {string}
|
|
177
|
-
*/
|
|
178
|
-
get buildingId(): string;
|
|
179
|
-
/**
|
|
180
|
-
* @description Get current floor of the selected building
|
|
181
|
-
* @deprecated You should use "indoor.floor" instead
|
|
182
|
-
* @returns {string | null}
|
|
183
|
-
*/
|
|
184
|
-
get currentFloor(): string | null;
|
|
185
|
-
/**
|
|
186
|
-
* @description Get current ordinal of selecting building
|
|
187
|
-
* @deprecated you should use "indoor.floor" instead
|
|
188
|
-
* @returns {string | null}
|
|
189
|
-
*/
|
|
190
|
-
get ordinal(): string | null;
|
|
191
|
-
/**
|
|
192
|
-
* @description Get current venueId
|
|
193
|
-
* @deprecated You should use the new getter 'venue' instead
|
|
194
|
-
* @returns {string | null}
|
|
195
|
-
*/
|
|
196
|
-
get venueId(): string | null;
|
|
197
|
-
/**
|
|
198
|
-
* @description Get current floor id
|
|
199
|
-
* @deprecated You can use "indoor.floor" instead
|
|
200
|
-
* @returns {string | null}
|
|
201
|
-
*/
|
|
202
|
-
get floorId(): string | null;
|
|
203
198
|
/**
|
|
204
199
|
* @description Get the current floor's information.
|
|
205
200
|
*/
|
|
@@ -220,44 +215,29 @@ export declare class Indoor extends Evented {
|
|
|
220
215
|
get features(): MapGeoJSONFeature[];
|
|
221
216
|
/**
|
|
222
217
|
* @description Get specified feature of bbox by id.
|
|
218
|
+
* @deprecated Use 'getFeaturesById' instead.
|
|
223
219
|
* @param id
|
|
224
220
|
* @return {MapGeoJSONFeature | undefined}
|
|
225
221
|
*/
|
|
226
222
|
getFeature(id: string): MapGeoJSONFeature | undefined;
|
|
227
223
|
/**
|
|
228
|
-
* @description Get
|
|
229
|
-
* @
|
|
230
|
-
* @param point {PointLike}
|
|
231
|
-
* @return {MapGeoJSONFeature | null}
|
|
224
|
+
* @description Get features from bbox by id.
|
|
225
|
+
* @param id
|
|
232
226
|
*/
|
|
233
|
-
|
|
227
|
+
getFeaturesById(id: string): MapGeoJSONFeature[];
|
|
234
228
|
/**
|
|
235
229
|
* @description Get level feature at the point
|
|
236
230
|
* @param point
|
|
237
231
|
* @return {MapGeoJSONFeature | null}
|
|
238
232
|
*/
|
|
239
233
|
getLevelByPoint(point: PointLike): MapGeoJSONFeature | null;
|
|
240
|
-
/**
|
|
241
|
-
* @description Pan to and select a building by buildingId and floorId
|
|
242
|
-
* @deprecated You should use the "panToBuilding" instead
|
|
243
|
-
* @param buildingId {string}
|
|
244
|
-
* @param floorId {string}
|
|
245
|
-
* @param callback
|
|
246
|
-
*/
|
|
247
|
-
goToBuilding(buildingId: string, floorId?: string, callback?: (feature: MapGeoJSONFeature) => void): void;
|
|
248
234
|
/**
|
|
249
235
|
* @description Map pan to the building center and select the building.
|
|
250
236
|
* @param buildingId
|
|
251
237
|
* @param floorId
|
|
252
238
|
* @param callback
|
|
253
239
|
*/
|
|
254
|
-
panToBuilding(buildingId: string, floorId?: string, callback?: (feature: MapGeoJSONFeature) => void): void
|
|
255
|
-
/**
|
|
256
|
-
* @description Switch floor by ordinal
|
|
257
|
-
* @deprecated You should use the "switchFloorByOrdinal" instead
|
|
258
|
-
* @param ordinal {string}
|
|
259
|
-
*/
|
|
260
|
-
switchFloor(ordinal: string): void;
|
|
240
|
+
panToBuilding(buildingId: string, floorId?: string, callback?: (feature: MapGeoJSONFeature) => void): Promise<void>;
|
|
261
241
|
/**
|
|
262
242
|
* @description Switch floor by ordinal.
|
|
263
243
|
* @param ordinal
|
|
@@ -272,6 +252,7 @@ export declare class Indoor extends Evented {
|
|
|
272
252
|
* @description Update map layout.
|
|
273
253
|
*/
|
|
274
254
|
updateLayers(): void;
|
|
255
|
+
updateRendering(): void;
|
|
275
256
|
/**
|
|
276
257
|
* @description Filter indoor layers.
|
|
277
258
|
*/
|
|
@@ -281,6 +262,11 @@ export declare class Indoor extends Evented {
|
|
|
281
262
|
* @param style {ISelectedBuildingBorderStyle | null}
|
|
282
263
|
*/
|
|
283
264
|
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): void;
|
|
265
|
+
/**
|
|
266
|
+
* @description Set whether to cover the unselected venues/buildings.
|
|
267
|
+
* @param mask Default is false.
|
|
268
|
+
*/
|
|
269
|
+
setMaskNonSelectedAreas(mask: boolean): void;
|
|
284
270
|
/**
|
|
285
271
|
* @description Listen for the indoor map state, including the changes of venue, building and floor.
|
|
286
272
|
* @param listener
|
|
@@ -294,12 +280,10 @@ export declare class Indoor extends Evented {
|
|
|
294
280
|
};
|
|
295
281
|
/**
|
|
296
282
|
* @description Select a building feature
|
|
297
|
-
* @deprecated Use map.selectBuildingById instead
|
|
298
283
|
* @param feature {MapGeoJSONFeature | null}
|
|
299
284
|
* @param floorId {string}
|
|
300
285
|
*/
|
|
301
286
|
selectBuilding(feature?: MapGeoJSONFeature | null, floorId?: string): void;
|
|
302
|
-
private _selectBuilding;
|
|
303
287
|
private _getBuildingByPoint;
|
|
304
288
|
private _getConditionsExpression;
|
|
305
289
|
private _loadData;
|
|
@@ -312,37 +296,43 @@ export declare class Indoor extends Evented {
|
|
|
312
296
|
private _getFeatures;
|
|
313
297
|
private _getBuildingFloorByOrdinal;
|
|
314
298
|
private _getBuildingFloorByFloorId;
|
|
315
|
-
private
|
|
299
|
+
private _getBuildingInitFloor;
|
|
316
300
|
private _isNotCurrentFeature;
|
|
317
301
|
private _setOutdoorLayersHidden;
|
|
318
302
|
private _addCustomLevelFillLayer;
|
|
319
303
|
private _setIndoorState;
|
|
320
|
-
private
|
|
304
|
+
private _setBuildingLineOpacity;
|
|
321
305
|
private _addBuildingHighlightLayer;
|
|
322
306
|
private _filterBuildingHighlight;
|
|
323
|
-
private
|
|
324
|
-
private
|
|
307
|
+
private _addHiddenBuilding;
|
|
308
|
+
private _deleteHiddenBuilding;
|
|
325
309
|
private _setDisplayLevels;
|
|
326
|
-
private
|
|
327
|
-
private
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
*/
|
|
333
|
-
private _getBuildingOrdinal;
|
|
334
|
-
private _getFloorIdByOrdinal;
|
|
335
|
-
/**
|
|
336
|
-
* @description 判断当前 building 是否为隐藏式 building,即点击的 building 无显示元素
|
|
337
|
-
* @param building
|
|
338
|
-
* @private
|
|
339
|
-
*/
|
|
340
|
-
private _isHiddenBuilding;
|
|
310
|
+
private _configMaskVenueMode;
|
|
311
|
+
private _configMaskBuildingMode;
|
|
312
|
+
private _configVenueMode;
|
|
313
|
+
private _configBuildingMode;
|
|
314
|
+
private _getVenueOriginOrdinal;
|
|
315
|
+
private _getBuildingOriginOrdinal;
|
|
341
316
|
private _isVenueMode;
|
|
342
|
-
private
|
|
343
|
-
private
|
|
344
|
-
private
|
|
345
|
-
private
|
|
317
|
+
private _setVenueOrdinalHistory;
|
|
318
|
+
private _getVenueOrdinalHistory;
|
|
319
|
+
private _setBuildingOrdinalHistory;
|
|
320
|
+
private _getBuildingOrdinalHistory;
|
|
321
|
+
private _getVenuesOfBbox;
|
|
322
|
+
private _getBuildingsOfBbox;
|
|
323
|
+
private _copyOverlapLayers;
|
|
324
|
+
private _layerBuildings;
|
|
325
|
+
private _addBuildingToUpper;
|
|
326
|
+
private _deleteBuildingFromUpper;
|
|
327
|
+
private _addBuildingToLower;
|
|
328
|
+
private _deleteBuildingFromLower;
|
|
329
|
+
private _addLevelToUpper;
|
|
330
|
+
private _deleteLevelFromUpper;
|
|
331
|
+
private _addLevelToLower;
|
|
332
|
+
private _deleteLevelFromLower;
|
|
333
|
+
private _filterGroupLayers;
|
|
334
|
+
private _filterRestOriginLayers;
|
|
335
|
+
private _getNewFilter;
|
|
346
336
|
private static isFilterHasBeenReset;
|
|
347
337
|
}
|
|
348
338
|
export interface IPoiEvent {
|
|
@@ -409,41 +399,11 @@ export declare class Map extends Evented {
|
|
|
409
399
|
* @description Turn off building-building switching.
|
|
410
400
|
*/
|
|
411
401
|
disableSwitchBuilding(): this;
|
|
412
|
-
/**
|
|
413
|
-
* @description Set outdoor layer to be shown or hidden.
|
|
414
|
-
* @deprecated You can use "map.setOutdoorLayerHidden" instead.
|
|
415
|
-
* @param isHiddenOutdoor True is hidden, false is shown.
|
|
416
|
-
*/
|
|
417
|
-
hiddenOutdoorLayer(isHiddenOutdoor: boolean): void;
|
|
418
402
|
/**
|
|
419
403
|
* @description Set outdoor layer to be shown or hidden.
|
|
420
404
|
* @param isHidden True is hidden, false is shown.
|
|
421
405
|
*/
|
|
422
406
|
setOutdoorLayerHidden(isHidden: boolean): void;
|
|
423
|
-
/**
|
|
424
|
-
* @description Get a list of floors of the selected building
|
|
425
|
-
* @deprecated You can use "map.building" instead
|
|
426
|
-
* @returns {string[]}
|
|
427
|
-
*/
|
|
428
|
-
get floors(): string[];
|
|
429
|
-
/**
|
|
430
|
-
* @description Get the current floor of the selected building
|
|
431
|
-
* @deprecated You can get the current floor by "map.floor"
|
|
432
|
-
* @returns {string | null}
|
|
433
|
-
*/
|
|
434
|
-
get currentFloor(): string | null;
|
|
435
|
-
/**
|
|
436
|
-
* @description Get the current ordinal of the selected building
|
|
437
|
-
* @deprecated You can use "map.floor" instead
|
|
438
|
-
* @returns {string | null}
|
|
439
|
-
*/
|
|
440
|
-
get ordinal(): string | null;
|
|
441
|
-
/**
|
|
442
|
-
* @description Get venueId which the selected building belongs
|
|
443
|
-
* @deprecated You can use "map.venue" instead
|
|
444
|
-
* @returns {string | null}
|
|
445
|
-
*/
|
|
446
|
-
get venueId(): string | null;
|
|
447
407
|
/**
|
|
448
408
|
* @description Get current selected floor info.
|
|
449
409
|
* @return {IFloor | null}
|
|
@@ -461,48 +421,34 @@ export declare class Map extends Evented {
|
|
|
461
421
|
get venue(): MapGeoJSONFeature | null;
|
|
462
422
|
/**
|
|
463
423
|
* @description Get feature in bbox by id.
|
|
424
|
+
* @deprecated Use 'getFeaturesById' instead.
|
|
464
425
|
* @param id
|
|
465
426
|
* @return {MapGeoJSONFeature | undefined}
|
|
466
427
|
*/
|
|
467
428
|
getFeature(id: string): MapGeoJSONFeature | undefined;
|
|
468
429
|
/**
|
|
469
|
-
* @description
|
|
470
|
-
* @
|
|
471
|
-
* @param feature {MapGeoJSONFeature | null} If feature is null then exit indoor
|
|
472
|
-
*/
|
|
473
|
-
selectBuilding(feature: MapGeoJSONFeature | null): this;
|
|
474
|
-
/**
|
|
475
|
-
* @description Switch the selected building to be the specified id
|
|
476
|
-
* @deprecated You can use "map.selectBuildingById" instead
|
|
477
|
-
* @param buildingId {string}
|
|
478
|
-
* @param callback
|
|
479
|
-
*/
|
|
480
|
-
switchBuilding(buildingId: string, callback?: (feature: MapGeoJSONFeature) => void): this;
|
|
481
|
-
/**
|
|
482
|
-
* @description Switch to the specified floor
|
|
483
|
-
* @deprecated You can use "map.selectFloorById" instead
|
|
484
|
-
* @param floor {string}
|
|
485
|
-
* @param callback
|
|
430
|
+
* @description Get features from bbox by id. One id may correspond to multiple features.
|
|
431
|
+
* @param id
|
|
486
432
|
*/
|
|
487
|
-
|
|
433
|
+
getFeaturesById(id: string): MapGeoJSONFeature[];
|
|
488
434
|
/**
|
|
489
435
|
* @description Select floor by id.
|
|
490
436
|
* @param floorId
|
|
491
437
|
* @param callback Called after floor has been selected.
|
|
492
438
|
*/
|
|
493
|
-
selectFloorById(floorId: string, callback?: VoidFunction): Promise<
|
|
439
|
+
selectFloorById(floorId: string, callback?: VoidFunction): Promise<void>;
|
|
494
440
|
/**
|
|
495
441
|
* @description Select building by id.
|
|
496
442
|
* @param buildingId
|
|
497
443
|
* @param callback Called after building has been selected
|
|
498
444
|
*/
|
|
499
|
-
selectBuildingById(buildingId: string, callback?: VoidFunction):
|
|
445
|
+
selectBuildingById(buildingId: string, callback?: VoidFunction): Promise<void>;
|
|
500
446
|
/**
|
|
501
447
|
* @description Select or exit venue by id.
|
|
502
448
|
* @param venueId Exit venue if venueId is null.
|
|
503
449
|
* @param callback Called after venue has been selected.
|
|
504
450
|
*/
|
|
505
|
-
selectVenueById(venueId: string | null, callback?: VoidFunction): Promise<
|
|
451
|
+
selectVenueById(venueId: string | null, callback?: VoidFunction): Promise<void>;
|
|
506
452
|
/**
|
|
507
453
|
* @description Listen for mouse click events on the map.
|
|
508
454
|
* @param listener
|
|
@@ -524,33 +470,6 @@ export declare class Map extends Evented {
|
|
|
524
470
|
onPointClickListener(listener: (result: IPointEvent) => void): {
|
|
525
471
|
unsubscribe: VoidFunction;
|
|
526
472
|
};
|
|
527
|
-
/**
|
|
528
|
-
* @description Listen for the selected floor changed event
|
|
529
|
-
* @deprecated You can use the "map.onMapChangeListener" instead
|
|
530
|
-
* @param listener {function} (feature: MapGeoJSONFeature | null) => void
|
|
531
|
-
* @return {unsubscribe} To remove the event listener
|
|
532
|
-
*/
|
|
533
|
-
onFloorChangeListener(listener: (feature: MapGeoJSONFeature | null) => void): {
|
|
534
|
-
unsubscribe: VoidFunction;
|
|
535
|
-
};
|
|
536
|
-
/**
|
|
537
|
-
* @description Listen for the selected building changed event
|
|
538
|
-
* @deprecated You can use the "map.onMapChangeListener" instead
|
|
539
|
-
* @param listener {function} (feature: MapGeoJSONFeature | null) => void
|
|
540
|
-
* @return {unsubscribe} To remove the event listener
|
|
541
|
-
*/
|
|
542
|
-
onBuildingChangeListener(listener: (feature: MapGeoJSONFeature | null) => void): {
|
|
543
|
-
unsubscribe: VoidFunction;
|
|
544
|
-
};
|
|
545
|
-
/**
|
|
546
|
-
* @description Listen for the selected venue changed event
|
|
547
|
-
* @deprecated You can use the "map.onMapChangeListener" instead
|
|
548
|
-
* @param listener {function} (feature: MapGeoJSONFeature | null) => void
|
|
549
|
-
* @return {unsubscribe} To remove the event listener
|
|
550
|
-
*/
|
|
551
|
-
onVenueChangeListener(listener: (feature: MapGeoJSONFeature | null) => void): {
|
|
552
|
-
unsubscribe: VoidFunction;
|
|
553
|
-
};
|
|
554
473
|
/**
|
|
555
474
|
* @description Listen for the indoor map status, including the changes of venue, building and floor.
|
|
556
475
|
* @param listener
|
|
@@ -589,24 +508,29 @@ export declare class Map extends Evented {
|
|
|
589
508
|
* @description Set the floorsControl's style.
|
|
590
509
|
* @param style
|
|
591
510
|
*/
|
|
592
|
-
setFloorsControlStyle(style: IFloorsControlStyle):
|
|
511
|
+
setFloorsControlStyle(style: IFloorsControlStyle): this;
|
|
593
512
|
/**
|
|
594
513
|
* @description Set the SelectedBuildingBorder's style
|
|
595
514
|
* @param style {ISelectedBuildingBorderStyle | null}
|
|
596
515
|
*/
|
|
597
|
-
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null):
|
|
516
|
+
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): this;
|
|
598
517
|
private static _getThemeStyleName;
|
|
599
518
|
private _setIndoorFilter;
|
|
600
519
|
private _setStyle;
|
|
601
520
|
private _addControl;
|
|
602
|
-
private _defaultSetMapZoom;
|
|
603
521
|
private _selectPoiById;
|
|
604
522
|
private _getBuildingIdByVenueId;
|
|
605
|
-
private
|
|
523
|
+
private _tilesRequestTransform;
|
|
524
|
+
private _getMapZoom;
|
|
525
|
+
private _setMapStyle;
|
|
526
|
+
private _clickEventsDispatcher;
|
|
527
|
+
private _hideIndoorLayers;
|
|
528
|
+
private _showIndoorLayers;
|
|
529
|
+
private _updatePermission;
|
|
606
530
|
}
|
|
607
531
|
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
608
532
|
export declare class Marker {
|
|
609
|
-
private _maplibreMap;
|
|
533
|
+
private readonly _maplibreMap;
|
|
610
534
|
private readonly _layerId;
|
|
611
535
|
private readonly _sourceId;
|
|
612
536
|
private _imageName;
|
|
@@ -615,11 +539,15 @@ export declare class Marker {
|
|
|
615
539
|
constructor(maplibreMap: MaplibreMap);
|
|
616
540
|
/**
|
|
617
541
|
* @description Set marker by sprite name.
|
|
618
|
-
*
|
|
542
|
+
* This method must be called after map style loaded if you set an external URL.
|
|
543
|
+
* @param icon Sprite name in map style or the image url, png format.
|
|
544
|
+
* @param callback Called when the image(from an external URL) has loaded
|
|
545
|
+
* or with an error argument if there is an error.
|
|
619
546
|
*/
|
|
620
|
-
setIconImage(
|
|
547
|
+
setIconImage(icon: string, callback?: VoidFunction): void;
|
|
621
548
|
/**
|
|
622
549
|
* @description Set marker by image url.
|
|
550
|
+
* @deprecated Use 'setIconImage' instead.
|
|
623
551
|
* @param imageUrl Network url, png format.
|
|
624
552
|
*/
|
|
625
553
|
setIconImageUrl(imageUrl: string): void;
|
|
@@ -663,7 +591,9 @@ export declare class Marker {
|
|
|
663
591
|
* @param eventKey
|
|
664
592
|
* @param callback
|
|
665
593
|
*/
|
|
666
|
-
onEventListener(eventKey: keyof MapLayerEventType, callback: (marker:
|
|
594
|
+
onEventListener(eventKey: keyof MapLayerEventType, callback: (marker: MapGeoJSONFeature) => void): {
|
|
595
|
+
offEventListener: VoidFunction;
|
|
596
|
+
};
|
|
667
597
|
/**
|
|
668
598
|
* @description Filter marker by custom properties.
|
|
669
599
|
* @param filterExpression A expression specifying conditions on source features.
|
|
@@ -676,8 +606,8 @@ export declare class Marker {
|
|
|
676
606
|
* Required 'venueId' and 'ordinal' in properties.
|
|
677
607
|
* Markers not matched 'venueId' and 'ordinal' would be hidden;
|
|
678
608
|
* Outdoor markers always are shown.
|
|
679
|
-
* @param venueId {string | null | undefined}
|
|
680
|
-
* @param ordinal {string | null | undefined}
|
|
609
|
+
* @param venueId {string | null | undefined} null | undefined will be treated as ''.
|
|
610
|
+
* @param ordinal {string | null | undefined} null | undefined will be treated as ''.
|
|
681
611
|
*/
|
|
682
612
|
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
683
613
|
/**
|
|
@@ -685,8 +615,8 @@ export declare class Marker {
|
|
|
685
615
|
* Required 'buildingId' and 'ordinal' in properties.
|
|
686
616
|
* Markers not matched 'buildingId' and 'ordinal' would be hidden;
|
|
687
617
|
* Outdoor markers always are shown.
|
|
688
|
-
* @param buildingId {string | null | undefined}
|
|
689
|
-
* @param ordinal {string | null | undefined}
|
|
618
|
+
* @param buildingId {string | null | undefined} null | undefined will be treated as ''.
|
|
619
|
+
* @param ordinal {string | null | undefined} null | undefined will be treated as ''.
|
|
690
620
|
*/
|
|
691
621
|
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
692
622
|
/**
|
|
@@ -701,8 +631,8 @@ export declare class Marker {
|
|
|
701
631
|
* Required 'venueId' and 'ordinal' in properties.
|
|
702
632
|
* Opacities of markers matched 'venueId' and 'ordinal' are 1, others are 0.5.
|
|
703
633
|
* Outdoor markers' opacity always are 1.
|
|
704
|
-
* @param venueId {string | null | undefined}
|
|
705
|
-
* @param ordinal {string | null | undefined}
|
|
634
|
+
* @param venueId {string | null | undefined} null | undefined will be treated as ''.
|
|
635
|
+
* @param ordinal {string | null | undefined} null | undefined will be treated as ''.
|
|
706
636
|
*/
|
|
707
637
|
setOpacityByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
708
638
|
/**
|
|
@@ -710,13 +640,14 @@ export declare class Marker {
|
|
|
710
640
|
* Required 'buildingId' and 'ordinal' in properties.
|
|
711
641
|
* Opacities of markers matched 'buildingId' and 'ordinal' are 1, others are 0.5.
|
|
712
642
|
* Outdoor markers' opacity always are 1.
|
|
713
|
-
* @param buildingId {string | null | undefined}
|
|
714
|
-
* @param ordinal {string | null | undefined}
|
|
643
|
+
* @param buildingId {string | null | undefined} null | undefined will be treated as ''.
|
|
644
|
+
* @param ordinal {string | null | undefined} null | undefined will be treated as ''.
|
|
715
645
|
*/
|
|
716
646
|
setOpacityByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
717
647
|
private _createIconFeature;
|
|
718
648
|
private _addIconSource;
|
|
719
649
|
private _addIconLayer;
|
|
650
|
+
private _handleEventListener;
|
|
720
651
|
}
|
|
721
652
|
export declare class Poi {
|
|
722
653
|
private _map;
|
|
@@ -752,28 +683,16 @@ export declare class FloorsControl implements IControl {
|
|
|
752
683
|
private _maxScrollTop;
|
|
753
684
|
private _$selectorExpanded;
|
|
754
685
|
private _$selectorFolded;
|
|
755
|
-
private _dispatch;
|
|
756
686
|
private _componentDidMount;
|
|
757
687
|
private _isShown;
|
|
758
688
|
constructor(indoor: Indoor);
|
|
759
689
|
onAdd(): HTMLElement;
|
|
760
690
|
onRemove(): void;
|
|
761
691
|
getDefaultPosition(): ControlPosition;
|
|
762
|
-
|
|
763
|
-
* @deprecated Use 'switchByOrdinal' instead
|
|
764
|
-
*/
|
|
765
|
-
switchByFloorName(floorName: string, callback?: (feature: MapGeoJSONFeature) => void): void;
|
|
766
|
-
switchByOrdinal(ordinal: string, callback?: (feature: MapGeoJSONFeature) => void): void;
|
|
692
|
+
switchByOrdinal(ordinal: string, callback?: VoidFunction): void;
|
|
767
693
|
setVisibility(visible: boolean): void;
|
|
768
694
|
setPosition(position: ControlPosition): void;
|
|
769
695
|
setStyle(style: Partial<IFloorsControlStyle> | null): void;
|
|
770
|
-
/**
|
|
771
|
-
* @deprecated
|
|
772
|
-
* @param listener
|
|
773
|
-
*/
|
|
774
|
-
onFloorClick(listener: (feature: MapGeoJSONFeature) => void): {
|
|
775
|
-
unsubscribe: VoidFunction;
|
|
776
|
-
};
|
|
777
696
|
private _bindEvents;
|
|
778
697
|
private _clearData;
|
|
779
698
|
private _render;
|
|
@@ -792,9 +711,8 @@ export declare class FloorsControl implements IControl {
|
|
|
792
711
|
private _getScrollTop;
|
|
793
712
|
private _handleScroll;
|
|
794
713
|
private _expandSelector;
|
|
795
|
-
private _getCurrentLevelFeature;
|
|
796
714
|
}
|
|
797
|
-
export declare class BuildingFilterControl implements
|
|
715
|
+
export declare class BuildingFilterControl implements IControl {
|
|
798
716
|
private _map;
|
|
799
717
|
private _indoor;
|
|
800
718
|
private _buildingId;
|
|
@@ -843,7 +761,7 @@ export type IMultiLangAddress = Record<keyof IMultiLangName, {
|
|
|
843
761
|
}>;
|
|
844
762
|
export interface IBbox {
|
|
845
763
|
maxLat: number;
|
|
846
|
-
maxLon:
|
|
764
|
+
maxLon: number;
|
|
847
765
|
minLat: number;
|
|
848
766
|
minLon: number;
|
|
849
767
|
}
|
|
@@ -1029,6 +947,10 @@ export interface IResponsePois {
|
|
|
1029
947
|
pois: IPoi[];
|
|
1030
948
|
total: number;
|
|
1031
949
|
}
|
|
950
|
+
export declare enum DistanceSearchType {
|
|
951
|
+
POINT = "Point",
|
|
952
|
+
POLYGON = "Polygon"
|
|
953
|
+
}
|
|
1032
954
|
export interface IPoiCategory {
|
|
1033
955
|
category: string;
|
|
1034
956
|
description: string;
|
|
@@ -1051,7 +973,6 @@ export interface IOrientationPoi {
|
|
|
1051
973
|
}
|
|
1052
974
|
export declare class PoisService {
|
|
1053
975
|
private _api;
|
|
1054
|
-
private _categories;
|
|
1055
976
|
private _categoriesV2;
|
|
1056
977
|
private _request;
|
|
1057
978
|
constructor();
|
|
@@ -1086,28 +1007,55 @@ export declare class PoisService {
|
|
|
1086
1007
|
*/
|
|
1087
1008
|
searchByBuildingId(keywords: string, buildingId: string, offset?: number, page?: number): AxiosPromise<IResponse<IResponsePois>>;
|
|
1088
1009
|
/**
|
|
1089
|
-
* @description Search
|
|
1090
|
-
* @
|
|
1091
|
-
* @param
|
|
1092
|
-
* @param
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
* @
|
|
1098
|
-
*
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
* @
|
|
1108
|
-
*
|
|
1109
|
-
|
|
1110
|
-
|
|
1010
|
+
* @description Search POIs of a venue.
|
|
1011
|
+
* @param keywords
|
|
1012
|
+
* @param venueId
|
|
1013
|
+
* @param offset
|
|
1014
|
+
* @param page
|
|
1015
|
+
*/
|
|
1016
|
+
searchByVenueId(keywords: string, venueId: string, offset?: number, page?: number): AxiosPromise<IResponse<IResponsePois>>;
|
|
1017
|
+
/**
|
|
1018
|
+
* @description Search poi categories by venue id, building id, or floor id.
|
|
1019
|
+
* Search scope priority: floorId > buildingId > venueId.
|
|
1020
|
+
* @param paramObject
|
|
1021
|
+
*/
|
|
1022
|
+
searchCategories(paramObject: {
|
|
1023
|
+
venueId?: string;
|
|
1024
|
+
buildingId?: string;
|
|
1025
|
+
floorId?: string;
|
|
1026
|
+
}): AxiosPromise<IResponse<IPoiCategory[]>>;
|
|
1027
|
+
/**
|
|
1028
|
+
* @description Search orientation and poi.
|
|
1029
|
+
* BuildingId, floorId and ordinal are mutually exclusive, priority: ordinal > floorId > buildingId.
|
|
1030
|
+
* @param paramObj
|
|
1031
|
+
*/
|
|
1032
|
+
searchOrientation(paramObj: {
|
|
1033
|
+
/**
|
|
1034
|
+
* User's current position, [lon, lat].
|
|
1035
|
+
*/
|
|
1036
|
+
center: [
|
|
1037
|
+
number,
|
|
1038
|
+
number
|
|
1039
|
+
];
|
|
1040
|
+
/**
|
|
1041
|
+
* The angle between cellphone's orientation and the north.
|
|
1042
|
+
*/
|
|
1043
|
+
angle: number;
|
|
1044
|
+
/**
|
|
1045
|
+
* Radius.
|
|
1046
|
+
*/
|
|
1047
|
+
distance: number;
|
|
1048
|
+
buildingId?: string;
|
|
1049
|
+
floorId?: string;
|
|
1050
|
+
/**
|
|
1051
|
+
* Floor order in physical space, e.g. '-1', '0'(ground floor), '1'...
|
|
1052
|
+
*/
|
|
1053
|
+
ordinal?: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Search type.
|
|
1056
|
+
*/
|
|
1057
|
+
distanceSearchType?: DistanceSearchType;
|
|
1058
|
+
}): AxiosPromise<IResponse<IOrientationPoi[]>>;
|
|
1111
1059
|
private _changedRes;
|
|
1112
1060
|
}
|
|
1113
1061
|
export interface IResponseRoute {
|
|
@@ -1190,7 +1138,7 @@ export declare class RouteService {
|
|
|
1190
1138
|
], fromFloorId: string | null, toFloorId: string | null, fromBuildingId: string | null, toBuildingId: string | null, vehicle?: WayFindingVehicleType, locale?: string, toDoor?: boolean): AxiosPromise<IResponse<IResponseRoute>>;
|
|
1191
1139
|
}
|
|
1192
1140
|
export declare class RoutePainter {
|
|
1193
|
-
private _maplibreMap;
|
|
1141
|
+
private readonly _maplibreMap;
|
|
1194
1142
|
private _fromCoordinate;
|
|
1195
1143
|
private _toCoordinate;
|
|
1196
1144
|
private _fromMarkerIcon;
|
|
@@ -1199,15 +1147,21 @@ export declare class RoutePainter {
|
|
|
1199
1147
|
private _paintProperties;
|
|
1200
1148
|
constructor(maplibreMap: MaplibreMap);
|
|
1201
1149
|
/**
|
|
1202
|
-
* @description Set image of the start marker.
|
|
1150
|
+
* @description Set image of the start marker. This method must be called after map style loaded.
|
|
1151
|
+
* This method must be called after map style loaded if you set an external URL.
|
|
1203
1152
|
* @param icon Sprite name in map style or the image url, png format.
|
|
1153
|
+
* @param callback Called when the image(from an external URL) has loaded
|
|
1154
|
+
* or with an error argument if there is an error.
|
|
1204
1155
|
*/
|
|
1205
|
-
setFromMarkerIcon(icon: string):
|
|
1156
|
+
setFromMarkerIcon(icon: string, callback?: VoidFunction): void;
|
|
1206
1157
|
/**
|
|
1207
|
-
* @description Set image of the end marker.
|
|
1158
|
+
* @description Set image of the end marker. This method must be called after map style loaded.
|
|
1159
|
+
* This method must be called after map style loaded if you set an external URL.
|
|
1208
1160
|
* @param icon Sprite name in map style or the image url, png format.
|
|
1161
|
+
* @param callback Called when the image(from an external URL) has loaded
|
|
1162
|
+
* or with an error argument if there is an error.
|
|
1209
1163
|
*/
|
|
1210
|
-
setToMarkerIcon(icon: string):
|
|
1164
|
+
setToMarkerIcon(icon: string, callback?: VoidFunction): void;
|
|
1211
1165
|
/**
|
|
1212
1166
|
* @description Set image icon scale.
|
|
1213
1167
|
* @param size Default is 1.
|
|
@@ -1228,7 +1182,7 @@ export declare class RoutePainter {
|
|
|
1228
1182
|
*/
|
|
1229
1183
|
setOutdoorLineColor(color: string): this;
|
|
1230
1184
|
/**
|
|
1231
|
-
* @description Set color of dashed
|
|
1185
|
+
* @description Set color of dashed lines which connected the start and end markers.
|
|
1232
1186
|
* @param color The color type is a color in the sRGB color space.
|
|
1233
1187
|
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1234
1188
|
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
@@ -1253,24 +1207,23 @@ export declare class RoutePainter {
|
|
|
1253
1207
|
], toCoordinate: [
|
|
1254
1208
|
number,
|
|
1255
1209
|
number
|
|
1256
|
-
]):
|
|
1210
|
+
]): void;
|
|
1257
1211
|
/**
|
|
1258
1212
|
* @description Remove route from the map.
|
|
1259
1213
|
*/
|
|
1260
|
-
remove():
|
|
1214
|
+
remove(): void;
|
|
1261
1215
|
/**
|
|
1262
1216
|
* @description Filter paths' opacity by venue and ordinal.
|
|
1263
1217
|
* @param venueId {string | null | undefined}
|
|
1264
1218
|
* @param ordinal {string | null | undefined}
|
|
1265
1219
|
*/
|
|
1266
|
-
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined):
|
|
1220
|
+
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1267
1221
|
/**
|
|
1268
1222
|
* @description Filter paths' opacity by building and ordinal.
|
|
1269
1223
|
* @param buildingId {string | null | undefined}
|
|
1270
1224
|
* @param ordinal {string | null | undefined}
|
|
1271
1225
|
*/
|
|
1272
|
-
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined):
|
|
1273
|
-
private _loadImage;
|
|
1226
|
+
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1274
1227
|
private _classifyFeatures;
|
|
1275
1228
|
private _createLineFeature;
|
|
1276
1229
|
private _createIconFeature;
|
|
@@ -1285,10 +1238,6 @@ export declare class RoutePainter {
|
|
|
1285
1238
|
}
|
|
1286
1239
|
export declare const OFFSET: number;
|
|
1287
1240
|
export declare const PAGE: number;
|
|
1288
|
-
export declare enum DistanceSearchType {
|
|
1289
|
-
POINT = "Point",
|
|
1290
|
-
POLYGON = "Polygon"
|
|
1291
|
-
}
|
|
1292
1241
|
export declare const version: string;
|
|
1293
1242
|
export type { ControlPosition, Map as MaplibreMap, MapLayerEventType, FilterSpecification, PointLike, } from "maplibre-gl";
|
|
1294
1243
|
|