avlsocialconnect / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

maps tiles move up when zooming with multitouch on XHDPI screens. #362

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Zoom in using two fingers (multitouch)

What is the expected output? What do you see instead?
The whole tiles move up before zooming.

What version of the product are you using? On what operating system?
3.0.8 Android XHDPI screen.

Please provide any additional information below.

Original issue reported on code.google.com by hju...@gmail.com on 1 Aug 2012 at 1:23

GoogleCodeExporter commented 9 years ago
Map is inside a fragment... if that helps

Original comment by hju...@gmail.com on 1 Aug 2012 at 8:44

GoogleCodeExporter commented 9 years ago
Actually it moves up because it is inside a fragment inside a tab.
Line of code 860 of MapView should take in consideration the height of the 
header tabs:
mMatrix.postTranslate(getWidth() / 2, getHeight() / 2 + headerHeight);

Original comment by hju...@gmail.com on 6 Aug 2012 at 3:11

GoogleCodeExporter commented 9 years ago
I have the same problem but with an mdpi device, but I also use fragments and 
actionbar.

Original comment by flavioxa...@gmail.com on 9 Aug 2012 at 1:54

GoogleCodeExporter commented 9 years ago
I did the following to prevent the jumping
Inside the dispatchDraw of the MapView I replaced
 c.getMatrix(mMatrix);
 mMatrix.postTranslate(getWidth() / 2, getHeight() / 2);
 mMatrix.preScale(mMultiTouchScale, mMultiTouchScale, getScrollX(), getScrollY());
 c.setMatrix(mMatrix);

with
 c.translate(getWidth() / 2, getHeight() / 2);
 c.scale(mMultiTouchScale,mMultiTouchScale,getScrollX(),getScrollY());

Original comment by reinhard...@gmail.com on 8 Mar 2013 at 4:51

GoogleCodeExporter commented 9 years ago
Confirmed the Bug, also with ActionBar, Fragment.
Android 4.2.2, HTC One.

 c.translate(getWidth() / 2, getHeight() / 2);
 c.scale(mMultiTouchScale,mMultiTouchScale,getScrollX(),getScrollY());

doesn't resolve the issue for me.
Were you able to solve this problem?

Original comment by matthias...@me.com on 23 Aug 2013 at 6:07

GoogleCodeExporter commented 9 years ago
I detected that this only happens when zooming in and out very fast.
When not releasing the fingers immideately after Pinch to Zoom this problem 
doesn't exist.

Original comment by matthias...@me.com on 22 Sep 2013 at 10:33