[bug] Network Link problems

12 views
Skip to first unread message

oneiros

unread,
Jul 14, 2005, 7:44:35 AM7/14/05
to KML Discussions
I've finally managed to get a Network Link with periodical refresh to work, and it's highlighted a few problems with both the KML documentation and the Google Earth client itself:

Firstly, the <refreshMode> element must be set to 'onInterval'. As far as I can see, this isn't mentioned anywhere in the spec.

Secondly, the refresh parameters must be nested within the <Url> element; in the documentation, they're listed as children of the <NetworkLink> element.

Thirdly (and this one's the killer), the <refreshInterval> element doesn't seem to work at all; it needs to be misspelt as <refreshInverval> for the specified value to be accepted!

Hope this is clear; if someone from the Keyhole team could confirm what I've seen it would be most appreciated. The last point in particular may cause some issues if and when the client is fixed.

Many thanks.

Camden_Daily

unread,
Jul 14, 2005, 11:21:20 AM7/14/05
to KML Discussions
I can confirm the lack of 'onInterval' in the documentation, and the fact that these need to be within the <url> tags. I've ended up having to set up my own network links in GE manually and then right clicking them and saving them to inspect the resulting file.

I can also confirm the refreshInverval is indeed spelled wrong, but needs to be spelled that way to correctly work.

(Also, in the documentation, a number of the 'anchor' links are broken.)

ink_polaroid

unread,
Jul 14, 2005, 12:22:57 PM7/14/05
to KML Discussions
All noted, all will be fixed. Many thanks.

Stadsman

unread,
Jul 14, 2005, 7:56:37 PM7/14/05
to KML Discussions
I tried to use the workaround as follows but couldn't solve the problem:

===================================

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<NetworkLink>
<name>Test Network Link</name>
<open>1</open>
<Url>
<href>test.kmz</href>
<refreshMode>onInterval</refreshMode>
<refreshInverval>10</refreshInverval>
</Url>
</NetworkLink>
</kml>

===================================

Still doesn't seem to refresh...

Any tips?

ink_polaroid

unread,
Jul 14, 2005, 9:16:05 PM7/14/05
to KML Discussions
There's nothing wrong with your KML, so I'd guess that there's a problem with the test.kmz file. How are you updating it?

mcshea98

unread,
Jul 14, 2005, 9:40:54 PM7/14/05
to KML Discussions
Stadsman,

If the following is from your exact code, then ...
Code:
<Url>
<href>test.kmz</href>
<refreshMode>onInterval</refreshMode>
<refreshInverval>10</refreshInverval>
</Url>


This part of your kml tells me that your file test.kml and the file test.kmz MUST be in the same directory and that they are on your computer, not somewhere else. If they are not, you will get the following error:

"Fetch or network link 'name_goes_here' failed '(Path goes here)': No such file or directory.

Does this help?

Stadsman

unread,
Jul 15, 2005, 4:18:32 AM7/15/05
to KML Discussions
The test.kmz is a simple placemark with an image in the description area that is pulled from the web (it actually is a still image from a webcam). I've basically tried any refresh/update setting to get it to work but none does. The image shows but stays the same.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Placemark>
<description><!CDATA[<img src="http://www.vid.nl/ImageCamera/cam_5.jpg">]]></description>
<name>Test Placemark</name>
<LookAt id="khLookAt1521">
<longitude>5.450150615910606</longitude>
<latitude>52.37543080603724</latitude>
<range>134230.0014479083</range>
<tilt>4.185474337102344e-011</tilt>
<heading>-0.0001420648917350513</heading>
</LookAt>
<styleUrl>root://styleMaps#default+nicon=0x307+hicon=0x317</styleUrl>
<Style id="khStyle1522">
<IconStyle id="khIconStyle1526">
<Icon>
<href>root://icons/palette-4.png</href>
<x>160</x>
<y>64</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
</Style>
<Point id="khPoint1529">
<coordinates>5.017950382279949,52.16594242994907,0</coordinates>
</Point>
</Placemark>
</kml>

jrohlf

unread,
Aug 2, 2005, 5:28:22 PM8/2/05
to KML Discussions
Images in the description balloon are currently cached and only refreshed on startup. Alternately you can specify your webcam url as the placemark's icon:


<Placemark>
<description><!CDATA[<img src="http://www.vid.nl/ImageCamera/cam_5.jpg">]]></description>
<name>Test Placemark</name>
<LookAt id="khLookAt1521">
<longitude>5.450150615910606</longitude>
<latitude>52.37543080603724</latitude>
<range>134230.0014479083</range>
<tilt>4.185474337102344e-011</tilt>
<heading>-0.0001420648917350513</heading>
</LookAt>
<styleUrl>root://styleMaps#default+nicon=0x307+hicon=0x317</styleUrl>
<Style id="khStyle1522">
<IconStyle id="khIconStyle1526">
<Icon>
<href>http://www.vid.nl/ImageCamera/cam_5.jpg</href>
</Icon>
<scale>6</scale>

Hulk

unread,
Aug 5, 2005, 5:21:54 PM8/5/05
to KML Discussions
So are all those magical incantations documented? nicon/hicon - those style ids "khStyle1522" do they matter or is it to keep the syntax checker happy?

Stadsman

unread,
Aug 6, 2005, 9:27:21 PM8/6/05
to KML Discussions
I had the images as an icon before but it was completely unusable as many of the webcams I want to include are too close to each other.
Reply all
Reply to author
Forward
0 new messages