AnsweredAssumed Answered

Problem displaying feature layer in a scene view

Question asked by dschatt on Jan 19, 2017
Latest reply on Jan 20, 2017 by dschatt

hi, I have a very simple code, just trying to display a feature layer in a scene view, using an offset in the elevationInfo property of the feature layer.  But I'm getting a strange error:

 

Uncaught (in promise) TypeError: cannot read property 'y' of null

 

No idea what this is, code is below.  Appreciate any help, thanks!

 

  <script>
    require([
      "esri/Map",
      "esri/views/SceneView",
      "esri/layers/FeatureLayer",
      "dojo/domReady!"
    ], function(Map, SceneView, FeatureLayer) {

      var map = new Map({
        basemap: "streets",
        ground: "world-elevation"
      });

      var view = new SceneView({
        container: "viewDiv",
        map: map,
        zoom: 13,
        center: [-76.34, 37.12],
        viewingMode: "local"
      });
     
      var featureLayer = new FeatureLayer({
        url: "http://cmap2.vims.edu/arcgis/rest/services/Test_3D/MapServer/0",
        elevationInfo: {
          mode: "absolute-height",
          offset: 20
        }         
      });

      map.add(featureLayer);

    });
  </script>

Outcomes