Osmdroid map rotation
Asked Answered
G

2

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?

Geter answered 5/4, 2013 at 13:12 Comment(1)
Maybe this ?Keeleykeelhaul
R
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.

Revealment answered 12/4, 2013 at 2:1 Comment(4)
Thanks for your Answer sir. I am using shapefiles for map. This code just change the orientation only. It willn`t rotate the map.Geter
I don't understand what you're saying - are you saying it doesn't rotate the shapefiles? How are you adding them?Revealment
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!!!!!!Geter
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.Revealment
W
3
RotationGestureOverlay mRotationGestureOverlay = new RotationGestureOverlay(context, map);
mRotationGestureOverlay.setEnabled(true);
map.setMultiTouchControls(true);
map.getOverlays().add(mRotationGestureOverlay);
Wellfounded answered 31/12, 2018 at 9:6 Comment(2)
Answers containing code only is bad answers. Add a description, please.Wolters
RotationGestureOverlay(Context context, MapView mapView) is now deprecated. Use RotationGestureOverlay(MapView mapView) instead.Mofette

© 2022 - 2024 — McMap. All rights reserved.