This commit is contained in:
wangcongtao
2020-02-27 12:41:08 +08:00
parent 4781b10eba
commit 0d3ae83b97
9 changed files with 136 additions and 33 deletions

View File

@@ -138,6 +138,8 @@ public class AMapNaviViewWrapper implements IMogoMapView,
mMapView.setRouteOverlayVisible( false );
mMapView.setCarOverlayVisible( false );
mMapView.setNaviMode( AMapNaviView.CAR_UP_MODE );
setRenderFps( 20 );
}
}
@@ -631,4 +633,14 @@ public class AMapNaviViewWrapper implements IMogoMapView,
MotionEvent upEvent = MotionEvent.obtain(downTime + 100, eventTime + 100, MotionEvent.ACTION_UP, 0,0, metaState);
mMapView.dispatchTouchEvent(upEvent);
}
@Override
public void setRenderFps( int fps ) {
if ( checkAMapView() ) {
if ( mMapView.getMap() != null ) {
mMapView.getMap().setRenderFps( fps );
Logger.d( TAG, "设置刷新帧率 fps = %s", fps );
}
}
}
}

View File

@@ -177,4 +177,11 @@ public class AMapUIController implements IMogoMapUIController {
mClient.startJumpAnimation( marker, high, interpolator, duration );
}
}
@Override
public void setRenderFps( int fps ) {
if ( mClient != null ) {
mClient.setRenderFps( fps );
}
}
}

View File

@@ -61,9 +61,10 @@ public interface IMogoMapUIController {
/**
* 设置锁车缩放级别
*
* @param var1 级别 3-20
*/
void setLockZoom(int var1);
void setLockZoom( int var1 );
/**
* 预览全程
@@ -138,4 +139,11 @@ public interface IMogoMapUIController {
* @param duration 动画时间
*/
void startJumpAnimation( IMogoMarker marker, float high, Interpolator interpolator, long duration );
/**
* 设置刷新帧率
*
* @param fps
*/
void setRenderFps( int fps );
}

View File

@@ -170,4 +170,11 @@ public class MogoMapUIController implements IMogoMapUIController {
mDelegate.startJumpAnimation( marker, high, interpolator, duration );
}
}
@Override
public void setRenderFps( int fps ) {
if ( mDelegate != null ) {
mDelegate.setRenderFps( fps );
}
}
}