0

I am specifying a route to be opened by the Google Maps app on iOS. The url I specify is of the form:

"comgooglemaps://?daddr=\(destination.lat),\(destination.lng)&saddr=\(myLocation.coordinate.latitude),\(myLocation.coordinate.longitude)&directionsmode=driving&waypoints=\(wp1.lat),\(wp1.lng)"

No matter what though, the route will never include the waypoint I specify. Is it possible that this notation is not supported on iOS? If so, what is the correct one?

Thanks

Don Miguel
  • 882
  • 9
  • 19
  • Looks like waypoints are not supported in [Maps URL scheme for iOS](https://developers.google.com/maps/documentation/urls/ios-urlscheme) but you can try the [Maps URLs universal cross-platform syntax](https://developers.google.com/maps/documentation/urls/get-started#directions-action) in displaying directions that supports waypoints. – jabamataro Oct 13 '20 at 07:21

1 Answers1

1

You can add the parameter +to:Latitude,Longtitude in daddr to add the extra stop(waypoint) you want.

Here is an example based on you sample code.

comgooglemaps://?&daddr=\(destination.lat),\(destination.lng)+to:\(destination2.lat),\(destination2.lng)&saddr=\(myLocation.coordinate.latitude),\(myLocation.coordinate.longitude)&directionsmode=driving

I based my answer on this post https://stackoverflow.com/a/47204434/4861618

Don Miguel
  • 882
  • 9
  • 19