ccabanero

Identify task - putting identify result values in NSArray

Discussion created by ccabanero on Nov 27, 2010
Latest reply on Nov 27, 2010 by ccabanero
Hello,

CONTEXT:
The bigger picture goal I have is to create a UITableView with sections - whereby each section presents the attributes returned from an identifyTask for multiple layers.  For example, section 1 shows attributes for parcels, section 2 shows attributes for permits, etc.

Specifically, I am using the identifyTask to return two layers from my map service.  The identifyTask request succeeds. 

As I understand it, the results from an identifyTask returns an NSDictionary.  However, when I execute the following, an exception is raised...

NSArray *values = [self.idResults allValues];

In the above, self.idResults is the results from an identify task set as a property of my class.  So, I'm simply trying to get all of the values in the dictionary into an array.  This line of code raises an exception.

QUESTIONS:
1. The identifyTask returns an NSDictionary right?
2. If the identifyTask returns an NSDictionary, I should be able to load all of the values into an Array right?  Maybe I'm doing this wrong?
3. Does anyone know of any samples that I can look at that executes an identifyTask against multiple layers and displays them in a UITableView with grouped sections?

Thanks!!!

Outcomes