Android 谷歌地图去当前位置没有动画

标签 android google-maps

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

这是我当前的代码

@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 谷歌地图去当前位置没有动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37692476/

相关文章:

android - Android中的谷歌地图签名api key 错误

php - 使用身份验证时 Google map 地理编码 API 不起作用

java - 同一模块的 Gradle 编译错误

java - 如何覆盖布局嵌套 View 的样式?

java - 不应将应用程序共享给其他用户

android - 向 AndroidAnnotation 注入(inject)的 bean 添加参数

android - 播放视频剪辑前后出现闪烁

c# - 删除所有标记而不使用 map.clear() Google map - Xamarin

google-maps - 谷歌自动完成查询的限制?

android - 打开应用程序时不会出现工具栏,但如果我将设备转为横向,则会出现