Google Maps SDK for iOS doesn't display map content

后端 未结 5 1602
耶瑟儿~
耶瑟儿~ 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: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.

提交回复
热议问题