问题
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