Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
  ArcGIS API for JavaScript,
  For more information about the sceneview-underground sample, read the original sample description at
<title>Underground navigation in global mode - 4.10</title>
    #viewDiv {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
    #menu {
      padding: 1em;
      text-align: center;
    button {
      display: block;
      margin: 0 auto;
      margin-top: 1em;

  <link rel="stylesheet" href="">
  <script src=""></script>
    ], function(WebScene, SceneView, esriConfig) {

      // load webscene from ArcGIS Online
      const map = new WebScene({
        portalItem: {
          id: "0359bb9202614d7ca2bd0acc278422d6"

      const view = new SceneView({
        container: "viewDiv",
        map: map

      view.when(function() {
        // allow navigation above and below the ground
        map.ground.navigationConstraint = {
          type: "none"
        // the webscene has no basemap, so set a surfaceColor on the ground
        map.ground.surfaceColor = "#fff";
        // to see through the ground, set the ground opacity to 0.4
        map.ground.opacity = 0.4;

      document.getElementById("undergroundBtn").addEventListener("click", function() {
        // slide 1 of the webscene presentation has a viewpoint that is underground
        view.goTo(map.presentation.slides.getItemAt(1).viewpoint, {duration: 1000});

      document.getElementById("opacityInput").addEventListener("change", function(event) {
          map.ground.opacity = ? 0.4 : 1;

      view.ui.add("menu", "top-right");

  <div id="viewDiv"></div>
  <div id="menu" class="esri-widget">
    <input type="checkbox" id="opacityInput" checked>
    <label for="opacityInput">See through ground</label>
    <button id="undergroundBtn">Go underground</button>