There is an error flying to entity in the event of waiting for the map to be loaded.
sandcastle Demo
This is my code.
const helper = new Cesium.EventHelper()
helper.add(viewer.scene.globe.tileLoadProgressEvent, (e) => {
if (e === 0) {
helper.removeAll()
const entity = viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(117, 30, 39),
point: {
color: Cesium.Color.RED,
size: 6
}
})
viewer.flyTo(entity)
}
})
Entity has been added to entities. Why is the array here empty