@mapxus/mapxus-map-jp 5.4.1 → 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.
Files changed (3) hide show
  1. package/index.d.ts +67 -97
  2. package/index.js +6 -4
  3. package/package.json +4 -18
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Generated by dts-bundle-generator v6.12.0
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 declare type Listener = (param: Object) => any;
29
+ export type Listener = (param: Object) => any;
29
30
  declare class DefinedEvent {
30
31
  private _type;
31
32
  private _target;
@@ -160,28 +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 _buildingOrdinals;
165
- private _buildingFloor;
166
- private _refLevel;
167
164
  private _curBuildingId;
168
165
  private _curBuildingFeature;
166
+ private _curOrdinal;
167
+ private _curLevelId;
168
+ private _curFloor;
169
+ private _buildingFloors;
170
+ private _buildingOrdinals;
169
171
  private _enableSwitch;
170
172
  private _enableSwitchBuilding;
171
173
  private _isHiddenOutdoor;
172
174
  private _indoorLayers;
173
- private _footprints;
174
175
  private _hasCustomLevelFill;
175
176
  private _curVenueId;
176
177
  private _curVenueFeature;
177
- private _curOrdinal;
178
- private _curOrdinals;
179
- private _venueFloors;
180
- private _refLevels;
181
- private _levelsMap;
182
- private _displayedLevels;
183
- private _curVenueLevelIds;
184
- private _incompleteVenues;
178
+ private _footprints;
179
+ private readonly _displayLevelSet;
180
+ private _curVenueLevelMap;
181
+ private _isSelectBuildingByClickMap;
185
182
  private static isFilterHasBeenReset;
186
183
  private static isLevel;
187
184
  private static isPoi;
@@ -196,18 +193,14 @@ export declare class Indoor extends Evented {
196
193
  /** Turn off the buildings switching */
197
194
  disableSwitchBuilding(): this;
198
195
  /**
199
- * Get the selected building's levels list
196
+ * Get the selected building's floor list
200
197
  * @return {string[]}
201
198
  */
202
- get buildingFloors(): string[];
199
+ get floors(): string[];
203
200
  /**
204
- * Get the selected building's ordinals list
201
+ * Get the selected building's ordinal list
205
202
  * @return {string[]}
206
203
  */
207
- get buildingOrdinals(): string[];
208
- /**
209
- * Get current venue's ordinals
210
- */
211
204
  get ordinals(): string[];
212
205
  /**
213
206
  * Get the selected building's id
@@ -220,27 +213,18 @@ export declare class Indoor extends Evented {
220
213
  */
221
214
  get currentFloor(): string;
222
215
  /**
223
- * Get current ordinal of selecting venue
216
+ * Get current ordinal of selecting building
224
217
  */
225
218
  get ordinal(): string | null;
226
219
  /**
227
220
  * Get current venueId
228
221
  */
229
222
  get venueId(): string | null;
230
- /**
231
- * Get floors of current venue
232
- */
233
- get venueFloors(): string[];
234
223
  /**
235
224
  * Get referred level of selecting building
236
225
  * @returns {string}
237
226
  */
238
227
  get refLevel(): string;
239
- /**
240
- * Get referred levels of current venue
241
- * @return {string[]}
242
- */
243
- get refLevels(): string[];
244
228
  /**
245
229
  * Get the tiles of bbox
246
230
  * @returns {IFeatureBuilding[]}
@@ -293,80 +277,52 @@ export declare class Indoor extends Evented {
293
277
  private _init;
294
278
  private _load;
295
279
  private _clear;
296
- /**
297
- * 未选中 venue 其内的 building 显示 venue 历史 ordinal (或 ground ordinal)对应的楼层,如无,则空白
298
- * @private
299
- */
300
- private _initVenues;
301
- /**
302
- * Venue 缺少 building_ids 属性其下 building 显示自身最接近地面层
303
- * @private
304
- */
305
- private _initLostBuildings;
306
- /**
307
- * 增加需要显示的 level id(s)
308
- * @param levelIds: {string | string[]}
309
- * @private
310
- */
311
- private _addDisplayedLevels;
312
- /**
313
- * 删除显示的 level id(s)
314
- * @param levelIds: {string | string[]}
315
- * @private
316
- */
317
- private _removeDisplayedLevels;
318
- private _setCurIndoorStates;
319
- /***
320
- * 以 Map<venueId_ordinal, levelId[]> 格式保存当前 venue ordinal-level 的对应关系
321
- * 把当前 bbox 里 venue 的全部 level ids 保存到变量 "_curVenueLevelIds"
322
- * @private
323
- */
324
- private _setLevelsCache;
325
280
  private _updateFilter;
326
281
  private _setPoiTextColor;
327
282
  private _addTextHaloColor;
328
283
  private _getFeatures;
329
284
  /**
330
- * Get selecting building feature
331
- * @private
332
- */
333
- private _getFeatureInfo;
334
- /**
335
- * Get level_names 列表,指定 feature,返回 feature 的 level_names;
336
- * 无则优先 current venue level_names, 无则取 selecting building level_names.
337
- * @param feature
338
- * @return string[]
285
+ * @description 获取 building ordinal: 有 floor 参数则返回该 floor 对应的 ordinal;
286
+ * @description 无则优先返回历史 ordinal 再是离地面层最近的 ordinal.
287
+ * @param buildingFeature: {MapGeoJSONFeature}
288
+ * @param floor?: {string}
339
289
  * @private
340
290
  */
341
- private _getLevelNames;
342
- private _getBuildingId;
291
+ private _getBuildingOrdinal;
343
292
  /**
344
- * Get current building level id
293
+ * 获取当前 building floor
345
294
  * @private
346
295
  */
347
- private _getRefLevel;
296
+ private _getBuildingFloor;
348
297
  /**
349
- * Get ordinals 列表, 如不传 buildingFeature 则取 venue level_ordinals.
298
+ * @description Get building level_names and ordinals
350
299
  * @param buildingFeature
351
300
  * @private
352
301
  */
353
- private _getOrdinals;
354
- /**
355
- * 获取 venue 或 building 的 ordinal: 有 floor 参数则返回该 floor 对应的 ordinal;
356
- * 无则返回历史 ordinal(venue 独有) 或离地面层最近的 ordinal.
357
- * @param feature: {MapGeoJSONFeature}
358
- * @param floor?: {string}
359
- * @private
360
- */
361
- private _getOrdinal;
362
- /**
363
- * 获取当前 building floor
364
- * @private
365
- */
366
- private _getLevelName;
302
+ private _getBuildingProps;
367
303
  private _isNotCurrentFeature;
368
304
  private _setOutdoorLayersHidden;
369
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;
370
326
  }
371
327
  export interface IFloorsControlStyle {
372
328
  fontColor?: string;
@@ -381,13 +337,14 @@ export interface IPoiEvent {
381
337
  }
382
338
  export interface IFloorEvent {
383
339
  floor: string;
340
+ ordinal: string;
384
341
  feature: Feature<GeometryObject>;
385
342
  }
386
343
  export interface IMapClickEvent extends Event {
387
344
  point?: PointLike;
388
345
  feature?: IFeatureBuilding;
389
346
  }
390
- export declare type TPosition = "top-right" | "top-left" | "bottom-right" | "bottom-left";
347
+ export type TPosition = "top-right" | "top-left" | "bottom-right" | "bottom-left";
391
348
  export declare class Map extends Evented {
392
349
  private _map;
393
350
  private _indoor;
@@ -443,6 +400,14 @@ export declare class Map extends Evented {
443
400
  * @returns {string}
444
401
  */
445
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;
446
411
  /**
447
412
  * Get the selected building properties
448
413
  * @returns {IBuilding | undefined}
@@ -469,10 +434,7 @@ export declare class Map extends Evented {
469
434
  * @param floor: {string}
470
435
  * @param callback
471
436
  */
472
- switchFloor(floor: string, callback?: (object: {
473
- floor: string;
474
- feature: IFeatureBuilding;
475
- }) => void): this;
437
+ switchFloor(floor: string, callback?: (object: IFloorEvent) => void): this;
476
438
  /**
477
439
  * Listen for mouse click events on the map
478
440
  * @param listener
@@ -505,6 +467,14 @@ export declare class Map extends Evented {
505
467
  onBuildingChangeListener(listener: (feature: IFeatureBuilding | null) => void): {
506
468
  unsubscribe: Function;
507
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
+ };
508
478
  /** Hide the FloorControl */
509
479
  disableFloorControl(): this;
510
480
  /**
@@ -536,7 +506,7 @@ export declare class Map extends Evented {
536
506
  private _defaultSelectedBuilding;
537
507
  private _defaultSelectedPoi;
538
508
  }
539
- export declare type TCoordinates = [
509
+ export type TCoordinates = [
540
510
  number,
541
511
  number
542
512
  ] | [
@@ -706,7 +676,7 @@ export declare class FloorsControl implements IControl {
706
676
  private _$arrowUp;
707
677
  private _$arrowDown;
708
678
  private _floor;
709
- private _venueId;
679
+ private _buildingId;
710
680
  private _ordinal;
711
681
  private _fontColor;
712
682
  private _selectFontColor;
@@ -898,7 +868,7 @@ export declare class PoisService {
898
868
  */
899
869
  searchByBuildingId(keywords: string, buildingId: string, offset?: number, page?: number): AxiosPromise<IResponse<IResponsePois>>;
900
870
  /**
901
- * Search poi category by within building
871
+ * Search poi category by building id or floor
902
872
  *
903
873
  * @param buildingId within the building
904
874
  * @param floor option param, within floor