Open scene (portal item)

View inAndroidFormsUWPWPFWinUIiOSView on GitHub

Open a web scene from a portal item.

Image of open a scene portal item

Use case

A scene is symbolized geospatial content that allows you to visualize and analyze geographic information in an intuitive and interactive 3D environment. Web scenes are an ArcGIS format for storing scenes in ArcGIS Online or portal. Scenes can be used to visualize a complex 3D environment like a city.

How to use the sample

When the sample opens, it will automatically display the scene from ArcGIS Online. Pan and zoom to explore the scene.

How it works

To open a web scene from a portal item:

  1. Create a PortalItem with an item ID pointing to a web scene.
  2. Create a Scene passing in the portal item.
  3. Set the scene to a SceneView to display it.

Relevant API

  • PortalItem
  • Scene
  • SceneView

About the data

This sample uses a Berlin, Germany scene hosted on ArcGIS Online.

Tags

portal, scene, web scene

Sample Code

OpenScenePortalItem.xamlOpenScenePortalItem.xamlOpenScenePortalItem.xaml.cs
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="ArcGISRuntime.Samples.OpenScenePortalItem.OpenScenePortalItem"
             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>

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