Instances of this class represent a mobile scene package (
.mspk file). More...
|Import Statement:||import Esri.ArcGISRuntime 100.8|
- expiration : Expiration
- item : ArcGISItem
- loadError : Error
- loadStatus : Enums.LoadStatus
- locatorTask : LocatorTask
- path : void
- scenes : list<Scene>
- version : string
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
- 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 the ArcGIS platform 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 connectivity.
Starting with ArcGIS Pro
2.3 you can create mobile scene packages for use in ArcGIS Runtime. This version of ArcGIS Runtime will support any mobile scene package up to major version
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:
- A tile package (
.tpkx) or an online basemap as the Scene::basemap.
- A mobile geodatabase (
.geodatabase) or an online feature service as one of the Scene::operationalLayers.
- Local raster data (such as a
GeoTIFF) or online image services as the elevation sources in a Scene::baseSurface
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.
- Determine the version of this package using the MobileScenePackage::version property. ArcGIS Runtime currently 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.
See also Loadable.
expiration : Expiration
Expiration details for this mobile scene package, if provided. (read-only).
Expiration details provide:
- The packageâs expiration date and time.
- Whether the scenes can be accessed after expiration.
- Any messages relevant for the user.
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.
These expiration details can be specified when the author creates a mobile scene package using ArcGIS Pro (from version
2.4). This requires the ArcGIS Pro Publisher Extension.
During package loading, the ArcGIS Runtime will determine whether the mobile scene package was authored with expiration. If so, then this property will be populated.
If the package has expired and was authored as (Enums.ExpirationTypePreventExpiredAccess), loading will fail and you will not be able to access the scenes. The expiration details will be accessible for you to examine and/or communicate to the user.
item : ArcGISItem
Returns an ArcGISItem object describing the contents of the mobile scene package (read-only).
The item includes the metadata that was provided by the mobile scene package author in ArcGIS Pro. This includes information such as:
- Snippet (summary)
A mobile scene package's item will be an instance of a LocalItem.
null if the package is not loaded.
loadError : Error
Returns the load error (read-only).
Note: load errors are also reported on the
error property and emit the
See also Loadable.
locatorTask : LocatorTask
Returns the locator contained in the mobile scene package as a LocatorTask (read-only).
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.
null if there is no LocatorTask in the package, or the package is not loaded.
The path of the mobile scene package.
The path can refer to a file with an
.mspk extension or a directory containing an unpacked mobile scene package.
This property cannot be set after the MobileScenePackage is loaded.
scenes : list<Scene>
Returns a list of the scenes contained in the mobile scene package (read-only).
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 a Scene 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 Scene::load.
If the package is not loaded, an empty collection is returned.
Returns the version of this mobile scene package (read-only).
The mobile scene package version was set when the package was authored in ArcGIS Pro.
This property is 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.
ArcGIS Runtime currently supports mobile scene packages up to and including major version
You may wish to check the version property before trying to access specific functionality. For example:
- Expiration details are only available in mobile scene package from version
- Links to online services are only available in mobile scene package from version
If the package fails to load, check that the version number does not exceeded the supported major version.
Emitted when the expiration property changes.
Emitted when the item property changes.
Emitted when the locatorTask property changes.
Emitted when the path property changes.
Emitted when the scenes property changes.
Emitted when the version property changes.
Closes a mobile scene package and frees file locks on the underlying
.mspk file or directory.
All references to mobile scene package data (scenes, layers, tables, networks, locators, etc.) should be released before closing the package. If active references to mobile scene package data exist, this method will still close the package, but subsequent rendering and data access methods will fail. Results of accessing mobile scene package data after close are undefined.
After closing a mobile scene package, the underlying
.mspk file or directory can be moved or deleted.
Closing a mobile scene package is not necessary if the package has not been loaded.
This QML method was introduced in Esri.ArcGISRuntime 100.6.