@mapxus/mapxus-map-jp 5.4.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +74 -98
- package/index.js +10 -0
- package/package.json +8 -57
- package/mapxus-map.js +0 -8
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator v6.
|
|
1
|
+
// Generated by dts-bundle-generator v6.13.0
|
|
2
2
|
|
|
3
3
|
import { AxiosPromise } from 'axios';
|
|
4
4
|
import { Feature, FeatureCollection, GeometryObject, LineString, Polygon } from 'geojson';
|
|
@@ -24,8 +24,9 @@ export interface IMapOption {
|
|
|
24
24
|
poiId?: string;
|
|
25
25
|
hiddenOutdoor?: boolean;
|
|
26
26
|
theme?: ThemeType;
|
|
27
|
+
collapseCopyright?: boolean;
|
|
27
28
|
}
|
|
28
|
-
export
|
|
29
|
+
export type Listener = (param: Object) => any;
|
|
29
30
|
declare class DefinedEvent {
|
|
30
31
|
private _type;
|
|
31
32
|
private _target;
|
|
@@ -160,27 +161,24 @@ export interface ISearchBuilding {
|
|
|
160
161
|
export declare class Indoor extends Evented {
|
|
161
162
|
private _map;
|
|
162
163
|
private _features;
|
|
163
|
-
private _buildingFloors;
|
|
164
|
-
private _buildingFloor;
|
|
165
|
-
private _refLevel;
|
|
166
164
|
private _curBuildingId;
|
|
167
165
|
private _curBuildingFeature;
|
|
166
|
+
private _curOrdinal;
|
|
167
|
+
private _curLevelId;
|
|
168
|
+
private _curFloor;
|
|
169
|
+
private _buildingFloors;
|
|
170
|
+
private _buildingOrdinals;
|
|
168
171
|
private _enableSwitch;
|
|
169
172
|
private _enableSwitchBuilding;
|
|
170
173
|
private _isHiddenOutdoor;
|
|
171
174
|
private _indoorLayers;
|
|
172
|
-
private _footprints;
|
|
173
175
|
private _hasCustomLevelFill;
|
|
174
176
|
private _curVenueId;
|
|
175
177
|
private _curVenueFeature;
|
|
176
|
-
private
|
|
177
|
-
private
|
|
178
|
-
private
|
|
179
|
-
private
|
|
180
|
-
private _levelsMap;
|
|
181
|
-
private _displayedLevels;
|
|
182
|
-
private _curVenueLevelIds;
|
|
183
|
-
private _incompleteVenues;
|
|
178
|
+
private _footprints;
|
|
179
|
+
private readonly _displayLevelSet;
|
|
180
|
+
private _curVenueLevelMap;
|
|
181
|
+
private _isSelectBuildingByClickMap;
|
|
184
182
|
private static isFilterHasBeenReset;
|
|
185
183
|
private static isLevel;
|
|
186
184
|
private static isPoi;
|
|
@@ -195,12 +193,13 @@ export declare class Indoor extends Evented {
|
|
|
195
193
|
/** Turn off the buildings switching */
|
|
196
194
|
disableSwitchBuilding(): this;
|
|
197
195
|
/**
|
|
198
|
-
* Get the selected building's
|
|
196
|
+
* Get the selected building's floor list
|
|
199
197
|
* @return {string[]}
|
|
200
198
|
*/
|
|
201
|
-
get
|
|
199
|
+
get floors(): string[];
|
|
202
200
|
/**
|
|
203
|
-
* Get
|
|
201
|
+
* Get the selected building's ordinal list
|
|
202
|
+
* @return {string[]}
|
|
204
203
|
*/
|
|
205
204
|
get ordinals(): string[];
|
|
206
205
|
/**
|
|
@@ -214,27 +213,18 @@ export declare class Indoor extends Evented {
|
|
|
214
213
|
*/
|
|
215
214
|
get currentFloor(): string;
|
|
216
215
|
/**
|
|
217
|
-
* Get current ordinal of selecting
|
|
216
|
+
* Get current ordinal of selecting building
|
|
218
217
|
*/
|
|
219
218
|
get ordinal(): string | null;
|
|
220
219
|
/**
|
|
221
220
|
* Get current venueId
|
|
222
221
|
*/
|
|
223
222
|
get venueId(): string | null;
|
|
224
|
-
/**
|
|
225
|
-
* Get floors of current venue
|
|
226
|
-
*/
|
|
227
|
-
get venueFloors(): string[];
|
|
228
223
|
/**
|
|
229
224
|
* Get referred level of selecting building
|
|
230
225
|
* @returns {string}
|
|
231
226
|
*/
|
|
232
227
|
get refLevel(): string;
|
|
233
|
-
/**
|
|
234
|
-
* Get referred levels of current venue
|
|
235
|
-
* @return {string[]}
|
|
236
|
-
*/
|
|
237
|
-
get refLevels(): string[];
|
|
238
228
|
/**
|
|
239
229
|
* Get the tiles of bbox
|
|
240
230
|
* @returns {IFeatureBuilding[]}
|
|
@@ -270,9 +260,9 @@ export declare class Indoor extends Evented {
|
|
|
270
260
|
goToBuilding(buildingId: string, callback?: (feature: Feature<GeometryObject, IBuilding>) => void): void;
|
|
271
261
|
/**
|
|
272
262
|
* Switch floor to filter features
|
|
273
|
-
* @param
|
|
263
|
+
* @param ordinal: {string}
|
|
274
264
|
*/
|
|
275
|
-
switchFloor(
|
|
265
|
+
switchFloor(ordinal: string): void;
|
|
276
266
|
/**
|
|
277
267
|
* Hide the outdoor map
|
|
278
268
|
* @param isHiddenOutdoor: {boolean}
|
|
@@ -287,79 +277,52 @@ export declare class Indoor extends Evented {
|
|
|
287
277
|
private _init;
|
|
288
278
|
private _load;
|
|
289
279
|
private _clear;
|
|
290
|
-
/**
|
|
291
|
-
* 未选中 venue 其内的 building 显示 venue 历史 ordinal (或 ground ordinal)对应的楼层,如无,则空白
|
|
292
|
-
* @private
|
|
293
|
-
*/
|
|
294
|
-
private _initVenues;
|
|
295
|
-
/**
|
|
296
|
-
* Venue 缺少 building_ids 属性其下 building 显示自身最接近地面层
|
|
297
|
-
* @private
|
|
298
|
-
*/
|
|
299
|
-
private _initLostBuildings;
|
|
300
|
-
/**
|
|
301
|
-
* 增加需要显示的 level id(s)
|
|
302
|
-
* @param levelIds: {string | string[]}
|
|
303
|
-
* @private
|
|
304
|
-
*/
|
|
305
|
-
private _addDisplayedLevels;
|
|
306
|
-
/**
|
|
307
|
-
* 删除显示的 level id(s)
|
|
308
|
-
* @param levelIds: {string | string[]}
|
|
309
|
-
* @private
|
|
310
|
-
*/
|
|
311
|
-
private _removeDisplayedLevels;
|
|
312
|
-
private _setCurIndoorStates;
|
|
313
|
-
/***
|
|
314
|
-
* 以 Map<venueId_ordinal, levelId[]> 格式保存当前 venue ordinal-level 的对应关系
|
|
315
|
-
* 把当前 bbox 里 venue 的全部 level ids 保存到变量 "_curVenueLevelIds"
|
|
316
|
-
* @private
|
|
317
|
-
*/
|
|
318
|
-
private _setLevelsCache;
|
|
319
280
|
private _updateFilter;
|
|
320
281
|
private _setPoiTextColor;
|
|
321
282
|
private _addTextHaloColor;
|
|
322
283
|
private _getFeatures;
|
|
323
284
|
/**
|
|
324
|
-
*
|
|
325
|
-
* @
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Get level_names 列表,指定 feature,返回 feature 的 level_names;
|
|
330
|
-
* 无则优先 current venue level_names, 无则取 selecting building level_names.
|
|
331
|
-
* @param feature
|
|
332
|
-
* @return string[]
|
|
333
|
-
* @private
|
|
334
|
-
*/
|
|
335
|
-
private _getLevelNames;
|
|
336
|
-
private _getBuildingId;
|
|
337
|
-
/**
|
|
338
|
-
* Get current building level id
|
|
339
|
-
* @private
|
|
340
|
-
*/
|
|
341
|
-
private _getRefLevel;
|
|
342
|
-
/**
|
|
343
|
-
* Get ordinals 列表, 优先 venue level_ordinals,如无则取 selecting building ordinals
|
|
285
|
+
* @description 获取 building ordinal: 有 floor 参数则返回该 floor 对应的 ordinal;
|
|
286
|
+
* @description 无则优先返回历史 ordinal 再是离地面层最近的 ordinal.
|
|
287
|
+
* @param buildingFeature: {MapGeoJSONFeature}
|
|
288
|
+
* @param floor?: {string}
|
|
344
289
|
* @private
|
|
345
290
|
*/
|
|
346
|
-
private
|
|
291
|
+
private _getBuildingOrdinal;
|
|
347
292
|
/**
|
|
348
|
-
*
|
|
349
|
-
* 无则返回历史 ordinal(venue 独有) 或离地面层最近的 ordinal.
|
|
350
|
-
* @param feature: {MapGeoJSONFeature}
|
|
351
|
-
* @param floor?: {string}
|
|
293
|
+
* 获取当前 building floor
|
|
352
294
|
* @private
|
|
353
295
|
*/
|
|
354
|
-
private
|
|
296
|
+
private _getBuildingFloor;
|
|
355
297
|
/**
|
|
356
|
-
*
|
|
298
|
+
* @description Get building level_names and ordinals
|
|
299
|
+
* @param buildingFeature
|
|
357
300
|
* @private
|
|
358
301
|
*/
|
|
359
|
-
private
|
|
302
|
+
private _getBuildingProps;
|
|
360
303
|
private _isNotCurrentFeature;
|
|
361
304
|
private _setOutdoorLayersHidden;
|
|
362
305
|
private _addCustomLevelFillLayer;
|
|
306
|
+
private _setSelectedVenueState;
|
|
307
|
+
private _setLayerTransparency;
|
|
308
|
+
private _setBuildingHighlight;
|
|
309
|
+
private _addBuildingHighlightLayer;
|
|
310
|
+
private _filterBuildingHighlight;
|
|
311
|
+
private _addDisplayLevels;
|
|
312
|
+
private _removeDisplayLevels;
|
|
313
|
+
private _setDisplayLevels;
|
|
314
|
+
private _cacheCurVenueLevels;
|
|
315
|
+
private _getDisplayLevels;
|
|
316
|
+
private _getVenueOrdinal;
|
|
317
|
+
private _getBuildingLevelByOrdinal;
|
|
318
|
+
private _isBuildingLayer;
|
|
319
|
+
private _isVenueLayer;
|
|
320
|
+
/**
|
|
321
|
+
* @description 判断当前 building 是否为隐藏式 building,即点击的 building 无显示元素
|
|
322
|
+
* @param building
|
|
323
|
+
* @private
|
|
324
|
+
*/
|
|
325
|
+
private _isHiddenBuilding;
|
|
363
326
|
}
|
|
364
327
|
export interface IFloorsControlStyle {
|
|
365
328
|
fontColor?: string;
|
|
@@ -374,13 +337,14 @@ export interface IPoiEvent {
|
|
|
374
337
|
}
|
|
375
338
|
export interface IFloorEvent {
|
|
376
339
|
floor: string;
|
|
340
|
+
ordinal: string;
|
|
377
341
|
feature: Feature<GeometryObject>;
|
|
378
342
|
}
|
|
379
343
|
export interface IMapClickEvent extends Event {
|
|
380
344
|
point?: PointLike;
|
|
381
345
|
feature?: IFeatureBuilding;
|
|
382
346
|
}
|
|
383
|
-
export
|
|
347
|
+
export type TPosition = "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
384
348
|
export declare class Map extends Evented {
|
|
385
349
|
private _map;
|
|
386
350
|
private _indoor;
|
|
@@ -436,6 +400,14 @@ export declare class Map extends Evented {
|
|
|
436
400
|
* @returns {string}
|
|
437
401
|
*/
|
|
438
402
|
get currentFloor(): string;
|
|
403
|
+
/**
|
|
404
|
+
* Get the current ordinal of the selected building
|
|
405
|
+
*/
|
|
406
|
+
get ordinal(): string | null;
|
|
407
|
+
/**
|
|
408
|
+
* Get venueId which the selected building belongs
|
|
409
|
+
*/
|
|
410
|
+
get venueId(): string | null;
|
|
439
411
|
/**
|
|
440
412
|
* Get the selected building properties
|
|
441
413
|
* @returns {IBuilding | undefined}
|
|
@@ -462,10 +434,7 @@ export declare class Map extends Evented {
|
|
|
462
434
|
* @param floor: {string}
|
|
463
435
|
* @param callback
|
|
464
436
|
*/
|
|
465
|
-
switchFloor(floor: string, callback?: (object:
|
|
466
|
-
floor: string;
|
|
467
|
-
feature: IFeatureBuilding;
|
|
468
|
-
}) => void): this;
|
|
437
|
+
switchFloor(floor: string, callback?: (object: IFloorEvent) => void): this;
|
|
469
438
|
/**
|
|
470
439
|
* Listen for mouse click events on the map
|
|
471
440
|
* @param listener
|
|
@@ -498,6 +467,14 @@ export declare class Map extends Evented {
|
|
|
498
467
|
onBuildingChangeListener(listener: (feature: IFeatureBuilding | null) => void): {
|
|
499
468
|
unsubscribe: Function;
|
|
500
469
|
};
|
|
470
|
+
/**
|
|
471
|
+
* Listen for the selected venue changed event
|
|
472
|
+
* @param {function} listener: (venueId: string | null, ordinal: string | null) => void
|
|
473
|
+
* @return {unsubscribe}: function to remove the event listener
|
|
474
|
+
*/
|
|
475
|
+
onVenueChangeListener(listener: (venueId: string | null, ordinal: string | null) => void): {
|
|
476
|
+
unsubscribe: Function;
|
|
477
|
+
};
|
|
501
478
|
/** Hide the FloorControl */
|
|
502
479
|
disableFloorControl(): this;
|
|
503
480
|
/**
|
|
@@ -529,7 +506,7 @@ export declare class Map extends Evented {
|
|
|
529
506
|
private _defaultSelectedBuilding;
|
|
530
507
|
private _defaultSelectedPoi;
|
|
531
508
|
}
|
|
532
|
-
export
|
|
509
|
+
export type TCoordinates = [
|
|
533
510
|
number,
|
|
534
511
|
number
|
|
535
512
|
] | [
|
|
@@ -699,7 +676,7 @@ export declare class FloorsControl implements IControl {
|
|
|
699
676
|
private _$arrowUp;
|
|
700
677
|
private _$arrowDown;
|
|
701
678
|
private _floor;
|
|
702
|
-
private
|
|
679
|
+
private _buildingId;
|
|
703
680
|
private _ordinal;
|
|
704
681
|
private _fontColor;
|
|
705
682
|
private _selectFontColor;
|
|
@@ -715,13 +692,11 @@ export declare class FloorsControl implements IControl {
|
|
|
715
692
|
get enabled(): boolean;
|
|
716
693
|
onAdd(map: maplibreMap): HTMLElement;
|
|
717
694
|
onRemove(): void;
|
|
695
|
+
switchBuildingFloor(floor: string, callback?: (object: IFloorEvent) => void): void;
|
|
718
696
|
onFloorClick(listener: (result: IFloorEvent) => void): {
|
|
719
697
|
unsubscribe: Function;
|
|
720
698
|
};
|
|
721
|
-
switchFloor(
|
|
722
|
-
floor: string;
|
|
723
|
-
feature: IFeatureBuilding;
|
|
724
|
-
}) => void): void;
|
|
699
|
+
switchFloor(ordinal: string, callback?: (object: IFloorEvent) => void): void;
|
|
725
700
|
setStyle(style: IFloorsControlStyle): void;
|
|
726
701
|
setLayoutHidden(isHidden: boolean): void;
|
|
727
702
|
moveFloorControl(from: TPosition, to: TPosition): void;
|
|
@@ -760,6 +735,7 @@ export declare class FloorsControl implements IControl {
|
|
|
760
735
|
private _floorScrollEvent;
|
|
761
736
|
private _bindEvent;
|
|
762
737
|
private _getCurrentFloor;
|
|
738
|
+
private _updateFloorControlStatus;
|
|
763
739
|
}
|
|
764
740
|
export declare class BuildingFilterControl implements maplibregl.IControl {
|
|
765
741
|
private _map;
|
|
@@ -892,7 +868,7 @@ export declare class PoisService {
|
|
|
892
868
|
*/
|
|
893
869
|
searchByBuildingId(keywords: string, buildingId: string, offset?: number, page?: number): AxiosPromise<IResponse<IResponsePois>>;
|
|
894
870
|
/**
|
|
895
|
-
* Search poi category by
|
|
871
|
+
* Search poi category by building id or floor
|
|
896
872
|
*
|
|
897
873
|
* @param buildingId within the building
|
|
898
874
|
* @param floor option param, within floor
|