Hi all,My problem is like this: I have a list of Graphics, divided into two type, that need to be display accordingly and depending on user input. Currently I put them into an ArrayCollection. It would be something like this:[{graph: graphic1, type: 1},
{graph: graphic2, type: 2},
{graph: graphic3, type:2},
{graph: graphic4, type:1},
...]
The list is dynamically updated at runtime. User can select the type from a dropdown list, and the graphic must be updated accordingly. I tried to tie the above array collection to the GraphicLayer.graphicProvider but it failed, due to the object in my ArrayCollection is not a graph.TypeError: Error #1034: Type Coercion failed: cannot convert Object@d2a87c1 to com.esri.ags.Graphic
I would really appriciate if somebody could provide me with some suggestion. The other solution I could think of is create two GraphicLayer and switch between them, but I think there must be a better and simpler way to do this.Thanks for reading.