【发布时间】:2018-12-21 16:56:11
【问题描述】:
我的 GMSMarker 出现了一些问题,它似乎与用户没有正确对齐。见下图:标记未对齐
如何将中心与用户位置透视对齐?
代码如下:
self.contractorMarker.iconView = self.markerImageView(image: UIImage(named: "contractor-marker")!, size: CGSize(width: 30, height: 30))
CATransaction.begin()
CAAnimation.init().duration = 0.5
self.contractorMarker.position = contractorCoordinate
CATransaction.commit()
self.contractorMarker.map = self.mapView
【问题讨论】:
-
用相关代码提问
-
会做@PrashantTukadiya
-
@AlvinQuezon 设置 groundAnchor = CGPoint (0.5,0.5)
-
嗨@chiragshah 是的,很有帮助!谢谢你,无论如何,你能否回答这个问题,以便其他人知道这一点?我会投票给你的答案。谢谢!
-
@AlvinQuezon 一定让我回答
标签: ios swift google-maps google-maps-markers