如何自定义谷歌地图iOS SDK的信息窗口? [英] How to customize the InfoWindow of google map iOS SDK?

查看:124
本文介绍了如何自定义谷歌地图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;
}

这篇关于如何自定义谷歌地图iOS SDK的信息窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