您好,设置地图监听是不会影响地图的移动的,可以参考以下代码:
m_mapcontrol.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
int x = (int) event.getX();
int y = (int) event.getY();
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
//获取鼠标点
Point pointMouse = new Point(x, y);
//将地图中指定点的像素坐标转换为地图坐标
Point2D point = m_mapcontrol.getMap().pixelToMap(pointMouse);
//显示鼠标点的地理坐标
double longitude = point.getX();
double latitude = point.getY();
Log.i("经度", String.valueOf(longitude));
break;
}
return false;
}
});