JA1
JA1

Reputation: 568

Network Linked KML to a Folder of KMLs

Using the below format as starting point I would like to know how to solve the following problem. This is an example for a Root KML file that links to other KMLs. My problem is that people modifying sub1.kml might change the name from sub1.kml to sub1-05-OCT-16.kml or want to add another KML called sub1-a.kml. Once this occurs the network link is no longer valid. I can't link to a folder from what I have seen and I do not want o have to change this file everytime. Is there an esiaer solution I'm overlooking?

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <NetworkLink>
        <name>NetworkLinked sub-item</name>
        <Link>
          <href> kml/sub1.kml </href>
        </Link>
    </NetworkLink>
    <NetworkLink>
        <name>NetworkLinked sub-item</name>
        <Link>
          <href> kml/sub2.kml </href>
        </Link>
    </NetworkLink>
  </Document>
</kml>

Upvotes: 1

Views: 644

Answers (1)

Christiaan Adams
Christiaan Adams

Reputation: 1385

A network link must point at a specific KML (or KMZ) file. Unfortunately there's no way to point it at a folder or directory and somehow get the list of files and pick out all the KML/KMZs. So you'll need to either make sure that the target file names stay the same, or update your NetworkLinks when they change.

Upvotes: 3

Related Questions