Show / Hide Table of Contents

Class KmlNode

A single node within a KML document.

Inheritance
System.Object
KmlNode
KmlContainer
KmlGroundOverlay
KmlNetworkLink
KmlPhotoOverlay
KmlPlacemark
KmlScreenOverlay
KmlTour
Implements
System.ComponentModel.INotifyPropertyChanged
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Esri.ArcGISRuntime.Ogc
Assembly: Esri.ArcGISRuntime.dll
Syntax
public abstract class KmlNode : INotifyPropertyChanged
Remarks

KML is a file format used to display geographic data (geometric shapes, symbology and attributes). KML uses a tag-based structure with nested elements and attributes and is based on the XML standard. The KML files are often distributed in KMZ files, which are zipped KML files with a .kmz extension.

A KmlNode corresponds to the KML concept of a Feature. KmlNode is an abstract type that describes properties common to all KML Features, such as: Name, Description, IsVisible, Viewpoint, etc. The following table maps KML Features Types to ArcGIS Runtime types:

KML Feature Type Runtime Type Notes
Container KmlContainer Abstract type. Contains properties common to KmlDocument and KmlFolder.
Document KmlDocument
Folder KmlFolder
Placemark KmlPlacemark Properties can be found on individual overlay subtypes instead.
Overlay N/A
GroundOverlay KmlGroundOverlay
ScreenOverlay KmlScreenOverlay
PhotoOverlay KmlPhotoOverlay
NetworkLink KmlNetworkLink

Examining individual nodes may be useful for: viewing attributes of the KML data, seeing the organization/structure within the KmlDataset, toggling visibility of KML features, and navigating to specific KML features.

It should be noted that a typical KML document will have multiple levels of nested KML nodes. Therefore to accurately traverse through all of the KML node information in a KmlDataset, it is recommended to recursively test all KmlNodes to see if they contain additional child KmlNodes. When writing your recursive function pay particular attention to the properties: KmlDataset.RootNodes, KmlNetworkLink.ChildNodes, and KmlContainer.ChildNodes (inherited by KmlDocument and KmlFolder).

Properties

Name Description
Address

Gets or sets an address associated with this node.

BalloonBackgroundColor

Gets the color that should be used for the background of the node's popup balloon.

BalloonContent

Gets the balloon popup content for this KML node as a string containing HTML.

Description

Gets or sets the description of this KML node.

ExtendedNonSchemaData

Gets or sets the non-schema data present in the extended data of a KML node.

ExtendedSchemaData

Gets a collection of schema data present in the extended data of a KML node.

Extent

Gets the bounding extent of this KML node.

HighlightStyle

Gets or sets the style used to render this KML node when IsHighlighted is true.

Id

Gets or sets the ID of the KML node.

IsHighlighted

Gets or sets a value indicating whether this KML node is highlighted.

IsVisible

Gets or sets a value indicating whether this KML node is visible.

Name

Gets or sets the name of this KML node.

Parent

Gets the parent of this node.

RefreshError

Gets the reason for refresh failure if the RefreshStatus is Failed.

RefreshStatus

Gets the KML node's refresh status.

Snippet

Gets or sets the optional snippet for this KML node.

SnippetMaxLines

Gets or sets the maximum number of lines of snippet to be shown in the UI.

Style

Gets or sets the style used to render this KML node.

TimeExtent

Gets or sets the node's time extent.

UxIcon

Gets the icon associated with this KML node for use in the user interface.

UxIconColor

Gets the color used to tint the UX icon.

UxIconId

Gets the UX icon id.

Viewpoint

Gets or sets the KmlViewpoint associated with this KML node or null if no Camera or LookAt is specified for the node.

Methods

Name Description
OnPropertyChanged(String)

Called when a property changes.

SaveAsAsync(String)

Saves this node and any referenced local files as a KMZ archive.

WriteToAsync(Stream)

Saves this node and any referenced local files into the given System.IO.Stream as a KMZ archive.

Events

Name Description
PropertyChanged

Occurs when a property value changes.

Applies to

TargetVersions
.NET Standard 2.0100.4 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.4 - 200.7
Xamarin.Android100.4 - 100.15
Xamarin.iOS100.4 - 100.15
UWP100.4 - 200.7

Relevant samples

Create and save KML file: Construct a KML document and save it as a KMZ file.
Edit KML ground overlay: Edit the values of a KML ground overlay.
Identify KML features: Show a callout with formatted content for a KML feature.
List KML contents: List the contents of a KML file.
In This Article
Back to top Copyright © 2022 Esri.