TheModularMind
TheModularMind

Reputation: 2065

Android OnInfoWindowClickListener() never called

I'm creating an application with new Google Maps API V2 and I have to intercept the click on InfoWindow, showed when a Marker is clicked.

Reading the documentation I assumed that I do that to listen to InfoWindows clicks :

 mGoogleMap.setOnInfoWindowClickListener(new OnInfoWindowClickListener() {

        @Override
        public void onInfoWindowClick(Marker marker) {

            Log.d("", marker.getTitle());   
        }
    });

But unfortunatly the method is never called.

If I try to listen to marker click and use setOnMarkerClickListener instead of OnInfoWindowClickListener , this works fine.

Hope to find some help, thanks in advance

Upvotes: 7

Views: 7424

Answers (1)

Lefteris
Lefteris

Reputation: 14677

The OnInfoWindowClickListener gets called when you actually click on the Marker title popup and not the marker.

The above just works fine.

Upvotes: 11

Related Questions