opt
This commit is contained in:
@@ -297,7 +297,11 @@ public class MogoServiceProvider implements IMogoModuleProvider,
|
||||
* @return
|
||||
*/
|
||||
private float getMapCameraFactWidth() {
|
||||
return Utils.calculateLineDistance( mCameraNorthEastPosition, new MogoLatLng( mCameraNorthEastPosition.lat, mCameraSouthWestPosition.lng ) );
|
||||
try {
|
||||
return Utils.calculateLineDistance( mCameraNorthEastPosition, new MogoLatLng( mCameraNorthEastPosition.lat, mCameraSouthWestPosition.lng ) );
|
||||
} catch ( Exception e ) {
|
||||
return 1000f;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -306,7 +310,11 @@ public class MogoServiceProvider implements IMogoModuleProvider,
|
||||
* @return
|
||||
*/
|
||||
private float getMapCameraFactHeight() {
|
||||
return Utils.calculateLineDistance( mCameraSouthWestPosition, new MogoLatLng( mCameraNorthEastPosition.lat, mCameraSouthWestPosition.lng ) );
|
||||
try {
|
||||
return Utils.calculateLineDistance( mCameraSouthWestPosition, new MogoLatLng( mCameraNorthEastPosition.lat, mCameraSouthWestPosition.lng ) );
|
||||
} catch ( Exception e ) {
|
||||
return 1000f;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -385,14 +393,15 @@ public class MogoServiceProvider implements IMogoModuleProvider,
|
||||
notifyRefreshData( latLng, getQueryRadius(), mCustomRefreshCallback );
|
||||
mLastCustomRefreshCenterLocation = latLng;
|
||||
mLastZoomLevel = zoom;
|
||||
} else if ( mLastZoomLevel - zoom < 0 ) {
|
||||
mLastZoomLevel = zoom;
|
||||
|
||||
} else if ( mLastZoomLevel == zoom ) {
|
||||
// 手动平移
|
||||
if ( invokeRefreshWhenTranslationByUser( latLng ) ) {
|
||||
notifyRefreshData( latLng, getQueryRadius(), mCustomRefreshCallback );
|
||||
mLastCustomRefreshCenterLocation = latLng;
|
||||
}
|
||||
} else {
|
||||
mLastZoomLevel = zoom;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -452,6 +461,7 @@ public class MogoServiceProvider implements IMogoModuleProvider,
|
||||
return;
|
||||
}
|
||||
Logger.d( TAG, mAutoRefreshCallback == callback ? "触发自动刷新" : "触发手动刷新" );
|
||||
Logger.i( TAG, "刷新半径 = %d, 点 = %s", radius, latLng );
|
||||
mRefreshModel.refreshData( latLng, radius, callback );
|
||||
}
|
||||
|
||||
@@ -467,7 +477,11 @@ public class MogoServiceProvider implements IMogoModuleProvider,
|
||||
|
||||
@Override
|
||||
public void onNaviInfoUpdate( MogoNaviInfo naviinfo ) {
|
||||
|
||||
// 发送当前限速到 adas
|
||||
Intent intent = new Intent( "com.mogo.launcher.adas" );
|
||||
intent.putExtra( "adas_speed_limit", naviinfo.getCurrentLimitSpeed() );
|
||||
Logger.i( TAG, "send limit data to adas: limitspeed = %f", naviinfo.getCurrentLimitSpeed() );
|
||||
mContext.sendBroadcast( intent );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user