![](/img/trans.png)
[英]How can I find the x coordinate of the contentView that is equal to the center x of a UIScrollView's frame
[英]How can I center the GMSMapMarker view in a coordinate
有沒有辦法將橙色箭頭(GMSMapMarker)在坐標中居中,更改視圖框架或其他什么? 我正在使用 iOS 版 Google 地圖。 我可以用一個角度旋轉視圖,但我想在自定義坐標中設置視圖的中心。
我使用 GMSMarker 的屬性 groundAnchor 找到了解決方案:
_mapMarker.groundAnchor = CGPointMake(0.5,0.5);
我認為您可以使用GMSCoordinateBounds計算像素/度數,然后您可以根據圖標大小和標題移動中心。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.