0
두 개의 NSMutableArray가 있는데, 먼저 위치의 위도를 유지하고 두 번째는 경도를 유지합니다. 그런 다음 마커가있는지도에서이 위치를보고 싶습니다. 이 코드는지도상의 한 점을 보여 주지만 NSMutableArray에 여러 점이 있습니다. 어떻게해야합니까? 아무도 나를 도울 수 있습니까?CLLocationCoordinate2D 및 NSMutableArray
- (void)viewDidLoad
{
[super viewDidLoad];
MKCoordinateRegion region;
MKCoordinateSpan span;
span.latitudeDelta=0.2;
span.longitudeDelta=0.2;
CLLocationCoordinate2D location;
location.latitude = 40.182533;
location.longitude = 29.066868;
region.span=span;
region.center=location;
if(addAnnotation != nil) {
[mapView removeAnnotation:addAnnotation];
[addAnnotation release];
addAnnotation = nil;
}
addAnnotation = [[AddressAnnotation alloc] initWithCoordinate:location];
[mapView addAnnotation:addAnnotation];
[mapView setRegion:region animated:TRUE];
[mapView regionThatFits:region];
// Do any additional setup after loading the view from its nib.
}
감사합니다.하지만이 기능이 작동하지 않습니다. S –
현재 코드를 표시 할 수 있습니까? – Saran
현재 코드를 주석으로 쓸 수는 없지만 http://stackoverflow.com/questions/7790208/how-can-i-show-several-location-points-on-map-in-objective-c –