I want to add a button on the map that centers the map at the user's current position, but it should be activated only if the user moves around the map and his current position is no longer displayed on the map. I used the onTouchEvent method to detect navigation.
@Override public boolean onTouchEvent(MotionEvent event, MapView mapView) { Log.e("Touch", Integer.toString(event.getAction())); int action = event.getAction(); if (action == MotionEvent.ACTION_DOWN) { touchStarted = true; } else if (action == MotionEvent.ACTION_MOVE) { if (event.getPointerCount() > 3) moveStarted = true; return true; } return true; }
but how do I find that my current position is no longer displayed on the screen?
source share