I am trying to dynamically update the attributes of symbols of existing graphics object. I can iterate over my existing graphics objects and update the symbol attributes but my MapView does not display the updated objects. I even tried clearing the graphics layer and adding the updated graphics objects. Is there any way to force a redraw? My test code looks like this:
function highlightTest(){
var highlightSymbol = new SimpleMarkerSymbol({
color: [0, 255, 0],
outline: new SimpleLineSymbol({
color: [0, 255, 255],
width: 2
})
});
var existingGraphics= pointLayer.graphics.clone();
pointLayer.clear();
existingGraphics.forEach(function(item, i){
item.symbol=highlightSymbol;
pointLayer.add(item);
});
}I suspect I am missing something....