MobileScenePackageUtility QML Type

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

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.5
Inherits:

Object

Properties

Signals

Methods

  • bool cancelTask(string taskId)
  • string unpack(url mobileScenePackageFilePath, url outputDirectory)

Detailed Description

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

Currently, this type contains two methods to help read raster layers in a .mspk file. Use the isDirectReadSupported method to determine if a .mspk 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

unpackStatusChanged()

Emitted when the unpackStatus property changes.

Note: The corresponding handler is onUnpackStatusChanged.


Method Documentation

bool cancelTask(string taskId)

Cancel the task with the ID taskId.

Returns false if the task cannot be canceled or there is no task with the specified id taskId.

See also Cancelable.


string unpack(url mobileScenePackageFilePath, url outputDirectory)

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

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

Use the MobileScenePackageUtility::isDirectReadSupported method to determine if the mobile scene 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 scene 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 .mspk file from the device.


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