在我的iOS项目中,我使用的是skobbler的SKMapView,我需要在mapview上显示带有注释的用户当前位置。我尝试下面的代码来做同样的事情:
mapView.settings.followUserPosition = true
mapView.settings.showCurrentPosition = true
而且我在应用程序中具有位置访问权限(WhenInUse位置访问权限)。但是未显示注释。任何帮助表示赞赏。
我已经联系了skobbler小组,请确保执行以下操作以获取用户的当前位置
在信息plist中添加NSLocationWhenInUseUsageDescription。
将显示当前位置设置为true
mapView.settings.showCurrentPosition = true
向SKPositionerService请求位置更新
SKPositionerService.sharedInstance().startLocationUpdate()
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句