iOS 8.0의 Google지도에서 여러 마커를 얻으려고 애 쓰고 있습니다. 나의 현재 코드는 다음과 같습니다 내 배열을 통해 반복,하지만 내 배열 수가 2 또는 3 선택한 항목 사용자에 따라 달라집니다처럼 동안 만 1 개 마커를 참조다중 마커 Google지도 iOS SDK
ResourceGroep *rsg = [ResourceGroep alloc]init;
GMSCameraPosition *camera = nil;
for (int i = 0; i < [rsg.chosenResourceArray count]; i++)
{
camera = [GMSCameraPosition cameraWithLatitude:[loc.Latitude doubleValue]
longitude:[loc.Long doubleValue]
zoom:15];
mapView_ = [GMSMapView mapWithFrame:self.view.bounds camera:camera];
mapView_.myLocationEnabled = NO;
CLLocationCoordinate2D position = { [rsg.Latitude doubleValue], [rsg.Long doubleValue] };
GMSMarker *marker = [GMSMarker markerWithPosition:position];
marker.title = [NSString stringWithFormat:@"Marker %i", i];
marker.appearAnimation = YES;
marker.flat = YES;
marker.snippet = @"";
marker.map = mapView_;
}
[self.view addSubview:mapView_];
. 내가 뭘 놓치고 있니?
move camera = ..., mapView_ = ... 루프에서 루프 아웃. 매번 새로운 mapView를 만들 때 – kabarga