ArcGIS Developers
Dashboard

KmlLayer QML Type

A layer that can visualize KML data. More...

Import Statement: import Esri.ArcGISRuntime 100.11
Since: Esri.ArcGISRuntime 100.4
Inherits:

Layer

Properties

Signals

Detailed Description

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.

Functional characteristics

KML represents features as a tree of nodes, including network links, folders, and place marks. 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 Runtime supports version 2.2 of the KML Standard, 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, which is useful 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 KmlDataset.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.

Performance characteristics

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.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

TypeDefault Property
ArcGISItemitem
KmlDatasetdataset

For samples, see:

See also Layer and Layer.

Property Documentation

[default] dataset : KmlDataset

The KML dataset to be associated with this KML layer.

The Kml dataset is the authoritative source for the layer's KML data. The KML dataset should be used when access to the tree of KML nodes is needed (for example to build a legend or toggle node visibility).

See also KmlDataset.


fullTimeExtent : TimeExtent

Returns the full time extent of the time aware layer (read-only).

Note: This property is only available after the time aware layer is loaded.

See also TimeExtent.


[default] item : ArcGISItem

An item used to create the KmlLayer.

KmlLayer can be created with an item or a KML dataset.


supportsTimeFiltering : bool

Returns whether the time aware layer supports filtering its contents by time values (read-only).


timeFilteringEnabled : bool

Whether the time aware layer participates in filtering based on the time extent of its geoview.


timeInterval : TimeValue

Returns a time interval that represents the suggested step size for use when manipulating the time extent (read-only).

Can be null if no time interval is suggested for this time aware object.

This information can be used to set the step size for a time slider control.

This property is available after the time aware layer is loaded.

See also TimeValue.


timeOffset : TimeValue

The time offset of the time aware layer.

The time offset is subtracted from the time extent set on the time aware layer's geoview. This can be used to overlay data from different periods of time for comparison.

Note: This property is only available after the layer is loaded.

See also TimeValue.


Signal Documentation

datasetChanged()

Emitted when the dataset property changes.

Note: The corresponding handler is onDatasetChanged.


fullTimeExtentChanged()

Emitted when the fullTimeExtent property of the time aware layer changes.

Note: The corresponding handler is onFullTimeExtentChanged.


supportsTimeFilteringChanged()

Emitted when the supportsTimeFiltering property of the time aware layer changes.

Note: The corresponding handler is onSupportsTimeFilteringChanged.


timeFilteringEnabledChanged()

Emitted when the timeFilteringEnabled property of the time aware layer changes.

Note: The corresponding handler is onTimeFilteringEnabledChanged.


timeIntervalChanged()

Emitted when the timeInterval property of the time aware layer changes.

Note: The corresponding handler is onTimeIntervalChanged.


timeOffsetChanged()

Emitted when the timeOffset property of the time aware layer changes.

Note: The corresponding handler is onTimeOffsetChanged.



Feedback on this topic?