Search code examples
iosgoogle-maps-sdk-ios

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


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?


Solution

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

    Swift Implementation:

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