6

I am doing osmdroid map project. I am using custom tiles for map. Can anyone tell me how to rotate the custom tiles map?

SeyedPooya Soofbaf
  • 2,654
  • 2
  • 29
  • 31
Palanichamy
  • 141
  • 2
  • 9

2 Answers2

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
  • 1
    Thanks 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
  • 1
    I 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
  • 1
    I 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
  • 2
    If 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