Gary Leung
Gary Leung

Reputation: 31

How to customize the InfoWindow of google map iOS SDK?

I want to change the width of the InfoWindow of google map iOS SDK. Is there anyway to do?

The reason I want to do it is to show the full address in the InfoWindow. Is there any other way to do so instead of customizing the InfoWindow?

Also, can I change the text size in the InfoWindow?

At least, I would like to achieve the effect like this map: http://www.google.com/about/company/facts/locations/ where hyperlink can be applied as well.

Upvotes: 3

Views: 3947

Answers (1)

Jing
Jing

Reputation: 1965

Set the map delegate to the view controller, then implement the google maps delegate method

-(UIView *)mapView:(GMSMapView *) aMapView markerInfoWindow:(GMSMarker*) marker
{
    UIView *view = [[UIView alloc]init];
    //customize the UIView, for example, in your case, add a UILabel as the subview of the view
    return view;
}

Upvotes: 9

Related Questions