AnsweredAssumed Answered

Hello all, Please help me to sort out this problem. I am trying to create popup for feature Layer but i am getting popup info null...

Question asked by goelritanshu1991 on Mar 3, 2015
Latest reply on Mar 10, 2015 by goelritanshu1991

Hello all, Please help me to sort out this problem. I am trying to create popup for feature Layer but i am getting popup info null...

 

mapView.addLayer(new ArcGISFeatureLayer("","",""));

mapView.setOnSingleTapListener(new OnSingleTapListener() {

  private static final long serialVersionUID = 1L;

 

 

  @Override

  public void onSingleTap(float x, float y) {

 

 

  if(mapView.isLoaded())

  {

  popupContainer=new PopupContainer(mapView);

  popupDialog=null;

  int id=popupContainer.hashCode();

  Layer[]layers=mapView.getLayers();

  for(Layer layer:layers)

  {

  if(layer instanceof ArcGISFeatureLayer)

  {

  if(!layer.isInitialized() && !layer.isVisible())

  continue;

  ArcGISFeatureLayer fLayer=(ArcGISFeatureLayer)layer;

  if(fLayer.getPopupInfo(0)!=null)

  {

  new RunQueryFeatureLayerTask(x, y, 5,id).execute(fLayer);

  }

  }

  }

  }

  }

  });

Outcomes