PreplannedMapArea Class

  • PreplannedMapArea
  • class Esri::ArcGISRuntime::PreplannedMapArea

    Represents a single preplanned offline map area. More...

    Header: #include <PreplannedMapArea.h>
    Since: Esri::ArcGISRuntime 100.2
    Inherits: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::Loadable

    Public Functions

    PreplannedMapArea(Esri::ArcGISRuntime::PortalItem *portalItem, QObject *parent = nullptr)
    virtual ~PreplannedMapArea() override
    Esri::ArcGISRuntime::Geometry areaOfInterest() const
    Esri::ArcGISRuntime::ImmutablePortalItemListModel *packageItems() const
    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


    void doneLoading(const Esri::ArcGISRuntime::Error &loadError)
    void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Detailed Description

    Offline map areas are specific work areas or major incident areas that are defined by an online map author ahead of time. Each online map can contain a number of offline map areas. These can be provided in a list by the OfflineMapTask::preplannedMapAreasAsync method. Each preplanned map area uses 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(const Esri::ArcGISRuntime::DownloadPreplannedOfflineMapParameters&, const QString&) method on the OfflineMapTask.

    To successfully load a PreplannedMapArea the packagingStatus must be PreplannedPackagingStatus::Complete.

    Member Function Documentation

    [explicit] PreplannedMapArea::PreplannedMapArea(Esri::ArcGISRuntime::PortalItem *portalItem, QObject *parent = nullptr)

    Constructor that accepts a PortalItem (portalItem) and an optional parent.

    Use this constructor to create an offline map area instance with a portal item that is of type map area.

    [override virtual] PreplannedMapArea::~PreplannedMapArea()


    Esri::ArcGISRuntime::Geometry PreplannedMapArea::areaOfInterest() const

    Returns the area of interest bounding the offline 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.

    [signal] void PreplannedMapArea::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.

    See also Loadable and Object.

    [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.

    [signal] void PreplannedMapArea::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Signal emitted when the loadStatus changes for this object.

    See also Loadable.

    [since Esri::ArcGISRuntime 100.14] Esri::ArcGISRuntime::ImmutablePortalItemListModel *PreplannedMapArea::packageItems() const

    Returns the portal items for packages related to this preplanned map area.

    When the offline map area has successfully loaded, this collection contains the portal items for the packages (tile packages or geodatabases) holding the offline data for the preplanned map area.

    This function was introduced in Esri::ArcGISRuntime 100.14.

    [since Esri::ArcGISRuntime 100.9] 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.

    If you attempt to load a PreplannedMapArea that is not PreplannedPackagingStatus::Complete the PreplannedMapArea will fail to load with an error of ErrorType::CommonIllegalState.

    There are four possible values:

    If the packaging status is PreplannedPackagingStatus::Processing you can check it again following these steps:

    This function was introduced in Esri::ArcGISRuntime 100.9.

    Esri::ArcGISRuntime::PortalItem *PreplannedMapArea::portalItem() const

    Returns the portal item that this offline map area was created from.

    [override virtual] void PreplannedMapArea::retryLoad()

    Reimplements: Loadable::retryLoad().

    See Loadable.

    [since Esri::ArcGISRuntime 100.6.0] Esri::ArcGISRuntime::OfflineMapUpdateCapabilities *PreplannedMapArea::updateCapabilities() const

    Returns the methods for obtaining updates that are supported for this preplanned map area.

    There are two approaches for updating the features in a preplanned offline map area:

    • Syncing directly with feature services.
    • Downloading scheduled updates (or update packages) from the online map area.

    Choose the approach that best suits your workflow, then select the appropriate DownloadPreplannedOfflineMapParameters::updateMode. For more details on how to update an offline map, see the OfflineMapSyncTask.

    If OfflineMapUpdateCapabilities::isSupportsSyncWithFeatureServices is true, you can sync directly with feature services. This mode gives you full control over when you upload and download changes. However, performing a download sync places significant load on the backing feature service, so this approach does not scale well for very large deployments. Set the DownloadPreplannedOfflineMapParameters::updateMode to PreplannedUpdateMode::SyncWithFeatureServices to use this approach.

    If OfflineMapUpdateCapabilities::isSupportsScheduledUpdatesForFeatures is true, you can download read-only update packages from the online map area. Updates are prepared on a regular schedule and cached for download by all users of the offline map area. Sharing a single set of cached updates, rather than performing individual sync operations, reduces the load on the back-end services. This approach is scalable for large deployments but does not support offline editing. Set the DownloadPreplannedOfflineMapParameters::updateMode to PreplannedUpdateMode::DownloadScheduledUpdates to use this approach.

    Note that scheduled updates is an optimization that must be enabled by the web map author when the map area is created.

    If both of the above OfflineMapUpdateCapabilities are true, and the feature services in your online map support creating new features, you can adopt a hybrid update model where you download read-only update packages while uploading new features directly to the feature service. This approach combines the scalability of downloading scheduled updates with the ability to collect data in the field. However, note that this approach is strictly add only, meaning that you cannot delete or edit features once they have been uploaded to the feature service. Set the DownloadPreplannedOfflineMapParameters::updateMode to PreplannedUpdateMode::DownloadScheduledUpdatesAndUploadNewFeatures to use this approach.

    This property will return nullptr until the offline map area is loaded.

    This function was introduced in Esri::ArcGISRuntime 100.6.0.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.