[explicit]
MobileMapPackage::MobileMapPackage(const QString &path, QObject *parent = nullptr)
Constructor that takes a file path and an optional parent.
The path can refer to a file with a .mmpk extension or a directory containing an unpacked mobile map package.
Note: Constructing a MobileMapPackage from a path to a .mmpk
file does not load the MobileMapPackage automatically. You must call load to load it explicitly.
[override virtual noexcept]
MobileMapPackage::~MobileMapPackage()
Destructor.
[override virtual]
void MobileMapPackage::cancelLoad()
Reimplements: Loadable::cancelLoad().
See Loadable.
[since Esri::ArcGISRuntime 100.6]
void MobileMapPackage::close()
Closes a mobile map package.
Closes a mobile map package and frees file locks on the underlying .mmpk
file or directory.
All references to mobile map package data (maps, layers, tables, networks, locators, etc.) should be released before closing the package. If active references to mobile map package data exist, this method will still close the package, but subsequent rendering and data access methods will fail. Results of accessing mobile map package data after close are undefined.
After closing a mobile map package, the underlying .mmpk
file or directory can be moved or deleted.
Closing a mobile map package is not necessary if the package has not been loaded.
This function was introduced in Esri::ArcGISRuntime 100.6.
See also Geodatabase::close.
[signal]
void MobileMapPackage::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.5]
Esri::ArcGISRuntime::Expiration MobileMapPackage::expiration() const
Gets expiration details for this mobile map package, if provided.
Expiration details provide:
These expiration details can be specified when the author creates a mobile map package using ArcGIS Pro (from version 2.4). This requires the ArcGIS Pro Publisher Extension. Mobile map packages created with the OfflineMapTask do not support expiration.
By publishing a package with expiration details, the author can control the experience an end-user has when they try to access information that is no longer valid. For example, for time limited data (such as major sporting events), the author can ensure that the data cannot be accessed after the expiry date.
During package loading, this API will determine whether the mobile map package was authored with expiration. If so, then this property will be populated.
If the package has expired and was authored as ExpirationType::preventExpiredAccess, loading will fail and you will not be able to access the maps. The expiration details will be accessible for you to examine and/or communicate to the user.
You should check Expiration::isEmpty to see whether the returned expiration object is valid.
This function was introduced in Esri::ArcGISRuntime 100.5.
[static, since Esri::ArcGISRuntime 100.2]
Esri::ArcGISRuntime::MobileMapPackage *MobileMapPackage::instance()
Returns an instance of the MobileMapPackage singleton.
The instance is used to connect to the Object::errorOccurred, unpackCompleted signals. You do not need to obtain the instance to call the static methods on the MobileMapPackage.
This function was introduced in Esri::ArcGISRuntime 100.2.
Esri::ArcGISRuntime::Item *MobileMapPackage::item() constThe mobile map package's Item describing metadata about the package.
The item includes the metadata about the mobile map package, such as:
If the package was created with ArcGIS Pro, the metadata was provided by the package author. If the package was created using the OfflineMapTask, the metadata was provided by the originating web map.
A package's item will be an instance of a LocalItem.
Returns nullptr
if the package is not loaded.
[override virtual]
void MobileMapPackage::load()
Reimplements: Loadable::load().
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Error MobileMapPackage::loadError() const
Reimplements: Loadable::loadError() const.
See Loadable.
[override virtual]
Esri::ArcGISRuntime::LoadStatus MobileMapPackage::loadStatus() const
Reimplements: Loadable::loadStatus() const.
See Loadable.
[signal]
void MobileMapPackage::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)
Signal emitted when the load status changes for this object.
See also Loadable.
Esri::ArcGISRuntime::LocatorTask *MobileMapPackage::locatorTask() constGets the locator contained in the mobile map package as a LocatorTask.
Use this task to geocode and reverse-geocode addresses and places. There is only one LocatorTask in each mobile map package but it can be used by all maps.
Returns nullptr
if there is no LocatorTask in the package or the package is not loaded.
Gets a list of the maps contained in the mobile map package.
To use the maps in a MobileMapPackage, you first need to load the package. If the mobile map package was created with ArcGIS Pro, the maps are presented in the same order in which they were packaged. Mobile map packages created with the OfflineMapTask will only contain one map.
If you display the map by setting the map to a MapView, the map will automatically load. If you only need to access the map's content or metadata, you will need to load it by calling GeoModel::load. If the package is not loaded, an empty collection is returned.
QString MobileMapPackage::path() constGets the path of the mobile map package.
The path can refer to a file with an .mmpk
extension or a directory containing an unpacked mobile map package.
[override virtual]
void MobileMapPackage::retryLoad()
Reimplements: Loadable::retryLoad().
See Loadable.
[static, since Esri::ArcGISRuntime 200.2]
QFuture<void> MobileMapPackage::unpackAsync(const QString &mobileMapPackageFilePath, const QString &outputDirectory)
Unpacks a mobile map package file (.mmpk) to an output directory.
If the last level of the output_directory is not present, it will be created as part of the unpack task. The returned task can be canceled with QFuture::cancel to abort the unpack. The unpack task writes the full content of the mobile map package to the output directory. Care should be taken on devices with limited storage space, especially if the original package is very large. After unpacking, you can remove the original .mmpk file from the device.
Note that unpacking will fail if the package is expired and was authored as ExpirationType::PreventExpiredAccess.
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.
QString MobileMapPackage::version() constReturns the version of the mobile map package.
The mobile map package version is set when the package is authored in ArcGIS Pro or when it is generated by the OfflineMapTask.
This property will be populated when you attempt to load the package. The version property will always be populated for you to examine, even if the package is an unsupported version.
This API currently support mobile map packages up to and including major version 5.
You may wish to check the version property before trying to access specific functionality. For example:
If the package fails to load, check that the version number has not exceeded the supported major version.
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