AGSGraphic identifier

525
2
11-15-2011 08:37 AM
PaulLohr
Occasional Contributor III
I have a bit of code that does the following. Push an AGSGraphic into an array. Push each AGSGraphic item from the array into an AGSGraphicsLayer. I have a tableView whose cells correspond with the AGSGraphics shown on the map. After I tap the point to get the callout, I would like to tap the accessoryButton which calls the tableView with the related cell highlighted. The problem is establishing a relationship between the AGSGraphics and the UITableView cells. I am looking for a way to uniquely identify an AGSGraphic, preferably the same way array items are identified. I would think AGSGraphicsLayer holds an array of AGSGraphics. Perhaps there is a way similar to [array1 objectAtIndex:indexPath.row]; which can be used against an AGSGraphicsLayer? A statement such as this one would have to be called in mapView:didClickCalloutAccessoryButtonForGraphic (I assume).

Thanks for any help,
Paul Lohr
0 Kudos
2 Replies
TOSPOLTOOMMALA
New Contributor
You may assign any identity value of graphic attribute, may be objectid, to UITableViewCell.tag. So when tap calloutaccessorybutton, you get that attribute of graphic then use viewWithtag: to get the cell for hilight.
0 Kudos
PaulLohr
Occasional Contributor III
tospol,
That is a very good solution, thank you for that.

Paul Lohr
0 Kudos