【问题标题】:Google Maps iOs SDK : Add an action to a custom InfoWindowGoogle Maps iOs SDK:向自定义信息窗口添加操作
【发布时间】:2016-03-15 19:32:52
【问题描述】:

我正在尝试使用自定义信息窗口在按钮上添加操作。 看起来此信息窗口已呈现为图像,无法执行任何操作。

我正在使用这种方法:

-(UIView *) mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker{
    //my code
}

我在 .XIB 文件中添加了我的自定义信息窗口。我想触发事件touchupinside,但仍然无法实现。

我尝试关注的一些链接没有成功:

谢谢!

编辑 对于Apple Maps,可以使用this beautiful class available on github来实现。

【问题讨论】:

    标签: xcode google-maps-sdk-ios


    【解决方案1】:
    If you check GMSMapView.h within GoogleMaps.Framework, you can see the below method which should let you add a custom infowindow for a marker, instead of using standard title and snippet alone:
    
    NOTE you (op) say annotationView=infoWindow
    BUT NORMAL: annotationView = marker itself and calloutView = infoWindow
    

    访问Custom annotation view in Google Maps SDK

    【讨论】:

    • 我已经添加了这个功能 :) 我会试试 Smccallout 插件!
    猜你喜欢
    • 1970-01-01
    • 2014-05-20
    • 2014-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多