Android GoogleMap覆盖触控侦听器

时间:2015-05-28 19:46:02

标签: android google-maps android-layout

我想覆盖android的谷歌地图触控听众。 (意味着通过在地图顶部滑动,它会执行其他操作,而不是移动地图)

我成功设法通过调用mMap.getUiSettings().setAllGesturesEnabled(false);取消当前的Google地图滑动手势。 现在,当我在地图顶部滑动时,它什么都不做

我尝试将setOnTouchListener设置为包含地图的布局,但地图仍未响应。

注意:我在调用setAllGesturesEnabled之前和之后都尝试在布局上调用setOnTouchListener,但遗憾的是它没有成功。

如果以下信息是必要的,我现在不知道,但这里是我用于mapActicity的与Google地图相关的软件包列表。

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;

另外我使用的是JDK 1.7

提前致谢。

0 个答案:

没有答案
相关问题