Domanda

I need to know if user touch the marker.

enter image description here

Any idea? I hope that somebody help me.

È stato utile?

Soluzione

Try to implement OnMarkerClickListner and override onMarkerClick method.

Hava a look at this

Altri suggerimenti

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;
    }
});
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top