Skip to content

Commit aaea7e7

Browse files
committed
【SDK】【Cesium】【修复toJSON方法内容为空的BUG】
1 parent e3d70f6 commit aaea7e7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/service/3DPlot/PlotLayer3D.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,16 @@ class PlotLayer3D extends Observable {
213213
const primitives = scene.primitives;
214214
const length = primitives.length;
215215
for (let i = 0; i < length; i++) {
216-
const p = primitives.get(i);
217-
if (p.toGeoJSON) {
218-
base.features.push(p.toGeoJSON());
216+
const p = primitives.get(i);
217+
if (this._id === p._id) {
218+
const {_primitives} = p;
219+
for (let j = 0; j < _primitives.length; j++) {
220+
if (_primitives[j].toGeoJSON) {
221+
json.features.push(_primitives[j].toGeoJSON());
222+
}
219223
}
224+
break;
225+
}
220226
}
221227
return json;
222228
}

0 commit comments

Comments
 (0)