@@ -37,7 +37,9 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
*/
|
||||
public class BaseDrawer {
|
||||
|
||||
// 移除过期的 marker
|
||||
/**
|
||||
* 移除过期的 marker
|
||||
*/
|
||||
public static final int MSG_REMOVE_DIRTY_MARKERS = 9990;
|
||||
|
||||
/**
|
||||
@@ -126,8 +128,8 @@ public class BaseDrawer {
|
||||
}
|
||||
}
|
||||
|
||||
private static void showSpeed(SpeedData speedData) {
|
||||
showSelfSpeed(speedData.getMarker()
|
||||
public static void showSpeed(SpeedData speedData) {
|
||||
showIdentitySpeed(speedData.getMarker()
|
||||
, speedData.getSpeed()
|
||||
, speedData.getUuid()
|
||||
, speedData.getType()
|
||||
@@ -324,7 +326,8 @@ public class BaseDrawer {
|
||||
* @param speed 是否显示速度
|
||||
* @param isVrMode 是否是vrMode
|
||||
*/
|
||||
public static void showSelfSpeed(IMogoMarker mogoMarker, double speed, String uuid, int type, double heading, boolean isVrMode) {
|
||||
public static void showIdentitySpeed(IMogoMarker mogoMarker, double speed, String uuid,
|
||||
int type, double heading, boolean isVrMode) {
|
||||
Log.d("EmArrow", "showSelf uuid : " + uuid + " speed : " + speed);
|
||||
if (mogoMarker == null || mogoMarker.isDestroyed()) {
|
||||
return;
|
||||
@@ -334,13 +337,11 @@ public class BaseDrawer {
|
||||
return;
|
||||
}
|
||||
int speedIntVal = (int) (speed * 3.6);
|
||||
if (speedIntVal <= 0) { //速度为0 隐藏InfoWindow
|
||||
mogoMarker.hideInfoWindow();
|
||||
return;
|
||||
}
|
||||
mogoMarker.setInfoWindowOffset(0, 20);
|
||||
// String text = "speed : " + speedIntVal + "\n" + uuid + "\n" + "type : " + type + "\n" + "heading : " + heading;
|
||||
String text = uuid + " , " + (int) heading;
|
||||
String text = "uuid : " + uuid + "\n"
|
||||
+ "speed : " + speedIntVal + "\n"
|
||||
+ "type : " + type + "\n"
|
||||
+ "heading : " + heading;
|
||||
mSpeedView.setText(text);
|
||||
mogoMarker.updateInfoWindowView(mSpeedView);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.module.common.drawer;
|
||||
|
||||
import static com.mogo.cloud.socket.entity.SocketDownDataHelper.FROM_ADAS;
|
||||
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -13,7 +12,6 @@ import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.module.common.drawer.bean.SpeedData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@@ -206,6 +204,17 @@ public class IdentifyDataDrawer extends BaseDrawer {
|
||||
marker.setAnchorColor(carColor);
|
||||
|
||||
newAdasRecognizedMarkersCaches.put(uniqueKey, marker);
|
||||
|
||||
// 显示目标车的信息,但是数据多的时候会导致崩溃,不建议打开
|
||||
// if (shouldShowSpeed(recognizedListResult.getType().getType())) {
|
||||
// SpeedData speedData = new SpeedData(marker
|
||||
// , recognizedListResult.getSpeed()
|
||||
// , recognizedListResult.getUuid()
|
||||
// , recognizedListResult.getType().getType()
|
||||
// , recognizedListResult.getHeading()
|
||||
// , MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode());
|
||||
// showSpeed(speedData);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user