Skip to content

A global scene provides an interactive display of geographic data that enables you to visualize and explore patterns, answer questions, and share insight in three dimensions (3D). Global scenes can be opened, edited, and shared across the ArcGIS system and beyond. They are typically used to display data that spans a large area where viewing the curvature of the earth is important and is spatially referenced using a geographic coordinate system.

You can use a global scene and ArcGISSceneView to:

  • Display a basemap layer such as streets or satellite imagery.
  • Access and display data layers based on files or services, including data you have authored.
  • Display terrain with an elevation layer.
  • Display real-world objects such as buildings, cars, and trees.
  • Display 3D visualizations of 2D objects.
  • Perform 3D analysis, such as line-of-sight, visibility, and 3D measurements.
  • Provide context for temporary points, lines, polygons, or text displayed as graphics.
  • Measure distance and explore spatial relationships between geometries.
  • Inspect data layers and display information from attributes.

Scene

The introduction explained the concept of a scene and how it works. The ArcGISScene is your entry point into the API when working with three dimensional data. However, when working with global scenes you connect them with ArcGISSceneView in order to display the data within an application. Remember that when you are working with global scenes, the SceneViewingMode is set to global. When creating a scene programmatically, the viewing mode needs to be set. If consuming a global web scene item from a portal, this information is gathered from the item's definition for you. For cases when the SceneViewingMode is set to local, consult the local scene overview topic for details as it is different from working with a global scene. Logically, when programmatically building a global scene, the next step is to add data layers to your scene.

Layer

Each layer in a scene references geographic data, either from an online service or from a local dataset. There are a variety of layers that can be added to a scene, each designed to display a particular type of data. Some layers display images, such as satellite photos or aerial photography, others are composed of a collection of features to represent real-world entities using point, line, or polygon geometries. In addition to geometry, features have attributes that provide details about the entity the feature represents.

Scenes can also contain scene layers that enable you to create advanced 3D visualizations. Scene layers can contain one of four data types: points, point clouds, 3D objects, or integrated meshes.

The Layer class is the base class for all types of layers used in ArcGIS Maps SDK for Flutter. The type of layer you create depends on the type of data you want to display. For example, to display feature data you can create a FeatureLayer that references an online service (such as a feature service) or a supported local dataset. Some layers cannot be displayed in a scene, such as ArcGISVectorTiledLayer and AnnotationLayer. Similarly, 3D layers cannot be displayed in ArcGISMap, such as ArcGISSceneLayer.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Create a new trail heads feature layer from its URL.
final trailheadsLayer = FeatureLayer.withFeatureTable(
  ServiceFeatureTable.withUri(
    Uri.parse(
      'https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trailheads_Styled/FeatureServer/0',
    ),
  ),
);

// Create a new trails feature layer from its URL.
final trailsLayer = FeatureLayer.withFeatureTable(
  ServiceFeatureTable.withUri(
    Uri.parse(
      'https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trails_Styled/FeatureServer/0',
    ),
  ),
);

// Create a new open spaces feature layer from its URL.
final openSpacesLayer = FeatureLayer.withFeatureTable(
  ServiceFeatureTable.withUri(
    Uri.parse(
      'https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Parks_and_Open_Space_Styled/FeatureServer/0',
    ),
  ),
);

// Add all feature layers to the scene.
scene.operationalLayers
      .addAll([trailheadsLayer, trailsLayer, openSpacesLayer]);

Camera

Global scenes and global scene views extend the concept of two dimensional viewpoints with a camera that represents the observer's position and perspective within three dimensions.

The following properties define the camera position:

  • Geographic location on the surface (longitude and latitude)
  • Altitude (height, in meters, above sea level)
  • Heading (angle about the z axis the camera is rotated, in degrees)
  • Pitch (angle the camera is rotated up or down, in degrees)
  • Roll (angle the camera is rotated side-to-side, in degrees)
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Define an ArcGIS point to stipulate a location for the camera.
final point = ArcGISPoint(
  x: -118.804,
  y: 34.027,
  z: 5330.0,
  spatialReference: SpatialReference.wgs84,
);

// Create a camera based on the point and set the other properties.
final camera = Camera.withLocation(
  location: point,
  heading: 355.0,
  pitch: 72.0,
  roll: 0,
);

// Set the scene's initial view point providing a point as the visible area
// and the camera.
scene.initialViewpoint =
    Viewpoint.withExtentCamera(targetExtent: point, camera: camera);

ArcGISSceneView has an associated controller that manages the camera for the global scene. Each type of camera controller is designed to provide a specific user experience for interacting with the scene display. The camera controller and its properties can be changed at run time, enabling you to provide the scene view interaction experience best suited for the current context.

When a camera controller other than the default GlobeCameraController is active, the scene view's viewpoint cannot be assigned. Attempts to do so do not raise an exception, but they are ignored.

