sfisher

Toggling Dynamic layers in legend doesn't refresh map using AcceleratedDisplayLayers

Discussion created by sfisher on Nov 12, 2012
Latest reply on Nov 13, 2012 by sfisher
I have implemented the interactive legend similar to the interactive legend sample in the SDK Samples.  In my application I need to
use layers with Accelerated and Non-Accelerated Display, so I am using the AcceleratedDisplayLayers group layer.
(<esri:AcceleratedDisplayLayers ...). 

What I figured out is that if a dynamic layer is added to this AcceleratedDisplayLayers group, then when toggling individual layers      on/off in the interactive legend the map does not update to show the layer correctly on or off.  If I change the map extent somehow after toggling, ie. pan, zoom, the map refreshes and it does show the correct layers on/off.  I tried several workarounds such as      manually calling layer.Refresh(), as well as a few others, with no success.  If the same layers are not added to the AcceleratedDisplayLayers group they work fine and toggling them on/off results in the correct map refresh right away. 

This behavior can be duplicated by taking the Interactive Legend sample in the SDK Samples and placing the USA layer inside an        AcceleratedDisplayLayers group layer.

This may be a bug or a known limitation of using the AcceleratedDisplayLayers group layer, but I could not find such a limitation
documented.  Any help or workarounds would be greatly appreciated.

Thanks
Simon

Outcomes