【问题标题】:Android Google Maps go to current location without animationAndroid Google Maps 无动画进入当前位置
【发布时间】:2016-06-08 11:20:26
【问题描述】:

我知道这可能有点傻,我一定错过了一些东西,但是如何禁用一直放大到我的标记并立即加载谷歌地图和我当前位置的动画?

这是我当前的代码

@Override
    public void onLocationChanged(Location location) {
        currentLocation = location;
        String curr_location = currentLocation.getLatitude()+ ","+currentLocation.getLongitude();
        LatLng coordinates = new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());
        CameraUpdate current = CameraUpdateFactory.newLatLngZoom(coordinates,15);
        googleMap.animateCamera(current);
        UpdateLocation(userid,email,curr_location);
    }

如果可能,我想移除动画相机。谢谢!

【问题讨论】:

    标签: android google-maps


    【解决方案1】:

    替换

    googleMap.animateCamera(current);
    

    googleMap.moveCamera(current);
    

    (Reference)

    【讨论】:

      猜你喜欢
      • 2012-11-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-31
      • 2018-09-13
      • 2013-08-27
      • 1970-01-01
      • 2015-05-06
      相关资源
      最近更新 更多