A KML dataset represents the current state of the KML data specified in a KML/KMZ file. More...
Header: | #include <KmlDataset.h> |
Since: | Esri::ArcGISRuntime 100.4 |
Inherits: | Esri::ArcGISRuntime::Object, Esri::ArcGISRuntime::Loadable, and Esri::ArcGISRuntime::RemoteResource |
Public Functions
KmlDataset(const QUrl &url, QObject *parent = nullptr) | |
KmlDataset(Esri::ArcGISRuntime::KmlNode *rootNode, QObject *parent = nullptr) | |
KmlDataset(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr) | |
virtual | ~KmlDataset() override |
QList<Esri::ArcGISRuntime::KmlNode *> | rootNodes() const |
Reimplemented Public Functions
virtual void | cancelLoad() override |
virtual Esri::ArcGISRuntime::Credential * | credential() const override |
virtual void | load() override |
virtual Esri::ArcGISRuntime::Error | loadError() const override |
virtual Esri::ArcGISRuntime::LoadStatus | loadStatus() const override |
virtual Esri::ArcGISRuntime::RequestConfiguration | requestConfiguration() const override |
virtual void | retryLoad() override |
virtual void | setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override |
virtual QUrl | url() const override |
Signals
void | doneLoading(const Esri::ArcGISRuntime::Error &loadError) |
void | kmlNetworkLinkMessageReceived(Esri::ArcGISRuntime::KmlNetworkLink *networkLink, const QString &message) |
void | kmlNodeBalloonVisibilityChanged(Esri::ArcGISRuntime::KmlNode *target, bool balloonVisibility) |
void | kmlNodeRefreshStatusChanged(Esri::ArcGISRuntime::KmlNode *target, Esri::ArcGISRuntime::KmlRefreshStatus refreshStatus) |
void | loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus) |
Detailed Description
The KML Dataset provides an entry point to traverse the tree of KML nodes that make up the KML document. You can create a KML dataset from an existing KML/KMZ file by using KmlDataset(const QUrl&, QObject*) or you can create a new KML dataset by using a specified root node (KmlDataset(Esri::ArcGISRuntime::KmlNode*, QObject*)).
Relevant samples:
- Display KML: Display KML from a URL, portal item, or local KML 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.
- List KML contents: List the contents of a KML file.
Member Function Documentation
[explicit, since Esri::ArcGISRuntime 100.4]
KmlDataset::KmlDataset (const QUrl &url, QObject *parent = nullptr)
Creates a KML dataset from the provided path to a KML/KMZ file.
- url - The location of the file, either on disk or from the network.
- parent - The optional parent QObject.
KML dataset is the source of KML information backing a KML layer. You can use the KML dataset to interact with the contents of a KML layer. Licensing for KML depends on the method of access. Accessing files on disk requires an ArcGIS Runtime 'Standard' license level.
This function was introduced in Esri::ArcGISRuntime 100.4.
[explicit, since Esri::ArcGISRuntime 100.6]
KmlDataset::KmlDataset (Esri::ArcGISRuntime::KmlNode *rootNode , QObject *parent = nullptr)
Creates a KML dataset from the specified root node.
- rootNode - The root KML node with which to create a KML dataset.
- parent - The optional parent QObject.
KML dataset is the source of KML information backing a KML layer. You can use the KML dataset to interact with the contents of a KML layer. Licensing for KML depends on the method of access. Creating a KML dataset from a root node requires an ArcGIS Runtime 'Standard' license level.
This function was introduced in Esri::ArcGISRuntime 100.6.
KmlDataset::KmlDataset (const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
Constructor that takes a url, credential and an optional parent.
url may be a network resource or a local .kml or .kmz file.
[override virtual]
KmlDataset::~KmlDataset ()
Destructor.
[override virtual]
void KmlDataset::cancelLoad ()
Reimplements: Loadable::cancelLoad().
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Credential *KmlDataset::credential() const
Reimplements: RemoteResource::credential() const.
Returns the security credential used to access the KML dataset.
[signal]
void KmlDataset::doneLoading (const Esri::ArcGISRuntime::Error &loadError )
Signal emitted when this object is done loading.
- loadError - Details about any error that may have occurred.
Note: If there is a load error it will also be emitted on the errorOccurred signal.
[signal]
void KmlDataset::kmlNetworkLinkMessageReceived (Esri::ArcGISRuntime::KmlNetworkLink *networkLink , const QString &message)
Signal emitted when a KML dataset network link message is available.
This is used to deliver a popup message, such as usage guidelines for the network link. The message is available when the network link is first loaded, or when it is changed in the network link control.
- networkLink - the KmlNetworkLink that had the new message.
- message - the message.
The returned KmlNetworkLink object has the KmlDataset as its parent.
See also Returned QObjects Parenting.
[signal, since Esri::ArcGISRuntime 100.7]
void KmlDataset::kmlNodeBalloonVisibilityChanged (Esri::ArcGISRuntime::KmlNode *target, bool balloonVisibility )
Signal emitted whenever a KML node's balloon visibility changes.
- target - the node target for the balloon visibility event.
- balloonVisibility - the visibility for the balloon.
The returned KmlNode object has the KmlDataset as its parent.
This function was introduced in Esri::ArcGISRuntime 100.7.
See also Returned QObjects Parenting.
[signal]
void KmlDataset::kmlNodeRefreshStatusChanged (Esri::ArcGISRuntime::KmlNode *target, Esri::ArcGISRuntime::KmlRefreshStatus refreshStatus )
Signal emitted when a KML refresh event is raised.
- target - the node target for the refresh event.
- refreshStatus - the refresh status of the KML node.
The returned KmlNode object has the KmlDataset as its parent.
See also Returned QObjects Parenting.
[override virtual]
void KmlDataset::load()
Reimplements: Loadable::load().
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Error KmlDataset::loadError () const
Reimplements: Loadable::loadError() const.
See Loadable.
[override virtual]
Esri::ArcGISRuntime::LoadStatus KmlDataset::loadStatus () const
Reimplements: Loadable::loadStatus() const.
See Loadable.
[signal]
void KmlDataset::loadStatusChanged (Esri::ArcGISRuntime::LoadStatus loadStatus )
Signal emitted when the load status changes for this object.
- loadStatus - The LoadStatus.
See also Loadable.
[override virtual]
Esri::ArcGISRuntime::RequestConfiguration KmlDataset::requestConfiguration () const
Reimplements: RemoteResource::requestConfiguration() const.
Returns the RequestConfiguration in use by this KML dataset.
See also setRequestConfiguration().
[override virtual]
void KmlDataset::retryLoad ()
Reimplements: Loadable::retryLoad().
See Loadable.
QList<Esri::ArcGISRuntime::KmlNode *> KmlDataset::rootNodes () const
Returns the KML dataset's root nodes.
KML files can have multiple root nodes, each of which may have children. When traversing the KML feature tree (for example to build a TOC), rootNodes is the correct starting point. Each root node can be the start of a tree of nodes.
[override virtual]
void KmlDataset::setRequestConfiguration (const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration )
Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).
Sets configuration parameters used for network requests sent by this KML dataset to requestConfiguration.
See also requestConfiguration().
[override virtual]
QUrl KmlDataset::url() const
Reimplements: RemoteResource::url() const.
Returns the URL to the KML dataset.
Returns the location of the KML/KMZ file, which can either be on disk or from the network. The URL of the backing file. Files can be loaded from local storage or the network. Note that KML files often point to network locations for their data (using network links). As a result, the loaded KML layer may display more information than is contained in the loaded KML file. KML files can point to network locations. These locations may be insecure (over plain text HTTP) even when the URL returned from this function is pointing to an SSL/TLS-secured resource.