AnsweredAssumed Answered

AGSGraphicLayer graphic attributes

Question asked by dave_mcd on Jul 25, 2013
Latest reply on Jul 25, 2013 by dave_mcd
Hi there,

I am curious whether it is possible to change the default behaviour for retrieving graphics in a AGSFeatureLayer when added to a AGSMapView?

Bear with me..

I am currently querying AGSFeatureLayers so that I can return all attributes for each graphic i.e. [query setOutFields:@[@"*"]].  This works fine, but I also need to return the geometry for each graphic in order to sort them by distance from the centre of the map. I have quite a lot of graphics so returning the geometry can become quite inefficient.

If I use the graphics returned dynamically from the visible map region instead, the performance is much better, but these graphics only contain the top two attributes from the feature service layer.

I would like to be able to specify a default query for the AGSFeatureLayer when adding it to a map, as I believe this would be more efficient than manually querying AGSFeatureLayers in this circumstance.

Hope that makes sense.