Google Maps SDK for iOS doesn't display map content

后端 未结 5 1603
耶瑟儿~
耶瑟儿~ 2021-01-02 04:13

I\'m using the current version 1.1.2 of Google Maps SDK for iOS. The map only displays the Google logo, the current location and the added marker. But no map content whatsoe

相关标签:
5条回答
  • 2021-01-02 04:24

    Just in case someone comes here and nothing works...

    I was having this problem and got bored so I unzoomed the map and discovered I messed up with the location and my map center was in the middle of a desert! Map was working just fine.

    So try to unzoom, just in case.

    0 讨论(0)
  • 2021-01-02 04:34

    If you have included both GoogleMaps.framework and GoogleMapsM4B.framework (Maps for Business) in your XCode project, remove GoogleMapsM4B.framework.

    Otherwise you'll need to enable Google Maps Mobile SDK for Work through Enterprise Support portal instead of Google Maps SDK for iOS from Cloud Console.

    0 讨论(0)
  • 2021-01-02 04:34

    I also had the same problem.The issue was I used two iOS Api keys in 2 different places in code.Please check whether you have used correct API Key (iOS Key) from google Api console.Use the same key through out your app.

    0 讨论(0)
  • 2021-01-02 04:35

    This could also be caused by not having the right bundle ID entered under the API key in your Google API Console.

    0 讨论(0)
  • 2021-01-02 04:44

    Found the solution myself.

    I'm using Auto Layout. Apparently, in -viewDidLoad the Auto Layout hasn't yet done its work and my GMSMapView still had a CGRectZero frame. GMSMapView seems to react very picky on a zero frame.

    [self.view layoutIfNeeded];
    

    prior to setting the camera solved the problem for me.

    0 讨论(0)
提交回复
热议问题