2014-08-28 64 views
0

我試圖在使用自定義infowindow的按鈕上添加動作。 看起來像這個infowindow呈現爲圖像,不能採取任何行動。Google Maps iOs SDK:向自定義InfoWindow添加動作

我用這個方法:

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

我一個的.xib文件中添加我的自定義信息窗口。我想觸發事件touchupinside但仍無法達到此目的。

一些鏈接我試圖不成功遵循:

謝謝!

編輯 對於Apple地圖,可以使用this beautiful class available on github來實現。

回答

0
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

+0

我已經添加了這個功能:)我將嘗試Smccallout插件訪問! – 2014-09-04 23:10:18

相關問題