Can network link reference multiple kml/kmz files?

596 views
Skip to first unread message

townie

unread,
Jun 22, 2006, 2:40:36 PM6/22/06
to KML Discussions
I'd like to have a network link KML that calls up several KMZ files within it. Is this possible or must I combine all data into one KMZ?

The approach I'm trying is outlined below. It works initially (displaying both dataset1 and dataset2) when the file is first loaded, but one of the links is always broken by refresh time. Also the connections to both datasets are lost when I try to save the network link KML to 'My Places'.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<NetworkLink>
<open>1</open>
<NetworkLink>
<name>DataSet1</name>
<visibility>1</visibility>
<open>1</open>
<Url> <href>http://www.mysite.com/kml/dataset1.kmz</href>
<refreshMode>onInterval</refreshMode>
<refreshInterval>3600</refreshInterval>
</Url>
<refreshVisibility>1</refreshVisibility>
</NetworkLink>
<NetworkLink>
<name>DataSet2</name>
<visibility>1</visibility>
<open>1</open>
<Url>
<href>http://www.mysite.com/kml/dataset2.kmz</href>
<refreshMode>onInterval</refreshMode>
<refreshInterval>3600</refreshInterval>
</Url>
<refreshVisibility>1</refreshVisibility>
</NetworkLink>
</NetworkLink>
</kml>

Thanks for your help!

barryhunter

unread,
Jun 22, 2006, 3:14:52 PM6/22/06
to KML Discussions
If you rewrite it to use folders to group the networklinks then it should work:


<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Folder>
<open>1</open>
<name>My Network Links</name>

<NetworkLink>
<name>DataSet1</name>
<visibility>1</visibility>
<open>1</open>
<Url> <href>http://www.mysite.com/kml/dataset1.kmz</href>
<refreshMode>onInterval</refreshMode>
<refreshInterval>3600</refreshInterval>
</Url>
<refreshVisibility>1</refreshVisibility>
</NetworkLink>
<NetworkLink>
<name>DataSet2</name>
<visibility>1</visibility>
<open>1</open>
<Url>
<href>http://www.mysite.com/kml/dataset2.kmz</href>
<refreshMode>onInterval</refreshMode>
<refreshInterval>3600</refreshInterval>
</Url>
<refreshVisibility>1</refreshVisibility>
</NetworkLink>
</Folder>
</kml>

Using two serperate links is probably better as then the user can opt to turn off only one link. Or use the folder tickbox to affect both.

townie

unread,
Jun 26, 2006, 2:01:11 PM6/26/06
to KML Discussions
Thanks a lot! Your suggestion worked...multiple network links can be nested within folders, but not a document tag or another network link.
Reply all
Reply to author
Forward
0 new messages