mkmapitem

Double variable in MKMapItem array

末鹿安然 提交于 2019-12-23 05:22:28
问题 I got a SearchBar that giving the name it print the name searched in a TableView. Before add the key searched I am checking if my Database got the variable. If my database got it I add the searched word in the TableView. My problem is that at the moment matchingItems or response.mapItems got double variable or more and it print a lot of times the same name in the TableView. I have tried a lot of time to fix that but I don't know how do it. Image of bug > http://i67.tinypic.com/2jfyxdf.png

How to exit from Map App in IOS 6 i.e. return control back to app requesting directions?

泪湿孤枕 提交于 2019-12-13 18:22:19
问题 I am using MKMapItem to launch Map app from within my app after the user taps 'Directions' button. The Map app comes up fine showing directions from current location to a address. But how do I go back to my app, If I no longer want to see Directions? Below is my code attached to IBAction . Code: - (IBAction)pressDirectionsButton:(id)sender { Class mapItemClass = [MKMapItem class]; if (mapItemClass && [mapItemClass respondsToSelector:@selector(openMapsWithItems:launchOptions:)]) { CLGeocoder

iOS MKMapItem - how get access to all members?

社会主义新天地 提交于 2019-12-08 08:02:02
问题 I am using MapKit to do a local search which returns one or more MKMapItem objects. But there are members of the object I can see in the debugger but I can't access. The one I particularly need is UID. I have tried item.placemark, but it does not let me access the UID. This seems like it should be really simple. What am I missing here? This does not work: NSString *uid = item.placemark.UID This does not work: NSDictionary *mapItemDictionary = (NSDictionary *)item; NSString *uid =

iOS MKMapItem - how get access to all members?

好久不见. 提交于 2019-12-06 16:38:09
I am using MapKit to do a local search which returns one or more MKMapItem objects. But there are members of the object I can see in the debugger but I can't access. The one I particularly need is UID. I have tried item.placemark, but it does not let me access the UID. This seems like it should be really simple. What am I missing here? This does not work: NSString *uid = item.placemark.UID This does not work: NSDictionary *mapItemDictionary = (NSDictionary *)item; NSString *uid = [mapItemDictionary objectForKey:@"UID"]; But the debugger command po item shows me all the members of the object:

Passing user location to MKMapItem

时光怂恿深爱的人放手 提交于 2019-12-06 14:16:00
问题 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

Passing user location to MKMapItem

拜拜、爱过 提交于 2019-12-04 19:57:16
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:@

MKMapItem with specific Location

寵の児 提交于 2019-11-30 07:20:41
How can I launch the default maps app for iOS6 and pass it a custom location? For example: [[MKMapItem setLocation:MyLocation] openInMapsWithLaunchOptions:nil]; I followed the example here, but was unable to figure it out. How can I launch the Google Maps iPhone application from within my own native application? Here is the code to open the Maps native application with a custom location: double latitude = 35.0; double longitude = 1.0; MKPlacemark *placemark = [[[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(latitude, longitude) addressDictionary:nil] autorelease]; MKMapItem

MKMapItem with specific Location

天涯浪子 提交于 2019-11-29 08:16:58
问题 How can I launch the default maps app for iOS6 and pass it a custom location? For example: [[MKMapItem setLocation:MyLocation] openInMapsWithLaunchOptions:nil]; I followed the example here, but was unable to figure it out. How can I launch the Google Maps iPhone application from within my own native application? 回答1: Here is the code to open the Maps native application with a custom location: double latitude = 35.0; double longitude = 1.0; MKPlacemark *placemark = [[[MKPlacemark alloc]

display route on iOS 7 maps: addOverlay has no effect

旧巷老猫 提交于 2019-11-28 18:22:27
i want display a point to point route inside my mapView, i use this code for create the route: - (IBAction)backToYourCar { MKPlacemark *sourcePlacemark = [[MKPlacemark alloc] initWithCoordinate:self.annotationForCar.coordinate addressDictionary:nil]; NSLog(@"coordiante : locationIniziale %f", sourcePlacemark.coordinate.latitude); MKMapItem *carPosition = [[MKMapItem alloc] initWithPlacemark:sourcePlacemark]; MKMapItem *actualPosition = [MKMapItem mapItemForCurrentLocation]; NSLog(@"coordiante : source %f, ActualPosition %f", carPosition.placemark.coordinate.latitude ,actualPosition.placemark

display route on iOS 7 maps: addOverlay has no effect

无人久伴 提交于 2019-11-27 11:17:19
问题 i want display a point to point route inside my mapView, i use this code for create the route: - (IBAction)backToYourCar { MKPlacemark *sourcePlacemark = [[MKPlacemark alloc] initWithCoordinate:self.annotationForCar.coordinate addressDictionary:nil]; NSLog(@"coordiante : locationIniziale %f", sourcePlacemark.coordinate.latitude); MKMapItem *carPosition = [[MKMapItem alloc] initWithPlacemark:sourcePlacemark]; MKMapItem *actualPosition = [MKMapItem mapItemForCurrentLocation]; NSLog(@"coordiante