KmlNode Class

  • KmlNode
  • class Esri::ArcGISRuntime::KmlNode

    A KML Node. More...

    Public Functions

    virtual ~KmlNode() override
    QString address() const
    QColor balloonBackgroundColor() const
    QString balloonContent() const
    QString description() const
    Esri::ArcGISRuntime::KmlNonSchemaData *extendedNonSchemaData() const
    QList<Esri::ArcGISRuntime::KmlSchemaData *> extendedSchemaData() 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
    QFuture<void> saveAsAsync(const QString &kmzFile)
    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 setTimeExtent(const Esri::ArcGISRuntime::TimeExtent &timeExtent)
    void setViewpoint(const Esri::ArcGISRuntime::KmlViewpoint &viewpoint)
    void setVisible(bool visible)
    QString snippet() const
    int snippetMaxLines() const
    Esri::ArcGISRuntime::KmlStyle *style()
    Esri::ArcGISRuntime::TimeExtent timeExtent() const
    QImage uxIcon() const
    QColor uxIconColor() const
    int uxIconId() const
    Esri::ArcGISRuntime::KmlViewpoint viewpoint() const

    Signals

    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

    [override virtual] KmlNode::~KmlNode()

    Destructor.

    [since Esri::ArcGISRuntime 100.7] 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().

    [since Esri::ArcGISRuntime 200.5] Esri::ArcGISRuntime::KmlNonSchemaData *KmlNode::extendedNonSchemaData() const

    Returns the non schema data present in extended data of a KML node.

    This function was introduced in Esri::ArcGISRuntime 200.5.

    [since Esri::ArcGISRuntime 200.5] QList<Esri::ArcGISRuntime::KmlSchemaData *> KmlNode::extendedSchemaData() const

    Returns an array of schema data present in extended data of a KML node.

    This function was introduced in Esri::ArcGISRuntime 200.5.

    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().

    [signal] void KmlNode::iconUpdated()

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

    bool KmlNode::isHighlighted() const

    Returns a flag indicating if the KML node is highlighted.

    Highlights the node if is_highlighted is true, unhighlights it otherwise. All of the connected map views will be updated. This controls whether the default style or an alternate 'highlighted' style (if present) is used for rendering the node. This is unrelated to the concept of selection in this API.

    bool KmlNode::isVisible() const

    Returns a flag indicating if the KML node is visible.

    [since Esri::ArcGISRuntime 100.6] 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.

    [signal] void KmlNode::refreshStatusChanged()

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

    [since Esri::ArcGISRuntime 200.2] QFuture<void> KmlNode::saveAsAsync(const QString &kmzFile)

    Saves the node and any referenced local files into a zipped KMZ archive.

    • kmzFile - The KMZ filepath to which the node should be saved.

    The node will be saved to a KMZ file to ensure that any referenced files are available locally when sharing the file with others. If this method is called on a leaf node (e.g. KMLPlacemark, KMLGroundOverlay, etc), only that node and its referenced files will be saved. If this method is called on container node (e.g. KMLDocument, KMLFolder), the node and all of its children and referenced files will be saved. If this method is called on a KMLNetworkLink, the link will be saved but the children will not. This is because the children will simply be refetched when the saved KMLNetworkLink is loaded. Saving referenced files will differ based on the type of reference. For HTTP paths, the path will be saved as is but the referenced file will not be zipped into the archive, as it will simply be refetched when the new KMZ is loaded. For relative paths, the path will be saved as is and the referenced file will be zipped relative to the root of the KMZ file. For absolute paths, the path will be converted to a relative path, and the referenced file will be zipped into a "files" folder at the root of the KMZ file. For example, "C:/icons/some_icon.png" would be 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. It must be non-empty and there must not be an existing file located there. Saving a node to a KMZ file requires an ArcGIS Runtime 'Standard' license level.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 100.7] 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().

    [since Esri::ArcGISRuntime 100.6] 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().

    [since Esri::ArcGISRuntime 100.6] 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().

    [since Esri::ArcGISRuntime 100.6] 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().

    [since Esri::ArcGISRuntime 100.6] 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().

    [since Esri::ArcGISRuntime 100.6] 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().

    [since Esri::ArcGISRuntime 100.11] void KmlNode::setTimeExtent(const Esri::ArcGISRuntime::TimeExtent &timeExtent)

    Sets the timeExtent to timeExtent.

    This function was introduced in Esri::ArcGISRuntime 100.11.

    See also timeExtent.

    [since Esri::ArcGISRuntime 100.6] 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().

    [since Esri::ArcGISRuntime 100.11] Esri::ArcGISRuntime::TimeExtent KmlNode::timeExtent() const

    Returns the KML node's time extent.

    Represents the TimeExtent equivalent of a KML node's TimeStamp or TimeSpan. A KmlContainer node such as KmlDocument or KmlFolder may have its own TimeExtent independent of its child nodes. All KML TimeStamps and TimeSpans specified in a KML/KMZ file are converted to their UTC TimeExtent equivalents.

    Examples:

    Kml TimeStampTimeExtent::startTimeTimeExtent::endTime
    20212021-01-01T00:00:002021-12-31T23:59:59
    2021-012021-01-01T00:00:002021-01-31T23:59:59
    2021-01-012021-01-01T00:00:002021-01-01T23:59:59
    2021-01-01T12:34:562021-01-01T12:34:562021-01-01T12:34:56
    Kml TimeSpanTimeExtent::startTimeTimeExtent::endTime
    2021 - 20222021-01-01T00:00:002022-12-31T23:59:59
    2021-012021-01-01T00:00:002021-02-28T23:59:59
    No beginning - 2021Infinite start time2021-12-31T23:59:59
    2021 - No end2021-01-01T00:00:00Infinite end time

    This function was introduced in Esri::ArcGISRuntime 100.11.

    See also setTimeExtent().

    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 used to tint the node's icon.

    A color mask that can be used to blend the image associated with the KML node. Pixels in the image are multiplied by this color channel-by-channel. Colors in KML are specified in ABGR order. When no UX icon is specified, you can use this color to draw a placeholder for use in the UI (for example, a legend). UX icons are not pre-tinted; it is the application's responsibility to apply the tint color to the UX icon before displaying it.

    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().

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.