How to customize the InfoWindow of google map iOS SDK?

心不动则不痛 提交于 2019-12-05 07:29:11

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/15177712/how-to-customize-the-infowindow-of-google-map-ios-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!