mapview
緯度用の別の配列と経度用の別の配列がある注釈ポイントをロードしようとしています ここに私のコードがあります
- (void)viewDidLoad
{
[super viewDidLoad];
delegate=[[UIApplication sharedApplication]delegate];
delegate.arrForLat=[[NSMutablearray alloc]initwithobjects:@"33.930216",@"33.939788",@"33.9272",@"33.902237"];
delegate.arrForLon=[[NSMutablearray alloc]initwithobjects:@"-118.050392",@"-118.076549",@"-118.065817",@"-118.081733 "];
for (int i=0 ; i< delegate.arrForLat.count;i++)
{
annotationCoord.latitude = [[delegate.arrForLat objectAtIndex:i] doubleValue];
annotationCoord.longitude = [[delegate.arrForLng objectAtIndex:i] doubleValue];
MKPointAnnotation *annotationPoint = [[MKPointAnnotation alloc] init];
annotationPoint.coordinate = annotationCoord;
[MapView addAnnotation:annotationPoint];
}
}
現在、注釈ポイントは 1 つしか取得できmapview
ませんが、座標は 4 つあります。どのような間違いを犯したのかわかりません。