When I click on a marker, I'd like to show quickly an InfoWindow with basic information, then call a webservice that returns me the distance / path to the marker.
I have to call the webservice and not directly the Google Maps SDK because the path is modified to go to some points.
I tried that code :
- (void)fillInfoWindowForMarker:(GMSMarker *)marker {
    // get infos
    NSURL * url = [WSHelper.sharedHelper getPathURLForOrigin:origin destination:dest inGreenPath:greenPath];
    NSDictionary * result = [WSHelper.sharedHelper getPathAtUrl:url];
    GMSPath * path = [result valueForKey:@"path"];
    NSString * distance = [result valueForKey:@"distance"];
    dispatch_async(dispatch_get_main_queue(), ^{
        pathLine = [GMSPolyline polylineWithPath:path];
        pathLine.strokeWidth = 2;
        pathLine.strokeColor = UIColor.blackColor;
        pathLine.map = map;
        infoWindow.distanceLabel.text = @"something"
    });
}
- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker {
    if (infoWindow) {
        pathLine.map = nil;
        infoWindow = nil;
        pathLine = nil;
    }
    InfoWindowView * view =  [[[NSBundle mainBundle] loadNibNamed:@"InfoWindowView" owner:self options:nil] objectAtIndex:0];
    view.distanceLabel.text = @"0 km";
    infoWindow = view;
    view.tag = 678;
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
        [self fillInfoWindowForMarker:marker];
    });
    return view;
}
Where infoWindow is a UIView subclass attribute of my controller.
The path is drawn on the map, but the label is not updated. I tried to print the map subviews, but there is no InfoWindow inside.
How could I achieve this ?