opt
This commit is contained in:
@@ -428,6 +428,7 @@ public class MogoServiceProvider implements IMogoModuleProvider,
|
||||
|
||||
@Override
|
||||
public void onMapChanged( MogoLatLng latLng, float zoom, float tilt, float bearing ) {
|
||||
|
||||
if ( mIsCameraInited ) {
|
||||
mLastZoomLevel = zoom;
|
||||
mLastCustomRefreshCenterLocation = latLng;
|
||||
@@ -444,6 +445,7 @@ public class MogoServiceProvider implements IMogoModuleProvider,
|
||||
if ( mStatusManager.isUserInteracted() ) {
|
||||
mLastCustomRefreshCenterLocation = latLng;
|
||||
mLastZoomLevel = zoom;
|
||||
refreshCameraPosition();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -487,6 +489,7 @@ public class MogoServiceProvider implements IMogoModuleProvider,
|
||||
if ( factor == 0.0f ) {
|
||||
return false;
|
||||
}
|
||||
Logger.d( TAG, "invokeRefreshWhenTranslationByUser,mLastCustomRefreshCenterLocation = %s, latLng = %s", mLastCustomRefreshCenterLocation, latLng );
|
||||
float distance = Utils.calculateLineDistance( latLng, mLastCustomRefreshCenterLocation );
|
||||
return distance > factor;
|
||||
} catch ( Exception e ) {
|
||||
@@ -500,6 +503,9 @@ public class MogoServiceProvider implements IMogoModuleProvider,
|
||||
if ( location == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d( TAG, "onLocationChanged = %s", location );
|
||||
|
||||
// 自动刷新触发
|
||||
final MogoLatLng point = new MogoLatLng( location.getLatitude(), location.getLongitude() );
|
||||
if ( mLastAutoRefreshLocation == null ) {
|
||||
|
||||
@@ -510,8 +510,8 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
|
||||
if (isFirstMarker && isOnLineCard) {
|
||||
if (nearlyMogoMarker != null) {
|
||||
Logger.w(TAG, "ACC ON,或者语音搜索触发,默认选中最近的在线车辆nearlyMogoMarker:" + nearlyMogoMarker);
|
||||
// onMarkerClicked(nearlyMogoMarker);
|
||||
// MogoMarkersHandler.getInstance().onMarkerClicked(nearlyMogoMarker);
|
||||
onMarkerClicked(nearlyMogoMarker);
|
||||
MogoMarkersHandler.getInstance().onMarkerClicked(nearlyMogoMarker);
|
||||
isFirstMarker = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user