Open mobile scene package

View inMAUIUWPWPFWinUIView on GitHub

Opens and displays a scene from a Mobile Scene Package (.mspk).

Image of open mobile scene package

Use case

An .mspk file is an archive containing the data (specifically, basemaps and features), used to display an offline 3D scene.

How to use the sample

When the sample opens, it will automatically display the Scene in the Mobile Map Package.

How it works

  1. Create a MobileScenePackage using the path to the local .mspk file.
  2. Use MobileScenePackage.IsDirectReadSupportedAsync to check whether the package can be read in the archived form (.mspk) or whether it needs to be unpacked.
  3. If the mobile scene package requires unpacking, call MobileScenePackage.UnpackAsync.
  4. Call MobileScenePackage.Load.
  5. When the MobileScenePackage is loaded, obtain the first Scene from the Scenes property.
  6. Display the scene in a SceneView.

Relevant API

  • MobileScenePackage
  • SceneView

Offline data

The following items will be downloaded from ArcGIS Online automatically:

About the data

This mobile scene package was authored with ArcGIS Pro.

Additional information

An .mspk file is an archive containing the data used to display an offline 3D scene. Some mobile scene packages have data that must be unpacked before reading.

Tags

offline, scene

Sample Code

OpenMobileScenePackage.xamlOpenMobileScenePackage.xamlOpenMobileScenePackage.xaml.cs
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
<UserControl
    x:Class="ArcGIS.UWP.Samples.OpenMobileScenePackage.OpenMobileScenePackage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="using:Esri.ArcGISRuntime"
    xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls">
    <Grid>
        <esriUI:SceneView x:Name="MySceneView" />
    </Grid>
</UserControl>

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