I build a winforms app in C# which embeds Google Earth as a viewer. Like this. My app receives data regularly, transforms that to KML, and displays the result in Google Earth. Whenever I receive the new update, I want to delete the old KML, but I could not find how in GE API. All I found is making the old stuff invisible:
this.ge = new ApplicationGEClass();
// ....
string newKml = this.ConvertNewInputToKML();
this.ge.LoadKmlData(ref newKml);
FeatureGE oldFeature = this.ge.GetFeatureByName("myOldKmlFeature");
oldFeature.Visibility = 0;
I wonder if this will cause memory/performance issue on the long run. Or is there a way to delete from Google Earth KML nodes?