Update layer without full map updating (Flexviewer)

1060
3
05-03-2011 03:23 AM
IgorYunusov
New Contributor
HI all, is anyone know how to update service or just layer in the srevice (layer is better) in brouser, without full map updating... I can update whole map, through meta http-equiv='refresh' content='10' , but I also use Login Screen for the Flexviewer, and every time I have to enter the login and pass. Is there some way to avoid it?
Tags (2)
0 Kudos
3 Replies
SandraPanicucci
New Contributor
Here's what worked for me. I run this function from a button click


protected function RefreshLayer_clickHandler(event:MouseEvent):void
   {
    
    /* protected function RefreshLayer_clickHandler(event:MouseEvent):void
    {*/
    map.removeLayer(featLayer)
    map.addLayer(featLayer);
0 Kudos
IgorYunusov
New Contributor
it's a not preatty good way, couse after remove layer/add Layser I can not see the update attribute inform, which I see after using F5. maybe other IDEAS
0 Kudos
by Anonymous User
Not applicable
it's a not preatty good way, couse after remove layer/add Layser I can not see the update attribute inform, which I see after using F5. maybe other IDEAS


Have you tried Layer.Refresh() ?

http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/Layer.html#refresh()
0 Kudos