Is it possible to handle simultaneous zoom and pan events using a MapView?
The Google Maps app for Android allows the map to be panned while a pinch-to-zoom gesture is already underway. This is helpful for making fine adjustments while you zoom in on a region of the map. The default MapView does not seem to support this.
I am prepared to implement this functionality myself, but I would prefer to use the built-in mechanisms.
I solved this problem using an
Overlay. By overriding the overlay’sonTouchEvent()and detecting when zoom and pan events happen, those events can be handled in parallel.For anyone facing this problem, I have posted a sample project based on my solution.
EDIT:
The new Google Maps v2 library supports simultaneous zoom and pan. Unless there is a need to customize the event handling algorithm, I strongly recommend upgrading to the new library.