Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 867
TheModularMind Avatar asked Jan 11 '13 00:01

TheModularMind


1 Answers

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

The above just works fine.

like image 145
Lefteris Avatar answered Oct 20 '22 19:10

Lefteris