Search code examples
androidopenstreetmapandroid-mapviewosmdroidandroid-orientation

osmdroid map change orientation with animation


I am using MapView.setMapOrientation() method for changing mapview's orientation. Now I want to add some animation while changing orientation. Can you suggest me how to do it?


Solution

  • from version 6.0.3 the controller supports orientation in animateTo, something like this (code not tested!) reference: https://github.com/osmdroid/osmdroid/issues/1119

    mapView.getController().animateTo(myLocation,mapView.getZoomLevelDouble(),null, (float) mapHeading);