0

When I tap a marker,I want map to pop a custom infowindow,rather than a default infowindow.The custom infowindow has a button on it,but when I clicked the button.The button does not triggered!!! I need your help ,help,help......

-(UIView*)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker
{
    NSLog(@"sssssssss");
    self.iCallOutView.nameLabel.text=marker.title;
    self.iCallOutView.coordinate=marker.position;
    return self.iCallOutView;
}
Chris Morgan
  • 86,207
  • 24
  • 208
  • 215
user2143299
  • 31
  • 1
  • 3
  • 4
    And we need your code, code, code ... – rdelmar May 30 '13 at 03:50
  • -(UIView*)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker { NSLog(@"sssssssss"); self.iCallOutView.nameLabel.text=marker.title; self.iCallOutView.coordinate=marker.position; return self.iCallOutView; } – user2143299 May 30 '13 at 04:34

2 Answers2

2

Check this topic How to force refresh contents of the markerInfoWindow in Google Maps iOS SDK

Note: The info window is rendered as an image each time it is displayed on the map. This means that any changes to its properties while it is active will not be immediately visible. The contents of the info window will be refreshed the next time that it is displayed.

So I think you can not handle any events for any controls in Info Window.

Community
  • 1
  • 1
Ky Thanh
  • 21
  • 3
0

Make sure that your button and the code is linked properly.

If you have xib or storyboard, check if the button and the function are linked properly. If it is all code then check if you have given the code to perform action when button is clicked, like given below.

        [button addTarget:self action:@selector(methodName:) forControlEvents:UIControlEventTouchUpInside];
prince
  • 854
  • 2
  • 9
  • 36