Victor Krusenstråhle Victor Krusenstråhle - 2 months ago 30
Swift Question

Google Maps SDK avoid highways and tolls (iOS)

I've read the documentations for both android and iOS but only I can't find but I cant manage to make google maps avoid either tolls or highways, this is my current code (and

does not work on iOS for me). Are there any way to avoid highways and tolls in the documentation?

let ONE = getText("address")
let TWO = getText("address2")

Alamofire.request(.GET, "\(ONE)&destination=\(TWO)&mode=drive&avoid=tfh", parameters: ["foo": "bar"])
.responseJSON { response in...


You can see in this video: Maps Shortcuts: Directions and the Google Maps iOS SDK on how to load and display information from the Directions web service in your app. You can read in this documentation the avoid parameter which indicates that the calculated route(s) should avoid the indicated features. It supports the following arguments:

  • tolls indicates that the calculated route should avoid toll roads/bridges.
  • highways indicates that the calculated route should avoid highways.

Check this related thread:

Hope this helps!