Select to view content in your preferred language

Attributes from identify results

994
8
07-23-2010 03:48 AM
AndrewEgleton
Deactivated User
Hi

How can I access the attributes in my identify results?

I'd like to use the attributes to populate a callout, and then the detailed view from the callout.

Thanks,
Andy.
0 Kudos
8 Replies
JeffPapirtis
Occasional Contributor
Hi Andrew,
I have been working on this and found that the example project was of great help.  Look at the GraphicsDemo.xcodeproj project that is installed with the iPhone SDK.

In my solution I have set up a Navigation based project.  This allows to push to a table view.  It took me a few days to wade through and understand what was going on.

Good Luck!
0 Kudos
AndrewEgleton
Deactivated User
Thanks for pointing me to that example, I had been using it for some of the callout bits already, but it is working with graphics not Identify results.

I've solved the issues I was having, i had missed the .feature step to get to the attributes:
 
NSDictionary *resultAttributes = result.feature.attributes;
0 Kudos
JeffPapirtis
Occasional Contributor
Would you mind sharing on how you achieved the identify results?  I have not had much luck with that code. 

Was there some example code that you were able to look at?
0 Kudos
AndrewEgleton
Deactivated User
I used the example posted in this thread:
http://forums.arcgis.com/threads/7719-Identify-Example

Then in the didExecuteWithIdentifyResult I added some code to read the reults attributes and bring up a callout.

What I can't get to work is the MapViews calloutDidClickAccessoryButton, it doesn't seem to get called when I tap on the callout button, so I can't bring up the full details.
0 Kudos
JeffPapirtis
Occasional Contributor
Do you have a feature details controller set up for your table?

I added a few lines of code to the -(void)identifyTask  didExecuteWithIdentifyResults method. and I can now identify and pull a pop up box and then link to the attribute table.
0 Kudos
AndrewEgleton
Deactivated User
Could you post the code?

The problem I'm having is that the button on the callout doesn't do anything when pressed, even though I've added in the code for it. I suspect I've missed something along the way.
0 Kudos
JeffPapirtis
Occasional Contributor
I thought that I had it working.  It worked intermediately.  Let me clean up my code a bit, and i will post it here.
0 Kudos
JeffPapirtis
Occasional Contributor
Could you post the code?

The problem I'm having is that the button on the callout doesn't do anything when pressed, even though I've added in the code for it. I suspect I've missed something along the way.


Hi Andrew, I am posting my code for you to look at.  There are some issues that I have encountered, namley, once you make your identify it kind of gets stuck on that one result, but the attributes table will pull up for that result.

If you can find some errors, or provide some feedback on what you find I would appreciate it.
0 Kudos