chaudhryz

Problem displaying PopUp info

Discussion created by chaudhryz on Oct 12, 2013
Latest reply on Oct 16, 2013 by chaudhryz
I been working with popup sample (that uses popupHelper custom class) with web map and its working fine. I add an extra dynamic map service to mapview as AGSFeatureLayer.
[HTML]
NSURL* url = [NSURL URLWithString: @"map service url"];
  AGSFeatureLayer *flayer = [AGSFeatureLayer featureServiceLayerWithURL:url mode:AGSFeatureLayerModeOnDemand];
 
  NSArray *outf = @[@"*"];
  flayer.outFields = outf;
  [self.mapView addMapLayer:flayer];
  flayer.delegate = self;
[/HTML]
it is displaying perfect and when i click on a feature, it calls the method but i get blank popup.  I tried to debug and i can see that graphics has all the attributes but popupinfo is nil (see below)....not sure why
[HTML]
if ([graphics allValues].count>0) {
    NSArray *graphicsArrays = [graphics allValues];
    for (NSArray *graphicsArray in graphicsArrays) {
      for (AGSGraphic *graphic in graphicsArray) {
        if ([graphic.layer isKindOfClass:[AGSFeatureLayer class]]) {
          AGSPopupInfo *popupInfo = [webmap popupInfoForFeatureLayer:(AGSFeatureLayer*)graphic.layer];
          AGSPopup *popup = [AGSPopup popupWithGraphic:graphic popupInfo:popupInfo];
          [popups addObject:popup];
        }
       
      }

[/HTML]
it is working fine with all the layers that are in the webmap but not working with the extra layer that i added to the mapView...

thanks

Zahid

Outcomes