Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Discussions > Google Earth Plug-in > How to remove a KML file?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
thematicmapping.org  
View profile  
 More options Jun 4 2008, 8:15 pm
From: thematicmapping.org
Date: Wed, 4 Jun 2008 17:15:36 -0700 (PDT)
Local: Wed, Jun 4 2008 8:15 pm
Subject: How to remove a KML file?
Hi,

I'm using this code to overlay a KML file on GE:

var networkLink = gePreview.createNetworkLink("");
networkLink.setFlyToView(true);
var link = gePreview.createLink("");
link.setHref(kmzlink);
networkLink.setLink(link);
gePreview.getFeatures().replaceChild(networkLink);

In my script I need to remove this KML file before I load a new file.
How can I remove a KML file already added?

Thanks,
Bjorn


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marquies  
View profile  
 More options Jun 5 2008, 3:04 am
From: marquies
Date: Thu, 5 Jun 2008 00:04:25 -0700 (PDT)
Local: Thurs, Jun 5 2008 3:04 am
Subject: Re: How to remove a KML file?
Hi Bjorn,

check this code:

var networkLink = ge.createNetworkLink("");
networkLink.setFlyToView(true);
var link = ge.createLink("");
link.setHref('doc.kml');
networkLink.setLink(link);

ge.getGlobe().getFeatures().appendChild(networkLink);

// This removes the KML
ge.getGlobe().getFeatures().removeChild(networkLink);

On 5 Jun., 02:15, thematicmapping.org wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
thematicmapping.org  
View profile  
 More options Jun 5 2008, 6:16 pm
From: thematicmapping.org
Date: Thu, 5 Jun 2008 15:16:56 -0700 (PDT)
Local: Thurs, Jun 5 2008 6:16 pm
Subject: Re: How to remove a KML file?
Thanks marquies!

It works

On Jun 5, 8:04 am, marquies wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Blair  
View profile  
 More options Jun 6 2008, 7:54 pm
From: Blair
Date: Fri, 6 Jun 2008 16:54:08 -0700 (PDT)
Local: Fri, Jun 6 2008 7:54 pm
Subject: Re: How to remove a KML file?
Hi Marquies,

I was able to make this work but it appears that the KML layers do not
completely remove.  For example it appears that parts of the KML
remain referenced in memory by the globe.  This happens when I remove
the KML and add a new KML.  Have you seen this?  Is this a bug?  Is
there a way to clear all KML globally?  Thanks again.

Cheers,
Blair

On Jun 4, 11:04 pm, marquies wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marquies  
View profile  
 More options Jun 7 2008, 7:47 am
From: marquies
Date: Sat, 7 Jun 2008 04:47:27 -0700 (PDT)
Local: Sat, Jun 7 2008 7:47 am
Subject: Re: How to remove a KML file?
Hi Blair,

can you provide some demo code? What browser and version do you use?

If you remove the 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 you remove it, it should be removed.
All methods for the feature container are described here:

http://code.google.com/apis/earth/documentation/API.html#GESchemaObje...

marquies
www.GONICUS.de

On 7 Jun., 01:54, Blair wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fraser  
View profile  
 More options Jun 15 2008, 12:09 pm
From: fraser
Date: Sun, 15 Jun 2008 09:09:29 -0700 (PDT)
Local: Sun, Jun 15 2008 12:09 pm
Subject: Re: How to remove a KML file?
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jpwade_bsu  
View profile  
 More options Jun 15 2008, 10:50 pm
From: jpwade_bsu
Date: Sun, 15 Jun 2008 19:50:44 -0700 (PDT)
Local: Sun, Jun 15 2008 10:50 pm
Subject: Re: How to remove a KML file?
James Stafford @ barnabu.co.uk posted an example using setVisibility:
full html
http://www.barnabu.co.uk/ge-plugin/

a few quirks added here:
http://www.czmartin.com/jpw/asp_arcmap/gem_3d_netlink_multiples.html

jpwade
www.czmartin.com/jpw

On Jun 15, 9:09 am, fraser wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fraser  
View profile  
 More options Jun 15 2008, 11:17 pm
From: fraser
Date: Sun, 15 Jun 2008 20:17:11 -0700 (PDT)
Local: Sun, Jun 15 2008 11:17 pm
Subject: Re: How to remove a KML file?
Hmmm,

I neither using networklinks nor setViibility...

I'm using fetchKml and removeChild.

Check this page please I'm pretty sure there is a bug.

http://www.simpsonhaugh.com/SimpsonHaugh/map/fetchKml_bug.html

...

On Jun 16, 3:50 am, jpwade_bsu wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »