Issue
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.
Solution
I solved this problem using an Overlay
. By overriding the overlay's onTouchEvent()
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.
Answered By - acj
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.