iOS의 Google지도에 여러 마커를 표시하려면 어떻게해야합니까? 다음 접근 방식을 사용했지만 작동하지 않았습니다. 난 당신이 아마 [array objectAtIndex:i]
를 사용한다고 생각하면Objective C의 Google Map에 여러 마커 표시
for (int i = 0; i < [array count]; i++)
{
pointsToUse[i] = CLLocationCoordinate2DMake([[[[array objectAtIndex:0] componentsSeparatedByString:@","] objectAtIndex:0] floatValue],[[[[array objectAtIndex:0] componentsSeparatedByString:@","] objectAtIndex:1] floatValue]);
[_map animateToLocation:pointsToUse[i]];
GMSMarkerOptions *options = [[GMSMarkerOptions alloc] init];
options.position = pointsToUse[i];
[_map animateToLocation:pointsToUse[i]];
[_map addMarkerWithOptions:options];
}
안녕 @Bryanyan, 나는 단지이 게시물을 보았다. 다음 코드를 사용하여 경계 영역 (즉, 모든 마커)을 포함하도록 카메라를 설정할 수 있습니다. http://stackoverflow.com/questions/15040409/how-to-setregion-with-google-maps-sdk-for- 이오스 –