How to get the speed of my navigation in Sygic

351 Views Asked by At

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

There are 1 best solutions below

0
On BEST ANSWER

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")
}