From b897e3f5b36c4dff7d8c07ba45869c6a55a5c110 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Fri, 9 Apr 2021 17:04:27 +0800 Subject: [PATCH] opt --- libraries/map-custom/build.gradle | 2 +- .../impl/MoGoV2XCloundDataManager.java | 31 ++++++++++--------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/libraries/map-custom/build.gradle b/libraries/map-custom/build.gradle index 9f081298c9..fa9c7cf8f4 100644 --- a/libraries/map-custom/build.gradle +++ b/libraries/map-custom/build.gradle @@ -67,7 +67,7 @@ dependencies { implementation project(':foudations:mogo-commons') } - implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.5.4' + implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.5.5' // implementation 'com.zhidaoauto.machine:map:1.0.0-vr-test-3.4' } diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java index b8e60f4e8a..fa03c9630f 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java @@ -1,12 +1,9 @@ package com.mogo.module.v2x.manager.impl; import android.content.Context; -import android.content.Intent; import android.location.Location; import android.util.Log; -import androidx.localbroadcastmanager.content.LocalBroadcastManager; - import com.alibaba.android.arouter.facade.annotation.Route; import com.mogo.cloud.commons.utils.CoordinateUtils; import com.mogo.map.MogoLatLng; @@ -14,7 +11,6 @@ import com.mogo.map.navi.IMogoCarLocationChangedListener2; import com.mogo.map.overlay.IMogoPolyline; import com.mogo.module.common.MogoApisHandler; import com.mogo.module.common.drawer.V2XWarnDataDrawer; -import com.mogo.module.common.entity.V2XMessageEntity; import com.mogo.module.common.entity.V2XWarningEntity; import com.mogo.module.service.MarkerServiceHandler; import com.mogo.module.service.receiver.MogoReceiver; @@ -27,7 +23,6 @@ import com.mogo.module.v2x.utils.LocationUtils; import com.mogo.utils.UiThreadHandler; import com.mogo.utils.WorkThreadHandler; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -74,7 +69,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog drawStopLine(cloundWarningInfo, newLocation); //添加停止线marker handleStopLine(); - }, 0); + }, 200); UiThreadHandler.postDelayed(() -> { V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine(); @@ -90,7 +85,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog drawOtherObjectLine(cloundWarningInfo); //二轮车和行人的渲染和移动 V2XWarnDataDrawer.getInstance().renderWarnData(cloundWarningInfo); - }, 0); + }, 200); //延迟3秒清理线 UiThreadHandler.postDelayed(() -> { @@ -193,8 +188,20 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog */ @Override public void onCarLocationChanged2(Location latLng) { -// Log.d(V2XConst.LOG_NAME_WARN, "onCarLocationChanged2 latLng = " + latLng.getLatitude() + "--" + latLng.getLongitude() + "---isSelfLineClear = " + isSelfLineClear); - //当行人经纬度交点 经纬度不为空,开始画线,否则清理 + Log.e(V2XConst.LOG_NAME_WARN, "onCarLocationChanged2 latLng = " + latLng.getLatitude() + "--" + latLng.getLongitude() + "---isSelfLineClear = " + isSelfLineClear); + //当行人经纬度交点 开始画线,否则清理 + drawSlefCarLine(latLng); + } + + @Override + public void onCarLocationChanged(MogoLatLng latLng) { + + } + + /** + * 绘制自车连线 + */ + private void drawSlefCarLine (Location latLng) { if (!isSelfLineClear) { IMogoPolyline mogoPolyline = V2XServiceManager.getMoGoWarnPolylineManager().getMogoWarnPolyline(); if (mCloundWarningInfo != null) { @@ -223,12 +230,6 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog } } - @Override - public void onCarLocationChanged(MogoLatLng latLng) { - - } - - /** * 补点后的停止线经纬度合集 */