3

Google지도 API을 사용하여 내 앱에서 현재 위치를 표시하고 싶습니다. 프로젝트에서 Google지도 API를 사용하여 ""의 모든 단계를 수행했습니다.Google지도 API를 통합 할 때지도가로드되지 않음 iOS

나는 적절한 API 키와 번들 식별자를 지정했지만 맵은 간단한 공백과 마지막 Google 버튼 표시 만로드하지 않습니다.

"GoogleMaps-iOS-1.9.1"의 데모에서 동일한 API 키를 사용했지만 올바르게 작동했지만 로드맵은 내 앱에 없습니다.

내 코드에 적용되는 제안이나 소스 코드를 제공하십시오.

감사합니다.

+0

인 iOS 전용 키를 설정하십시오. 앱 번들 ID는 Google지도 대시 보드에 있습니까? –

+0

예 이미 추가되었습니다. – nipa

답변

-1

를 사용하여 다음 단계를 AppDelegate에에서

: 어딘가에 당신의 클래스

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 
    // Put your API key here. 
    [GMSServices provideAPIKey:GOOGLE_PRJ_API_KEY]; 
    return YES; 
} 

이 나타납니다 코드 다음 MapsController 사용하는 말 :

- (void)setupGoogleMap{ 
    GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:_currentLocation.coordinate.latitude longitude:_currentLocation.coordinate.longitude zoom:DEFAULT_ZOOM_LEVEL]; 
    if (!_googleMapView) { 
     _googleMapView = [GMSMapView mapWithFrame:self.view.bounds camera:camera]; 
     [self.view insertSubview:_googleMapView atIndex:0]; 
     _googleMapView.settings.compassButton = YES; 
     _googleMapView.myLocationEnabled = YES; 
     [_googleMapView setDelegate:self]; 
    } 
    _googleMapView.camera = camera; 
} 

하여 제공하는 API 키 또는 확인 함 재생성을 시도하거나 번들 식별자가