CSVLayer graphics

1671
1
Jump to solution
07-16-2016 09:32 AM
LanceCrumbliss
Occasional Contributor II


Hello all,

In my application, I have a CSVLayer that displays fine.  I also have a master clone of it's graphics array.  I filter that array based on user selected options based on the graphics attributes, and then set the CSVLayer.graphics property to that array.

csvLayer.graphics = filteredArray;
csvLayer.redraw();

However, the CSVLayer continues to show all of the original graphics.  How can I properly filter the graphics of the CSVLayer and have it redraw?

edit:  i also tried

csvLayer.remove(oldGraphic);
csvLayer.add(newGraphic);
csvLayer.redraw();

to no avail. 

0 Kudos
1 Solution

Accepted Solutions
LanceCrumbliss
Occasional Contributor II

OK, I figured it out.  I had to call csvLayer.clear(); first.

View solution in original post

0 Kudos
1 Reply
LanceCrumbliss
Occasional Contributor II

OK, I figured it out.  I had to call csvLayer.clear(); first.

0 Kudos