I need to limit the area in which my users can navigate in mapview (unless they get a blank screen!). I created a class that extends mapview and overrides onTouchEvent. I discovered the action "ACTION_UP" and checked the coordinates and retelling of the map here, if necessary. Everything works fine until the user “ejects” the card. I can detect the Up and screen coordinates at this point, but the map is still moving, so the detected coordinates are not correct.
I need to know the position of the screen when it stops moving!
@Override
public boolean onTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_UP ) {
//get coords of screen corners and calculate if the map is still in view.
}
I was looking for quite a while to answer this question, but many people ask a question, but there are no solutions around?
Could anyone do this?
Bex