-2

I want to show a small window on the click of info window in iphone google maps. I want that when the user will tap on the marker, info window will appear. And on the tap of that info window, another window should appear. In android, there is a OnInfoWindowClickListener method. What we have in iOS like that ?

Saxon Druce
  • 17,406
  • 5
  • 50
  • 71
Hawk-Eye
  • 400
  • 1
  • 7
  • 23

2 Answers2

2

where you adding Map,add

 mapView_.delegate=self; 

then use this

-(void)mapView:(GMSMapView *)mapView
didTapInfoWindowOfMarker:(GMSMarker *)marker{

   //info window tapped

}
Hatem Alimam
  • 9,968
  • 4
  • 44
  • 56
user2115266
  • 137
  • 1
  • 12
  • hey man..you know how to set frame for google map ?? – user2115266 Mar 28 '13 at 09:58
  • 1
    Create a CGRect with the required frame dimensions and set the MapView frame with method `mapWithFrame:` and then add the mapview as main subview. Below is the code which explains all. `CGRect fr= CGRectMake(0, 44, 768, 960); mapView_ = [GMSMapView mapWithFrame:fr camera:camera]; mapView_.myLocationEnabled = YES; [self.view addSubview:mapView_];` – Hawk-Eye Mar 29 '13 at 05:47
0

in iOS a delegate method will be called in the case the user taps on the info window. Here is the documentation of the delegate.

/**
 * Called after a marker's info window has been tapped.
 */
- (void)mapView:(GMSMapView *)mapView
    didTapInfoWindowOfMarker:(id<GMSMarker>)marker;

As parameters you will receive the mapView instance and the object of the info window's marker. Don't forget to include the GMSMapViewDelegate.

Robert Weindl
  • 1,092
  • 1
  • 10
  • 30