Trouble getting map object to refresh after resetting visible layers

Discussion created by danieto on May 18, 2012
Latest reply on May 21, 2012 by sauldls
I am having issues getting the 'map' object to refresh after resetting the layer visiblity with 'setVisibleLayers' function.  After updating the layer visibility if you inspect the map object and do a .getLayer().visibleLayers it'll still have the old layer data in there even though the map no longer shows these layers.  I need only the current visible layers, is there a better place to get this information than the map object?