Skip To Content ArcGIS for Developers Sign In Dashboard

KmlNode Class

class Esri::ArcGISRuntime::KmlNode

A KML Node. More...

This class was introduced in Esri::ArcGISRuntime 100.4.

Public Functions

virtual ~KmlNode() override
QString address() const
QColor balloonBackgroundColor() const
QString balloonContent() const
QString description() const
Esri::ArcGISRuntime::Envelope extent() const
Esri::ArcGISRuntime::KmlStyle *highlightStyle()
bool isHighlighted() const
bool isVisible() const
QString kmlNodeId() const
Esri::ArcGISRuntime::KmlNodeType kmlNodeType() const
QString name() const
Esri::ArcGISRuntime::KmlNode *parentNode() const
Esri::ArcGISRuntime::Error refreshError() const
Esri::ArcGISRuntime::KmlRefreshStatus refreshStatus() const
Esri::ArcGISRuntime::TaskWatcher saveAs(const QString &kmzFile) const
void setAddress(const QString &address)
void setDescription(const QString &description)
void setHighlightStyle(Esri::ArcGISRuntime::KmlStyle *highlightStyle)
void setHighlighted(bool highlighted)
void setKmlNodeId(const QString &kmlNodeId)
void setName(const QString &name)
void setSnippet(const QString &snippet)
void setSnippetMaxLines(int maxLines)
void setStyle(Esri::ArcGISRuntime::KmlStyle *style)
void setViewpoint(const Esri::ArcGISRuntime::KmlViewpoint &viewpoint)
void setVisible(bool visible)
QString snippet() const
int snippetMaxLines() const
Esri::ArcGISRuntime::KmlStyle *style()
QImage uxIcon() const
QColor uxIconColor() const
int uxIconId() const
Esri::ArcGISRuntime::KmlViewpoint viewpoint() const

Signals

void iconUpdated()
void refreshStatusChanged()
void saveAsCompleted(QUuid taskId)

Detailed Description

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.

Member Function Documentation

[signal] void KmlNode::iconUpdated()

Signal emitted when the uxIcon property changes for this KML node.

[signal] void KmlNode::refreshStatusChanged()

Signal emitted when the refreshStatus property changes for this KML node.

[signal] void KmlNode::saveAsCompleted(QUuid taskId)

The signal emitted when the saveAs task with the ID taskId completes.

[override virtual] KmlNode::~KmlNode()

Destructor.

QString KmlNode::address() const

Returns the address of the KML node.

Represents an unstructured address such as a street, city, state address, and/or a postal code.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also setAddress().

QColor KmlNode::balloonBackgroundColor() const

Returns the color mask to be applied to the KML node's balloon border.

QString KmlNode::balloonContent() const

Returns the balloon content that should be displayed in a balloon popup for the KML node.

QString KmlNode::description() const

Returns the description of the KML node.

See also setDescription().

Esri::ArcGISRuntime::Envelope KmlNode::extent() const

Returns the extent for the KML node.

Esri::ArcGISRuntime::KmlStyle *KmlNode::highlightStyle()

The KML node's highlight style. This style is used when the KML node has been highlighted / selected.

See also setHighlightStyle().

bool KmlNode::isHighlighted() const

Returns a flag indicating if the KML node is highlighted.

bool KmlNode::isVisible() const

Returns a flag indicating if the KML node is visible.

QString KmlNode::kmlNodeId() const

Returns the kmlNodeId of the KML node.

The kmlNodeId is a standard XML ID and can be empty.

This function was introduced in Esri::ArcGISRuntime 100.6.

See also setKmlNodeId().

Esri::ArcGISRuntime::KmlNodeType KmlNode::kmlNodeType() const

Returns the KmlNodeType of this KML Node object.

QString KmlNode::name() const

Returns the name of the KML node.

See also setName().

Esri::ArcGISRuntime::KmlNode *KmlNode::parentNode() const

Returns the KML node's parent.

Esri::ArcGISRuntime::Error KmlNode::refreshError() const

Returns the KML node's refresh error.

Esri::ArcGISRuntime::KmlRefreshStatus KmlNode::refreshStatus() const

Returns the KML node's refresh status.

Use the node refresh status to update the node's properties and update application UI.

  • KmlRefreshStatus::None - No action required.
  • KmlRefreshStatus::InProgress - Invalidate the node and its children. Application may show an appropriate UI cue such as a spinning wheel on top of the node's TOC icon to indicate in-progress status and to restrict user interaction with the node.
  • KmlRefreshStatus::Completed - Read and update the node's properties and its children.
  • KmlRefreshStatus::Error - Application may call refreshError to get the reason for failure and show the error message. Also, applications may show an appropriate UI cue such as a red X with the node's TOC icon to indicate the failed status.

