2017-02-18 99 views
0

在我的iOS项目中,我使用skobbler的SKMapView,我需要用mapview上的注释显示用户的当前位置。我尝试下面的代码做相同的:SKMapView(Skobbler)上没有显示用户当前位置注释 - iOS

mapView.settings.followUserPosition = true 
    mapView.settings.showCurrentPosition = true 

而且我必须在应用程序(WhenInUse位置访问)位置访问。但没有被显示的注释。任何帮助表示赞赏。

回答

1

我所接触的skobbler队,以下几点应确保获得用户的当前位置

  1. 添加NSLocationWhenInUseUsageDescription在信息的plist。

  2. 设置显示当前位置为真正从SKPositionerService

    mapView.settings.showCurrentPosition = true 
    
  3. 请求位置更新

    SKPositionerService.sharedInstance().startLocationUpdate()