Upload kml file periodically to update position in Google Earth

I want to download a kml file every 10 seconds from google earth, I found this example http://ukhas.org.uk/code:kml_live_update but it doesn't seem to 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 download every 10.kml, even I tried the kml file over the Internet ( http://code.google.com/apis/kml/documentation/Point.kml )

+4
source share
5 answers

The code in this example is valid, but the link link (href) is incorrect. You should try pasting the 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> 
+7
source

First up is a working example. You must provide a complete link to your kml file. In my GE version, this is a NetworkLink update every 10 seconds. In your case, to view the update (and the new kml update), you can try setting the preferences in Google Earth. In the context menu on the subelement of the kml file (NetFolder icon), you can select the "Update" tab (maybe a different name - my language is different from English) and select an interval of 10 seconds.

+1
source
 <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <NetworkLink> <Link> <href>every10.kml</href> <refreshMode>onInterval</refreshMode> <refreshInterval>10</refreshInterval> </Link> </NetworkLink> </kml> 
0
source

Worked for me:

load.kml

 <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <Document> <NetworkLink> <Link> <href>C:\Users\loran\kml\every10.kml</href> <refreshMode>onInterval</refreshMode> <refreshInterval>10</refreshInterval> </Link> </NetworkLink> </Document> </kml> 

Just make sure you have the full path in href

0
source

It loads, but does not approach the point, so that it looks as if it is not working. The real problem is a solid load point with scaling to this specific area.

0
source

All Articles