在使用cesium的绘制工具绘制点的时候,生成的实体点不能通过viewer.entities.remove来删除吗?
pointHandler = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Point);
pointHandler.drawEvt.addEventListener((res: any) => {
commStore.changeShowEditPlot(true);
pointEntity = res.object;
pointEntity.color = new Cesium.Color(1, 0, 0, 0.6);
pointEntity.outlineColor = new Cesium.Color(1, 1, 0, 1);
pointEntity.pixelSize = 20; //大小
pointEntity.outlineWidth = 5; //外线宽度
});
viewer.entities.remove(pointEntity); //这里删除实体不生效