See also refreshError.

Esri::ArcGISRuntime::TaskWatcher KmlNode::saveAs(const QString &kmzFile) const

Saves the node and any referenced local files into a zipped KMZ archive at local file path specified in kmzFile.

The node is saved to a KMZ file to ensure that any referenced files are available locally when sharing the KMZ file with others.

  • When this method is called on a leaf node (e.g. KmlPlacemark, KmlGroundOverlay, and so on), only that node and its referenced files are saved.
  • When this method is called on a container node (e.g. KmlDocument, KmlFolder), the node and all of its children and referenced files are saved.
  • When this method is called on a KmlNetworkLink, the link is saved but the children are not. This is because the children will be refetched when the saved KmlNetworkLink is loaded.

Saving referenced files will differ based on the type of path used for reference.

  • For HTTP paths, the path is saved as-is but the referenced file is not zipped into the archive, as it will be refetched when the new KMZ file is loaded.
  • For relative paths, the path is saved as-is and the referenced file is zipped relative to the root of the KMZ file.
  • For absolute paths, the path is converted to a relative path, and the referenced file is zipped into a "files" folder at the root of the KMZ file. For example, C:/icons/some_icon.png is converted to files/some_icon.png and stored at that location in the KMZ file.

The filename supports Unicode characters as well as nested directories

The saveAsCompleted signal is fired when a saveAs operation completes.

This function was introduced in Esri::ArcGISRuntime 100.6.

void KmlNode::setAddress(const QString &address)

Sets the address of the KML node.

Represents an unstructured address such as a street, city, state address, and/or a postal code.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also address().

void KmlNode::setDescription(const QString &description)

Sets the description of the KML node.

This function was introduced in Esri::ArcGISRuntime 100.6.

See also description().

void KmlNode::setHighlightStyle(Esri::ArcGISRuntime::KmlStyle *highlightStyle)

Sets the KML node's highlight style to highlightStyle.

This style is used when the KML node has been highlighted or selected.

See also highlightStyle().

void KmlNode::setHighlighted(bool highlighted)

Sets the isHighlighted property to highlighted.

See also isHighlighted().

void KmlNode::setKmlNodeId(const QString &kmlNodeId)

Sets the ID of this KML node to kmlNodeId.

This function was introduced in Esri::ArcGISRuntime 100.6.

See also kmlNodeId().

void KmlNode::setName(const QString &name)

Sets the name of the KML node.

This function was introduced in Esri::ArcGISRuntime 100.6.

See also name().

void KmlNode::setSnippet(const QString &snippet)

Sets the KML node's snippet.

See snippet

This function was introduced in Esri::ArcGISRuntime 100.6.

See also snippet().

void KmlNode::setSnippetMaxLines(int maxLines)

Sets the maximum number of lines of snippet to be shown in the UI to maxLines.

This function was introduced in Esri::ArcGISRuntime 100.6.

See also snippetMaxLines().

void KmlNode::setStyle(Esri::ArcGISRuntime::KmlStyle *style)

Sets the KML node's style to style.

See also style().

void KmlNode::setViewpoint(const Esri::ArcGISRuntime::KmlViewpoint &viewpoint)

Sets the KML node's viewpoint.

See viewpoint.

This function was introduced in Esri::ArcGISRuntime 100.6.

See also viewpoint().

void KmlNode::setVisible(bool visible)

Sets the isVisible property to visible.

See also isVisible().

QString KmlNode::snippet() const

Returns the KML node's snippet.

Snippets can be defined for KML nodes as an additional short description for UI display. If no snippet is specified, you can take the first few lines of the description. The maximum number of lines to display is specified by the snippetMaxLines property.

See also setSnippet().

int KmlNode::snippetMaxLines() const

Returns the maximum number of lines of snippet to be shown in the UI.

See also setSnippetMaxLines().

Esri::ArcGISRuntime::KmlStyle *KmlNode::style()

The KML node's style.

See also setStyle().

QImage KmlNode::uxIcon() const

Returns the UX icon of a KML node.

Use this icon to represent the KML node in the TOC or list item or any UI element.

QColor KmlNode::uxIconColor() const

Returns the color mask to be applied to the KML node's image buffer.

Returns a color mask that can be used to blend the image associated with KML node.

int KmlNode::uxIconId() const

Returns the UX icon id.

Esri::ArcGISRuntime::KmlViewpoint KmlNode::viewpoint() const

Returns the KML node's viewpoint.

The KML viewpoint is the specified vantage point for looking at the node. This can be used to show a particular node in the view (for example, if a user selected it in a TOC).

See also setViewpoint().


Feedback on this topic?