Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Calculating Travel time

I currently have an app that will calculate your current location. Then the app lists parking lots around your current location. All locations are in the CLLocation format. I can currentlly calculate the distance in meters. However, what I would like to do is give the user a travel time from their current location to a selected parking lot. I looked around on google and am having trouble finding a solution.

I am using Swift 2.3

Any help would be greatly appreciated.

Could you convert the meters into feet for example:

let distanceInFeet = distanceInMeters * 3.28084

And then display the result of that?

Yes, that would work to get the distance in feet. But what I am really looking for is to get a Time that it would take to get from one location to another.