谷歌地图API V2:如何使标志物非点击? [英] Google Maps API v2: How to make markers non-clickable?
问题描述
我的意思是,如果我点击标记 OnMarkerClickListener
被调用,因此 OnMapClickListener
没有。即使我设置 mMap.setOnMarkerClickListener(空);
标记对象仍然掩盖所有点击活动为基础的地图和对象。
如何设置标记
透明的,所有的用户interractions?
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?
推荐答案
这确实是标记为3.1.59版本的库的限制。
This is indeed a "limitation" of markers as of 3.1.59 version of the library.
如果你真的需要他们的标记,请在发布的 GMaps实现-API的问题为 MarkerOptions.clickable
和 Marker.setClickable
。
If you really need them to be markers, please post a feature request on gmaps-api-issues for MarkerOptions.clickable
and Marker.setClickable
.
如果你可以,请考虑使用其他视觉对象,例如 GroundOverlay
。唯一的问题是他们都秤地图,不同的标记。最接近的将是圆
零半径和20-50 DP笔画宽度,但这只是一个单一的颜色点。
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 be Circle
with zero radius and 20-50 dp stroke width, but that's only a single color dot.
这篇关于谷歌地图API V2:如何使标志物非点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!