The following camera controllers are available:

  • GlobeCameraController (default) — Provides the default scene view camera behavior. Allows the user to freely move and focus the camera anywhere in the scene.
  • OrbitGeoElementCameraController — Locks the scene view's camera to maintain focus relative to a (possibly moving) graphic. The camera can only move relative to the target graphic.
  • OrbitLocationCameraController — Locks the scene view's camera to orbit a fixed location (map point). The camera can only move relative to the target map point.
  • TransformationMatrixCameraController — Provides navigation by using a TransformationMatrix to control the camera's location and rotation. You need to pass this object to all TransformationMatrixCameraController functions. This can be used with transformation matrices produced by Augmented Reality APIs like ARKit (iOS) and ARCore (Android).§
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
// Create a camera controller to follow a GeoElement in the scene view.
// Pass a GeoElement (graphic) and a distance the camera will be positioned
// from the GeoElement.
final cameraController = OrbitGeoElementCameraController(
  targetGeoElement: _planeGraphic!,
  distance: 1700,
)
  ..cameraPitchOffset = 3
  ..cameraHeadingOffset = 150;

// Add the camera controller to the scene view controller.
sceneViewController.cameraController = cameraController;
§ This capability has not yet been implemented in ArcGIS Maps SDK for Flutter, but will be added in a future release. See this page for more details.

ArcGISSceneView

A scene view is a user interface control that displays a single global scene in your application. It contains built-in functionality that allows the user to explore the scene by zooming in and out, panning and rotating, or getting additional information about elements in the global scene. Scene views may also contain graphics in one or more graphics overlays.

After creating a scene view, you typically set the scene and the camera position. Unlike a map, a scene uses a camera to define the viewer's perspective and to determine the visible area. The perspective is defined by setting the camera's location, altitude (height), heading, and tilt.

Add a ArcGISScene to a ArcGISSceneView to display it. Changes you make to the scene, such as adding, removing, or reordering layers, will immediately be reflected in the display. The ArcGISScene.initialViewpoint will determine the area shown when the scene loads.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Set the scene to the scene view controller's arcGISScene property.
sceneViewController.arcGISScene = scene;

// Display the viewpoint specified by the camera.
sceneViewController.setViewpointCamera(
  Camera.withLatLong(
    latitude: 33.961,
    longitude: -118.808,
    altitude: 2000,
    heading: 0,
    pitch: 75,
    roll: 0,
  ),
);

A ArcGISSceneView also allows you to:

  • Adjust light, atmosphere, and space effects.
  • Display image overlays on the scene surface.
  • Lock the camera to a location or geoelement.
  • Add analysis overlays to visualize analysis results.
  • Identify and select features using a mouse or tap location.
  • Export an image of the current display.
  • Apply a time extent to filter the display of features.

View error

The ArcGISSceneView supports an error that helps to capture different situations and provides useful messages to help troubleshoot related problems that may arise. Ultimately, you decide what you want to do with the error. For example, you may decide to enter the information into a log for further examination as users report problems with your application.

GeoModel error

When working with ArcGISSceneView there are situations that arise when the view is in a usable state, but nothing is displayed because the GeoModel is not configured correctly.

Examples

Display a global scene with elevation

This example uses a ArcGISScene and ArcGISSceneView to display the topographic basemap layer. The basemap layer is draped on an elevation layer to create a 3D perspective. A Camera is created to define the initial view of the global scene.

Steps

  1. Create a ArcGISScene and add a basemap layer.

  2. Use an elevation service to define the ArcGISScene.baseSurface.

  3. Create a ArcGISSceneView and set the camera position.

Expand
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
    // Create a new ArcGISScene with the topographic basemap style.
    final scene = ArcGISScene.withBasemapStyle(BasemapStyle.arcGISTopographic);

    // Use the world 3D terrain service, which provides global elevation to use
    // as a ground surface.
    const elevationUrl =
        'https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer';

    // Create an elevation source using the global elevation service.
    final elevationSource =
        ArcGISTiledElevationSource.withUri(Uri.parse(elevationUrl));

    // Create a new surface.
    final surface = Surface();

    // Add the elevation source to the surface.
    surface.elevationSources.add(elevationSource);

    // Set the base surface of the ArcGISScene to the surface.
    scene.baseSurface = surface;

    // Set the scene to the scene view controller's arcGISScene property.
    _sceneViewController.arcGISScene = scene;

    // Display the viewpoint specified by the camera.
    _sceneViewController.setViewpointCamera(
      Camera.withLatLong(
        latitude: 33.961,
        longitude: -118.808,
        altitude: 2000,
        heading: 0,
        pitch: 75,
        roll: 0,
      ),
    );
Expand

Display a global scene from a mobile scene package

This example displays a global scene from a mobile scene package. You can create your own mobile scene packages using ArcGIS Pro or download existing ones from ArcGIS Online. The Philadelphia scene package, for example, shows an area of downtown Philadelphia with textured buildings.

Steps

  1. Create a MobileScenePackage using the path to a local .mspk file.

  2. Call MobileScenePackage.load() to load the package.

  3. When the package loads, get the first scene from the package using the MobileScenePackage.scenes property.

  4. Display the global scene in a ArcGISSceneView.

Expand
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    // Create a mobile scene package using the Uri to the mobile scene
    // package file.
    final mobileScenePackage = MobileScenePackage.withFileUri(
      mobileScenePackageFile.uri,
    );

    // Load the metadata for the mobile scene package.
    await mobileScenePackage.load();

    // Check that the mobile scene package is not empty.
    if (mobileScenePackage.scenes.isNotEmpty) {
      // Display the first scene in the mobile scene package in the scene
      // view controller.
      _sceneViewController.arcGISScene = mobileScenePackage.scenes.first;
    }
Expand

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