Displaying info window when tapped marker in google maps iOS sdk while implementing mapView:didTapMarker: delegate method implemented

瘦欲@ 提交于 2019-12-11 04:01:47

问题


Ok it is a long title. I am having trouble when i use google maps iOS sdk. I want to show an info window about a marker which user tapped. According the documentation if snippet and title properties of GMSMarker are both selected info window will be shown when user tapped that marker. But I also implement mapView:didTapMarker: method from GMSMapViewDelegate protocol. If I comment out that method info window is visible otherwise info window is not visible. So how can I show info window when that method implemented?


回答1:


Implement GMSMapViewDelegate's mapView:didTapMarker: method and make it return false.

Swift Implementation:

func mapView(mapView: GMSMapView!, didTapMarker marker: GMSMarker!) -> Bool {
    return false
}


来源:https://stackoverflow.com/questions/22564172/displaying-info-window-when-tapped-marker-in-google-maps-ios-sdk-while-implement

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