KML NetworkLinkControl blocks Document parsing

We have some KML files that have NetworkLinkControl as the first node. Since that node is not yet supported, it seems to block processing of the Document and hence Placemark nodes. Any ideas on how to deal with this situation? All I get is a console log of “KML - Unsupported feature node: NetworkLinkControl”. Here is the structure of our files. Thanks!

<?xml version="1.0" encoding="UTF-8"?>








I assume this is a copy/paste error but you have 2 nodes so this document is syntactically invalid xml/KML.

Once that was fixed, I could reproduce what you described. This looks like a clear cut bug. The problem is that according to the KML spec, you can only have a single root feature tag as a child of the tag. For example, change NetworkLinkControl in your example to Placemark and Google Earth will through an error and not load anything. The trick here is that NetworkLinkControl is apparently not a feature element and therefore can be under the KML element and a sibling to the actual feature element. This should (hopefully) be easy to detect and properly handle the rest of the file.

I’ll try to get this into 1.11 and I’ll update this thread when a fix is in.

Thanks Matthew!
Yes, my duplicate nodes were a copy/paste error.

Bumping this. Anything I can do to help?

Hi Ashley,

We plan to do work on this part of KML soon, but we are all focused on preparing for SIGGRAPH at the moment. I expect we’ll start to make progress here in late August.


Ashley, I thought we fixed this already, but apparently not. The problem is in the Document identification code around Basically the code is always expected the ‘Document’ element to be the first child of a kml root node, but as you can see that’s not always the case. The short term solution is for us to ignore any children that isn’t a feature node. Longer term we when we have NetworkLinkControl support, we will support those nodes as well. I opened a pull request with a fix: