I am using a customised version of the mapview (OSMDroid version). I am using custom tiles within it and I only want the user to be able to view the area where I have my custom
I'm looking for exactly the same thing.
My best lead is to add an Overlay, which extends boolean onScroll(...)
. If this returns true, then the scroll is cancelled.
This is exactly how I want it, except for one thing: flinging/flicking. The same approach can be used to cancel fling events, though you only get to hear about it at the start of the fling.
Ideally, you'd be able to listen to the computeScroll()
method, and limit the (x, y)
of the scroll, based on mScroller.getCurX()
and mScroller.getCurY()
.