【问题标题】:osmdroid map change orientation with animationosmdroid 地图用动画改变方向
【发布时间】:2018-07-30 12:08:49
【问题描述】:

我正在使用MapView.setMapOrientation() 方法来更改地图视图的方向。现在我想在改变方向的同时添加一些动画。你能建议我怎么做吗?

【问题讨论】:

    标签: android openstreetmap android-mapview osmdroid android-orientation


    【解决方案1】:

    从版本 6.0.3 开始,控制器支持 animateTo 中的方向,类似这样(代码未经测试!) 参考:https://github.com/osmdroid/osmdroid/issues/1119

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-15
      • 1970-01-01
      • 1970-01-01
      • 2020-04-29
      • 2021-08-24
      相关资源
      最近更新 更多