cesium 根據 id 獲取實體 entity並移除實體

官方參考文檔 https://cesium.com/docs/cesiumjs-ref-doc/EntityCollection.html
我是在數據庫中記錄了entityid,每次調用接口,獲取到id,希望能獲取實體。
官方方法:getById
在這裏插入圖片描述
具體代碼:

const labelEntity = viewer.entities.getById(`bubbleLabelEntity`);

當然,也有移除實體:

viewer.entities.remove(labelEntity);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章