Question

I need to know if user touch the marker.

enter image description here

Any idea? I hope that somebody help me.

Était-ce utile?

La solution

Try to implement OnMarkerClickListner and override onMarkerClick method.

Hava a look at this

Autres conseils

Put this code below inside onMapReady(GoogleMap googleMap){..}

mMap = googleMap;
mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
    @Override
    public boolean onMarkerClick(Marker marker) {
        Log.e("Testing",marker.getTitle());
        return false;
    }
});
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top