I know this thread is a little old but the answer to this question can be found on http://code.google.com/p/osmdroid/issues/detail?id=209
To point is to set max extent of map and restrict scrolling to that extent.
Below is the summary of issue mentioned above (Add the code below to MapView.java)
protected Rect mScrollableAreaLimit = null;
public void setScrollableAreaLimit(BoundingBoxE6 boundingBox) {
final int worldSize_2 = TileSystem.MapSize(MapViewConstants.MAXIMUM_ZOOMLEVEL) / 2;
// Clear scrollable area limit if null passed.
if (boundingBox == null) {
mScrollableAreaLimit = null;
return;
}
// Get NW/upper-left
final Point upperLeft = TileSystem.LatLongToPixelXY(boundingBox.getLatNorthE6() / 1E6,
boundingBox.getLonWestE6() / 1E6, MapViewConstants.MAXIMUM_ZOOMLEVEL, null);
upperLeft.offset(-worldSize_2, -worldSize_2);
// Get SE/lower-right
final Point lowerRight = TileSystem.LatLongToPixelXY(boundingBox.getLatSouthE6() / 1E6,
boundingBox.getLonEastE6() / 1E6, MapViewConstants.MAXIMUM_ZOOMLEVEL, null);
lowerRight.offset(-worldSize_2, -worldSize_2);
mScrollableAreaLimit = new Rect(upperLeft.x, upperLeft.y, lowerRight.x, lowerRight.y);
}
Now you can call the setScrollableAreaLimit method when map view is created or you can expand constructor with BoundingBoxE6 parameter.
Hope this helps.
In addition to this a correction for double tap bug is needed http://code.google.com/p/osmdroid/issues/detail?id=209#c23
@Override
public void computeScroll() {
if (mScroller.computeScrollOffset()) {
if (mScroller.isFinished()) {
// This will facilitate snapping-to any Snappable points.
setZoomLevel(mZoomLevel);
} else {
/* correction for double tap */
int targetZoomLevel = getZoomLevel();
if (targetZoomLevel == mZoomLevel)
scrollTo(mScroller.getCurrX(), mScroller.getCurrY());
}
postInvalidate(); // Keep on drawing until the animation has
// finished.
}
}