@mapxus/mapxus-map-jp 7.1.0 → 7.2.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 +105 -219
- package/index.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ maplibre-gl
|
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
```
|
|
9
|
-
npm install maplibre-gl @mapxus/mapxus-map
|
|
9
|
+
npm install maplibre-gl @mapxus/mapxus-map-jp
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
## Example
|
|
@@ -27,11 +27,11 @@ const map = new MapxusMap.Map({
|
|
|
27
27
|
});
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
More sample page at [https://map-service.mapxus.
|
|
30
|
+
More sample page at [https://map-service.mapxus.co.jp/bssww/initMapByVenue](https://map-service.mapxus.co.jp/bssww/initMapByVenue)
|
|
31
31
|
|
|
32
32
|
## Documentation
|
|
33
33
|
|
|
34
|
-
Docs are available at [https://map-service.mapxus.
|
|
34
|
+
Docs are available at [https://map-service.mapxus.co.jp/dpw/digitalMapWeb](https://map-service.mapxus.co.jp/dpw/digitalMapWeb)
|
|
35
35
|
|
|
36
36
|
## License
|
|
37
37
|
|
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, PointLike } from 'maplibre-gl';
|
|
5
5
|
|
|
6
6
|
export declare enum ThemeType {
|
|
7
7
|
CHRISTMAS = "christmas",
|
|
@@ -39,10 +39,6 @@ export interface IMapOption {
|
|
|
39
39
|
venueId?: string;
|
|
40
40
|
buildingId?: string;
|
|
41
41
|
floorId?: string;
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated "floor" is deprecated, please use "floorId" instead
|
|
44
|
-
*/
|
|
45
|
-
floor?: string;
|
|
46
42
|
poiId?: string;
|
|
47
43
|
hiddenOutdoor?: boolean;
|
|
48
44
|
theme?: ThemeType;
|
|
@@ -50,6 +46,7 @@ export interface IMapOption {
|
|
|
50
46
|
selectedBuildingBorderStyle?: ISelectedBuildingBorderStyle;
|
|
51
47
|
floorsControlStyle?: IFloorsControlStyle;
|
|
52
48
|
floorSwitchMode?: FloorSwitchMode;
|
|
49
|
+
maskNonSelectedAreas?: boolean;
|
|
53
50
|
}
|
|
54
51
|
export type Listener = (param: Object) => any;
|
|
55
52
|
declare class DefinedEvent {
|
|
@@ -123,8 +120,6 @@ export declare class Indoor extends Evented {
|
|
|
123
120
|
private _ordinal;
|
|
124
121
|
private _floorId;
|
|
125
122
|
private _floorName;
|
|
126
|
-
private _buildingFloors;
|
|
127
|
-
private _buildingOrdinals;
|
|
128
123
|
private _enableSwitch;
|
|
129
124
|
private _enableSwitchBuilding;
|
|
130
125
|
private _isHiddenOutdoor;
|
|
@@ -132,16 +127,21 @@ export declare class Indoor extends Evented {
|
|
|
132
127
|
private _hasCustomLevelFill;
|
|
133
128
|
private _curVenueId;
|
|
134
129
|
private _curVenueFeature;
|
|
135
|
-
private
|
|
136
|
-
private readonly _displayLevelSet;
|
|
137
|
-
private _curVenueLevelMap;
|
|
138
|
-
private _curBuildingLevelMap;
|
|
139
|
-
private _isSelectBuildingByClickMap;
|
|
130
|
+
private _ordinalHistory;
|
|
140
131
|
private _buildingHighlightStyle;
|
|
141
132
|
private readonly _floorSwitchMode;
|
|
142
|
-
private
|
|
133
|
+
private _maskNonSelectedAreas;
|
|
134
|
+
private _isSelectBuildingByClickMap;
|
|
135
|
+
private readonly _hiddenBuildings;
|
|
136
|
+
private _lowerLayers;
|
|
137
|
+
private _upperLayers;
|
|
138
|
+
private _commonLayers;
|
|
139
|
+
private _upperBuildingIds;
|
|
140
|
+
private _lowerBuildingIds;
|
|
141
|
+
private _upperLevelIds;
|
|
142
|
+
private _lowerLevelIds;
|
|
143
143
|
private _dispatch;
|
|
144
|
-
constructor(map: maplibreMap, isHiddenOutdoor?: boolean, floorSwitchMode?: FloorSwitchMode
|
|
144
|
+
constructor(map: maplibreMap, isHiddenOutdoor?: boolean, floorSwitchMode?: FloorSwitchMode);
|
|
145
145
|
/**
|
|
146
146
|
* @description Turn on indoor-outdoor switching.
|
|
147
147
|
*/
|
|
@@ -158,48 +158,6 @@ export declare class Indoor extends Evented {
|
|
|
158
158
|
* @description Turn off building-building switching.
|
|
159
159
|
*/
|
|
160
160
|
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
161
|
/**
|
|
204
162
|
* @description Get the current floor's information.
|
|
205
163
|
*/
|
|
@@ -220,44 +178,29 @@ export declare class Indoor extends Evented {
|
|
|
220
178
|
get features(): MapGeoJSONFeature[];
|
|
221
179
|
/**
|
|
222
180
|
* @description Get specified feature of bbox by id.
|
|
181
|
+
* @deprecated Use 'getFeaturesById' instead.
|
|
223
182
|
* @param id
|
|
224
183
|
* @return {MapGeoJSONFeature | undefined}
|
|
225
184
|
*/
|
|
226
185
|
getFeature(id: string): MapGeoJSONFeature | undefined;
|
|
227
186
|
/**
|
|
228
|
-
* @description Get
|
|
229
|
-
* @
|
|
230
|
-
* @param point {PointLike}
|
|
231
|
-
* @return {MapGeoJSONFeature | null}
|
|
187
|
+
* @description Get features from bbox by id.
|
|
188
|
+
* @param id
|
|
232
189
|
*/
|
|
233
|
-
|
|
190
|
+
getFeaturesById(id: string): MapGeoJSONFeature[];
|
|
234
191
|
/**
|
|
235
192
|
* @description Get level feature at the point
|
|
236
193
|
* @param point
|
|
237
194
|
* @return {MapGeoJSONFeature | null}
|
|
238
195
|
*/
|
|
239
196
|
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
197
|
/**
|
|
249
198
|
* @description Map pan to the building center and select the building.
|
|
250
199
|
* @param buildingId
|
|
251
200
|
* @param floorId
|
|
252
201
|
* @param callback
|
|
253
202
|
*/
|
|
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;
|
|
203
|
+
panToBuilding(buildingId: string, floorId?: string, callback?: (feature: MapGeoJSONFeature) => void): Promise<void>;
|
|
261
204
|
/**
|
|
262
205
|
* @description Switch floor by ordinal.
|
|
263
206
|
* @param ordinal
|
|
@@ -272,6 +215,7 @@ export declare class Indoor extends Evented {
|
|
|
272
215
|
* @description Update map layout.
|
|
273
216
|
*/
|
|
274
217
|
updateLayers(): void;
|
|
218
|
+
updateRendering(): void;
|
|
275
219
|
/**
|
|
276
220
|
* @description Filter indoor layers.
|
|
277
221
|
*/
|
|
@@ -281,6 +225,11 @@ export declare class Indoor extends Evented {
|
|
|
281
225
|
* @param style {ISelectedBuildingBorderStyle | null}
|
|
282
226
|
*/
|
|
283
227
|
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): void;
|
|
228
|
+
/**
|
|
229
|
+
* @description Set whether to cover the unselected venues/buildings.
|
|
230
|
+
* @param mask Default is false.
|
|
231
|
+
*/
|
|
232
|
+
setMaskNonSelectedAreas(mask: boolean): void;
|
|
284
233
|
/**
|
|
285
234
|
* @description Listen for the indoor map state, including the changes of venue, building and floor.
|
|
286
235
|
* @param listener
|
|
@@ -294,12 +243,10 @@ export declare class Indoor extends Evented {
|
|
|
294
243
|
};
|
|
295
244
|
/**
|
|
296
245
|
* @description Select a building feature
|
|
297
|
-
* @deprecated Use map.selectBuildingById instead
|
|
298
246
|
* @param feature {MapGeoJSONFeature | null}
|
|
299
247
|
* @param floorId {string}
|
|
300
248
|
*/
|
|
301
249
|
selectBuilding(feature?: MapGeoJSONFeature | null, floorId?: string): void;
|
|
302
|
-
private _selectBuilding;
|
|
303
250
|
private _getBuildingByPoint;
|
|
304
251
|
private _getConditionsExpression;
|
|
305
252
|
private _loadData;
|
|
@@ -312,37 +259,43 @@ export declare class Indoor extends Evented {
|
|
|
312
259
|
private _getFeatures;
|
|
313
260
|
private _getBuildingFloorByOrdinal;
|
|
314
261
|
private _getBuildingFloorByFloorId;
|
|
315
|
-
private
|
|
262
|
+
private _getBuildingInitFloor;
|
|
316
263
|
private _isNotCurrentFeature;
|
|
317
264
|
private _setOutdoorLayersHidden;
|
|
318
265
|
private _addCustomLevelFillLayer;
|
|
319
266
|
private _setIndoorState;
|
|
320
|
-
private
|
|
267
|
+
private _setBuildingLineOpacity;
|
|
321
268
|
private _addBuildingHighlightLayer;
|
|
322
269
|
private _filterBuildingHighlight;
|
|
323
|
-
private
|
|
324
|
-
private
|
|
270
|
+
private _addHiddenBuilding;
|
|
271
|
+
private _deleteHiddenBuilding;
|
|
325
272
|
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;
|
|
273
|
+
private _configMaskVenueMode;
|
|
274
|
+
private _configMaskBuildingMode;
|
|
275
|
+
private _configVenueMode;
|
|
276
|
+
private _configBuildingMode;
|
|
277
|
+
private _getVenueOriginOrdinal;
|
|
278
|
+
private _getBuildingOriginOrdinal;
|
|
341
279
|
private _isVenueMode;
|
|
342
|
-
private
|
|
343
|
-
private
|
|
344
|
-
private
|
|
345
|
-
private
|
|
280
|
+
private _setVenueOrdinalHistory;
|
|
281
|
+
private _getVenueOrdinalHistory;
|
|
282
|
+
private _setBuildingOrdinalHistory;
|
|
283
|
+
private _getBuildingOrdinalHistory;
|
|
284
|
+
private _getVenuesOfBbox;
|
|
285
|
+
private _getBuildingsOfBbox;
|
|
286
|
+
private _copyOverlapLayers;
|
|
287
|
+
private _layerBuildings;
|
|
288
|
+
private _addBuildingToUpper;
|
|
289
|
+
private _deleteBuildingFromUpper;
|
|
290
|
+
private _addBuildingToLower;
|
|
291
|
+
private _deleteBuildingFromLower;
|
|
292
|
+
private _addLevelToUpper;
|
|
293
|
+
private _deleteLevelFromUpper;
|
|
294
|
+
private _addLevelToLower;
|
|
295
|
+
private _deleteLevelFromLower;
|
|
296
|
+
private _filterGroupLayers;
|
|
297
|
+
private _filterRestOriginLayers;
|
|
298
|
+
private _getNewFilter;
|
|
346
299
|
private static isFilterHasBeenReset;
|
|
347
300
|
}
|
|
348
301
|
export interface IPoiEvent {
|
|
@@ -409,41 +362,11 @@ export declare class Map extends Evented {
|
|
|
409
362
|
* @description Turn off building-building switching.
|
|
410
363
|
*/
|
|
411
364
|
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
365
|
/**
|
|
419
366
|
* @description Set outdoor layer to be shown or hidden.
|
|
420
367
|
* @param isHidden True is hidden, false is shown.
|
|
421
368
|
*/
|
|
422
369
|
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
370
|
/**
|
|
448
371
|
* @description Get current selected floor info.
|
|
449
372
|
* @return {IFloor | null}
|
|
@@ -461,48 +384,34 @@ export declare class Map extends Evented {
|
|
|
461
384
|
get venue(): MapGeoJSONFeature | null;
|
|
462
385
|
/**
|
|
463
386
|
* @description Get feature in bbox by id.
|
|
387
|
+
* @deprecated Use 'getFeaturesById' instead.
|
|
464
388
|
* @param id
|
|
465
389
|
* @return {MapGeoJSONFeature | undefined}
|
|
466
390
|
*/
|
|
467
391
|
getFeature(id: string): MapGeoJSONFeature | undefined;
|
|
468
392
|
/**
|
|
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
|
|
393
|
+
* @description Get features from bbox by id. One id may correspond to multiple features.
|
|
394
|
+
* @param id
|
|
486
395
|
*/
|
|
487
|
-
|
|
396
|
+
getFeaturesById(id: string): MapGeoJSONFeature[];
|
|
488
397
|
/**
|
|
489
398
|
* @description Select floor by id.
|
|
490
399
|
* @param floorId
|
|
491
400
|
* @param callback Called after floor has been selected.
|
|
492
401
|
*/
|
|
493
|
-
selectFloorById(floorId: string, callback?: VoidFunction): Promise<
|
|
402
|
+
selectFloorById(floorId: string, callback?: VoidFunction): Promise<void>;
|
|
494
403
|
/**
|
|
495
404
|
* @description Select building by id.
|
|
496
405
|
* @param buildingId
|
|
497
406
|
* @param callback Called after building has been selected
|
|
498
407
|
*/
|
|
499
|
-
selectBuildingById(buildingId: string, callback?: VoidFunction):
|
|
408
|
+
selectBuildingById(buildingId: string, callback?: VoidFunction): Promise<void>;
|
|
500
409
|
/**
|
|
501
410
|
* @description Select or exit venue by id.
|
|
502
411
|
* @param venueId Exit venue if venueId is null.
|
|
503
412
|
* @param callback Called after venue has been selected.
|
|
504
413
|
*/
|
|
505
|
-
selectVenueById(venueId: string | null, callback?: VoidFunction): Promise<
|
|
414
|
+
selectVenueById(venueId: string | null, callback?: VoidFunction): Promise<void>;
|
|
506
415
|
/**
|
|
507
416
|
* @description Listen for mouse click events on the map.
|
|
508
417
|
* @param listener
|
|
@@ -524,33 +433,6 @@ export declare class Map extends Evented {
|
|
|
524
433
|
onPointClickListener(listener: (result: IPointEvent) => void): {
|
|
525
434
|
unsubscribe: VoidFunction;
|
|
526
435
|
};
|
|
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
436
|
/**
|
|
555
437
|
* @description Listen for the indoor map status, including the changes of venue, building and floor.
|
|
556
438
|
* @param listener
|
|
@@ -589,12 +471,12 @@ export declare class Map extends Evented {
|
|
|
589
471
|
* @description Set the floorsControl's style.
|
|
590
472
|
* @param style
|
|
591
473
|
*/
|
|
592
|
-
setFloorsControlStyle(style: IFloorsControlStyle):
|
|
474
|
+
setFloorsControlStyle(style: IFloorsControlStyle): this;
|
|
593
475
|
/**
|
|
594
476
|
* @description Set the SelectedBuildingBorder's style
|
|
595
477
|
* @param style {ISelectedBuildingBorderStyle | null}
|
|
596
478
|
*/
|
|
597
|
-
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null):
|
|
479
|
+
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): this;
|
|
598
480
|
private static _getThemeStyleName;
|
|
599
481
|
private _setIndoorFilter;
|
|
600
482
|
private _setStyle;
|
|
@@ -602,11 +484,10 @@ export declare class Map extends Evented {
|
|
|
602
484
|
private _defaultSetMapZoom;
|
|
603
485
|
private _selectPoiById;
|
|
604
486
|
private _getBuildingIdByVenueId;
|
|
605
|
-
private _getBuildingOrdinalByFloor;
|
|
606
487
|
}
|
|
607
488
|
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
608
489
|
export declare class Marker {
|
|
609
|
-
private _maplibreMap;
|
|
490
|
+
private readonly _maplibreMap;
|
|
610
491
|
private readonly _layerId;
|
|
611
492
|
private readonly _sourceId;
|
|
612
493
|
private _imageName;
|
|
@@ -615,11 +496,15 @@ export declare class Marker {
|
|
|
615
496
|
constructor(maplibreMap: MaplibreMap);
|
|
616
497
|
/**
|
|
617
498
|
* @description Set marker by sprite name.
|
|
618
|
-
*
|
|
499
|
+
* This method must be called after map style loaded if you set an external URL.
|
|
500
|
+
* @param icon Sprite name in map style or the image url, png format.
|
|
501
|
+
* @param callback Called when the image(from an external URL) has loaded
|
|
502
|
+
* or with an error argument if there is an error.
|
|
619
503
|
*/
|
|
620
|
-
setIconImage(
|
|
504
|
+
setIconImage(icon: string, callback: VoidFunction): void;
|
|
621
505
|
/**
|
|
622
506
|
* @description Set marker by image url.
|
|
507
|
+
* @deprecated Use 'setIconImage' instead.
|
|
623
508
|
* @param imageUrl Network url, png format.
|
|
624
509
|
*/
|
|
625
510
|
setIconImageUrl(imageUrl: string): void;
|
|
@@ -663,7 +548,9 @@ export declare class Marker {
|
|
|
663
548
|
* @param eventKey
|
|
664
549
|
* @param callback
|
|
665
550
|
*/
|
|
666
|
-
onEventListener(eventKey: keyof MapLayerEventType, callback: (marker:
|
|
551
|
+
onEventListener(eventKey: keyof MapLayerEventType, callback: (marker: MapGeoJSONFeature) => void): {
|
|
552
|
+
offEventListener: VoidFunction;
|
|
553
|
+
};
|
|
667
554
|
/**
|
|
668
555
|
* @description Filter marker by custom properties.
|
|
669
556
|
* @param filterExpression A expression specifying conditions on source features.
|
|
@@ -717,6 +604,7 @@ export declare class Marker {
|
|
|
717
604
|
private _createIconFeature;
|
|
718
605
|
private _addIconSource;
|
|
719
606
|
private _addIconLayer;
|
|
607
|
+
private _handleEventListener;
|
|
720
608
|
}
|
|
721
609
|
export declare class Poi {
|
|
722
610
|
private _map;
|
|
@@ -752,28 +640,16 @@ export declare class FloorsControl implements IControl {
|
|
|
752
640
|
private _maxScrollTop;
|
|
753
641
|
private _$selectorExpanded;
|
|
754
642
|
private _$selectorFolded;
|
|
755
|
-
private _dispatch;
|
|
756
643
|
private _componentDidMount;
|
|
757
644
|
private _isShown;
|
|
758
645
|
constructor(indoor: Indoor);
|
|
759
646
|
onAdd(): HTMLElement;
|
|
760
647
|
onRemove(): void;
|
|
761
648
|
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;
|
|
649
|
+
switchByOrdinal(ordinal: string, callback?: VoidFunction): void;
|
|
767
650
|
setVisibility(visible: boolean): void;
|
|
768
651
|
setPosition(position: ControlPosition): void;
|
|
769
652
|
setStyle(style: Partial<IFloorsControlStyle> | null): void;
|
|
770
|
-
/**
|
|
771
|
-
* @deprecated
|
|
772
|
-
* @param listener
|
|
773
|
-
*/
|
|
774
|
-
onFloorClick(listener: (feature: MapGeoJSONFeature) => void): {
|
|
775
|
-
unsubscribe: VoidFunction;
|
|
776
|
-
};
|
|
777
653
|
private _bindEvents;
|
|
778
654
|
private _clearData;
|
|
779
655
|
private _render;
|
|
@@ -792,9 +668,8 @@ export declare class FloorsControl implements IControl {
|
|
|
792
668
|
private _getScrollTop;
|
|
793
669
|
private _handleScroll;
|
|
794
670
|
private _expandSelector;
|
|
795
|
-
private _getCurrentLevelFeature;
|
|
796
671
|
}
|
|
797
|
-
export declare class BuildingFilterControl implements
|
|
672
|
+
export declare class BuildingFilterControl implements IControl {
|
|
798
673
|
private _map;
|
|
799
674
|
private _indoor;
|
|
800
675
|
private _buildingId;
|
|
@@ -1051,7 +926,6 @@ export interface IOrientationPoi {
|
|
|
1051
926
|
}
|
|
1052
927
|
export declare class PoisService {
|
|
1053
928
|
private _api;
|
|
1054
|
-
private _categories;
|
|
1055
929
|
private _categoriesV2;
|
|
1056
930
|
private _request;
|
|
1057
931
|
constructor();
|
|
@@ -1086,18 +960,25 @@ export declare class PoisService {
|
|
|
1086
960
|
*/
|
|
1087
961
|
searchByBuildingId(keywords: string, buildingId: string, offset?: number, page?: number): AxiosPromise<IResponse<IResponsePois>>;
|
|
1088
962
|
/**
|
|
1089
|
-
* @description Search
|
|
1090
|
-
* @
|
|
1091
|
-
* @param
|
|
1092
|
-
* @param
|
|
963
|
+
* @description Search POIs of a venue.
|
|
964
|
+
* @param keywords
|
|
965
|
+
* @param venueId
|
|
966
|
+
* @param offset
|
|
967
|
+
* @param page
|
|
1093
968
|
*/
|
|
1094
|
-
|
|
969
|
+
searchByVenueId(keywords: string, venueId: string, offset?: number, page?: number): AxiosPromise<IResponse<IResponsePois>>;
|
|
1095
970
|
/**
|
|
1096
|
-
* @description Search poi categories by building id
|
|
971
|
+
* @description Search poi categories by venue id, building id, or floor id.
|
|
972
|
+
* Search scope priority: floorId > buildingId > venueId.
|
|
973
|
+
* @param venueId
|
|
1097
974
|
* @param buildingId
|
|
1098
975
|
* @param floorId
|
|
1099
976
|
*/
|
|
1100
|
-
searchCategories(
|
|
977
|
+
searchCategories({ venueId, buildingId, floorId, }: {
|
|
978
|
+
venueId?: string;
|
|
979
|
+
buildingId?: string;
|
|
980
|
+
floorId?: string;
|
|
981
|
+
}): AxiosPromise<IResponse<IPoiCategory[]>>;
|
|
1101
982
|
/**
|
|
1102
983
|
* @description Search orientation and poi
|
|
1103
984
|
* @param angle The angle between cellphone's orientation and the north.
|
|
@@ -1190,7 +1071,7 @@ export declare class RouteService {
|
|
|
1190
1071
|
], fromFloorId: string | null, toFloorId: string | null, fromBuildingId: string | null, toBuildingId: string | null, vehicle?: WayFindingVehicleType, locale?: string, toDoor?: boolean): AxiosPromise<IResponse<IResponseRoute>>;
|
|
1191
1072
|
}
|
|
1192
1073
|
export declare class RoutePainter {
|
|
1193
|
-
private _maplibreMap;
|
|
1074
|
+
private readonly _maplibreMap;
|
|
1194
1075
|
private _fromCoordinate;
|
|
1195
1076
|
private _toCoordinate;
|
|
1196
1077
|
private _fromMarkerIcon;
|
|
@@ -1199,15 +1080,21 @@ export declare class RoutePainter {
|
|
|
1199
1080
|
private _paintProperties;
|
|
1200
1081
|
constructor(maplibreMap: MaplibreMap);
|
|
1201
1082
|
/**
|
|
1202
|
-
* @description Set image of the start marker.
|
|
1083
|
+
* @description Set image of the start marker. This method must be called after map style loaded.
|
|
1084
|
+
* This method must be called after map style loaded if you set an external URL.
|
|
1203
1085
|
* @param icon Sprite name in map style or the image url, png format.
|
|
1086
|
+
* @param callback Called when the image(from an external URL) has loaded
|
|
1087
|
+
* or with an error argument if there is an error.
|
|
1204
1088
|
*/
|
|
1205
|
-
setFromMarkerIcon(icon: string):
|
|
1089
|
+
setFromMarkerIcon(icon: string, callback?: VoidFunction): void;
|
|
1206
1090
|
/**
|
|
1207
|
-
* @description Set image of the end marker.
|
|
1091
|
+
* @description Set image of the end marker. This method must be called after map style loaded.
|
|
1092
|
+
* This method must be called after map style loaded if you set an external URL.
|
|
1208
1093
|
* @param icon Sprite name in map style or the image url, png format.
|
|
1094
|
+
* @param callback Called when the image(from an external URL) has loaded
|
|
1095
|
+
* or with an error argument if there is an error.
|
|
1209
1096
|
*/
|
|
1210
|
-
setToMarkerIcon(icon: string):
|
|
1097
|
+
setToMarkerIcon(icon: string, callback?: VoidFunction): void;
|
|
1211
1098
|
/**
|
|
1212
1099
|
* @description Set image icon scale.
|
|
1213
1100
|
* @param size Default is 1.
|
|
@@ -1253,24 +1140,23 @@ export declare class RoutePainter {
|
|
|
1253
1140
|
], toCoordinate: [
|
|
1254
1141
|
number,
|
|
1255
1142
|
number
|
|
1256
|
-
]):
|
|
1143
|
+
]): void;
|
|
1257
1144
|
/**
|
|
1258
1145
|
* @description Remove route from the map.
|
|
1259
1146
|
*/
|
|
1260
|
-
remove():
|
|
1147
|
+
remove(): void;
|
|
1261
1148
|
/**
|
|
1262
1149
|
* @description Filter paths' opacity by venue and ordinal.
|
|
1263
1150
|
* @param venueId {string | null | undefined}
|
|
1264
1151
|
* @param ordinal {string | null | undefined}
|
|
1265
1152
|
*/
|
|
1266
|
-
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined):
|
|
1153
|
+
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1267
1154
|
/**
|
|
1268
1155
|
* @description Filter paths' opacity by building and ordinal.
|
|
1269
1156
|
* @param buildingId {string | null | undefined}
|
|
1270
1157
|
* @param ordinal {string | null | undefined}
|
|
1271
1158
|
*/
|
|
1272
|
-
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined):
|
|
1273
|
-
private _loadImage;
|
|
1159
|
+
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1274
1160
|
private _classifyFeatures;
|
|
1275
1161
|
private _createLineFeature;
|
|
1276
1162
|
private _createIconFeature;
|