KML Network Link

Network Links are great ways to reference KML or KMZ files archive on a local or remote location. You can use the element to specify the location of the KML file. Within that element, you can define the refresh options for updating the file, based on time and camera change. NetworkLinks can be used in combination with Regions to handle very large datasets efficiently. Following is a code snippet in C# : –

public void AddSensorNetworkLink(XmlDocument doc, XmlNode DocumentNode, string sensor, string URL)
{
XmlNode NetworkLinkNode = doc.CreateElement("NetworkLink");
DocumentNode.AppendChild(NetworkLinkNode);
XmlNode nameNode = doc.CreateElement("name");
nameNode.AppendChild(doc.CreateTextNode(sensor));
NetworkLinkNode.AppendChild(nameNode);

XmlNode LinkNode = doc.CreateElement("Link");
NetworkLinkNode.AppendChild(LinkNode);
XmlNode hrefNode = doc.CreateElement("href");
hrefNode.AppendChild(doc.CreateTextNode(URL));
LinkNode.AppendChild(hrefNode);
}

Advertisements

About Paritosh Gupta

I am an M.Tech from IIT Roorkee and MBA from IIM Lucknow India. I am having more than 16 years of experience in design, development, Integration and implementation of Geographical Information System for various applications in Utilities, Watershed Management and Land records domains
This entry was posted in ArcObjects with Visual C# .NET. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s