moagrius / MapView

(Deprecated, prefer https://github.com/moagrius/TileView) Android widget roughly described as a hybrid between com.google.android.maps.MapView and iOS's CATiledLayer
http://moagrius.github.com/MapView/documentation
69 stars 35 forks source link

Increase the scrollable area in order to scroll the edges of the map into view #49

Closed mohlendo closed 11 years ago

mohlendo commented 11 years ago

Another crazy feature request:

I would like to be able to scroll to the edges of the map. Right now the MapView only allows to scroll until the edge of the map is reached. But I would like to scroll further - until the edge of the map is in the center of the screen.

moagrius commented 11 years ago

You'd have to hack it for that - the relevant bits are in the super class ZoomPanLayout - you could probably mess with (constrainPoint)[https://github.com/moagrius/MapView/blob/master/src/com/qozix/layouts/ZoomPanLayout.java#L494] to modify the scroll limits - you might need to set the map width and height as well, but probably not.

HTH

mohlendo commented 11 years ago

Ok, thanks! I will give it a try!

mohlendo commented 11 years ago

It works. Thanks again! Here is the commit: a7916e0f3d1497263428e8f787cef0576424851a

moagrius commented 11 years ago

Awesome - gj.