Show / Hide Table of Contents

Class KmlDataset

Points to KML/KMZ content, either from a local file or the network. This object provides an entry point for traversing the tree of KmlNodes that make up the file.

Inheritance
System.Object
KmlDataset
Implements
ILoadable
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 sealed class KmlDataset : ILoadable, INotifyPropertyChanged
Remarks

Use the RootNodes property to obtain a KmlNodeCollection to traverse the KmlNode objects for examining/using individual KML features. The RootNodes is populated after a KML dataset has finished loading successfully.

A typical KML document will have multiple levels of nodes. Consider using recursion to discover the full collection of nodes in a KML file. See the guide doc and samples for details.

If a KML file has KmlNetworkLinks, the content can change after loading due to automatic refresh. You can use the System.ComponentModel.INotifyPropertyChanged.PropertyChanged event to detect changes and update your app's UI.

Constructors

Name Description
KmlDataset(KmlNode)

Initializes a new instance of the KmlDataset class, with the given KmlNode as its root node.

KmlDataset(Uri)

Initializes a new instance of the KmlDataset class.

Properties

Name Description
LoadError

Gets the System.Exception associated with the last load error.

LoadStatus

Gets the load status.

RootNodes

Gets this dataset's root KML nodes as a KmlNodeCollection.

Source

Gets the location of the KML data from which this dataset was created.

Methods

Name Description
CancelLoad()

Cancel loading metadata for the object.

LoadAsync()

Load the metadata for the object asynchronously.

RetryLoadAsync()

Loads or retries loading metadata for the object asynchronously.

Events

Name Description
BalloonPopupEvent

Event that is raised when a KmlTour requests that a balloon popup should be shown or hidden for a particular KmlNode.

Loaded

Event that is raised when the object is done loading.

LoadStatusChanged

Event that is raised when the LoadStatus property changes.

NetworkLinkControlMessage

Event that is raised when a network link control message is available for this dataset.

Name Description
INotifyPropertyChanged.PropertyChanged

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.
Display KML network links: Display a file with a KML network link, including displaying any network link control messages at launch.
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.