google maps markerInfowindow delegate not calling ios

google-maps, infowindow, ios, marker

Solution

I had the same problem - markerInfoWindow wouldn't get called even after setting the delegate. Ended up doing this:

- (BOOL)mapView:(GMSMapView*)mapView didTapMarker:(GMSMarker*)marker
{
  [mapView setSelectedMarker:marker];
  return YES;
}

setSelectedMarker will force a call on markerInfoWindow.

Problem

I am using Google Maps SDK for iOS app. I need to customize markerinfowindow. I add 1) `@interface MapsViewController : UIViewController GMSMapViewDelegate` 2) `mapView_.delegate = self;` in viewdidload and 3) ``` - (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker{ UIView *InfoWindow = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 150, 200)]; UILabel *nameLabel = [[UILabel alloc]init]; nameLabel.text = @"hi"; [InfoWindow addSubview:nameLabel]; return InfoWindow; } ``` but control is not comming in markerInfoWindow.

Original source