I mean if i click marker OnMarkerClickListener
is called, so the OnMapClickListener
did not. Even if i set mMap.setOnMarkerClickListener(null);
marker object still masks all click events for underlying map and objects.
How can i set Marker
transparent for all user interractions?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
The only workaround I found for this issue is to execute the same code in
OnMarkerClickListener
that you have inOnMapClickListener
and returnfalse
:According to the docs about markers, if you add your own Listener and the onMarkerClick() method returns false, the default behaviour will be executed.
So, in the onMarkerClick() just return true and do nothing else to completely overwrite the default.
This is indeed a "limitation" of markers as of 3.1.59 version of the library.
If you really need them to be markers, please post a feature request on gmaps-api-issues for
MarkerOptions.clickable
andMarker.setClickable
.If you can, consider using other visual objects, e.g.
GroundOverlay
. The only problem is they all scale with map, unlike markers. The closest would beCircle
with zero radius and 20-50 dp stroke width, but that's only a single color dot.