Globes and local scenes

Global and local scenes using different projections to display the same basemap layer and feature layer

What are global and local scenes?

Global and local scenes are different viewing modes you can use to visualize 3D data. When you work with a scene, you choose whether to render the data on a globe or to project it on a plane that can be navigated in 3D space.

A global scene is typically used to display data that spans around the globe when viewing the curvature of the earth is important.

A local scene is a projected view of a surface that is typically used for smaller extents. It is useful when visualizing data such as a country or a city. To show only a region of interest, you can clip a local scene to an extent.

In both global and local scenes, you can display data below the ground and navigate below and above the ground.

How to create a scene

To create a global or local scene, you define the basemap layer and data layers to display and then set the camera properties.

Define the scene

The first step is to create the scene with a basemap layer and/or data layers. You can also reference an elevation service to display the scene with relief.

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
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
        esriConfig.apiKey = "YOUR_API_KEY";
        // In the ArcGIS JS API, the Map class is used
        // to define both maps and scenes.
        const map = new Map({
          basemap: "arcgis-light-gray",
          ground: "world-elevation"
        });
Expand

Set the camera

Now display the scene using a scene view. You set the scene view's perspective of the scene by defining the scene view's camera, specifying the camera's location (including height), heading, and tilt (or pitch).

Use the scene view to specify whether the viewing mode is local or global.

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
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
        const sceneView = new SceneView({
          map: map,
          camera: {
            position: [
              -41.18215285,
              -86.13467977,
              9321113.29449
            ],
            heading: 359.73,
            tilt: 68.57
          },
          viewingMode: "local",
Expand

Examples

Create a globe

This example displays earthquake data on a globe. The scene uses the Vintage Shaded Relief layer as a basemap. Additionally the earthquakes data layer is loaded as a CSV layer. Set the scene on a scene view along with a camera position and a global viewing mode.

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
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
        const map = new Map({
          basemap: new Basemap({
            baseLayers: [
              new TileLayer({
                url: "https://tiles.arcgis.com/tiles/nGt4QxSblgDfeJn9/arcgis/rest/services/VintageShadedRelief/MapServer"
              })
            ]
          }),
          layers: [csvLayer]
        });

        const view = new SceneView({
          container: "viewDiv",
          map: map,
          // Indicates to create a global scene
          viewingMode: "global",
          camera: {
            position: [
              -63.77153412,
              20.75790715,
              25512548.00000
            ],
            heading: 0.00,
            tilt: 0.10
          },
Expand

Create a local scene

This example displays earthquakes in a clipped, local scene. The scene view displays a basemap and earthquake data that is displayed below the ground plane. Enable navigation below the ground to permit exploring the earthquakes. Additionally, the view uses a clipping extent to display only the area of interest.

ArcGIS JS API
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
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
        const map = new Map({
          basemap: "arcgis-topographic",
          layers: [
            quakesDepthLayer
          ],
          ground: {
            navigationConstraint: {
              type: "none"
            },
            opacity: 0.8
          }
        });

        const view = new SceneView({
          container: "viewDiv",
          map: map,
          // Indicates to create a local scene
          viewingMode: "local",
          // Use the exent defined in clippingArea to define the bounds of the scene
          clippingArea: {
            xmax: -10834217,
            xmin: -10932882,
            ymax: 4493918,
            ymin: 4432667,
            spatialReference: {
              wkid: 3857
            }
          },
          camera: {
            position: [
              -98.36408160,
              36.42115060,
              26124.42603
            ],
            heading: 32.37,
            tilt: 78.08
          },
Expand

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