我在地图上放置了两个图钉:
- (void)viewDidLoad {
[super viewDidLoad];
CLLocationCoordinate2D cord1 = {.latitude = 44.508473, .longitude = 11.375828};
CLLocationCoordinate2D cord2 = {.latitude = 44.508871, .longitude = 11.375854};
[self.mapView setRegion:MKCoordinateRegionMake(cord1, MKCoordinateSpanMake(.005, .005)) animated:YES];
[self.mapView setRegion:MKCoordinateRegionMake(cord2, MKCoordinateSpanMake(.005, .005)) animated:YES];
AddressAnnotation * annotazione = [[AddressAnnotation alloc] init];
AddressAnnotation * annotazione2 = [[AddressAnnotation alloc] init];
[annotazione setCoordinate:cord1];
[annotazione2 setCoordinate:cord2];
[self.mapView addAnnotation:annotazione];
[self.mapView addAnnotation:annotazione2];
}
有没有办法用线连接引脚?谢谢!