Skip To Content ArcGIS for Developers Sign In Dashboard

MobileMapPackageUtility QML Type

A utility that contains methods to work with .mmpk files. More...

Import Statement: import Esri.ArcGISRuntime 100.6
Since: Esri.ArcGISRuntime 100.2
Inherits:

Object

Properties

Signals

Methods

Detailed Description

Use this singleton type to access helper methods that can be used in conjunction with a MobileMapPackage.

Currently, this type contains two methods to help read raster layers in a .mmpk file. Use the isDirectReadSupported method to determine if a .mmpk file can be read without unpacking. And if necessary, unpacking can be performed by using the unpack method.

Note: You cannot declare or create a component of this type in QML code. Rather, an instance is automatically created and only that single instance is available for use in the application.

See also Cancelable.

Property Documentation

isDirectReadSupportedResult : bool

Returns the result of the isDirectReadSupported operation (read-only).

This property returns whether the .mmpk file that isDirectReadSupported is performed on can be read without unpacking. This property updates each time the operation is completed.

Until the operation is performed, the value of this property is false. Confirm that the operation completed successfully by checking the isDirectReadSupportedStatus before using this property.


isDirectReadSupportedStatus : Enums.TaskStatus

Returns the status of the isDirectReadSupported asynchronous operation (read-only).

Check this status when the isDirectReadSupportedStatusChanged signal emits, to determine if the operation is complete, in progress, or has errored.

See also Enums.TaskStatus.


unpackStatus : Enums.TaskStatus

Returns the status of the unpack asynchronous operation (read-only).

Check this status when the unpackStatusChanged signal emits, to determine if the operation is complete, in progress, or has errored.

See also Enums.TaskStatus.


Signal Documentation

isDirectReadSupportedResultChanged()

Emitted when the isDirectReadSupportedResult property changes.


isDirectReadSupportedStatusChanged()

Emitted when the isDirectReadSupportedStatus property changes.


unpackStatusChanged()

Emitted when the unpackStatus property changes.


Method Documentation

bool cancelTask(string taskId)

See also Cancelable.


string isDirectReadSupported(url mobileMapPackageFilePath)

Checks if a mobile map package (.mmpk) file can be read directly.

This method asynchronously checks if the file specified by the mobileMapPackageFilePath can be read without unpacking.

The isDirectReadSupportedStatusChanged signal emits when the operation is complete. Check the isDirectReadSupportedStatus to make sure the operation completed successfully. The result is then available through the isDirectReadSupportedResult property.

Returns a task ID that can be used to cancel the unpack task.


string unpack(url mobileMapPackageFilePath, url outputDirectory)

Unpacks a mobile map package (.mmpk) file to an output directory.

This method asynchronously unpacks the file specified by the mobileMapPackageFilePath and stores it at the location specified in the outputDirectory.

Use the MobileMapPackageUtility::isDirectReadSupported method to determine if the mobile map package file can be read without being unpacked.

The unpackStatusChanged signal emits when the operation is complete. Check the unpackStatus to make sure the operation completed successfully.

Returns a task ID that can be used to cancel the unpack task.

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.



Feedback on this topic?