maplibre-gl-lidar 0.4.0 → 0.5.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/dist/{LidarLayerAdapter-CWBS2ItS.js → LidarLayerAdapter-ZG9A0pFN.js} +15 -6
- package/dist/{LidarLayerAdapter-CWBS2ItS.js.map → LidarLayerAdapter-ZG9A0pFN.js.map} +1 -1
- package/dist/{LidarLayerAdapter-DTOIC9jR.cjs → LidarLayerAdapter-zXSROe7Q.cjs} +15 -6
- package/dist/{LidarLayerAdapter-DTOIC9jR.cjs.map → LidarLayerAdapter-zXSROe7Q.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.cjs +2 -2
- package/dist/react.cjs.map +1 -1
- package/dist/react.mjs +3 -3
- package/dist/react.mjs.map +1 -1
- package/dist/types/lib/adapters/LidarLayerAdapter.d.ts.map +1 -1
- package/dist/types/lib/core/LidarControl.d.ts.map +1 -1
- package/dist/types/lib/core/LidarControlReact.d.ts.map +1 -1
- package/dist/types/lib/core/types.d.ts +4 -1
- package/dist/types/lib/core/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -37347,8 +37347,9 @@ class LidarControl {
|
|
|
37347
37347
|
hiddenClassifications: /* @__PURE__ */ new Set()
|
|
37348
37348
|
};
|
|
37349
37349
|
this.setState(stateUpdate);
|
|
37350
|
-
this.
|
|
37350
|
+
this._emitWithData("unload", { pointCloud: { id } });
|
|
37351
37351
|
} else {
|
|
37352
|
+
const allIds = this._state.pointClouds.map((pc) => pc.id);
|
|
37352
37353
|
this.stopStreaming();
|
|
37353
37354
|
(_c = this._pointCloudManager) == null ? void 0 : _c.clear();
|
|
37354
37355
|
this.setState({
|
|
@@ -37357,7 +37358,9 @@ class LidarControl {
|
|
|
37357
37358
|
availableClassifications: /* @__PURE__ */ new Set(),
|
|
37358
37359
|
hiddenClassifications: /* @__PURE__ */ new Set()
|
|
37359
37360
|
});
|
|
37360
|
-
|
|
37361
|
+
for (const removedId of allIds) {
|
|
37362
|
+
this._emitWithData("unload", { pointCloud: { id: removedId } });
|
|
37363
|
+
}
|
|
37361
37364
|
}
|
|
37362
37365
|
}
|
|
37363
37366
|
/**
|
|
@@ -37693,7 +37696,7 @@ class LidarControl {
|
|
|
37693
37696
|
hiddenClassifications: /* @__PURE__ */ new Set()
|
|
37694
37697
|
});
|
|
37695
37698
|
this._emit("streamingstop");
|
|
37696
|
-
this.
|
|
37699
|
+
this._emitWithData("unload", { pointCloud: { id } });
|
|
37697
37700
|
} else {
|
|
37698
37701
|
const streamingIds = Array.from(this._streamingLoaders.keys());
|
|
37699
37702
|
for (const viewportManager of this._viewportManagers.values()) {
|
|
@@ -37720,7 +37723,9 @@ class LidarControl {
|
|
|
37720
37723
|
});
|
|
37721
37724
|
if (streamingIds.length > 0) {
|
|
37722
37725
|
this._emit("streamingstop");
|
|
37723
|
-
|
|
37726
|
+
for (const removedId of streamingIds) {
|
|
37727
|
+
this._emitWithData("unload", { pointCloud: { id: removedId } });
|
|
37728
|
+
}
|
|
37724
37729
|
}
|
|
37725
37730
|
}
|
|
37726
37731
|
}
|
|
@@ -38375,7 +38380,11 @@ class LidarLayerAdapter {
|
|
|
38375
38380
|
this._notifyLayerAdded(event.pointCloud.id);
|
|
38376
38381
|
}
|
|
38377
38382
|
};
|
|
38378
|
-
const handleUnload = () => {
|
|
38383
|
+
const handleUnload = (event) => {
|
|
38384
|
+
var _a;
|
|
38385
|
+
if ((_a = event.pointCloud) == null ? void 0 : _a.id) {
|
|
38386
|
+
this.notifyLayerRemoved(event.pointCloud.id);
|
|
38387
|
+
}
|
|
38379
38388
|
};
|
|
38380
38389
|
this._lidarControl.on("load", handleLoad);
|
|
38381
38390
|
this._lidarControl.on("unload", handleUnload);
|
|
@@ -38516,4 +38525,4 @@ export {
|
|
|
38516
38525
|
getFilename as l,
|
|
38517
38526
|
throttle as t
|
|
38518
38527
|
};
|
|
38519
|
-
//# sourceMappingURL=LidarLayerAdapter-
|
|
38528
|
+
//# sourceMappingURL=LidarLayerAdapter-ZG9A0pFN.js.map
|