I'm using PhotoView library to create my custom MapView
. It includes a path on it which the following code is draws:
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.save();
canvas.concat(getImageMatrix());
canvas.drawPath(path, paint);
canvas.restore();
}
Also, I need to draw some pins with the same way and I need at least to zoom to a specific pin or area (which is being choosen by the user) and preferably with the animation.
I've tried to acheive this with the photoView.setScale(float scale, float x, float y, boolean animate)
method, but x and y are coordinates of the visible part of bitmap that is being displayed and have 0,0 left-top coordinate even if there is displaying the center of the image. Please, help me to solve this problem.