private void changeZoomPosition(float dz, float angle) { final QuadPoint cp = initialViewport.getCenterPixelPoint(); float dx = cp.x - initialMultiTouchCenterPoint.x; float dy = cp.y - initialMultiTouchCenterPoint.y; final RotatedTileBox calc = initialViewport.copy(); calc.setLatLonCenter(initialCenterLatLon.getLatitude(), initialCenterLatLon.getLongitude()); float calcZoom = initialViewport.getZoom() + dz + initialViewport.getZoomScale(); float calcRotate = calc.getRotate() + angle; calc.setRotate(calcRotate); calc.setZoomAnimation(dz); final LatLon r = calc.getLatLonFromPixel(cp.x + dx, cp.y + dy); setLatLon(r.getLatitude(), r.getLongitude()); zoomToAnimate(calcZoom, true); rotateToAnimate(calcRotate); }
public float getZoomScale() { return currentViewport.getZoomScale(); }