The GenerateGeodatabaseJob requests that a sync-enabled ArcGIS feature service generates a geodatabase file and downloads it for offline use. More...
Header: | #include <GenerateGeodatabaseJob.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherits: | Esri::ArcGISRuntime::Job |
Public Functions
virtual | ~GenerateGeodatabaseJob() override |
Esri::ArcGISRuntime::Geodatabase * | result() const |
Detailed Description
To make a GenerateGeodatabaseJob, use the GeodatabaseSyncTask as follows:
- Construct and load the GeodatabaseSyncTask with a URL to a sync-enabled ArcGIS feature service.
- Create a Geometry to define the area of interest that you wish to take offline.
- Obtain the default GenerateGeodatabaseParameters for the area of interest by calling GeodatabaseSyncTask::createDefaultGenerateGeodatabaseParametersAsync(const Esri::ArcGISRuntime::Geometry&).
- Modify the GenerateGeodatabaseParameters as required.
- Use the GenerateGeodatabaseParameters to create a GenerateGeodatabaseJob by calling GeodatabaseSyncTask::generateGeodatabase(const Esri::ArcGISRuntime::GenerateGeodatabaseParameters&, const QString&). You must specify a path where the mobile geodatabase (.geodatabase file) is downloaded to.
Start the GenerateGeodatabaseJob and monitor progress. On completion, obtain the Geodatabase from the result.
Relevant samples:
- Edit and sync features: Synchronize offline edits with a feature service.
- Generate geodatabase replica from feature service: Generate a local geodatabase from an online feature service.
See also SyncGeodatabaseJob.
Member Function Documentation
[override virtual]
GenerateGeodatabaseJob::~GenerateGeodatabaseJob ()
Destructor.
Esri::ArcGISRuntime::Geodatabase *GenerateGeodatabaseJob::result() const
Returns for a successfully completed job, the result returns the local geodatabase. Otherwise, nullptr
is returned.
If the job is in progress then a nullptr
result is returned until the job successfully completes. The returned geodatabase is in a not loaded state; use Geodatabase::load to load it. A geodatabase downloaded in this way can contain features, annotation and dimensions that are accessed with the Geodatabase::geodatabaseFeatureTables, Geodatabase::geodatabaseAnnotationTables and Geodatabase::geodatabaseDimensionTables collections, respectively.