tanweijiu / osmbonuspack

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

Auto-rotate map #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Dear sirs,

Can you tell me if is possible to implement the auto-rotation of map in order 
to mantain allways the actual bearing pointing to up? If yes, can you tell how?

Thanks is advance.
Best regards,
PS.

Original issue reported on code.google.com by pedromsi...@gmail.com on 10 Feb 2014 at 4:54

GoogleCodeExporter commented 9 years ago
You can rotate the map with MapView.setMapOrientation(degrees)

For auto-rotation, it depends if you want to use the orientation sensor 
(compass), or the GPS bearing (based on the speed vector of the device), or 
both. 
You can have a look in OSMBonusPackDemo source, in MapActivity: it implements 
an auto-rotation based on GPS bearing. 

Note that the OSMBonusPack lib provides no API to help in this area. This is 
just standard Android stuff. So you may also ask this question in osmdroid 
Discussion Group, or in StackOverflow. 

Original comment by mathieu....@gmail.com on 11 Feb 2014 at 9:29

GoogleCodeExporter commented 9 years ago

Original comment by mathieu....@gmail.com on 14 Feb 2014 at 3:32