I had to subclass MapView and override dispatchDraw
Here is the code:
int oldZoomLevel=-1;
@Override
public void dispatchDraw(Canvas canvas) {
super.dispatchDraw(canvas);
if (getZoomLevel() != oldZoomLevel) {
Log.d(TAG, "ZOOOMED");
oldZoomLevel = getZoomLevel();
}
}
This blog helped me a lot:
http://pa.rezendi.com/2010/03/responding-to-zooms-and-pans-in.html
Above works great. Is there maybe simpler solution?
I tried to implement onTouchListener on MapView directly but touch
event would be detected only once if onTouchListener would return
false. If it would return true, touch would be detected every time,
but map zooming and panning wouldn't work.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en