moagrius / TileView

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.
MIT License
1.46k stars 337 forks source link

Double tap zoom do not zoom at the max zoom #22

Closed Tristus1er closed 11 years ago

Tristus1er commented 11 years ago

When you double tap on the map it perform a zoom (x2 each time) till the zoom is 1 (100%) But it could be more than 1

moagrius commented 11 years ago

You're correct, that's a bug. This line: https://github.com/moagrius/TileView/blob/master/src/com/qozix/layouts/ZoomPanLayout.java#L781

Currently reads:

double destination = Math.min( 1, scale * 2 );

And should be updated to:

double destination = Math.min( maxScale, scale * 2 );

I'll make a commit soon, but feel free to patch your own copy now if you'd like.

Good catch, and thanks for pointing it out.

moagrius commented 11 years ago

Fixed in 1.0.3