2016-06-08 102 views
3

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

这是我当前的代码

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

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

+0

为什么这个downvoted?我试过了吗? – JianYA

回答

10

更换

googleMap.animateCamera(current); 

googleMap.moveCamera(current); 

(Reference)

+0

哦,男人谢谢你! – JianYA