Open GoogleCodeExporter opened 9 years ago
This is an interesting problem. It sounds like you are adjusting the maps so
that they always face north, correct? So as I turn around the maps turn with
me. This would make a great sample for the demo app.
Try turning off SafeDraw and see if that helps. I would leave hardware
acceleration off too for testing. It does sound like a rounding error (which
the SafeDraw essentially aims to fix) but it could be something else.
Original comment by kurtzm...@gmail.com
on 1 Jun 2013 at 4:40
Yes, the idea is that the map turns as the user rotates and it works and looks
great (the speed of the Nexus makes for a great experience).
However, the illusion of smoothness gets completely ruined by the jerkiness.
Turning off SafeCanvas doesn't help. It actually makes things worse, as there
are black lines between the tiles and all the tiles start to shake
independently.
Hardware acceleration doesn't make a difference either, except the performance
penalty when it's off.
As for the demo app sample, I can write one up once this is done, as the
concept is pretty straightforward - you register your Activity as a
SensorEventListener and simply pass the bearing received in onSensorChanged to
the MapView.
I can't say I have an idea of where to look next. The issue isn't in the
rotation of the canvas. It isn't in the overlays and it isn't in GeometryMath.
I don't think it's in the Projection class either, as the values used in
dispatchDraw are pretty much constant.
Original comment by RandomA...@gmail.com
on 1 Jun 2013 at 4:50
Hi,
Just a thought..
Is the compass sensor of your device working normally?
Only the map rotates abnormally or also the compass drawable is jumping to
random orientations?
You can check this also by trying device's compass / map rotation with another
map application e.g. Google Maps.
Because I have been seen devices where their compass / map was rotating
randomly and the reason was that the sensor was sending wrong values all the
time. Probably a compass calibration could help if this is the case.
Regards.
Original comment by devemu...@gmail.com
on 1 Jun 2013 at 8:02
[deleted comment]
The app has been tested on around a dozen devices and they all exhibit the same
behavior, so I don't think it's a compass issue. Although I use
SENSOR_DELAY_FASTEST, filtering the input by trimming the decimal part will
make the map less prone to random shake. However, when rotating it, the skips
are noticeable.
Attached is a simple Activity which will reproduce the error. Keep in mind that
the default tile provider doesn't support high zoom levels so the issue might
not be obvious. However, if you pay close attention to the map at the highest
zoom, you will notice that it is shaking.
I added a "toggle filter" button which will strip the decimal part from the
orientation. When this is enabled, rotating the device will show that the pivot
changes slightly when rotating.
Here is a video showing the issue in my app at zoom level 19 (much more
obvious):
http://www.youtube.com/watch?v=8qqhqAdqrIg
The device and the camera weren't moved at all.
Original comment by RandomA...@gmail.com
on 1 Jun 2013 at 4:09
Attachments:
Can you update to the latest trunk and try it again? I made a change that may
help this issue.
Original comment by kurtzm...@gmail.com
on 11 Jun 2013 at 2:19
Tried it out. The issue is still there, though the pattern seems to have
changed.
Original comment by RandomA...@gmail.com
on 11 Jun 2013 at 3:48
Have the same problem with MyLocationNewOverlay at 21-22 zoom level. The person
on map snakes even when i simply move map at any direction.
If I change canvas.drawBitmap(mPersonBitmap, mDirectionRotater, mPaint) to
canvas.drawBitmap(mPersonBitmap, x, y, mPaint) then snaking stops.
Looks like sMatrix.postTranslate(xOffset, yOffset) does not work there because
of insufficient precision of float matrices.
Original comment by ls.illar...@gmail.com
on 29 Jun 2013 at 6:43
Original issue reported on code.google.com by
RandomA...@gmail.com
on 1 Jun 2013 at 3:53