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>
Solved! Go to Solution.
The issue is not with your code - I believe your feature geometry that you are trying to load as a FeatureLayer is too complex for the SceneView.
The issue is not with your code - I believe your feature geometry that you are trying to load as a FeatureLayer is too complex for the SceneView.
thanks FC, appreciate your help!