What is the best way to mouse click to change extruded building footprint symbol color (only one selection at a time)?
I prefer using a Graphic layer for this purpose. I tried the code below and it doesn't work. I would very much appreciate any of your input.
this.sceneView.on('click', lang.hitch(this, function(evt){
this.sceneView.hitTest(evt.screenPoint).then(function(res){
var height = res.results[0].graphic.attributes.Building_Height;
var highlightSym = new PolygonSymbol3D({
symbolLayers: [new ExtrudeSymbol3DLayer({
size: height,
material: { color: [242, 255, 99, 1] }
})]
});
var graphic = new Graphic(res.results[0].geometry, highlightSym);
this.sceneView.graphics(graphic);
});
}));