balabala~~~
This commit is contained in:
@@ -1101,4 +1101,8 @@ public class MogoServices implements IMogoMapListener,
|
||||
public void destroy() {
|
||||
Logger.d( TAG, "MogoServices do nothings." );
|
||||
}
|
||||
|
||||
public Location getLastCarLocation() {
|
||||
return mLastCarLocation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.mogo.module.common.entity.MarkerResponse;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.MogoSnapshotSetData;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.MogoServices;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.service.network.RefreshCallback;
|
||||
@@ -148,7 +149,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<MogoSnapshotSetData> target() {
|
||||
public Class< MogoSnapshotSetData > target() {
|
||||
return MogoSnapshotSetData.class;
|
||||
}
|
||||
|
||||
@@ -160,6 +161,10 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
if ( !MogoApisHandler.getInstance().getApis().getMapFrameControllerApi().isVrMode() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( MogoServices.getInstance().getLastCarLocation() != null ) {
|
||||
data.curSpeed = MogoServices.getInstance().getLastCarLocation().getSpeed();
|
||||
}
|
||||
SnapshotSetDataDrawer.getInstance().renderSnapshotData( data, false );
|
||||
VrModeController.getInstance().renderMogoSnapshotSetData( data );
|
||||
}
|
||||
@@ -174,8 +179,12 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
if ( resultList == null || resultList.isEmpty() ) {
|
||||
return;
|
||||
}
|
||||
double speed = 0.0;
|
||||
if ( MogoServices.getInstance().getLastCarLocation() != null ) {
|
||||
speed = MogoServices.getInstance().getLastCarLocation().getSpeed();
|
||||
}
|
||||
// 绘制近景识别到的车辆,每秒绘制一次
|
||||
AdasRecognizedResultDrawer.getInstance().renderAdasRecognizedResult( resultList );
|
||||
AdasRecognizedResultDrawer.getInstance().renderAdasRecognizedResult( resultList, false, speed );
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -652,12 +661,12 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
}
|
||||
|
||||
|
||||
|
||||
private boolean ignoreDrawRequest() {
|
||||
return MarkerServiceHandler.getMogoStatusManager().isSearchUIShow()
|
||||
|| MarkerServiceHandler.getMogoStatusManager().isV2XShow()
|
||||
|| !MarkerServiceHandler.getMogoStatusManager().isMainPageLaunched()
|
||||
|| !MarkerServiceHandler.getMogoStatusManager().isMainPageOnResume();
|
||||
|| !MarkerServiceHandler.getMogoStatusManager().isMainPageOnResume()
|
||||
|| MarkerServiceHandler.getApis().getMapFrameControllerApi().isVrMode();
|
||||
}
|
||||
|
||||
private void runOnTargetThread( Runnable runnable ) {
|
||||
|
||||
@@ -51,11 +51,11 @@ class VrModeController {
|
||||
}
|
||||
|
||||
public void onVrModeChanged( boolean isVrMode ) {
|
||||
if ( isVrMode ) {
|
||||
bindVrModeService();
|
||||
} else {
|
||||
unbindVrModeService();
|
||||
}
|
||||
// if ( isVrMode ) {
|
||||
// bindVrModeService();
|
||||
// } else {
|
||||
// unbindVrModeService();
|
||||
// }
|
||||
}
|
||||
|
||||
private void bindVrModeService() {
|
||||
|
||||
Reference in New Issue
Block a user