I want to load a kml file every 10 seconds with google earth, I found this example http://ukhas.org.uk/code:kml_live_update but it seems it does not work.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<NetworkLink>
<Link>
<href>every10.kml</href>
<refreshMode>onInterval</refreshMode>
<refreshInterval>10</refreshInterval>
</Link>
</NetworkLink>
</Document>
</kml>
It does not load every10.kml, even I tried a kml file over internet (http://code.google.com/apis/kml/documentation/Point.kml )
The code you provided from the example is valid, but the link reference (href) is incorrect. You should try inserting a full URL, and it will work. Using the Point.kml file you provided, the working code should look like this:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<NetworkLink>
<Link>
<href>http://code.google.com/apis/kml/documentation/Point.kml</href>
<refreshMode>onInterval</refreshMode>
<refreshInterval>10</refreshInterval>
</Link>
</NetworkLink>
</Document>
</kml>
First - it is working example. You must specify full link to your kml file. In my version GE this NetworkLink update every 10 sec. In your case, for refresh view (and new update kml), you may try to setup settings in Google Earth. On context menu on subelement of kml file (NetFolder icon), you may choose Refresh tab (maybe other name - i have language differen from English) and choose 10 sec interval.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With