Select to view content in your preferred language

Feature layers infowindowrenderer not showing the updated values

661
0
07-02-2013 08:07 AM
PriyaRam
Deactivated User
I'm registering a listener for featureLayer to show the info window on the click of a polygon and i'm able to see the
info window . Also i have a datagrid thru which i can update my polygon name[zone name]. After the update is
successful, i'm not able to see the polygon name reflected in the info window. [if  i reload the layer it works, but i would like to
see the changes reflected without refreshing the layer.] . Please advice on how this could be achieved.

model.pricingZoneLayer.addEventListener(MouseEvent.CLICK,initInfoWindowRenderer);


private function initInfoWindowRenderer(event:MouseEvent):void {
   
   var arrOfPopupFields :Array = [];
   
   for (var j:int = 0; j < model.zonepopUpFields.length;j++)  
   {
    var field1:PopUpFieldInfo = new PopUpFieldInfo();
    field1.fieldName = model.zonepopUpFields
    field1.label = model.zonepopUpFieldLabels + ": "
    
    field1.visible = true;
    
    
    
    arrOfPopupFields.push(field1);
   }
   
      
   // Create the pop-up info
   var popUpInfo:PopUpInfo = new PopUpInfo();
   // Tell the pop-up info about the field name template
   popUpInfo.title = "Zone Info";
   popUpInfo.popUpFieldInfos = arrOfPopupFields;
   
   popUpInfo.showZoomToButton = false;
   
   // Create the class factory
   var popUpRenderer:ClassFactory = new ClassFactory(PopUpRenderer);
   // Set the "popUpInfo" key
   popUpRenderer.properties = { "popUpInfo": popUpInfo };
   
   
   model.pricingZoneLayer.infoWindowRenderer = null;
   
   // Set the info window renderer to use the pop-up renderer
   model.pricingZoneLayer.infoWindowRenderer =  popUpRenderer;
   
   
   
  }
Tags (2)
0 Kudos
0 Replies