mkmapitem

Multiple Locations on Map (using MKMapItem and CLGeocoder)

末鹿安然 提交于 2019-11-27 08:47:29
I'm trying to display multiple locations in MKMapItem . I am getting those locations from a CLGeocoder , unfortunately it only accepts one location. Even though I pass in an NSArray it just returns one location. The following works fine with a single location, but not with multiple locations. How can I geocode multiple locations? Class mapItemClass = [MKMapItem class]; if (mapItemClass && [mapItemClass respondsToSelector:@selector(openMapsWithItems:launchOptions:)]) { NSArray *addresses = @[@"Mumbai",@"Delhi","Banglore"]; CLGeocoder *geocoder = [[CLGeocoder alloc] init]; [geocoder

Multiple Locations on Map (using MKMapItem and CLGeocoder)

删除回忆录丶 提交于 2019-11-26 14:20:00
问题 I'm trying to display multiple locations in MKMapItem . I am getting those locations from a CLGeocoder , unfortunately it only accepts one location. Even though I pass in an NSArray it just returns one location. The following works fine with a single location, but not with multiple locations. How can I geocode multiple locations? Class mapItemClass = [MKMapItem class]; if (mapItemClass && [mapItemClass respondsToSelector:@selector(openMapsWithItems:launchOptions:)]) { NSArray *addresses = @[@