O'Reilly logo

iOS Programming Cookbook by Hossam Ghareeb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting directions between locations

Getting directions between source and destination locations is one of the common operations when dealing with maps and navigation apps. You can get directions from the current location or any other source location to the destination location and those directions will differ depending on the mode of transit, such as walking, driving, cycling, or public transport. In this section, we will learn how to get the direction between any two source and destination points and display them on the map.

How to do it...

To get directions between a source and destination, perform the following steps:

  1. Let's continue using our demo to add a way to display directions between two locations.
  2. Go to storyboard and open our view controller ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required