Sagaya Abdul Sagaya Abdul - 10 months ago 153
iOS Question

Google distance api with ios swift

I want to use the google distance api to calculate the distance in kilometers with iOS swift have tried going through the distance matrix api but seems there is no sdk for ios


You could use distanceFromLocation method.

let distanceInMeters = location1.distanceFromLocation(location2)

Your location1 and location2 are CLLocation instances .