1

My issue is simple I am able to start a navigation, get the remaining time and distance from current position to end of route but I didn't find how to get the current speed of my navigation

  • 1
    You surely tried *something*. Don't hesitate to show your attempt, so that this does not look like a “write the code for me” question! – ielyamani Dec 05 '18 at 13:55
  • I tried to find a solution but there is nothing in their documentation that help or explain how to get the speed of a navigation there is only how to get the current speed limit and it properties – omar thamri Dec 05 '18 at 14:03

1 Answers1

1

Best way to get current speed and other info related to your GPS position is to use SYPositioning.

You will need to register your class as a SYPositioningDelegate and then update current speed in delegate method SYPositioningDelegate.positioning(_ positioning: SYPositioning, didUpdate position: SYPosition)

SYPositioning.shared().delegate = self

...

func positioning(_ positioning: SYPositioning, didUpdate position: SYPosition) {
    let currentSpeed = position.speed
    print("current speed is \(Int(currentSpeed))km/h")
}
anonym
  • 136
  • 5