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.
Ok, apologies. The easiest solution for me is to set the outFields in the AGSFeatureLayers to * and then I don't need to make any queries. The app is now running much quicker.
Ok, apologies. The easiest solution for me is to set the outFields in the AGSFeatureLayers to * and then I don't need to make any queries. The app is now running much quicker.