Shailesh Chandavar
Shailesh Chandavar

Reputation: 1614

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

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.

Upvotes: 0

Views: 99

Answers (1)

Shailesh Chandavar
Shailesh Chandavar

Reputation: 1614

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()
    

Upvotes: 1

Related Questions