Last active
January 1, 2018 22:17
-
-
Save geog4046instructor/763c027dcb2003bc7117ca4561c7959a to your computer and use it in GitHub Desktop.
ArcGIS - Load a 3D scene from ArcGIS Online
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This example loads a 3D globe with basemap and layers published to ArcGIS Online. To use another scene with this code, | |
* change the id of the portalItem. The "container" value should match the id of the map div specified in the HTML. | |
*/ | |
require([ | |
"esri/views/SceneView", | |
"esri/WebScene", | |
"dojo/domReady!" | |
], | |
function( | |
SceneView, WebScene | |
) { | |
let scene = new WebScene({ | |
portalItem: { | |
id: "SCENE_ID_GOES_HERE" // change this to the id (the long sequence of characters in the URL of an ArcGIS web scene) | |
} | |
}); | |
let globe = new SceneView({ | |
map: scene, | |
container: "arcgis-map" // this value should match the id of the map div | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment