I tried to draw a route with Google Maps on iOS that come from Google Direction API. I hit this end point
NSString *urlString = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/directions/json?origin=%@&destination=%@&mode=driving&key=%@", origin, destination, gDirectionKey];
Then I got its routes that I draw with GMSPolyline
GMSPath *path =[GMSPath pathFromEncodedPath:resultData[@"routes"][0][@"overview_polyline"][@"points"]];
if (routeToCustomer == nil)
routeToCustomer = [[GMSPolyline alloc] init];
routeToCustomer.path = path;
routeToCustomer.strokeWidth = 7;
routeToCustomer.strokeColor = [UIColor colorWithHexString:ACTIVE_COLOR];
routeToCustomer.map = _mapView;
It looks like that the starting line doesn't start in its coordinate, but in the nearest way. See image below.
Is it possible to draw line from its coordinate into "starting direction"? If so, any help would be appreciated. Thank you.