GMSMarker icon in the top left corner of the view (iOS)

守給你的承諾、 提交于 2019-12-03 16:09:17

I had a pretty similar issue. I resolved it by changing the moment I configure the map in the view lifecycle.

In my case, I was using a child view controller. I was configuring the map before viewWillAppear was called which caused the map to not center properly (the marker was on the top left corner). I moved my call to after the viewWillAppear and it fixed it. A good place would be viewDidAppear.

If you are using a cell, you will probably need to investigate with the view lifecycle instead of the controller lifecycle.

This is not written anywhere on the Google documentation.

you have to draw map in func viewDidLayoutSubviews()

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!