Hi all,
I have the same problem as Blair. I can load a new KML file but the
old placemarks are not removed when removeChild() is called...
ge.getGlobe().getFeatures().removeChild(currentKml);
I have also tried...
var fc = ge.getGlobe().getFeatures().getFirstChild();
ge.getGlobe().getFeatures().removeChild(fc);
Check:
http://www.simpsonhaugh.co.uk/SimpsonHaugh/map/earth.php
If you click on any of the links...
Type | City | Name | Date | Status
You will notice the placemarks look like they have been removed when
the link is clicked.
And the new data is loaded (same placemarks in different folders)
However if you check by clicking a placemark you see in fact a
duplicate has been made.
In fact a duplicate is added every time the links are clicked...
I noticed people having the same issue with networklinks although I
happen to be using google.earth.fetchKml.
Is this a bug or somthing?
Regards,
Fraser.
On Jun 7, 12:47 pm, marquies wrote:
> Hi Blair,
>
> can you provide some demo code? What browser and version do you use?
>
> If youremovethe feature and set the reference to null it will be
> removed on the next call of the garbage collector. But this should
> have no effect to the GE Plug, if youremoveit, it should be removed.
> All methods for the feature container are described here:
>
>
http://code.google.com/apis/earth/documentation/API.html#GESchemaObje...
>
>
marquieswww.GONICUS.de
>
> On 7 Jun., 01:54, Blair wrote:
>
>
>
> > Hi Marquies,
>
> > I was able to make this work but it appears that the KML layers do not
> > completelyremove. For example it appears that parts of the KML
> > > > In my script I need toremovethis KML file before I load a new file.
> > > > How can Iremovea KML file already added?
>
> > > > Thanks,
> > > > Bjorn- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -