글쎄, 내가 더 나은 대답을 해주기를 바란다. 그러나 나는 많은 실험을 통해 animateCamera를 사용하여 매끄러운 두루마리를 얻을 수 없었다.
가까운 지점의 위도/경도를 변경하는 것과 관계없이 카메라맨은 인상적인 이륙과 착륙을 계속했습니다. 다음 임의의 비행 애니메이션을 만들고,
private void animateTo(double lat, double lon, double zoom, double bearing, double tilt, final int milliseconds) {
if (mMapInstance==null) return;
mMapInstance.setMapType(paramMapMode);
mCurrentPosition=new LatLng(lat,lon);
// animate camera jumps too much
// so we set the camera instantly to the next point
mMapInstance.moveCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(mCurrentPosition,(float)zoom, (float)tilt, (float)bearing)));
// give Android a break so it can load tiles. If I start the animation
// without pause, no tile loading is done
mMap.postDelayed(new Runnable(){
@Override
public void run() {
// keeping numbers small you get a nice scrolling effect
mMapInstance.animateCamera(CameraUpdateFactory.scrollBy(250-(float)Math.random()*500-250, 250-(float)Math.random()*500),milliseconds,null);
}},500);
}
이 루틴은 젯 10000s 밀리 초 값으로 호출 한 지점으로 이동 : 나는 다음과 같은 루틴 제한 '값싼'애니메이션의 성공이 있었다
젠장 줌 tranquilo 유지 방향. 픽셀 값이 매우 작기 때문에 은 모두 캐시됩니다.
더 나은 해결책을 가진 사람이 있습니까? '터치 된'핑핑을 시뮬레이션하기 위해 터치 이벤트를 주입하는 것이 합리적이고 가능한가요?
을! –