Select to view content in your preferred language

LiveMapsWidget doesn't follow changes

2727
10
01-12-2011 12:15 AM
GyorgyGyorfi
Deactivated User
Hi!

In Flexviewer 1.3 the  LiveMapsWidget doesn't follow the layer visibility changes if i turn off one or more layers  by actionscript like this:

         public function hideLayer(name:String,service:ArcGISDynamicMapServiceLayer):void
            {
    
      var Arr:Array = service.layerInfos;
    
      for each (var layerInfo:LayerInfo in Arr){
       var idIndex:int =      service.visibleLayers.getItemIndex(layerInfo.id);
       if(layerInfo.name == name)
        service.visibleLayers.removeItemAt(idIndex);
      }
            }    



I tryed to figure out where and how can i refresh the LiveMapsWidget but i realized the bigest problem is that if i modify the layers visibility by code before and then i start the LiveMapsWidget, it shows wrong layer visibility. It seems to read the visibility settings from another property.

please help,
GeorgeG
Tags (2)
0 Kudos
10 Replies
GiosiaPoma
Regular Contributor
thanks for info!
0 Kudos