A task used to export a tile cache (.tpk
or .tpkx
). Use this in conjunction with a map or image service to generate and download tile packages. More...
[explicit]
ExportTileCacheTask::ExportTileCacheTask(const QUrl &url, QObject *parent = nullptr)
Create an export tile cache task from a URL.
The map or image service must support tile cache export.
[override virtual noexcept]
ExportTileCacheTask::~ExportTileCacheTask()
Destructor.
[override virtual, since Esri::ArcGISRuntime 100.10]
QString ExportTileCacheTask::apiKey() const
Reimplements: ApiKeyResource::apiKey() const.
Returns the API key allows your app to access ArcGIS location services and private portal items.
An API key is a unique long-lived access token that is used to authenticate and monitor requests to ArcGIS location services and private portal items. You can create and manage an API key using your portal when you sign in with an ArcGIS Location Platform account or an ArcGIS Online account with administrator access or a custom role that has the `Generate API keys` privilege. To learn how to create and manage API keys, go to the Create an API Key tutorial. You must ensure that your API key has the correct privileges to access secure resources.
Note: An API key created with a referrer is not supported. If you need service requests to include the referrer, use the SDK's functionality to intercept the request and add an HTTP referer header.
In addition to setting an ArcGISRuntimeEnvironment::apiKey at a global level for your application, you can set it on any class that implements ApiKeyResource. This overrides the ArcGISRuntimeEnvironment::apiKey and enables more granular usage telemetry and management of ArcGIS location resources used by your app.
Classes that expose an API key property by implementing ApiKeyResource include:
For more information, see API key authentication and Types of authentication.
This function was introduced in Esri::ArcGISRuntime 100.10.
See also setApiKey().
[override virtual]
void ExportTileCacheTask::cancelLoad()
Reimplements: Loadable::cancelLoad().
Cancels loading metadata for the object.
Cancels loading the metadata if the object is loading.
See Loadable.
[since Esri::ArcGISRuntime 200.2]
QFuture<Esri::ArcGISRuntime::ExportTileCacheParameters> ExportTileCacheTask::createDefaultExportTileCacheParametersAsync(const Esri::ArcGISRuntime::Geometry &areaOfInterest, double minScale, double maxScale)
Creates and returns a QFuture of ExportTileCacheParameters.
This function is asynchronous because it makes use of the service metadata to build a ExportTileCacheParameters object. Calling the function will trigger load of the ExportTileCacheTask, unless it's already loaded.
The supported geometry types for the area of interest are Envelope and Polygon. The area of interest must have a spatial reference. When a Polygon is supplied, tiles will be filtered according to the polygon geometry, which can help reduce the size of the resulting tile package. Note that the filtered set of tiles may vary, depending on the underlying service.
The value of min_scale must be larger than the value of max_scale, unless they are 0. A min_scale value of 0 will result in this method choosing the services smallest level number, typically level 0.
Similarly, a max_scale of 0 will result in the services largest level number being used, representing the closest in view being visible when taken offline. If min_scale is between the scales of tile levels the previous smallest level is used.
If max_scale is between tile levels the next level is taken to ensure it is displayed. For example a simple service has 4 levels: level 0 scale 2000000; level 1 scale 1000000; level 2 scale 500000; level 3 scale 250000.
A min_scale of 0 and max_scale of 0 selects all levels 0,1,2,3.
A min_scale of 750000 (between levels 1 and 2) and a max_scale of 25000 (at level 3) will select levels 1,2,3.
A min_scale of 0 and a max_scale 750000 (between 1 and 2) will select levels 0,1,2.
A min_scale of 1000000 and a max_scale of 0 will select all levels from 1 onwards 1,2,3.
Be careful when combining a large extent or a wide range of scales, this can result in the export failing due to exceeding the services maximum export tile count.
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 ExportTileCacheTask::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.
Returns a job that can be used to get a size estimate of the tile package contaning tiles specified by the parameters.
An EstimateTileCacheSizeJob, representing the progress on the server, is returned. The result of the job will be of type EstimateTileCacheSizeResult, which will describe the estimated size and number of tiles.
Note: The job is initially in the JobStatus::NotStarted state. It can be started by calling Job::start(). The job should be deleted after completion.
See also Job.
Esri::ArcGISRuntime::ExportTileCacheJob *ExportTileCacheTask::exportTileCache(const Esri::ArcGISRuntime::ExportTileCacheParameters ¶meters, const QString &downloadFilePath)Returns a job that can be used to download a tile package from an ArcGIS map or image service.
The extent, image compression, and other characteristics of the output tile package are determined by the supplied parameters. The tile package will be downloaded to the location specified in the downloadFilePath.
The resulting job will export tiles from the service, which is referenced by the url property (or its export-enabled alternative), to a local tile cache at the downloadFilePath. The format of the tile cache is determined by the file extension supplied in the downloadFilePath parameter.
If the service does not support exporting tiles, the job will fail with an error code of 7007.
If a .tpkx
format was requested, but the format is not supported by the service, the job will fail with an error code of 7024.
A ExportTileCacheJob, representing the progress on the server, is returned. The result of the job will be of type TileCache, which can be used to create an ArcGISTiledLayer.
Note: The job is initially in the JobStatus::NotStarted state. It can be started by calling Job::start(). The job should be deleted after completion.
See also Job.
[override virtual]
void ExportTileCacheTask::load()
Reimplements: Loadable::load().
Loads the metadata for the object asynchronously.
Loads the metadata if the object is not loaded
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Error ExportTileCacheTask::loadError() const
Reimplements: Loadable::loadError() const.
Returns the load error.
See Loadable.
See also Error.
[override virtual]
Esri::ArcGISRuntime::LoadStatus ExportTileCacheTask::loadStatus() const
Reimplements: Loadable::loadStatus() const.
Returns the load status.
See Loadable.
See also LoadStatus.
[signal]
void ExportTileCacheTask::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)
Signal emitted when the load status changes for this object.
See also Loadable.
Esri::ArcGISRuntime::ArcGISMapServiceInfo ExportTileCacheTask::mapServiceInfo() constReturns the task's ArcGISMapServiceInfo
If created with a URL, this property will be populated after the task has been loaded. Before then, empty will be returned.
In the case of Esri provided image basemaps or elevation sources, the meta-data will be for the export-enabled version of the service.
[override virtual]
void ExportTileCacheTask::retryLoad()
Reimplements: Loadable::retryLoad().
Loads or retries loading metadata for the object asynchronously.
Will retry loading the metadata if the object is failed to load. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded.
See Loadable.
[override virtual, since Esri::ArcGISRuntime 100.10]
void ExportTileCacheTask::setApiKey(const QString &apiKey)
Reimplements: ApiKeyResource::setApiKey(const QString &apiKey).
Sets the API key to apiKey.
This function was introduced in Esri::ArcGISRuntime 100.10.
See also apiKey().
[override virtual]
QUrl ExportTileCacheTask::url() const
Reimplements: RemoteResource::url() const.
Returns the task's service URL.
This property is only writable when the task is in load status LoadStatus::NotLoaded.
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