this is opened from ios app using below code
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:routeUrlString] options:@{} completionHandler:nil];
this opens the url in google map app or browser depending on availability.
Need confirmation that it is legal and free to use this way for commercial purpose ? A google official source url, mentions this would be really helpful
See https://developers.google.com/maps/documentation/urls/get-started.
And for using directions go here: https://developers.google.com/maps/documentation/urls/get-started#directions-action