I've displayed user location and i want to display those fetched locations in MKMApItem
.
I know the way to display in MKMapItem
..But i cant pass those fetched locations to MapItem class..can u help me in passing those values
FBRequest *friendRequest = [FBRequest requestForGraphPath:@"me/friends?field=name,location,hometown"];
[ friendRequest startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error){
NSArray *data = [result objectForKey:@"data"];
for (FBGraphObject<FBGraphUser> *friend in data) {
NSLog(@"%@:%@", [friend name ],[friend.location objectForKey:@"name"]);
and my output is:
2013-01-09 17:47:57.096 istb[296:1a03] Athish:Cochin, Kerala
2013-01-09 17:47:57.096 istb[296:1a03] Anges:Mumbai
.
.
.
.
2013-01-09 17:47:57.097 istb[296:1a03] Raja:Delhi
2013-01-09 17:47:57.097 istb[296:1a03] Rajesh:Canada
how should i pass these locations to MKMapItem
class
- (IBAction)onClick:(id)sender {
Class mapItemClass=[MKMapItem class];
if(mapItemClass &&[mapItemClass respondsToSelector:@selector(openMapsWithItems:launchOptions:)])
{...}}
Thanks in Advance..
I answered the question of how to do multiple geocode requests in response to your other question, so I'll refrain from repeating that narrative here.
Bottom line, I'd just suggest that you try:
and then you can tweak the answer provided in Multiple Locations on Map (using MKMapItem and CLGeocoder):
This routine is a complicated way of ensuring that the multiple geocode requests do not happen concurrently. The logic behind this is explained in greater detail Multiple Locations on Map (using MKMapItem and CLGeocoder).