Loading multiple KML files from 1 KML file

329 views
Skip to first unread message

Toby P

unread,
Jul 8, 2015, 10:38:44 AM7/8/15
to kml-suppor...@googlegroups.com
So far I have a script that creates a kml file for a coloured line.  It creates many kml files, each with a different line.

Is there a way of creating one KML file that when opened, loads all the lines/placemarks of the other KML files.

So far my KML file that loads all the other KML files looks like this:
NetworkLink>
<Name>4</Name>
<Link><href>TD000004.kml</href></Link>
</NetworkLink>
<NetworkLink>
<Name>5</Name>
<Link><href>TD000005.kml</href></Link>
</NetworkLink>
<NetworkLink>
<Name>6</Name>
<Link><href>TD000006.kml</href></Link>
</NetworkLink>

However all I get is a little picture icon at the side of the screen for each file it is linked to, however they don't all load.

Thank you

Jason M

unread,
Jul 12, 2015, 9:56:27 PM7/12/15
to kml-suppor...@googlegroups.com
For multiple networkLinks you need to wrap them in a parent <Document> like this:

<Document>
<NetworkLink>
  <Name>4</Name>
  <Link><href>TD000004.kml</href></Link>
</NetworkLink>
<NetworkLink>
  <Name>5</Name>
  <Link><href>TD000005.kml</href></Link>
</NetworkLink>
</Document>
</kml>
Reply all
Reply to author
Forward
0 new messages