gpt4 book ai didi

ios - Swift iOS 中的 GMSCircle 不规则边框

转载 作者:行者123 更新时间:2023-11-28 13:36:33 26 4
gpt4 key购买 nike

我正在使用谷歌地图,我在其中使用以下代码创建了圆圈,但我的圆圈的边界是不规则的。我的问题是如何让它像 MKCircle 一样平滑

let circ = GMSCircle(position: circleCentreCoordinate, radius: CLLocationDistance(radius))
circ.fillColor = UIColor.purple.withAlphaComponent(0.2)
circ.strokeColor = UIColor.purple.withAlphaComponent(0.7)
circ.strokeWidth = 2
circ.map = self.mapView
let update = GMSCameraUpdate.fit(circ.bounds())
mapView.animate(with: update)

当我的半径是 30 米时,它会像这样显示我

enter image description here

当半径为 200+ 米时,它就像

enter image description here

最佳答案

此问题出现在 GoogleMap 3.1.0 中,更新到 GoogleMap 3.3.0,这将解决您的问题。

关于ios - Swift iOS 中的 GMSCircle 不规则边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56555666/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com