A task with methods related to taking a map offline and synchronizing online and offline maps. More...
Member Function Documentation[explicit]
OfflineMapTask::OfflineMapTask(Esri::ArcGISRuntime::Map *onlineMap, QObject *parent = nullptr)
Constructor that accepts an online map and a parent object.
[explicit]
OfflineMapTask::OfflineMapTask(Esri::ArcGISRuntime::PortalItem *portalItem, QObject *parent = nullptr)
Constructor that accepts a portal item and a parent object.
The PortalItem must be of type PortalItemType::WebMap
, either on ArcGIS Online or an on-premise ArcGIS Enterprise Portal.
[override virtual noexcept]
OfflineMapTask::~OfflineMapTask()
Destructor.
[override virtual]
void OfflineMapTask::cancelLoad()
Reimplements: Loadable::cancelLoad().
See Loadable.
[since Esri::ArcGISRuntime 200.2]
QFuture<Esri::ArcGISRuntime::DownloadPreplannedOfflineMapParameters> OfflineMapTask::createDefaultDownloadPreplannedOfflineMapParametersAsync(Esri::ArcGISRuntime::PreplannedMapArea *preplannedMapArea)
Returns a QFuture of DownloadPreplannedOfflineMapParameters created from the specified PreplannedMapArea.
A convenience method to create DownloadPreplannedOfflineMapParameters with default values appropriate for taking the specified map area offline.
The parameters will be populated using the values in the online map's OfflineSettings (if present).
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 200.2]
QFuture<Esri::ArcGISRuntime::GenerateOfflineMapParameters> OfflineMapTask::createDefaultGenerateOfflineMapParametersAsync(const Esri::ArcGISRuntime::Geometry &areaOfInterest)
Returns a QFuture of GenerateOfflineMapParameters created from the specified area of interest.
The supported geometry types for the area of interest are Envelope and Polygon. The area of interest must have a spatial reference.
Where a Polygon is supplied, features and tiles will be filtered according to the polygon geometry, which can help reduce the size of the resulting offline map. Note that the filtered set of tiles may vary, depending on the underlying service.
The returned parameters min scale and max scale are zero so data will be taken at the full range of scales the services support.
The returned GenerateOfflineMapParameters has its itemInfo property initialized from the offline map task's portal item, if that is set.
The ItemInfo's thumbnail will be copied from the portal item's thumbnail.
The default parameters will be populated using the values in the online map's OfflineSettings (if present).
If the map being taken offline contains a UtilityNetwork and is in an ArcGIS Enterprise 11.1 or later service, the Offline Capability selected for the UtilityNetwork such as "Trace utility network features" will automatically be reflected in the default parameters created by this method. If the map being taken offline contains a UtilityNetwork and is in an earlier version of ArcGIS Enterprise, the GenerateGeodatabaseParameters::utilityNetworkSyncMode property is set to UtilityNetworkSyncMode::SyncSystemTables for the Geodatabase containing the UtilityNetwork. Use createGenerateOfflineMapParameterOverridesAsync(const Esri::ArcGISRuntime::GenerateOfflineMapParameters&, QObject*) to change the UtilityNetworkSyncMode if desired.
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 200.2]
QFuture<Esri::ArcGISRuntime::GenerateOfflineMapParameters> OfflineMapTask::createDefaultGenerateOfflineMapParametersAsync(const Esri::ArcGISRuntime::Geometry &areaOfInterest, double minScale, double maxScale)
Returns a QFuture of GenerateOfflineMapParameters created from the specified area of interest, min scale and max scale.
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 200.2]
QFuture<Esri::ArcGISRuntime::GenerateOfflineMapParameterOverrides *> OfflineMapTask::createGenerateOfflineMapParameterOverridesAsync(const Esri::ArcGISRuntime::GenerateOfflineMapParameters ¶meters, QObject *parent = nullptr)
Returns a QFuture of GenerateOfflineMapParameterOverrides created from the specified GenerateOfflineMapParameters parameters.
When the task completes the GenerateOfflineMapParameterOverrides will be populated reflecting the values in the GenerateOfflineMapParameters parameters. The overrides may be inspected and modified to change the offline data before passing onto creating a job with Esri::ArcGISRuntime::OfflineMapTask::generateOfflineMap
If there are errors with loading individual layers or tables, or they cannot be taken offline due to service settings, the outcome depends on the value of GenerateOfflineMapParameters::continueOnErrors.
If GenerateOfflineMapParameters::continueOnErrors is true
, the overrides correspond to the remaining layers and tables that can go offline.
The resulting offline map will not contain the layers or tables which had errors.
If GenerateOfflineMapParameters::isContinueOnErrors is false
, the returned QFuture will complete containing an Error in the QFuture::error property from the failed layer or table.
To check upfront which layers or tables are valid for taking offline see offlineMapCapabilitiesAsync(const Esri::ArcGISRuntime::GenerateOfflineMapParameters&).
If GenerateOfflineMapParameters::referenceBasemapDirectory is set, the overrides corresponding to online basemap layers will be omitted, since no basemap layers will be downloaded.
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.
[signal]
void OfflineMapTask::doneLoading(const Esri::ArcGISRuntime::Error &loadError)
Signal emitted when this object is done loading.
Note: If there is a load error it will also be emitted on the errorOccurred signal.
[since Esri::ArcGISRuntime 100.4]
Esri::ArcGISRuntime::DownloadPreplannedOfflineMapJob *OfflineMapTask::downloadPreplannedOfflineMap(const Esri::ArcGISRuntime::DownloadPreplannedOfflineMapParameters ¶meters, const QString &downloadDirectoryPath)
Returns a job that is used to download the preplanned map area specified by the given parameters object.
"my_mobile_map_package"
in a parent directory "[my root path]/my_mobile_maps"
, this property would be "[my root path]/my_mobile_maps/my_mobile_map_package"
.Note: The job that is returned is not started and needs to be explicitly started. The job will fail if the last directory in the download directory path cannot be created or is not empty.
This function was introduced in Esri::ArcGISRuntime 100.4.
Esri::ArcGISRuntime::GenerateOfflineMapJob *OfflineMapTask::generateOfflineMap(const Esri::ArcGISRuntime::GenerateOfflineMapParameters ¶meters, const QString &downloadDirectoryPath)Returns a GenerateOfflineMapJob to run this OfflineMapTask.
"my_mobile_map_package"
in a parent directory "[my root path]/my_mobile_maps"
, this property would be "[my root path]/my_mobile_maps/my_mobile_map_package"
.[since Esri::ArcGISRuntime 100.4]
Esri::ArcGISRuntime::GenerateOfflineMapJob *OfflineMapTask::generateOfflineMap(const Esri::ArcGISRuntime::GenerateOfflineMapParameters ¶meters, const QString &downloadDirectoryPath, Esri::ArcGISRuntime::GenerateOfflineMapParameterOverrides *parameterOverrides)
Returns a job that is used to generate an offline map using the specified parameters and overrides.
"my_mobile_map_package"
in a parent directory "[my root path]/my_mobile_maps"
, this property would be "[my root path]/my_mobile_maps/my_mobile_map_package"
.Note: The job that is returned is not started and needs to be explicitly started. The job will fail if the last directory in the download directory path cannot be created or is not empty.
To create an instance GenerateOfflineMapParameterOverrides use {Esri::ArcGISRuntime::OfflineMapTask::createGenerateOfflineMapParameterOverridesAsync(const Esri::ArcGISRuntime::GenerateOfflineMapParameters&, QObject*)} {createGenerateOfflineMapParameterOverridesAsync(const Esri::ArcGISRuntime::GenerateOfflineMapParameters&, QObject*)}.
Some properties on GenerateOfflineMapParameters will be ignored when using GenerateOfflineMapParameterOverrides and replaced with equivalent properties for each service. The overridden properties are:
This function was introduced in Esri::ArcGISRuntime 100.4.
[override virtual]
void OfflineMapTask::load()
Reimplements: Loadable::load().
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Error OfflineMapTask::loadError() const
Reimplements: Loadable::loadError() const.
See Loadable.
[override virtual]
Esri::ArcGISRuntime::LoadStatus OfflineMapTask::loadStatus() const
Reimplements: Loadable::loadStatus() const.
See Loadable.
[signal]
void OfflineMapTask::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)
Signal emitted when the load status changes for this object.
See also Loadable.
[since Esri::ArcGISRuntime 200.2]
QFuture<Esri::ArcGISRuntime::OfflineMapCapabilities> OfflineMapTask::offlineMapCapabilitiesAsync(const Esri::ArcGISRuntime::GenerateOfflineMapParameters ¶meters)
Returns an async QFuture which, when successful, returns the OfflineMapCapabilities containing information on which layers will be included in an offline map.
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.
Esri::ArcGISRuntime::Map *OfflineMapTask::onlineMap() constReturns the online map.
Esri::ArcGISRuntime::PortalItem *OfflineMapTask::portalItem() constReturns the portal item.
[since Esri::ArcGISRuntime 100.2]
Esri::ArcGISRuntime::PreplannedMapAreaListModel *OfflineMapTask::preplannedMapAreaList() const
Returns the list of preplanned map areas populated by preplannedMapAreasAsync. Note that calling this method will load the OfflineMapTask if it is not already loaded.
This function was introduced in Esri::ArcGISRuntime 100.2.
See also PreplannedMapArea.
[since Esri::ArcGISRuntime 200.2]
QFuture<QList<Esri::ArcGISRuntime::PreplannedMapArea *>> OfflineMapTask::preplannedMapAreasAsync(QObject *parent = nullptr)
Returns an async QFuture which when successful, contains a list of preplanned map areas, if there are any.
Once the future is completed, all new PreplannedMapArea results will be availabe in the PreplannedMapAreaListModel immediately as well as the future's QList of results.
Note that calling this method will load the OfflineMapTask if it is not already loaded.
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.
See also preplannedMapAreaList.
[override virtual]
void OfflineMapTask::retryLoad()
Reimplements: Loadable::retryLoad().
See Loadable.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4