Class MobileScenePackage
A mobile scene package.
Inheritance
Implements
Namespace: Esri.ArcGISRuntime.Mapping
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class MobileScenePackage : ILoadable
Remarks
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 a .mspk extension.
- A directory.
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 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 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:
- A tile package (.tpkx) or an online basemap as the Basemap.
- A mobile geodatabase (.geodatabase) or an online feature service as one of the OperationalLayers.
- Local raster data (such as a DTED, GeoTIFF) or online image services as the elevation sources in a 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.
Mobile scene packages implement the ILoadable 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 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 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.
Constructors
Name | Description |
---|---|
MobileScenePackage(String) | Initializes a new instance of the MobileScenePackage class. |
Properties
Name | Description |
---|---|
Expiration | Gets the expiration details for this mobile scene package, if provided. |
Item | Gets the mobile scene package's Item describing meta-data about the package. |
LoadError | Gets the System.Exception associated with the last load error. |
LoadStatus | Gets the load status. |
LocatorTask | Gets the LocatorTask from the mobile scene package. |
Path | Gets the path to the mobile scene package. |
Scenes | Gets a collection of Scenes from the MobileScenePackage. |
Version | Gets the mobile scene package's version. |
Methods
Name | Description |
---|---|
CancelLoad() | Cancel loading metadata for the object. |
Close() | Closes a mobile scene package. |
LoadAsync() | Load the metadata for the object asynchronously. |
OpenAsync(String) | Opens a new instance of the MobileScenePackage class. |
RetryLoadAsync() | Loads or retries loading metadata for the object asynchronously. |
UnpackAsync(String, String) | Unpacks a mobile scene package file (.mspk) to an output directory. |
UnpackAsync(String, String, CancellationToken) | Unpacks a mobile scene package file (.mspk) to an output directory. |
Events
Name | Description |
---|---|
Loaded | Event that is raised when the object is done loading. |
LoadStatusChanged | Event that is raised when the LoadStatus property changes. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.5 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.5 - 200.6 |
Xamarin.Android | 100.5 - 100.15 |
Xamarin.iOS | 100.5 - 100.15 |
UWP | 100.5 - 200.6 |