code style
This commit is contained in:
@@ -179,7 +179,7 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
// 需要新增的 marker 数量
|
||||
int newDiffSetSize = newDiffSet.size();
|
||||
// 能复用的数量
|
||||
int size = cachedMarkerSize >= newDiffSetSize ? newDiffSetSize : cachedMarkerSize;
|
||||
int size = Math.min(cachedMarkerSize, newDiffSetSize);
|
||||
|
||||
// 复用过期 marker
|
||||
if ( newDiffSetSize > 0 ) {
|
||||
@@ -197,7 +197,7 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
|
||||
// 更新资源内容
|
||||
if ( old == null || old.getType() != cloudRoadData.getType() ) {
|
||||
String resIdVal = null;
|
||||
String resIdVal;
|
||||
int resId = getModelRes( cloudRoadData.getType() );
|
||||
resIdVal = resId + "";
|
||||
String resName = mMarkerCachesResMd5Values.get( resIdVal );
|
||||
@@ -238,8 +238,8 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
/**
|
||||
* 判断类型、uuid 等
|
||||
*
|
||||
* @param cloudRoadData
|
||||
* @return
|
||||
* @param cloudRoadData {@link CloudRoadData}
|
||||
* @return isUselessValue
|
||||
*/
|
||||
private boolean isUselessValue( CloudRoadData cloudRoadData ) {
|
||||
if ( cloudRoadData == null ) {
|
||||
@@ -250,17 +250,14 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
}
|
||||
|
||||
String uniqueKey = cloudRoadData.getUniqueKey();
|
||||
if ( TextUtils.isEmpty( uniqueKey ) ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return TextUtils.isEmpty(uniqueKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 绘制某个物体的一个数据
|
||||
*
|
||||
* @param cloudRoadData
|
||||
* @param newSnapshotCaches
|
||||
* @param cloudRoadData {@link CloudRoadData}
|
||||
* @param newSnapshotCaches 缓存数据
|
||||
*/
|
||||
private void renderSnapshotOneFrame( IMogoMarker marker, String uniqueKey, final CloudRoadData cloudRoadData, Map< String, IMogoMarker > newSnapshotCaches ) {
|
||||
|
||||
@@ -288,9 +285,7 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
long cost = System.currentTimeMillis() - start;
|
||||
final long intervalRef = interval - cost;
|
||||
|
||||
SimpleHandlerThreadPool.getInstance().postRender( () -> {
|
||||
marker.addDynamicAnchorPosition( point, ( float ) cloudRoadData.getHeading(), intervalRef );
|
||||
} );
|
||||
SimpleHandlerThreadPool.getInstance().postRender( () -> marker.addDynamicAnchorPosition( point, ( float ) cloudRoadData.getHeading(), intervalRef ));
|
||||
} else {
|
||||
marker.setRotateAngle( ( ( float ) cloudRoadData.getHeading() ) );
|
||||
marker.setPosition( cloudRoadData.getWgslat(), cloudRoadData.getWgslon() );
|
||||
@@ -373,7 +368,7 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
.gps( true )
|
||||
.controlAngle( true )
|
||||
.position( new MogoLatLng( data.getWgslat(), data.getWgslon() ) );
|
||||
String resIdVal = null;
|
||||
String resIdVal;
|
||||
if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
options.set3DMode( true );
|
||||
options.anchorColor( getModelRenderColor( data.getType(), data.getSpeed(), data.getWgslon(), data.getWgslat(), data.getHeading() ) );
|
||||
|
||||
Reference in New Issue
Block a user