A layer that can visualize KML data.
public sealed class KmlLayer : Layer, INotifyPropertyChanged, ILoadable, ILayerContent, ITimeAware
Keyhole Markup Language (KML) is a specification for working with geographic content. KML files can contain 2D and 3D content, as well as links to content from the network. ArcGIS Maps SDK for .NET provides the ability to read .kml and .kmz files from disk or the network. You can also create, edit, and save KmlLayer's via the KmlDataset.
KML represents features as a tree of nodes, including network links, folders, and placemarks. Like ArcGIS features, place marks are defined with point, line, or polygon geometry. KML geometry, however, is always based on the WGS84 coordinate system. KML can also have attributes, but unlike ArcGIS feature services, a KML document does not use a schema to define a standard set of fields. ArcGIS Maps SDK for .NET supports version 2.2 of the KML specification as defined by the Open Geospatial Consortium (OGC).
Unique features of KML include network links and screen overlays. Network links are useful for retrieving network content on a specified interval—perfect for keeping a live map up to date. Network links can also be used to split a large KML file into multiple per-region KML files, with each being loaded only when the region is in view. Screen overlays can be used to show content, such as branding or a legend, on top of the view. Screen overlay content does not scroll with the map or react to user interaction.
All coordinates are expressed in latitude and longitude (using decimal degrees), and are based on the Wgs84 geographic coordinate system. Altitude is always expressed in meters. The geographic features can contain attribute information and various styles can be specified to render them. Ground Overlays allow images to be displayed for specific geographic objects or draped onto the map itself. Screen Overlays allow fixing images to the GeoView, and may be used for compasses, logos, legends, etc. Network Links give the ability to reference remote .kml or .kmz files, and refresh them periodically.
Loading the KmlLayer also loads its underlying KmlDataset, creating one if you didn't supply one through a constructor. The structure of a KML document can be examined through RootNodes after the KmlDataset has successfully loaded. Missing or inaccessible .kml and .kmz files would cause loading to fail. Missing resources referenced by the KML document (such as images or files referenced via a network link) will not prevent the layer from loading.
KML files can vary significantly in the features they use, including 3D models, network links, and refresh intervals. Not all features are supported in 2D and 3D. For example, 3D models only appear when the KML layer is shown in a scene. Many KML files consist solely of a pointer to another KML file and a refresh interval. For example, the National Weather Service distributes forecast maps in the United States this way.
Initializes a new instance of the KmlLayer class with the given dataset.
Initializes a new instance of the KmlLayer class from an ArcGIS Item.
Initializes a new instance of the KmlLayer class with a URI to a KML file.
Gets the KmlDataset associated with this KML layer.
Gets the temporal window that encapsulates the instance's complete set of data
Gets or sets a value indicating whether the instance respects any temporal filters that are applied to it.
Gets a value indicating whether the instance supports filtering its data based on time.
Gets a temporal value that represents the suggested temporal interval to use when sequentially stepping through the instance's data by time
Gets or sets the amount of time by which to offset the temporal values of data points in this instance when displaying the data in a GeoView
Raised when the FullTimeExtent of the instance's data changes
|.NET Standard 2.0||100.4 - 200.0|
|.NET 6.0||100.13 - 200.0|
|.NET 6.0 Windows||100.13 - 200.0|
|.NET 6.0 Android||200|
|.NET 6.0 iOS||200|
|.NET Framework||100.4 - 200.0|
|.NET 5||100.10 - 100.12|
|.NET Core 3.1||100.7 - 100.12|
|Android||100.4 - 100.15|
|iOS||100.4 - 100.15|
|UWP||100.4 - 200.0|