MobileScenePackage

A mobile scene package. Mobile scene packages allow you to work with 3D scenes on a mobile device. A mobile scene package contains all of the files necessary to work with your scenes and is stored on a device as either:

  • A single archive file with an .mspk extension

  • A directory containing an unpacked mobile scene package

A mobile scene package can encapsulate one or more scenes, their layers and data, transportation networks, and a locator. The mobile scene package also contains an Item with metadata about the package (description, thumbnail, etc.). You can use these packages to share scenes across ArcGIS products and to allow your users to work with scenes in the field. Mobile scene packages also allow you to continue working when you have limited or no connectivity.

Starting with ArcGIS Pro 2.3 you can create mobile scene packages for use by this API. Mobile scene packages are supported up to major version 3.

Mobile scene packages can contain links to online services, but be aware that these services will be unavailable if your device is offline. You can choose whether to use:

Online services (such as traffic or weather) can provide excellent contextual information for your users. If the mobile scene package is going to be used in areas of poor connectivity, however, you must ensure that data critical to your workflow is stored locally on the device.

Mobile scene packages implement the Loadable interface; you need to load the MobileScenePackage before you can access its content. Once loaded you can:

  • Determine the version of this package using the MobileScenePackage.version property. This API supports mobile scene packages up to and including major version 3. If the package is from an unsupported version it will fail to load.

  • Discover whether the package has expired using the MobileScenePackage.expiration property

  • Access the individual scenes and display them in a SceneView

  • Programmatically add, modify, and remove layers in the scene. Mobile scene packages, however, are read-only and these changes to scenes or layers will not be persisted to the device.

Since

200.1.0

Constructors

Link copied to clipboard

Create a MobileScenePackage with a path. The path can refer to a file with an .mspk extension or a directory containing an unpacked mobile scene package.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Expiration details for this mobile scene package, if provided. Expiration details provide:

Link copied to clipboard
val item: Item?

The mobile scene package's Item describing metadata about the package. The item includes the metadata that was provided by the mobile scene package author in ArcGIS Pro. This includes information such as:

Link copied to clipboard

A LocatorTask from the mobile scene package. Use this task to geocode and reverse-geocode addresses and places. There is only one LocatorTask in each mobile scene package but it can be used by all scenes.

Link copied to clipboard

The path to the mobile scene package. The path can refer to a file with an .mspk extension or a directory containing an unpacked mobile scene package.

Link copied to clipboard

A collection of ArcGISScene from the MobileScenePackage. To use the scenes in a MobileScenePackage, you first need to load the package. The scenes are presented in the same order in which they were packaged with ArcGIS Pro. To display an ArcGISScene set the scene to a SceneView. This will automatically load the scene and all of its content. If you only need to access the scene's content or metadata, then you need to load it by calling GeoModel.load(). If the package is not loaded, an empty collection is returned.

Link copied to clipboard

The mobile scene package's version. The mobile scene package version was set when the package was authored in ArcGIS Pro.

Inherited properties

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Functions

Link copied to clipboard
fun close()

Closes a mobile scene package. Closes a mobile scene package and frees file locks on the underlying .mspk file or directory.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.