2016-06-08 96 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