I am doing osmdroid map project. I am using custom tiles for map. Can anyone tell me how to rotate the custom tiles map?
Asked
Active
Viewed 5,332 times
6
-
1Maybe [this](http://stackoverflow.com/questions/1830391/rotate-mapview-in-android) ? – Fabio Cardoso Apr 05 '13 at 13:13
2 Answers
7
The latest version of osmdroid includes the ability to rotate the maps.
mMapView.setMapOrientation(45.0f);
The latest samples application also includes a rotation gesture overlay for rotating the maps with a two-finger rotate gesture.

kurtzmarc
- 3,110
- 1
- 24
- 40
-
1Thanks for your Answer sir. I am using shapefiles for map. This code just change the orientation only. It willn`t rotate the map. – Palanichamy May 10 '13 at 13:38
-
1I don't understand what you're saying - are you saying it doesn't rotate the shapefiles? How are you adding them? – kurtzmarc May 10 '13 at 15:52
-
1I am just convert the shapefiles into tiles using tilemill. The tiles used for map. So I can rotate the tiles(Map) for the purpose of the navigation. So kindly provide your suggestion and sample codes. Thank you Sir!!!!!! – Palanichamy May 11 '13 at 05:11
-
2If you call setMapOrientation it will rotate the maps including the tiles. If there is something specifically not working then you must clearly state what is not rotating properly. A screen shot would be the most helpful. – kurtzmarc May 11 '13 at 20:08
3
RotationGestureOverlay mRotationGestureOverlay = new RotationGestureOverlay(context, map);
mRotationGestureOverlay.setEnabled(true);
map.setMultiTouchControls(true);
map.getOverlays().add(mRotationGestureOverlay);

Federico Grandi
- 6,785
- 5
- 30
- 50

Golnar sheikh bahaie
- 181
- 1
- 5
-
2Answers containing code only is bad answers. Add a description, please. – Dmytro Dadyka Dec 31 '18 at 09:14
-
2`RotationGestureOverlay(Context context, MapView mapView)` is now deprecated. Use `RotationGestureOverlay(MapView mapView)` instead. – kalucki23 Aug 30 '21 at 09:44