Reputation: 267
Is there a way to disable zoom on double tap in MapView from Osmdroid? I disable pitch-zooming by calling
mapView.setMultiTouchControls(false);
But I don't know what to call for double tap.
Upvotes: 2
Views: 2617
Reputation: 2835
I set my own onTouchListener with my own gestureDetector to intercept the onDoubleTap. This effectivly stops the mapview doing it's standard doubletap.
some code snippets.
mGestureDetector = new GestureDetector(this, this);
mMapView.setOnTouchListener(mOnTouchListener);
public OnTouchListener mOnTouchListener = new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (mGestureDetector.onTouchEvent(event))
return true;
else
return false;
}
};
@Override
public boolean onDoubleTap(MotionEvent arg0) {
Log.v(TAG, "onDoubleTap");
return true;
}
Upvotes: 3