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

这是我当前的代码

@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);
    }

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

最佳答案

代替

googleMap.animateCamera(current);


googleMap.moveCamera(current);

(Reference)

关于android - Android Google Maps无需动画即可转到当前位置,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37692476/

10-10 18:30