I extended MapView (called MyMapView). I overridden "onLayout()". this is after I tried few other hooks. this method is called upon each change to the map. from there I was able to capture the current map left and right bounds, match them against the bounds of my choice and reset the map center so it won't exceed the bounds.
however, our world'd most left longitude is around -179*1E6. a small pan to the right moves the map to be +179*1E6, which then my calculations fails. am I on the right track here or is there a simpler way, for us Andoird- to-GoogleMapsApi dev people to bound map panning? thanks Ori On Aug 16, 6:26 pm, TreKing <treking...@gmail.com> wrote: > On Mon, Aug 16, 2010 at 6:51 AM, oriharel <ori.ha...@gmail.com> wrote: > > is it possible? > > Probably, assuming you can detect when a scroll happens, which I'm sure you > can, you can simply check the MapView's current longitude bounds and if it's > past the threshhold you want to allow, get the MapController() and reset it > to where your limit is. > > I'll leave the implementation details to the reader =) > > --------------------------------------------------------------------------- > ---------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en