AnsweredAssumed Answered

3D SceneView - Feature Layer not visible but getting loaded

Question asked by George1912 on Jun 10, 2020
Latest reply on Jun 17, 2020 by George1912

Hi Team / Ken BujaRaluca Nicola / John Grayson / Kristian Ekenes,

 

I have a Map and a SceneView and trying to load a FeatureLayer with a UniqueValueRenderer (tried with a SimpleRenderer also)

However, I can see that the layers are successfully getting queried but not getting displayed on the UI.

 

In console, I however see this error/warning and the loading of the basemap itself is taking a lot of time.

Is this the reason why my layers are not visible or something else?

 

Unfortunately I do not have a public URL for the Feature Layer to share. Below is a snippet of the code. The WKID is in 102100 for the Feature Layer, so I believe that should not be a problem.

 

There are about ~1500 features in the layer which is to be rendered.

 

var map = new Map({
basemap: "topo-vector"
// ground: "world-elevation"
});

 

var view = new SceneView({
map: map,
container: "viewDiv",
camera: {
position: {
x: -90.02,
y: 20.745,
z: 2000 // meters
},
tilt: 75
}
});

 

var pipelineRenderer = {
type: "unique-value", 
field: "PRODUCT",
defaultSymbol: {
type: "line-3d",
symbolLayers: [{
material: {
color: "blue"
},
type:"path",
profile: "circle",
width:30,
height: 30,
join:"miter",
cap: "round"
}],
}, 
uniqueValueInfos: [{
value: "OIL",
symbol: {
type: "line-3d", 
symbolLayers: [{
material: {
color: "green"
},
type:"path",
profile: "circle",
width:30,
height: 30,
join:"miter",
cap: "round"
}],
}
}, {
value: "GAS",
symbol: {
type: "line-3d", 
symbolLayers: [{
material: {
color: "red"
},
type:"path",
profile: "circle",
width:30,
height: 30,
join:"miter",
cap: "round"
}],
}
}]
};

 

var pipelineSimpleRenderer = {
type: "simple", 
symbol: {
type: "line-3d", 
symbolLayers: [{
type:"path",
profile: "circle",
width:30,
height: 30,
material: {
color: "red"
},
join:"miter",
cap: "round"
}]
}
};

 

var pipelineLayer = new FeatureLayer({
url: <URL>,
outFields: ["*"],
token: accessToken,
elevationInfo: {
mode: "relative-to-scene",
offset: 0
},
renderer: pipelineRenderer //pipelineSimpleRenderer
});
map.add(pipelineLayer);

 

 

NOTE: I have some other feature layers which I am very well able to view with extrude in renderer and the 3D visualisation works fine, so WebGL rendering on Chrome is not an issue.

Outcomes