Select to view content in your preferred language

Identify 2.3.1 1st-call problem

1643
2
05-13-2011 09:49 AM
MarkAnstaett
Emerging Contributor
I am using the Identify Widget version 2.3.1 in a stock Flexviewer 2.3.1 and having a problem with the first Identify call- it is configured to a single dynamic Mapservice with a few Fields set.  The first execution of Identify returns a result to the widget's Result state, then when I mouseover it the InfoPopupWidget opens to the feature but with only the Title, no Content displayed.  Subsequent Identify's work correctly (the mouseOver of a result opens the InfoPopupWidget with the field-values Content correct).  In FlashBuilder it appears that the InfoPopupWidget.mxml is running its creationCompleteHandler() on this 1st Identify execution which calls dataChangeHandler(null) but not firing the DATA_CHANGE event.  The subsequent Identify runs do fire DATA_CHANGE and the dataChangeHandler() has data != null, then correctly fills in the infoWindow with data.content.

Have other users seen this problem, and is there a workaround to make 1st Identify fill the popup map.infoWindow content correctly?
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Mark,

   I can not duplicate that on the my live sample page... The bigest thing is that the 2.3.1 version of this widget does not even use the InfoPopupWidget.mxml at all... It uses the new 2.3.1 API's PopUpInfo.
0 Kudos
MicheleFocareta
Deactivated User
Hello
I have the same problem with infopopupwindows for view youtubevideo! if I use ESRI API 2.3.1 and SDK 4.1 there is the problem, but if i use ESRI API 2.2 i do not have problem.

The first click on item generate infopopupwindows empty if i click another item the infopopup is correctly popolate...

The probability part of error code is:

......

                           var infoWindowRenderer:ClassFactory = new ClassFactory();
  var infoWindowContent:DisplayObject;
   
  if (event.currentTarget != null)
   {
   var recreate:Boolean = true;
   var graphic:Graphic = Graphic(event.currentTarget);
   
                      if (map.infoWindow.content != null) {
recreate = !((graphic.attributes.type == SocialMediaType.Flickr && (map.infoWindow.content is Flickr_InfoWindowRenderer)) ||(graphic.attributes.type == SocialMediaType.YouTube && (map.infoWindow.content is YouTube_InfoWindowRenderer)));
     }
    
   if (recreate) {
if (graphic.attributes.type == SocialMediaType.Flickr) {
infoWindowRenderer = new ClassFactory(Flickr_InfoWindowRenderer);
      
      }
else if (graphic.attributes.type == SocialMediaType.YouTube) {
  infoWindowRenderer = new ClassFactory(YouTube_InfoWindowRenderer);
      }
     
              infoWindowContent = infoWindowRenderer.newInstance();
map.infoWindow.content = infoWindowContent as UIComponent;
   map.infoWindow.closeButtonVisible = true;
     
     }
     map.infoWindow.data = graphic.attributes;
     map.infoWindow.label = graphic.attributes.title;
     map.infoWindow.show(map.toMapFromStage(event.stageX, event.stageY));
    }
.....

is there a solution?
Thanks
0 Kudos