PreplannedMapArea Class
Represents a single preplanned offline map area. More...
Header: | #include <PreplannedMapArea> |
Since: | Esri::ArcGISRuntime 100.2 |
Inherits: | Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::Loadable |
This class was introduced in Esri::ArcGISRuntime 100.2.
Public Functions
PreplannedMapArea(Esri::ArcGISRuntime::PortalItem *portalItem, QObject *parent = nullptr) | |
virtual | ~PreplannedMapArea() override |
Esri::ArcGISRuntime::Geometry | areaOfInterest() const |
Esri::ArcGISRuntime::TaskWatcher | contentItems() |
Esri::ArcGISRuntime::PreplannedPackagingStatus | packagingStatus() const |
Esri::ArcGISRuntime::PortalItem * | portalItem() const |
Esri::ArcGISRuntime::OfflineMapUpdateCapabilities * | updateCapabilities() const |
Reimplemented Public Functions
virtual void | cancelLoad() override |
virtual void | load() override |
virtual Esri::ArcGISRuntime::Error | loadError() const override |
virtual Esri::ArcGISRuntime::LoadStatus | loadStatus() const override |
virtual void | retryLoad() override |
Signals
void | contentItemsCompleted(QUuid taskId, Esri::ArcGISRuntime::ImmutablePortalItemListModel *contentItems) |
void | doneLoading(Esri::ArcGISRuntime::Error loadError) |
void | loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus) |
Detailed Description
Preplanned map areas are specific work areas or major incident areas that are defined by an online map author. Each online map can contain several map areas. These can be provided in a list by the OfflineMapTask::preplannedMapAreas method.
Each preplanned map area creates map content that is stored online.
Download this map content by running a DownloadPreplannedOfflineMapJob.
Create this job by passing the preplanned map area to the OfflineMapTask::downloadPreplannedOfflineMap method on the task.
To successfully load a PreplannedMapArea the PreplannedMapArea::packagingStatus must be PreplannedPackagingStatus}{PreplannedPackagingStatus::Complete}.
Member Function Documentation
PreplannedMapArea::PreplannedMapArea(Esri::ArcGISRuntime::PortalItem *portalItem, QObject *parent = nullptr)
Constructor that accepts a PortalItem (portalItem) and an optional parent.
Use this constructor to create a preplanned map area instance with a portal item that is of type map area.
[signal]
void PreplannedMapArea::contentItemsCompleted(QUuid taskId, Esri::ArcGISRuntime::ImmutablePortalItemListModel *contentItems)
Signal emitted when contentItems completes.
- taskId - The task ID that this signal corresponds to.
- contentItems - A list model containing the fetched content items.
The returned ImmutablePortalItemListModel object has the PreplannedMapArea as its parent.
This function was introduced in Esri::ArcGISRuntime 100.3.
See also Returned QObjects Parenting.
[signal]
void PreplannedMapArea::doneLoading(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 PreplannedMapArea::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)
Signal emitted when the loadStatus changes for this object.
See also Loadable.
[override virtual]
PreplannedMapArea::~PreplannedMapArea()
Destructor.
Esri::ArcGISRuntime::Geometry PreplannedMapArea::areaOfInterest() const
Returns the area of interest bounding the preplanned map area.
The area of interest is returned as a Geometry which can be either an Envelope or a Polygon depending on how the online map was created.
[override virtual]
void PreplannedMapArea::cancelLoad()
Reimplements: Loadable::cancelLoad().
See Loadable.
Esri::ArcGISRuntime::TaskWatcher PreplannedMapArea::contentItems()
Starts a task to fetch the content items for this preplanned map area.
This method populates an ImmutablePortalItemListModel with the content items for this preplanned area. The results of this operation are cached, so the same portal item instances will be returned with each subsequent call of this method.
This method returns a TaskWatcher for the asynchronous operation.
This function was introduced in Esri::ArcGISRuntime 100.3.
[override virtual]
void PreplannedMapArea::load()
Reimplements: Loadable::load().
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Error PreplannedMapArea::loadError() const
Reimplements: Loadable::loadError() const.
See Loadable.
[override virtual]
Esri::ArcGISRuntime::LoadStatus PreplannedMapArea::loadStatus() const
Reimplements: Loadable::loadStatus() const.
See Loadable.
Esri::ArcGISRuntime::PreplannedPackagingStatus PreplannedMapArea::packagingStatus() const
Returns the publishing status of the online map area.
This property allows you to check whether an online PreplannedMapArea is in a PreplannedPackagingStatus::Complete state and ready to be downloaded.
There are four possible values:
- PreplannedPackagingStatus::Unknown indicates that the metadata for the map area has not been fetched. This will be the value when the map area is LoadStatus::NotLoaded.
- PreplannedPackagingStatus::Processing indicates that the online map area is not yet ready to be downloaded. The packages required for the map area have not been packaged yet.
- PreplannedPackagingStatus::Failed indicates that an error was encountered while preparing the online map area or its packages. In this scenario, the map area cannot be downloaded until the web map author has resolved the errors.
- PreplannedPackagingStatus::Complete indicates the map area is ready for download and the data has been packaged.
If you attempt to download a PreplannedMapArea that is not PreplannedPackagingStatus::Complete the DownloadPreplannedOfflineMapJob will fail with Error::code 7022
.
If you attempt to create a set of DownloadPreplannedOfflineMapParameters by calling OfflineMapTask::createDefaultDownloadPreplannedOfflineMapParameters from a PreplannedMapArea that is not PreplannedPackagingStatus::Complete, the operation will also fail with Error::code 7022
.
If the packaging status is PreplannedPackagingStatus::Processing you can check it again following these steps:
- 1. Create a new PortalItem instance using the url in the portalItem.
- 2. Create a new PreplannedMapArea using the portal item.
- 3. Load the PreplannedMapArea and check packagingStatus.
This function was introduced in Esri::ArcGISRuntime 100.9.
Esri::ArcGISRuntime::PortalItem *PreplannedMapArea::portalItem() const
Returns the portal item that this preplanned map area was created from.
[override virtual]
void PreplannedMapArea::retryLoad()
Reimplements: Loadable::retryLoad().
See Loadable.
Esri::ArcGISRuntime::OfflineMapUpdateCapabilities *PreplannedMapArea::updateCapabilities() const
Describes what methods for obtaining updates are supported for this preplanned map area. This property will return an empty OfflineMapUpdateCapabilities until loaded.
This function was introduced in Esri::ArcGISRuntime 100.6.0.