I add a marker to the map using the code below, but after doing so I am unable to receive marker click/touch events.
If I just add the marker and don't animate to the marker's location, it seems impossible to click on the marker because of finger accuracy. Every now and then if I tap a lot really fast, I can get a click on it.
But if I do the second step below and animate to the marker's location, I can click on the marker with 100% accuracy, at least once anyway. But what happens is GoogleMap intercepts the touch and I don't get a touch event. Instead, GoogleMap displays two navigation buttons in the lower right corner of the map.
I've attached a screen shot to highlight where I've placed a marker and the navigation buttons that pop up in the lower-right when I touch that marker.
So my question is kinda two-fold. First is can I turn off those navigation buttons and receive that touch event myself?
And secondly, why do I have to animate the map camera to the specified location in order to receive any touch input?
Lastly, is there something I can set so that "fat finger" accuracy is turned on for touching markers? I'd think that unnecessary but maybe it's an issue here?
Also, I do have a Marker click listener. It's just not a direct listener because I have to manage clusters as well.
mClusterManager = new ClusterManager<>(this, mainMap);
mainMap.setOnMarkerClickListener(mClusterManager);
mClusterManager.setOnClusterItemClickListener(this);
mClusterManager.setOnClusterClickListener(this);
OnClusterItemClickListener() never gets called.
Thanks.
// Add marker - this alone doesn't make it clickable
Marker tempCursor = mainMap.addMarker(new MarkerOptions().position(newLatLng)
.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_pin_shadow)));
// Animate to new location - after this you can touch/click it
CameraUpdate up = CameraUpdateFactory.newLatLng(newLatLng);
mainMap.animateCamera(up);