gpt4 book ai didi

ios - 在 Google map 中保留用户位置中心 - Swift

转载 作者:行者123 更新时间:2023-11-28 09:28:21 25 4
gpt4 key购买 nike

我已经在一个 swift 项目中实现了 Google map ,并使用 locationManager 来跟踪并当前打印出用户位置。

当用户四处移动时,我也会更改相机位置,但是随着 map 移动然后蓝点(用户位置)移动,这似乎有点不稳定。

有没有一种方法可以让用户位置始终居中并让 map 移动?

最佳答案

您可以轻松启用

mapView.myLocationEnabled = true

看看这个answer有关相机更新的更多信息 -> 因为它显示了如何使用 2 个位置更新相机或将位置居中

关于ios - 在 Google map 中保留用户位置中心 - Swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30839864/

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