Opens and displays a scene from a Mobile Scene Package (.mspk).
      
  
    
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
- Create a 
MobileScenePackageusing the path to the local .mspk file. - Use 
MobileScenePackage.IsDirectReadSupportedAsyncto check whether the package can be read in the archived form (.mspk) or whether it needs to be unpacked. - If the mobile scene package requires unpacking, call 
MobileScenePackage.UnpackAsync. - Call 
MobileScenePackage.Load. - When the 
MobileScenePackageis loaded, obtain the firstScenefrom theScenesproperty. - Display the scene in a SceneView.
 
Relevant API
- MobileScenePackage
 - SceneView
 
Offline data
The following items will be downloaded from ArcGIS Online automatically:
- Philadelphia MSPK - Philadelphia mobile scene package authored in ArcGIS Pro
 
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
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="ArcGISRuntimeXamarin.Samples.OpenMobileScenePackage.OpenMobileScenePackage"
             xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms">
    <Grid>
        <esriUI:SceneView x:Name="MySceneView" />
    </Grid>
</ContentPage>