Displaying info window when tapped marker in googl

2019-07-17 23:44发布

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条回答
The star\"
2楼-- · 2019-07-18 00:30

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

Swift Implementation:

func mapView(mapView: GMSMapView!, didTapMarker marker: GMSMarker!) -> Bool {
    return false
}
查看更多
登录 后发表回答