Question

I used https://github.com/ened/Android-Tiling-ScrollView library to display large tiled image. Everything is working fine. Only problem is that, I want to zoom only particular part which I touched(pinch-to-zoom as in Google map). Now, its always display tiles from beginning for all zoom levels irrespective of where I touched. Sometimes, it takes me near where I want to zoom but its not perfect as sometimes it takes me to different part. Following code does moving logic

mScroller.startScroll(getScrollX(), getScrollY(), newOffsetX, newOffsetY);

First 2 parameters indicate start scroll offset and last 2 indicates destination points to where scroll ends. I tried different combinations for last 2 parameters but ran out of luck.

If it's a ImageView, I would have done

canvas.translate(x, y);

to Zoom particular part but unfortunately its not ImageView. Even though I applied ImageView zoom logic as in https://github.com/jasonpolites/gesture-imageview to tile Zoom but had no luck.

Suggestions or clues are greatly appreciated.

Thanks.

Was it helpful?

Solution

Got a very nice library for custom mapView with almost all the features of google map. Its here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top