@aibee/crc-bmap 0.0.23 → 0.0.24

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/lib/bmap.esm.js CHANGED
@@ -892,6 +892,11 @@ var PoiLayer = class extends Layer {
892
892
  });
893
893
  this.registryEvent();
894
894
  }
895
+ clear() {
896
+ super.clear();
897
+ this.pois = [];
898
+ return this;
899
+ }
895
900
  createPoi(options) {
896
901
  const poi = new Poi(this.context, options);
897
902
  this.add(poi);
@@ -1590,6 +1595,7 @@ var BoxSelection = class extends BaseSvg {
1590
1595
  const height = Math.abs(endPoint.y - startPoint.y);
1591
1596
  setRectPosition(this.rect, leftTop.x, leftTop.y, width, height);
1592
1597
  }
1598
+ setRectPosition(this.rect, 0, 0, 0, 0);
1593
1599
  });
1594
1600
  const { config: { selectBox: { fill, stroke } } } = context;
1595
1601
  this.rect = createRect(stroke, fill);
@@ -2529,6 +2535,16 @@ var BMap = class extends EventDispatcher6 {
2529
2535
  var _a;
2530
2536
  return (_a = this.context.currentFloor) == null ? void 0 : _a.poiLayer.removePoiById(id);
2531
2537
  }
2538
+ getPois() {
2539
+ var _a;
2540
+ return ((_a = this.context.currentFloor) == null ? void 0 : _a.poiLayer.pois) || [];
2541
+ }
2542
+ clearPoi() {
2543
+ if (this.context.currentFloor) {
2544
+ this.getPois().forEach((poi) => poi.dispose());
2545
+ this.context.currentFloor.poiLayer.clear();
2546
+ }
2547
+ }
2532
2548
  dispose() {
2533
2549
  this.context.dispose();
2534
2550
  clearTextTexture();