Reputation: 1623
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 &avoid=tfh
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, "https://maps.googleapis.com/maps/api/directions/json?language=sv&origin=\(ONE)&destination=\(TWO)&mode=drive&avoid=tfh", parameters: ["foo": "bar"])
.responseJSON { response in...
Upvotes: 0
Views: 749
Reputation: 13469
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!
Upvotes: 1