My App holds N map Instances.
I am looking for a generic way to inform other parts of my app that map X was destroyed.
Is there any built-in event by cesium that notifies the user when the viewer is destroyed ?
If not , is there any safe workaround for it?
I don’t believe there is any event or callback which runs when a viewer or scene instance is destroyed. I would recommend you manage a property to track this in your app rather than doing something like modify the Cesium source code.
I hope that helps!
Tnx for the reply .
I am using cesium with react, so I solved it
by detecting when the map container component unmounted and triggering my own event as you