1

I am having trouble getting a NetworkLinkControl KML command to work.

The drive.google.com URL matches Network Link to Slot 2 and I am trying to use NetworkLinkControl to delete kmlslot2.

I know the targetHref tag works, because I have successfully been able to append a placemark under the Network Link to Slot 2 directory, but have been unable to get the delete function to work.

Below is the KML text, along with an included picture of the KML that I am trying to modify. I am using Google Earth Pro 7.1.8 on macOS for reference.

**I just realized I was confusing name and object id, but even after adding an object id ex: <NetworkLink id="kmlslot2"> it still isn't working.

Any idea why this isn't working?

<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.2"> <NetworkLinkControl> <Update> <targetHref>https://drive.google.com/uc?export=download&amp;id=**</targetHref> <Delete> <NetworkLink targetId="kmlslot2"/> </Delete> </Update> </NetworkLinkControl> </kml>

KML to be modified

1 Answer 1

1

After 9 hours I finally figured it out, and hopefully nobody will have to repeat the troubleshooting I just did. The problem is described here.

This will give you "Security violation warnings"

On page 51 of the KML 2.1 reference doc at the bottom of the page... its states that

"the file containing the "NetworkLinkControl" must have been loaded by a network link. This is a key point.

Therefore create a separate update network link which points to your "Network_link_control" file.

Don't try and click on a link or load that file into Google Earth independently othwise you get the security violation warning. Its a very important mechanism which can get over looked very easily if your breezing over the docs!!!

Creating a local NetworkLink didn't work for me either, I had to upload my NetworkLinkControl.kml to the internet in order for it to run. Even with error reporting turned on, I never got a message that indicated I had a security violation, until I tried to run NetworkLinkControl via a local network link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.