如何自定义谷歌地图iOS SDK的信息窗口?

如何自定义谷歌地图iOS SDK的信息窗口?

问题描述:

我想更改Google Map iOS SDK的信息窗口的宽度.反正有事吗?

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

我要这样做的原因是在InfoWindow中显示完整的地址.还有其他方法可以代替自定义InfoWindow吗?

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?

至少,我想实现如下图所示的效果: http://www.google.com/about/company/facts/locations/一个> 可以在其中应用超链接的地方.

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.

将地图delegate设置为视图控制器,然后实现google maps委托方法

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;
}