User current location annotation not being shown on SKMapView (Skobbler) - iOS

101 Views Asked by At

In my iOS project I'm using skobbler's SKMapView, I need to show user's current location with an annotation on mapview. I tried following code to do the same :

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

And I have location access in the app (WhenInUse Location access).But the annotation is not being shown. Any help is appreciated.

1

There are 1 best solutions below

0
Shailesh Chandavar On BEST ANSWER

I have contacted the skobbler team, following things should be ensured to get the user's current location

  1. Add NSLocationWhenInUseUsageDescription in Info plist.

  2. Set show current position as true

    mapView.settings.showCurrentPosition = true
    
  3. Request location update from SKPositionerService

    SKPositionerService.sharedInstance().startLocationUpdate()