Objective C Draw path between two location in Google map

- (void)drawRoute
{
    [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
    CLLocationCoordinate2D origin = CLLocationCoordinate2DMake([[obj_DataModel getCurrentLocationLatitude] doubleValue],[[obj_DataModel getCurrentLocationLongitude] doubleValue]);
    CLLocationCoordinate2D destination = CLLocationCoordinate2DMake([obj_appDelegate.app_latitude doubleValue], [obj_appDelegate.app_longitude doubleValue]);
    
    [self fetchPolylineWithOrigin:origin destination:destination completionHandler:^(GMSPolyline *polyline)
    {
        if(polyline)
            polyline.map = _mapView;
        [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
    }];
}

- (void)fetchPolylineWithOrigin:(CLLocationCoordinate2D )origin destination:(CLLocationCoordinate2D )destination completionHandler:(void (^)(GMSPolyline *))completionHandler
{
    
    NSString *originString = [NSString stringWithFormat:@"%f,%f", origin.latitude, origin.longitude];
    NSString *destinationString = [NSString stringWithFormat:@"%f,%f", destination.latitude, destination.longitude];
    NSString *directionsAPI = @"https://maps.googleapis.com/maps/api/directions/json?";
    NSString *directionsUrlString = [NSString stringWithFormat:@"%@&origin=%@&destination=%@&mode=driving", directionsAPI, originString, destinationString];
    NSURL *directionsUrl = [NSURL URLWithString:directionsUrlString];
    
    
    NSURLSessionDataTask *fetchDirectionsTask = [[NSURLSession sharedSession] dataTaskWithURL:directionsUrl completionHandler:
                                                 ^(NSData *data, NSURLResponse *response, NSError *error)
                                                 {
                                                     NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];
                                                     if(error)
                                                     {
                                                         if(completionHandler)
                                                             completionHandler(nil);
                                                         return;
                                                     }
                                                     
                                                     NSArray *routesArray = [json objectForKey:@"routes"];
                                                     
                                                     dispatch_async(dispatch_get_main_queue(), ^{
                                                         GMSPolyline *polyline = nil;
                                                         if ([routesArray count] > 0)
                                                         {
                                                             NSDictionary *dictlegs = [routesArray valueForKey:@"legs"];
                                                             NSDictionary *dictDistance = [[dictlegs valueForKey:@"distance"] objectAtIndex:0];
                                                             NSDictionary *dictDuration = [[dictlegs valueForKey:@"duration"] objectAtIndex:0];
                                                             NSLog(@"Distance: %@", [[dictDistance valueForKey:@"text"] objectAtIndex:0]);
                                                             NSLog(@"Duration: %@", [[dictDuration valueForKey:@"text"] objectAtIndex:0]);
//                                                             lblDistance.text = [NSString stringWithFormat:@"Distance: %@, Duration: %@", [[dictDistance valueForKey:@"text"] objectAtIndex:0], [[dictDuration valueForKey:@"text"] objectAtIndex:0]];
                                                             NSDictionary *routeDict = [routesArray objectAtIndex:0];
                                                             NSDictionary *routeOverviewPolyline = [routeDict objectForKey:@"overview_polyline"];
                                                             NSString *points = [routeOverviewPolyline objectForKey:@"points"];
                                                             GMSPath *path = [GMSPath pathFromEncodedPath:points];
                                                             polyline = [GMSPolyline polylineWithPath:path];
                                                         }
                                                         
                                                         polyline.strokeWidth = 2;
                                                         polyline.strokeColor = [UIColor redColor];
                                                         if(completionHandler)
                                                             completionHandler(polyline);
                                                     });
                                                     
                                                 }];
    [fetchDirectionsTask resume];
}