© Jeffrey Linwood 2020
J. LinwoodBuild Location Apps on iOS with Swifthttps://doi.org/10.1007/978-1-4842-6083-8_9

9. Using Directions with the Google Directions API

Jeffrey Linwood1 
(1)
Austin, TX, USA
 

The Google Directions API is a simple HTTPS API that lets you get driving directions to a destination. The Google Directions API does not have a native Swift implementation from Google – instead, you make an HTTPS API call to Google and parse the JSON results in the response. Part of a successful response is a path that can be turned into a polyline and displayed on the map.

This chapter builds on the work done in Chapters 7 and 8. In Chapter 7, we set up a basic iOS application project using CocoaPods with the Google Maps API. In Chapter 8, we discussed ...

Get Build Location Apps on iOS with Swift: Use Apple Maps, Google Maps, and Mapbox to Code Location Aware Mobile Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.