0

我正在使用这个插件: https ://github.com/JakeWharton/ActionBarSherlock-Plugin-Maps/downloads

在 ABS 中有 MapViewActivity。

我的问题是我想在地图上检测 onTap 事件,而不是在叠加层上,并且 onTap 方法似乎不存在于 SherlockMapActivity.class

怎么做 ?

谢谢。

4

1 回答 1

1

SherlockMapActivity is just an extension of MapActivity that add the capabilities of ActionBarSherlock to the MapActivity. However, it doesn't add an onTap method and MapActivity doesn't provide one either.

I guess what you are trying to detect a tap on the MapView. Several methods exists in order to do so. One of my favorite is to add a custom Overlay that does nothing but detects the tap. This Overlay has to be added at the first overlay in the getOverlays()'s Listin order to have its onTap method called after all other Overlays

于 2012-08-28T13:49:26.743 回答