[RouteOpt]移除无用代码
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
package com.mogo.module.service.routeoverlay;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_OLD_ROUTE;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Color;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.core.util.Pools;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
@@ -19,7 +17,6 @@ import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
import com.mogo.map.overlay.MogoPolylineOptions;
|
||||
import com.mogo.module.common.utils.DrivingDirectionUtils;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
@@ -29,33 +26,18 @@ public class RouteOverlayDrawer {
|
||||
private static final String TAG = "MogoRouteOverlayManager";
|
||||
|
||||
// 连接线参数
|
||||
|
||||
private Handler mRenderHandler;
|
||||
IMogoOverlayManager mogoOverlayManager;
|
||||
private static volatile RouteOverlayDrawer sInstance;
|
||||
private final MogoPolylineOptions mPolylineOptions;
|
||||
private volatile IMogoPolyline mMoGoPolyline;
|
||||
// private FileWriter writer;
|
||||
private static final int COLOR_LIGHT = Color.parseColor("#BAEBF5");
|
||||
|
||||
private RouteOverlayDrawer() {
|
||||
mPolylineOptions = new MogoPolylineOptions();
|
||||
mPolylineOptions.zIndex(75000f);
|
||||
mPolylineOptions.setGps(true);
|
||||
mPolylineOptions.width(20).useGradient(true);
|
||||
// try {
|
||||
// File log = new File(Environment.getExternalStorageDirectory(), "log.txt");
|
||||
// if (log.exists()) {
|
||||
// log.delete();
|
||||
// }
|
||||
// if (log.getParentFile() != null && !log.getParentFile().exists()) {
|
||||
// log.getParentFile().mkdirs();
|
||||
// }
|
||||
//
|
||||
// log.createNewFile();
|
||||
// writer = new FileWriter(log, false);
|
||||
// } catch (Throwable t) {
|
||||
//
|
||||
// }
|
||||
|
||||
// 渐变色
|
||||
mogoOverlayManager = MogoOverlayManager.getInstance();
|
||||
// 线条粗细,渐变,渐变色值
|
||||
@@ -191,48 +173,13 @@ public class RouteOverlayDrawer {
|
||||
RouteStrategy.INSTANCE.end();
|
||||
Strategy strategy = RouteStrategy.INSTANCE.getStrategy();
|
||||
List<Integer> colors = strategy.getColors();
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// int colorIndex = 0;
|
||||
// sb.append("=========================================\n");
|
||||
// for (MogoLatLng p : points) {
|
||||
// sb.append(p.lat);
|
||||
// sb.append(",");
|
||||
// sb.append(p.lon);
|
||||
// sb.append(",");
|
||||
// sb.append(p.acc);
|
||||
// sb.append(",");
|
||||
// sb.append(p.speed);
|
||||
// if (colorIndex < colors.size()) {
|
||||
// int color = colors.get(colorIndex);
|
||||
// sb.append(",");
|
||||
// sb.append(color);
|
||||
// sb.append(",");
|
||||
// sb.append(Color.red(color));
|
||||
// sb.append(",");
|
||||
// sb.append(Color.green(color));
|
||||
// sb.append(",");
|
||||
// sb.append(Color.blue(color));
|
||||
// sb.append(",");
|
||||
// sb.append(Color.alpha(color));
|
||||
// colorIndex ++;
|
||||
// }
|
||||
// sb.append("\n");
|
||||
// }
|
||||
// try {
|
||||
// if (writer != null) {
|
||||
// writer.write(sb.toString());
|
||||
// writer.flush();
|
||||
// }
|
||||
// } catch (Throwable t) {
|
||||
//
|
||||
// }
|
||||
boolean isLightOn = strategy instanceof ColorfulStrategy && ((ColorfulStrategy) strategy).isLightOn();
|
||||
if (mMoGoPolyline == null || mMoGoPolyline.isDestroyed()) {
|
||||
mPolylineOptions.points(points);
|
||||
mPolylineOptions.colorValues(colors);
|
||||
if (isLightOn) {
|
||||
mPolylineOptions.openBright(true);
|
||||
mPolylineOptions.brightColor(Color.parseColor("#D2F2F8"));
|
||||
mPolylineOptions.brightColor(COLOR_LIGHT);
|
||||
mPolylineOptions.brightSpeed(0.5f);
|
||||
} else {
|
||||
mPolylineOptions.openBright(false);
|
||||
@@ -243,7 +190,7 @@ public class RouteOverlayDrawer {
|
||||
mPolylineOptions.colorValues(colors);
|
||||
if (isLightOn) {
|
||||
mPolylineOptions.openBright(true);
|
||||
mPolylineOptions.brightColor(Color.parseColor("#D2F2F8"));
|
||||
mPolylineOptions.brightColor(COLOR_LIGHT);
|
||||
mPolylineOptions.brightSpeed(0.5f);
|
||||
} else {
|
||||
mPolylineOptions.openBright(false);
|
||||
|
||||
Reference in New Issue
Block a user