Turning on and off graphic layers

408
1
10-13-2011 12:10 PM
MelindaFrost
Occasional Contributor
Hi,
I have been experience some weird issues about when I add graphic layers to the map. I have a page where you can turn layers (including graphic layers) on and off. What I do is when view is loaded, I do some queries and populate them with data. I then only add them to mapview after someone checked them to be visible. And if unchecked, I removed from mapview. But does not seem to behave like expected. Nothing every changes on the map. I never see the graphics.
Right now I have switched to instead loading them all when view has been loaded. Then if check to see I run query to populate graphic layer. If uncheck- remove graphics. I think this is Ok workflow but was wondering if I missed something with other approach. THe only difference I can see is that in option that doesn't work- the datachanged is called on graphicslayer before being added to mapview. But I don't see why that would be the issue.
0 Kudos
1 Reply
NimeshJarecha
Esri Regular Contributor
If possible, post a small sample demonstrating the issue.

Regards,
Nimesh
0 Kudos