From c5244379015e0c220f9c71e697eff8af5d33884c Mon Sep 17 00:00:00 2001 From: wujifei Date: Tue, 13 Apr 2021 15:31:58 +0800 Subject: [PATCH 01/16] =?UTF-8?q?fix#=E3=80=90#517=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E5=BF=85=E7=8E=B0=E3=80=91=E6=97=A5=E5=A4=9C=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=BA=E7=99=BD=E5=A4=A9=E6=A8=A1=E5=BC=8F=EF=BC=8C=E8=BF=9B?= =?UTF-8?q?=E5=85=A5=E9=B9=B0=E7=9C=BC=EF=BC=8C=E5=87=BA=E5=8F=91=E9=81=93?= =?UTF-8?q?=E8=B7=AF=E4=BA=8B=E4=BB=B6=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E4=B8=BA=E7=81=B0=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/item_v2x_event_detail_vr.xml | 10 ++++++---- modules/mogo-module-v2x/src/main/res/values/colors.xml | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_vr.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_vr.xml index 2d0db2ebb2..79f8efeac3 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_vr.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_vr.xml @@ -255,7 +255,7 @@ android:maxWidth="@dimen/dp_480" android:paddingLeft="@dimen/dp_40" android:paddingRight="@dimen/dp_40" - android:textColor="@color/v2x_white" + android:textColor="@color/v2x_white_color" android:textSize="@dimen/dp_32" /> + app:layout_constraintTop_toTopOf="parent" + tools:visibility="visible" /> + app:layout_constraintTop_toTopOf="parent" + tools:visibility="visible" /> \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/values/colors.xml b/modules/mogo-module-v2x/src/main/res/values/colors.xml index b3a90791e3..c52d9652c2 100644 --- a/modules/mogo-module-v2x/src/main/res/values/colors.xml +++ b/modules/mogo-module-v2x/src/main/res/values/colors.xml @@ -21,4 +21,7 @@ #FF3036 #F63A35 + + #D6D7D9 + #FFFFFF \ No newline at end of file From 52bba1a3782f955ddac67fd29d991e0d6c917e91 Mon Sep 17 00:00:00 2001 From: wujifei Date: Tue, 13 Apr 2021 19:33:21 +0800 Subject: [PATCH 02/16] =?UTF-8?q?fix#=E3=80=90#521=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E5=BF=85=E7=8E=B0=E3=80=91=E9=B9=B0=E7=9C=BC=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E6=94=B6=E5=88=B0=E6=95=85=E9=9A=9C=E6=B1=82?= =?UTF-8?q?=E5=8A=A9=EF=BC=8C=E6=97=A0=E5=AF=BC=E8=88=AA=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapter/holder/V2XOtherSeekHelpVH.java | 8 ++-- .../v2x_event_icon_daohang_vr.png | Bin 0 -> 2624 bytes .../drawable-xhdpi/v2x_event_icon_tel_vr.png | Bin 0 -> 2737 bytes .../src/main/res/drawable/bg_v2x_event_bg.xml | 2 +- .../drawable/bg_v2x_event_type_orange_vr.xml | 4 +- .../res/layout/item_v2x_fault_help_vr.xml | 39 ++++++++---------- 6 files changed, 25 insertions(+), 28 deletions(-) create mode 100644 modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_event_icon_daohang_vr.png create mode 100644 modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_event_icon_tel_vr.png diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XOtherSeekHelpVH.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XOtherSeekHelpVH.java index 37c49f4e49..509e7d6bad 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XOtherSeekHelpVH.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XOtherSeekHelpVH.java @@ -199,18 +199,18 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder { if (mV2XPushMessageEntity.getDistance() > 1000) { SpanUtils.with(tvDistance) .append("" + (int) mV2XPushMessageEntity.getDistance() / 1000) - .setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_text)) + .setFontSize((int) itemView.getResources().getDimension(V2XServiceManager.getMoGoStatusManager().isVrMode() ? R.dimen.dp_42 : R.dimen.module_v2x_event_distance_text)) .append("公里") - .setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_title)) + .setFontSize((int) itemView.getResources().getDimension(V2XServiceManager.getMoGoStatusManager().isVrMode() ? R.dimen.dp_42 : R.dimen.module_v2x_event_distance_title)) .create(); } else { SpanUtils.with(tvDistance) .append("" + (int) mV2XPushMessageEntity.getDistance()) - .setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_text)) + .setFontSize((int) itemView.getResources().getDimension(V2XServiceManager.getMoGoStatusManager().isVrMode() ? R.dimen.dp_42 : R.dimen.module_v2x_event_distance_text)) .append("米") .setFontSize((int) itemView.getResources().getDimension( V2XServiceManager.getMoGoStatusManager().isVrMode() ? - R.dimen.module_v2x_event_distance_title_vr : R.dimen.module_v2x_event_distance_title)) + R.dimen.dp_42 : R.dimen.module_v2x_event_distance_title)) .create(); } SimpleDateFormat sdf = new SimpleDateFormat("HH:mm", Locale.CHINA); diff --git a/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_event_icon_daohang_vr.png b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_event_icon_daohang_vr.png new file mode 100644 index 0000000000000000000000000000000000000000..8344ac641c046618a863fc3adec42d5e41017e59 GIT binary patch literal 2624 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 literal 0 HcmV?d00001 diff --git a/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_event_icon_tel_vr.png b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_event_icon_tel_vr.png new file mode 100644 index 0000000000000000000000000000000000000000..3b65e46367dbc92a6b01f28205cfdcefef6b8a24 GIT binary patch literal 2737 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 literal 0 HcmV?d00001 diff --git a/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_bg.xml b/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_bg.xml index 82d3c3395f..73892b5ac9 100644 --- a/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_bg.xml +++ b/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_bg.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_type_orange_vr.xml b/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_type_orange_vr.xml index 0c99dfb607..86fe790833 100644 --- a/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_type_orange_vr.xml +++ b/modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_type_orange_vr.xml @@ -2,8 +2,8 @@ + android:endColor="#FFBF29" + android:startColor="#FFBF29" /> \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_fault_help_vr.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_fault_help_vr.xml index 76ddb7d31a..b69404b002 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_fault_help_vr.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_fault_help_vr.xml @@ -35,13 +35,11 @@ android:layout_marginTop="15dp" android:background="@drawable/bg_v2x_event_type_orange_vr" android:gravity="center" - android:paddingTop="@dimen/dp_2" - android:paddingBottom="@dimen/dp_5" android:text="求助" android:textColor="@android:color/white" - android:textSize="@dimen/module_v2x_event_type_title_text_size" + android:textSize="@dimen/sp_20" android:textStyle="bold" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="@id/ivFaultHelpHead" @@ -51,8 +49,8 @@ android:id="@+id/tvFaultHelpName" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/dp_20" - android:layout_marginTop="@dimen/dp_15" + android:layout_marginStart="@dimen/dp_24" + android:layout_marginTop="@dimen/dp_27" android:textColor="#FFFFFF" android:textSize="@dimen/dp_40" android:textStyle="bold" @@ -66,11 +64,13 @@ android:id="@+id/tvFaultHelpEventTime" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginStart="@dimen/dp_24" + android:layout_marginBottom="@dimen/dp_27" android:alpha="0.59" android:textColor="#FFFFFF" android:textSize="@dimen/dp_24" - app:layout_constraintStart_toStartOf="@id/tvFaultHelpName" - app:layout_constraintTop_toBottomOf="@id/tvFaultHelpName" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/ivFaultHelpHead" tools:text="15:30发布求助信息" /> @@ -83,36 +83,33 @@ android:layout_marginRight="@dimen/dp_42" android:gravity="center_vertical" android:textColor="#FFFFFF" - android:textSize="@dimen/dp_70" - android:textStyle="bold" + android:textSize="@dimen/dp_42" app:layout_constraintBottom_toBottomOf="@+id/ivFaultHelpEventCall" app:layout_constraintEnd_toStartOf="@+id/ivFaultHelpEventCall" app:layout_constraintTop_toTopOf="@+id/ivFaultHelpEventCall" - app:layout_constraintVertical_bias="0.466" tools:text="300M" /> + app:layout_constraintTop_toTopOf="parent" + tools:visibility="visible" /> \ No newline at end of file From bcbf035e5e928a38f6335f2f5c716ba08ad678db Mon Sep 17 00:00:00 2001 From: wujifei Date: Tue, 13 Apr 2021 19:33:42 +0800 Subject: [PATCH 03/16] =?UTF-8?q?fix#=E3=80=90#521=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E5=BF=85=E7=8E=B0=E3=80=91=E9=B9=B0=E7=9C=BC=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E6=94=B6=E5=88=B0=E6=95=85=E9=9A=9C=E6=B1=82?= =?UTF-8?q?=E5=8A=A9=EF=BC=8C=E6=97=A0=E5=AF=BC=E8=88=AA=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/module/extensions/view/ArcView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/ArcView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/ArcView.java index 7c22a7c303..9dc23e7587 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/ArcView.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/ArcView.java @@ -8,6 +8,7 @@ import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; +import android.graphics.Typeface; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.view.View; @@ -69,10 +70,12 @@ public class ArcView extends View { private void drawText(Canvas canvas) { Rect mRect = new Rect(); String mValue = String.valueOf(currentValue); + mTextPaint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); //绘制中心的数值 mTextPaint.getTextBounds(mValue, 0, mValue.length(), mRect); - canvas.drawText(mValue, getWidth() / 2, getHeight() / 2 + mRect.height() / 2, mTextPaint); + canvas.drawText(mValue, getWidth() / 2, getHeight() / 2 + mRect.height() / 2-10, mTextPaint); + mTextPaint.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL)); //绘制中心文字描述 mTextPaint.setTextSize(28); mTextPaint.getTextBounds(mDes, 0, mDes.length(), mRect); From 58c8b134c0a8db477ad484e0044ef7fa385bac03 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Thu, 15 Apr 2021 11:04:14 +0800 Subject: [PATCH 04/16] opt --- .../java/com/zhidao/roadcondition/service/CarCorderController.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/CarCorderController.kt b/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/CarCorderController.kt index faee34d0e5..ac1a0a8a49 100644 --- a/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/CarCorderController.kt +++ b/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/service/CarCorderController.kt @@ -499,6 +499,7 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback { info.type = type //0为图片, 1为视频 info.fromType = fromType info.mainInfoId = mainInfoId + info.infoType = 1 return info } From 1993e98b322821867fbd8fc2ac10345c31bd3a49 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 15 Apr 2021 11:16:19 +0800 Subject: [PATCH 05/16] code style --- .../common/drawer/SnapshotSetDataDrawer.java | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java index 26f50e85c4..ba8ba13c89 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java @@ -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() ) ); From 180e36acdb509b3054c7b07344489f1b25b45a73 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 15 Apr 2021 15:11:58 +0800 Subject: [PATCH 06/16] fix bug --- .../scenario/scene/livecar/V2XPushLiveCarWindow.java | 12 +++++++++--- .../scene/livecar/V2XVoiceCallLiveCarWindow.java | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java index 9549efdb15..f9ec08b008 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java @@ -113,9 +113,15 @@ public class V2XPushLiveCarWindow extends V2XBasWindow implements IV2XWindow Date: Thu, 15 Apr 2021 15:21:39 +0800 Subject: [PATCH 07/16] fix bug of clear OnlineCarData --- .../module/common/drawer/OnlineCarDrawer.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/OnlineCarDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/OnlineCarDrawer.java index 8418f23054..58f16cadd5 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/OnlineCarDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/OnlineCarDrawer.java @@ -13,6 +13,8 @@ import com.mogo.module.common.entity.MarkerCarPois; import com.mogo.module.common.entity.MarkerLocation; import com.mogo.module.common.entity.MarkerOnlineCar; import com.mogo.module.common.entity.MarkerShowEntity; +import com.mogo.service.statusmanager.IMogoStatusChangedListener; +import com.mogo.service.statusmanager.StatusDescriptor; import com.mogo.utils.logger.Logger; import java.util.ArrayList; @@ -26,7 +28,7 @@ public * * 描述 */ -class OnlineCarDrawer { +class OnlineCarDrawer implements IMogoStatusChangedListener { private static final String TAG = "OnlineCarDrawer"; @@ -36,6 +38,9 @@ class OnlineCarDrawer { private static volatile OnlineCarDrawer sInstance; private OnlineCarDrawer() { + MogoApisHandler.getInstance().getApis() + .getStatusManagerApi() + .registerStatusChangedListener( TAG, StatusDescriptor.VR_MODE, this ); } public static OnlineCarDrawer getInstance() { @@ -53,11 +58,6 @@ class OnlineCarDrawer { sInstance = null; } - private Object readResolve() { - // 阻止反序列化,必须实现 Serializable 接口 - return sInstance; - } - public void clearMarkers(){ MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).removeMarkers( ModuleNames.CARD_TYPE_USER_DATA ); } @@ -196,5 +196,8 @@ class OnlineCarDrawer { return false; } - + @Override + public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) { + clearMarkers(); + } } From 66600c848925d223f20b767d309fc13d2fd0be20 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 15 Apr 2021 15:40:36 +0800 Subject: [PATCH 08/16] fix bug --- .../scene/livecar/V2XPushLiveCarWindow.java | 36 +++++++++---------- .../livecar/V2XVoiceCallLiveCarWindow.java | 24 +++++++------ 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java index f9ec08b008..ad3810f2ee 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java @@ -112,16 +112,7 @@ public class V2XPushLiveCarWindow extends V2XBasWindow implements IV2XWindow { - //Logger.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。"); - //移出Window详细信息 - //移除窗体 - V2XServiceManager - .getMogoTopViewManager() - .removeViewNoLinkage(this); - }; + //Logger.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。"); + //移出Window详细信息 + runnableV2XEvent = this::close; } else { handlerV2XEvent.removeCallbacks(runnableV2XEvent); } @@ -155,4 +141,18 @@ public class V2XPushLiveCarWindow extends V2XBasWindow implements IV2XWindow Date: Thu, 15 Apr 2021 17:48:35 +0800 Subject: [PATCH 09/16] update version --- gradle.properties | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1d9227fd21..38d6182a4c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -155,19 +155,19 @@ LOGLIB_VERSION = 1.0.4 ######## MogoAiCloudSDK Version # 网络请求 -MOGO_NETWORK_VERSION=1.0.69 +MOGO_NETWORK_VERSION=1.0.70 # 鉴权 -MOGO_PASSPORT_VERSION=1.0.69 +MOGO_PASSPORT_VERSION=1.0.70 # 常链接 -MOGO_SOCKET_VERSION=1.0.69 +MOGO_SOCKET_VERSION=1.0.70 # 数据采集 -MOGO_REALTIME_VERSION=1.0.69 +MOGO_REALTIME_VERSION=1.0.70 # 探路,道路事件发布,获取 -MOGO_TANLU_VERSION=1.0.69 +MOGO_TANLU_VERSION=1.0.70 # 直播推流 -MOGO_LIVE_VERSION=1.0.69 +MOGO_LIVE_VERSION=1.0.70 # 直播拉流 -MOGO_TRAFFICLIVE_VERSION=1.0.69 +MOGO_TRAFFICLIVE_VERSION=1.0.70 ######## Foundation MogoAiCloud Module # mogoAiCloud apk services From 33f18b385a5bbe6f1a52e6b984d3f30a4a257710 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 15 Apr 2021 18:18:35 +0800 Subject: [PATCH 10/16] close v2x front v2xlive ivClose --- .../v2x/scenario/scene/livecar/V2XVoiceCallLiveCarWindow.java | 4 ++-- .../src/main/res/layout/window_see_carlive_video.xml | 1 + .../src/main/res/layout/window_see_carlive_video_vr.xml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XVoiceCallLiveCarWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XVoiceCallLiveCarWindow.java index 1db6ae4d66..2a7acd3c2a 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XVoiceCallLiveCarWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XVoiceCallLiveCarWindow.java @@ -55,7 +55,7 @@ public class V2XVoiceCallLiveCarWindow extends V2XBasWindow : R.layout.window_see_carlive_video, this); CarZegoLiveVideoView mV2XCarLiveVideoView = findViewById(R.id.videoPlayer); tvCountDown = findViewById(R.id.tvCountDown); - ImageView ivLiveVideoClose = findViewById(R.id.liveVideoClose); +// ImageView ivLiveVideoClose = findViewById(R.id.liveVideoClose); ivVideoPlayingSign = findViewById(R.id.ivVideoPlayingSign); mV2XCarLiveVideoView.addOnVideoStatusChangeListener(videoPlaying -> { isVideoPlay = videoPlaying; @@ -65,7 +65,7 @@ public class V2XVoiceCallLiveCarWindow extends V2XBasWindow stopCountDown(); } }); - ivLiveVideoClose.setOnClickListener(v -> close()); +// ivLiveVideoClose.setOnClickListener(v -> close()); } @Override diff --git a/modules/mogo-module-v2x/src/main/res/layout/window_see_carlive_video.xml b/modules/mogo-module-v2x/src/main/res/layout/window_see_carlive_video.xml index 335bf86fc1..2b73411810 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/window_see_carlive_video.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/window_see_carlive_video.xml @@ -20,5 +20,6 @@ android:layout_marginTop="@dimen/dp_20" android:clickable="true" android:focusable="true" + android:visibility="gone" android:src="@drawable/module_v2x_vr_close" /> \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/layout/window_see_carlive_video_vr.xml b/modules/mogo-module-v2x/src/main/res/layout/window_see_carlive_video_vr.xml index b27461dcef..02c4174e76 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/window_see_carlive_video_vr.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/window_see_carlive_video_vr.xml @@ -20,6 +20,7 @@ android:layout_marginTop="@dimen/dp_20" android:clickable="true" android:focusable="true" + android:visibility="gone" android:src="@drawable/module_v2x_vr_close" /> \ No newline at end of file From 9c87517b0e5790aeeeb10f926ea5eb1eb2b40e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Fri, 16 Apr 2021 10:13:08 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=9C=B0=E5=9B=BESDK?= =?UTF-8?q?=EF=BC=9A1.0.0-vr-8.5.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libraries/map-custom/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/map-custom/build.gradle b/libraries/map-custom/build.gradle index 28941cfea3..aebc219be0 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.6' + implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.5.7' // implementation 'com.zhidaoauto.machine:map:1.0.0-vr-test-3.4' } From f35c0e9cda5e36c2a16765535f12672457c9bbfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 20 Apr 2021 12:50:24 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E5=8D=87=E7=BA=A7AiSDK=EF=BC=8C=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E4=BA=86null=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 38d6182a4c..c263dde2c6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -155,19 +155,19 @@ LOGLIB_VERSION = 1.0.4 ######## MogoAiCloudSDK Version # 网络请求 -MOGO_NETWORK_VERSION=1.0.70 +MOGO_NETWORK_VERSION=1.0.71 # 鉴权 -MOGO_PASSPORT_VERSION=1.0.70 +MOGO_PASSPORT_VERSION=1.0.71 # 常链接 -MOGO_SOCKET_VERSION=1.0.70 +MOGO_SOCKET_VERSION=1.0.71 # 数据采集 -MOGO_REALTIME_VERSION=1.0.70 +MOGO_REALTIME_VERSION=1.0.71 # 探路,道路事件发布,获取 -MOGO_TANLU_VERSION=1.0.70 +MOGO_TANLU_VERSION=1.0.71 # 直播推流 -MOGO_LIVE_VERSION=1.0.70 +MOGO_LIVE_VERSION=1.0.71 # 直播拉流 -MOGO_TRAFFICLIVE_VERSION=1.0.70 +MOGO_TRAFFICLIVE_VERSION=1.0.71 ######## Foundation MogoAiCloud Module # mogoAiCloud apk services From 965aa42617bd10d12ca5305c958c500575ad2f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 20 Apr 2021 16:38:47 +0800 Subject: [PATCH 13/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=9C=80?= =?UTF-8?q?=E4=BC=98=E8=B7=AF=E7=BA=BF=E6=8E=A8=E8=8D=90=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=B8=A0=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/module/v2x/V2XSocketManager.java | 14 +++++++------- ..._401019.java => V2XMessageListener_401020.java} | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) rename modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/{V2XMessageListener_401019.java => V2XMessageListener_401020.java} (82%) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XSocketManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XSocketManager.java index 66144feea0..a1b99c07bd 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XSocketManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XSocketManager.java @@ -9,7 +9,7 @@ import com.mogo.module.v2x.listener.V2XMessageListener_401009; import com.mogo.module.v2x.listener.V2XMessageListener_401010; import com.mogo.module.v2x.listener.V2XMessageListener_401011; import com.mogo.module.v2x.listener.V2XMessageListener_401012; -import com.mogo.module.v2x.listener.V2XMessageListener_401019; +import com.mogo.module.v2x.listener.V2XMessageListener_401020; import com.mogo.utils.logger.Logger; import static com.mogo.module.v2x.V2XConst.MODULE_NAME; @@ -33,7 +33,7 @@ public class V2XSocketManager { private V2XMessageListener_401007 v2XMessageListener_401007; private V2XMessageListener_401009 v2XMessageListener_401009; private V2XMessageListener_401010 v2XMessageListener_401010; - private V2XMessageListener_401019 v2XMessageListener_401019; + private V2XMessageListener_401020 mV2XMessageListener_401020; private V2XSocketManager() { @@ -112,10 +112,10 @@ public class V2XSocketManager { .getMoGoSocketManager() .unregisterOnMessageListener(401009, v2XMessageListener_401009); } - if (v2XMessageListener_401019 != null) { + if (mV2XMessageListener_401020 != null) { V2XServiceManager .getMoGoSocketManager() - .unregisterOnMessageListener(401019, v2XMessageListener_401019); + .unregisterOnMessageListener(401019, mV2XMessageListener_401020); } } @@ -231,13 +231,13 @@ public class V2XSocketManager { * * 最优路线推荐 */ public void register401019() { - v2XMessageListener_401019 = new V2XMessageListener_401019(); + mV2XMessageListener_401020 = new V2XMessageListener_401020(); // 道路事件,在线车辆绘制 V2XServiceManager .getMoGoSocketManager() .registerOnMessageListener( - 401019, - v2XMessageListener_401019 + 401020, + mV2XMessageListener_401020 ); } diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_401019.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_401020.java similarity index 82% rename from modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_401019.java rename to modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_401020.java index 9bb5f2f364..1fc8dae340 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_401019.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_401020.java @@ -11,7 +11,7 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME; * @description 车路云—场景预警-云下发数据监听 最优路线推荐 * @since: 2021/4/13 */ -public class V2XMessageListener_401019 implements IMogoOnMessageListener { +public class V2XMessageListener_401020 implements IMogoOnMessageListener { @Override public Class target() { return V2XOptimalRouteDataRes.class; @@ -19,7 +19,7 @@ public class V2XMessageListener_401019 implements IMogoOnMessageListener Date: Wed, 21 Apr 2021 16:57:10 +0800 Subject: [PATCH 14/16] add tileId in uploadData --- gradle.properties | 14 +- .../amap/uicontroller/AMapUIController.java | 5 + .../mogo/map/impl/custom/AMapViewWrapper.java | 53 +++-- .../com/mogo/map/impl/custom/AMapWrapper.java | 33 ++- .../custom/uicontroller/AMapUIController.java | 6 + .../uicontroller/IMogoMapUIController.java | 9 + .../com/mogo/map/MogoMapUIController.java | 194 +++++++++--------- .../SnapshotLocationController.java | 2 + .../service/location/MogoRTKLocation.java | 79 +++---- .../service/impl/adas/AdasObjectUtils.java | 49 +++-- .../com/mogo/service/impl/v2x/V2XManager.java | 6 +- 11 files changed, 240 insertions(+), 210 deletions(-) diff --git a/gradle.properties b/gradle.properties index c263dde2c6..c12c099553 100644 --- a/gradle.properties +++ b/gradle.properties @@ -155,19 +155,19 @@ LOGLIB_VERSION = 1.0.4 ######## MogoAiCloudSDK Version # 网络请求 -MOGO_NETWORK_VERSION=1.0.71 +MOGO_NETWORK_VERSION=1.0.74 # 鉴权 -MOGO_PASSPORT_VERSION=1.0.71 +MOGO_PASSPORT_VERSION=1.0.74 # 常链接 -MOGO_SOCKET_VERSION=1.0.71 +MOGO_SOCKET_VERSION=1.0.74 # 数据采集 -MOGO_REALTIME_VERSION=1.0.71 +MOGO_REALTIME_VERSION=1.0.74 # 探路,道路事件发布,获取 -MOGO_TANLU_VERSION=1.0.71 +MOGO_TANLU_VERSION=1.0.74 # 直播推流 -MOGO_LIVE_VERSION=1.0.71 +MOGO_LIVE_VERSION=1.0.74 # 直播拉流 -MOGO_TRAFFICLIVE_VERSION=1.0.71 +MOGO_TRAFFICLIVE_VERSION=1.0.74 ######## Foundation MogoAiCloud Module # mogoAiCloud apk services diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/uicontroller/AMapUIController.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/uicontroller/AMapUIController.java index d8f81123fa..5061ea4b39 100644 --- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/uicontroller/AMapUIController.java +++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/uicontroller/AMapUIController.java @@ -298,4 +298,9 @@ public class AMapUIController implements IMogoMapUIController { mClient.changeBearing( bearing ); } } + + @Override + public long getTileId(double lon, double lat) { + return 0; + } } diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index ebe2ac1cbd..b3c6c20f0e 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -9,7 +9,6 @@ import android.location.Location; import android.os.Bundle; import android.os.Trace; import android.text.TextUtils; -import android.util.ArrayMap; import android.util.Log; import android.view.MotionEvent; import android.view.View; @@ -17,7 +16,6 @@ import android.view.ViewGroup; import android.view.animation.Interpolator; import android.widget.TextView; -import com.autonavi.nge.map.LonLat; import com.mogo.commons.debug.DebugConfig; import com.mogo.map.IMogoMap; import com.mogo.map.IMogoMapView; @@ -38,7 +36,6 @@ import com.mogo.map.uicontroller.MapControlResult; import com.mogo.utils.TipToast; import com.mogo.utils.UiThreadHandler; import com.mogo.utils.logger.Logger; -import com.mogo.utils.network.utils.GsonUtil; import com.zhidaoauto.map.sdk.open.MapAutoApi; import com.zhidaoauto.map.sdk.open.abs.MapStatusListener; import com.zhidaoauto.map.sdk.open.abs.OnCameraChangeListener; @@ -57,7 +54,6 @@ import com.zhidaoauto.map.sdk.open.location.RTKAutopilotLocationBean; import com.zhidaoauto.map.sdk.open.marker.BitmapDescriptorFactory; import com.zhidaoauto.map.sdk.open.marker.Marker; import com.zhidaoauto.map.sdk.open.marker.OnMarkClickListener; -import com.zhidaoauto.map.sdk.open.poyline.PolylineOptions; import com.zhidaoauto.map.sdk.open.query.LonLatPoint; import com.zhidaoauto.map.sdk.open.tools.MapTools; import com.zhidaoauto.map.sdk.open.view.MapAutoView; @@ -67,10 +63,8 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.json.JSONObject; -import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.Random; import java.util.concurrent.ConcurrentHashMap; public class AMapViewWrapper implements IMogoMapView, @@ -729,6 +723,11 @@ public class AMapViewWrapper implements IMogoMapView, } } + @Override + public long getTileId(double lon, double lat) { + return getMap().getUIController().getTileId(lon,lat); + } + @Override public void onLocationChanged(@NotNull com.zhidaoauto.map.sdk.open.location.MogoLocation location) { Location sysLocation = new Location(location.getProvider()); @@ -796,13 +795,13 @@ public class AMapViewWrapper implements IMogoMapView, String speedVal = String.valueOf(speedIntVal); String infoResName = ResIdCache.getVal(speedVal); int offset = 20; - if ( !mMapView.getMapAutoViewHelper().getLockMode() ) { + if (!mMapView.getMapAutoViewHelper().getLockMode()) { offset = 30; } - if ( offset != mLastYOffset ) { + if (offset != mLastYOffset) { mLastYOffset = offset; } - mSelfMarker.setInfoWindowOffset( 0, offset ); + mSelfMarker.setInfoWindowOffset(0, offset); if (TextUtils.isEmpty(infoResName)) { if (mSpeedView == null) { mSpeedView = new TextView(mMapView.getContext()); @@ -958,7 +957,7 @@ public class AMapViewWrapper implements IMogoMapView, /** * 切换到车头朝上 */ - private void change2CarUp(){ + private void change2CarUp() { mMapView.getMapAutoViewHelper().setMapViewPerspective(MapAutoApi.MAP_PERSPECTIVE_UP_CAR); } @@ -1029,9 +1028,9 @@ public class AMapViewWrapper implements IMogoMapView, bean.setAcceleration(acceleration); bean.setAlt(alt); bean.setSystemTime(systemTime); - bean.setSatelliteTime( satelliteTime ); + bean.setSatelliteTime(satelliteTime); bean.setReceiverDataTime(receiverDataTime); - bean.setAdasSatelliteTime( adasSatelliteTime ); + bean.setAdasSatelliteTime(adasSatelliteTime); bean.setLon(lon); bean.setGnss_speed(((float) speed)); bean.setLat(lat); @@ -1063,24 +1062,24 @@ public class AMapViewWrapper implements IMogoMapView, /** * 带缓存的道路匹配算法 - * + *

* 使用{@link MapDataApi#INSTANCE#getSinglePointMatchRoad()}这个方法获取道路数据会存在一定耗时,目前是4-10ms,因为请求频繁,为了 * 减小这部分耗时,使用一个ConcurrentHashMap{@link #roadCacheMap}缓存道路数据,此缓存是以目标车id为key,道路数据为value,以此减少 * 道路数据获取次数。 - * + *

* 当出现道路改变的情况,需要重新获取道路数据,采用递归的方式重获道路数据以及添加缓存,为了避免一直获取不到道路数据,一直递归,增加useCache参数跳出递归。 - * + *

* 道路改变的情况主要分为: - * 1. 目标车距离道路中心线距离超过阈值 matchThreshold(取路宽的1/4为阈值); - * 2. 目标车到道路中心线的映射点不在道路上(此判断在{@link PointInterpolatorUtil#mergeToRoad(double, double, List)}),也就是说已经驶出了这条道路 + * 1. 目标车距离道路中心线距离超过阈值 matchThreshold(取路宽的1/4为阈值); + * 2. 目标车到道路中心线的映射点不在道路上(此判断在{@link PointInterpolatorUtil#mergeToRoad(double, double, List)}),也就是说已经驶出了这条道路 * - * @param id 目标车唯一标识 - * @param lon 目标车经度 - * @param lat 目标车纬度 - * @param angle 目标车角度 + * @param id 目标车唯一标识 + * @param lon 目标车经度 + * @param lat 目标车纬度 + * @param angle 目标车角度 * @param isGpsLocation true-使用gps定位数据 - * @param isRTK true-使用rtk数据 - * @param usdCache true-使用道路缓存 false-不使用道路缓存 + * @param isRTK true-使用rtk数据 + * @param usdCache true-使用道路缓存 false-不使用道路缓存 * @return double[]{匹配后经度,匹配后纬度,目标车距离车道中心线距离},若匹配后经纬度值为-1,则没有匹配成功 */ private double[] matchRoad(String id, double lon, double lat, double angle, boolean isGpsLocation, boolean isRTK, boolean usdCache) { @@ -1089,7 +1088,7 @@ public class AMapViewWrapper implements IMogoMapView, RoadCacheWrapper roadCache = roadCacheMap.get(id); double matchThreshold = -1; - if (roadCache == null||roadCache == noCache) { + if (roadCache == null || roadCache == noCache) { SinglePointRoadInfo singlePointRoadInfo = MapDataApi.INSTANCE.getSinglePointMatchRoad(((float) wgs[0]), ((float) wgs[1]), ((float) angle), isGpsLocation, isRTK); if (singlePointRoadInfo != null && singlePointRoadInfo.getCoords() != null && !singlePointRoadInfo.getCoords().isEmpty()) { Log.i("timer-matchRoad-4", "cost " + (System.currentTimeMillis() - start) + "ms roadId: " + singlePointRoadInfo.getRoadId()); @@ -1127,7 +1126,7 @@ public class AMapViewWrapper implements IMogoMapView, matchThreshold = roadCache.getLaneWidth() / 4; double[] matchedPoint = PointInterpolatorUtil.mergeToRoad(wgs[0], wgs[1], roadCache.getRoad()); - if (matchThreshold>0&&matchedPoint[2] > 0 && matchedPoint[2] <= matchThreshold) { + if (matchThreshold > 0 && matchedPoint[2] > 0 && matchedPoint[2] <= matchThreshold) { // 目标车在阈值范围内 roadCacheMap.put(id, roadCache); Log.i("timer-matchRoad-3", "cost " + (System.currentTimeMillis() - start) + "ms"); @@ -1152,8 +1151,8 @@ public class AMapViewWrapper implements IMogoMapView, } @Override - public String getMarkerInfoResName( String speedVal ) { - return ResIdCache.getVal( speedVal ); + public String getMarkerInfoResName(String speedVal) { + return ResIdCache.getVal(speedVal); } @Override diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapWrapper.java index c8a58396a6..f1e03b51d2 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapWrapper.java @@ -2,7 +2,6 @@ package com.mogo.map.impl.custom; import android.content.Context; import android.graphics.Point; -import android.util.Log; import com.mogo.map.IMogoMap; import com.mogo.map.IMogoUiSettings; @@ -51,13 +50,13 @@ public class AMapWrapper implements IMogoMap { private IMogoUiSettings mUiSettings; public AMapWrapper(MapAutoViewHelper map, MapAutoView mapView, IMogoMapUIController controller) { - Logger.i(TAG, "autoop--AMapWrapper: init"+this); + Logger.i(TAG, "autoop--AMapWrapper: init" + this); this.mAMap = map; sAMap = map; this.mMapView = mapView; mUIcontroller = controller; // 设置实现自定义 info window - MapAutoApi.INSTANCE.setInfoWindowAdapter( new AMapInfoWindowAdapter() ); + MapAutoApi.INSTANCE.setInfoWindowAdapter(new AMapInfoWindowAdapter()); AMapUIController.getInstance().initClient(mUIcontroller); } @@ -83,7 +82,7 @@ public class AMapWrapper implements IMogoMap { @Override public IMogoMarker addMarker(String tag, MogoMarkerOptions options) { - Logger.i(TAG, "autoop-addMarker: " + tag + ",MogoMarkerOptions:" + options + ",AMap:" + (mAMap != null)+",this:"+this); + Logger.i(TAG, "autoop-addMarker: " + tag + ",MogoMarkerOptions:" + options + ",AMap:" + (mAMap != null) + ",this:" + this); if (!checkAMap()) { return null; } @@ -134,7 +133,7 @@ public class AMapWrapper implements IMogoMap { multiPointOverlayOptions.setData(markerOptions); multiPointOverlayOptions.setMarkerIcon(R.drawable.marker_blue); List data = mAMap.addMarkers(multiPointOverlayOptions).getOptions().getData(); - for (int i = 0 ;i< data.size();i++){ + for (int i = 0; i < data.size(); i++) { markers.add(new Marker(data.get(i))); } if (markers == null || markers.isEmpty()) { @@ -168,7 +167,7 @@ public class AMapWrapper implements IMogoMap { @Override public void setPointToCenter(int x, int y) { if (checkAMap()) { - LonLatPoint lonLatPoint = MapTools.INSTANCE.fromScreenLocation(new Point(x,y)); + LonLatPoint lonLatPoint = MapTools.INSTANCE.fromScreenLocation(new Point(x, y)); mAMap.setCenter(lonLatPoint); } } @@ -176,21 +175,21 @@ public class AMapWrapper implements IMogoMap { @Override public void setTouchPoiEnable(boolean touchPoiEnable) { if (checkAMap()) { - mAMap.setTouchPoiEnable( touchPoiEnable ); + mAMap.setTouchPoiEnable(touchPoiEnable); } } @Override public void setTrafficEnable(boolean enable) { if (checkAMap()) { - mAMap.setTraffic( enable ); + mAMap.setTraffic(enable); } } @Override public void showBuildings(boolean enabled) { if (checkAMap()) { - mAMap.showBuildings( enabled ); + mAMap.showBuildings(enabled); } } @@ -204,7 +203,7 @@ public class AMapWrapper implements IMogoMap { @Override public void showMapText(boolean enable) { if (checkAMap()) { - mAMap.showMapText( enable ); + mAMap.showMapText(enable); } } @@ -217,7 +216,7 @@ public class AMapWrapper implements IMogoMap { @Override public float getScalePerPixel() { - if ( checkAMap() ) { + if (checkAMap()) { return mAMap.getScalePerPixel(); } return 0; @@ -247,19 +246,19 @@ public class AMapWrapper implements IMogoMap { @Override public IMogoPolyline addPolyline(MogoPolylineOptions options) { - if ( checkAMap() ) { - PolylineOptions polylineOptions = ObjectUtils.fromMogo( options ); + if (checkAMap()) { + PolylineOptions polylineOptions = ObjectUtils.fromMogo(options); Logger.d(TAG, "addPolyline %s", polylineOptions.toString()); - if ( polylineOptions == null ) { + if (polylineOptions == null) { return null; } Polyline polyline = null; - if (polylineOptions.getLineWidth() > 0){ + if (polylineOptions.getLineWidth() > 0) { polyline = mAMap.drawThickLine(polylineOptions); - }else { + } else { polyline = mAMap.drawLine(polylineOptions); } - return new AMapPolylineWrapper( polyline, options ); + return new AMapPolylineWrapper(polyline, options); } return null; } diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/uicontroller/AMapUIController.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/uicontroller/AMapUIController.java index 4dc88d87fb..184f7f7ff0 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/uicontroller/AMapUIController.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/uicontroller/AMapUIController.java @@ -13,6 +13,7 @@ import com.mogo.map.uicontroller.EnumMapUI; import com.mogo.map.uicontroller.IMogoMapUIController; import com.mogo.map.uicontroller.MapCameraPosition; import com.mogo.map.uicontroller.MapControlResult; +import com.zhidaoauto.map.sdk.open.MapAutoApi; import org.json.JSONObject; @@ -286,6 +287,11 @@ public class AMapUIController implements IMogoMapUIController { } } + @Override + public long getTileId(double lon, double lat) { + return MapAutoApi.INSTANCE.getTileID(lon,lat,13); // 13为默认获取瓦片层级级别 + } + @Override public void setAnchorScale( float x, float y ) { diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java index 4f7ee5a167..0634cec1f7 100644 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java +++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java @@ -237,6 +237,15 @@ public interface IMogoMapUIController { */ void changeBearing( float bearing ); + /** + * 获取瓦片id + * @param lon 经度 + * @param lat 纬度 + * @return 瓦片id + */ + long getTileId(double lon, double lat); + + default void setAnchorScale( float x, float y ) { } diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java b/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java index 9aca5abc2c..d6d009fed0 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java +++ b/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java @@ -3,7 +3,6 @@ package com.mogo.map; import android.graphics.Point; import android.graphics.Rect; import android.location.Location; -import android.util.Log; import android.view.View; import android.view.animation.Interpolator; @@ -38,9 +37,9 @@ public class MogoMapUIController implements IMogoMapUIController { } public static MogoMapUIController getInstance() { - if ( sInstance == null ) { - synchronized ( MogoMapUIController.class ) { - if ( sInstance == null ) { + if (sInstance == null) { + synchronized (MogoMapUIController.class) { + if (sInstance == null) { sInstance = new MogoMapUIController(); } } @@ -48,7 +47,7 @@ public class MogoMapUIController implements IMogoMapUIController { return sInstance; } - public void setDelegate( IMogoMapUIController mDelegate ) { + public void setDelegate(IMogoMapUIController mDelegate) { this.mDelegate = mDelegate; } @@ -57,77 +56,77 @@ public class MogoMapUIController implements IMogoMapUIController { } @Override - public void setTrafficEnabled( boolean visible ) { + public void setTrafficEnabled(boolean visible) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.setTrafficEnabled( visible ); + if (mDelegate != null) { + mDelegate.setTrafficEnabled(visible); } } @Override - public MapControlResult changeZoom( boolean zoom ) { + public MapControlResult changeZoom(boolean zoom) { initDelegate(); - if ( mDelegate != null ) { - return mDelegate.changeZoom( zoom ); + if (mDelegate != null) { + return mDelegate.changeZoom(zoom); } return MapControlResult.ERROR; } @Override - public MapControlResult changeZoom( float zoom ) { + public MapControlResult changeZoom(float zoom) { initDelegate(); - if ( mDelegate != null ) { - return mDelegate.changeZoom( zoom ); + if (mDelegate != null) { + return mDelegate.changeZoom(zoom); } return MapControlResult.ERROR; } @Override - public void changeMapMode( EnumMapUI mode ) { + public void changeMapMode(EnumMapUI mode) { initDelegate(); - if ( mDelegate != null ) { - Logger.d( TAG, "set type: %s", mode.name() ); - mDelegate.changeMapMode( mode ); + if (mDelegate != null) { + Logger.d(TAG, "set type: %s", mode.name()); + mDelegate.changeMapMode(mode); } } @Override - public void moveToCenter( MogoLatLng latLng, boolean animate ) { + public void moveToCenter(MogoLatLng latLng, boolean animate) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.moveToCenter( latLng, animate ); + if (mDelegate != null) { + mDelegate.moveToCenter(latLng, animate); } } @Override - public void showMyLocation( boolean visible ) { + public void showMyLocation(boolean visible) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.showMyLocation( visible ); + if (mDelegate != null) { + mDelegate.showMyLocation(visible); } } @Override public void emphasizeMyLocation() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { mDelegate.emphasizeMyLocation(); } } @Override - public void showMyLocation( View view ) { + public void showMyLocation(View view) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.showMyLocation( view ); + if (mDelegate != null) { + mDelegate.showMyLocation(view); } } @Override public void recoverLockMode() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { mDelegate.recoverLockMode(); } } @@ -135,31 +134,31 @@ public class MogoMapUIController implements IMogoMapUIController { @Override public void loseLockMode() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { mDelegate.loseLockMode(); } } @Override - public void setLockZoom( int var1 ) { + public void setLockZoom(int var1) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.setLockZoom( var1 ); + if (mDelegate != null) { + mDelegate.setLockZoom(var1); } } @Override - public void displayOverview( Rect bounds ) { + public void displayOverview(Rect bounds) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.displayOverview( bounds ); + if (mDelegate != null) { + mDelegate.displayOverview(bounds); } } @Override public float getScalePerPixel() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { return mDelegate.getScalePerPixel(); } return 0; @@ -168,7 +167,7 @@ public class MogoMapUIController implements IMogoMapUIController { @Override public float getZoomLevel() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { return mDelegate.getZoomLevel(); } return 0; @@ -177,7 +176,7 @@ public class MogoMapUIController implements IMogoMapUIController { @Override public float getRoadWidth(double lon, double lat, float angle, boolean isGpsLocation, boolean isRTK) { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { return mDelegate.getRoadWidth(lon, lat, angle, isGpsLocation, isRTK); } @@ -187,7 +186,7 @@ public class MogoMapUIController implements IMogoMapUIController { @Override public MogoLatLng getCameraNorthEastPosition() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { return mDelegate.getCameraNorthEastPosition(); } return null; @@ -196,7 +195,7 @@ public class MogoMapUIController implements IMogoMapUIController { @Override public MogoLatLng getCameraSouthWestPosition() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { return mDelegate.getCameraSouthWestPosition(); } return null; @@ -205,75 +204,75 @@ public class MogoMapUIController implements IMogoMapUIController { @Override public MogoLatLng getWindowCenterLocation() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { return mDelegate.getWindowCenterLocation(); } return null; } @Override - public void setPointToCenter( double mapCenterX, double mapCenterY ) { + public void setPointToCenter(double mapCenterX, double mapCenterY) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.setPointToCenter( mapCenterX, mapCenterY ); + if (mDelegate != null) { + mDelegate.setPointToCenter(mapCenterX, mapCenterY); } } @Override - public Point getLocationPointInScreen( MogoLatLng latLng ) { + public Point getLocationPointInScreen(MogoLatLng latLng) { initDelegate(); - if ( mDelegate != null ) { - return mDelegate.getLocationPointInScreen( latLng ); + if (mDelegate != null) { + return mDelegate.getLocationPointInScreen(latLng); } return null; } @Override - public MogoLatLng getLocationMogoLatLngInScreen( Point point ) { + public MogoLatLng getLocationMogoLatLngInScreen(Point point) { initDelegate(); - if ( mDelegate != null ) { - return mDelegate.getLocationMogoLatLngInScreen( point ); + if (mDelegate != null) { + return mDelegate.getLocationMogoLatLngInScreen(point); } return null; } @Override - public void startJumpAnimation( IMogoMarker marker, float high, Interpolator interpolator, long duration ) { + public void startJumpAnimation(IMogoMarker marker, float high, Interpolator interpolator, long duration) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.startJumpAnimation( marker, high, interpolator, duration ); + if (mDelegate != null) { + mDelegate.startJumpAnimation(marker, high, interpolator, duration); } } @Override - public void setRenderFps( int fps ) { + public void setRenderFps(int fps) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.setRenderFps( fps ); + if (mDelegate != null) { + mDelegate.setRenderFps(fps); } } @Override - public void showBounds( String tag, MogoLatLng carPosition, List< MogoLatLng > lonLats, Rect bound, boolean lockCarPosition ) { + public void showBounds(String tag, MogoLatLng carPosition, List lonLats, Rect bound, boolean lockCarPosition) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.showBounds( tag, carPosition, lonLats, bound, lockCarPosition ); + if (mDelegate != null) { + mDelegate.showBounds(tag, carPosition, lonLats, bound, lockCarPosition); } } @Override public void forceRender() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { mDelegate.forceRender(); } } @Override - public float calculateLineDistance( MogoLatLng p1, MogoLatLng p2 ) throws Exception { + public float calculateLineDistance(MogoLatLng p1, MogoLatLng p2) throws Exception { initDelegate(); - if ( mDelegate != null ) { - return mDelegate.calculateLineDistance( p1, p2 ); + if (mDelegate != null) { + return mDelegate.calculateLineDistance(p1, p2); } return 0; } @@ -281,67 +280,72 @@ public class MogoMapUIController implements IMogoMapUIController { @Override public EnumMapUI getCurrentUiMode() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { return mDelegate.getCurrentUiMode(); } return null; } @Override - public void changeMyLocation( Location location ) { + public void changeMyLocation(Location location) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.changeMyLocation( location ); + if (mDelegate != null) { + mDelegate.changeMyLocation(location); } } @Override public boolean isCarLocked() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { return mDelegate.isCarLocked(); } return false; } @Override - public void setCarCursorOption( CarCursorOption option ) { + public void setCarCursorOption(CarCursorOption option) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.setCarCursorOption( option ); + if (mDelegate != null) { + mDelegate.setCarCursorOption(option); } } @Override public MapCameraPosition getMapCameraPosition() { initDelegate(); - if ( mDelegate != null ) { + if (mDelegate != null) { return mDelegate.getMapCameraPosition(); } return null; } @Override - public void changeBearing( float bearing ) { + public void changeBearing(float bearing) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.changeBearing( bearing ); + if (mDelegate != null) { + mDelegate.changeBearing(bearing); } } @Override - public void rtkEnable( boolean enable ) { + public long getTileId(double lon, double lat) { + return mDelegate.getTileId(lon, lat); + } + + @Override + public void rtkEnable(boolean enable) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.rtkEnable( enable ); + if (mDelegate != null) { + mDelegate.rtkEnable(enable); } } @Override - public void syncLocation2Map( JSONObject data ) { + public void syncLocation2Map(JSONObject data) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.syncLocation2Map( data ); + if (mDelegate != null) { + mDelegate.syncLocation2Map(data); } } @@ -351,42 +355,42 @@ public class MogoMapUIController implements IMogoMapUIController { } private void initDelegate() { - if ( mDelegate == null ) { + if (mDelegate == null) { mDelegate = MogoMapDelegateFactory.getMapUIControllerDelegate(); } } @Override - public void openVrMode( boolean zoomGestureEnable ) { + public void openVrMode(boolean zoomGestureEnable) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.openVrMode( zoomGestureEnable ); + if (mDelegate != null) { + mDelegate.openVrMode(zoomGestureEnable); } } @Override - public double[] matchRoad( String id, double lon, double lat, double angle, boolean isGpsLocation, boolean isRTK ) { + public double[] matchRoad(String id, double lon, double lat, double angle, boolean isGpsLocation, boolean isRTK) { initDelegate(); - if ( mDelegate != null ) { - return mDelegate.matchRoad( id, lon, lat, angle, isGpsLocation, isRTK ); + if (mDelegate != null) { + return mDelegate.matchRoad(id, lon, lat, angle, isGpsLocation, isRTK); } return null; } @Override - public String getMarkerInfoResName( String speedVal ) { + public String getMarkerInfoResName(String speedVal) { initDelegate(); - if ( mDelegate != null ) { - return mDelegate.getMarkerInfoResName( speedVal ); + if (mDelegate != null) { + return mDelegate.getMarkerInfoResName(speedVal); } return null; } @Override - public void setMarkerInfoResName( String speedVal, String val ) { + public void setMarkerInfoResName(String speedVal, String val) { initDelegate(); - if ( mDelegate != null ) { - mDelegate.setMarkerInfoResName( speedVal, val ); + if (mDelegate != null) { + mDelegate.setMarkerInfoResName(speedVal, val); } } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/uploadintime/SnapshotLocationController.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/uploadintime/SnapshotLocationController.java index da20e6f206..8ff04c3c59 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/uploadintime/SnapshotLocationController.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/uploadintime/SnapshotLocationController.java @@ -1,6 +1,7 @@ package com.mogo.module.common.uploadintime; import com.mogo.commons.debug.DebugConfig; +import com.mogo.module.common.MogoApisHandler; import com.mogo.realtime.entity.CloudLocationInfo; import com.mogo.utils.logger.Logger; @@ -98,6 +99,7 @@ class SnapshotLocationController { cloudLocationInfo.setSpeed( speed ); cloudLocationInfo.setSatelliteTime( satelliteTime ); cloudLocationInfo.setSystemTime( systemTime ); + cloudLocationInfo.setTileId(String.valueOf(MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().getTileId(lon,lat))); mLastLocationInfo = cloudLocationInfo; mMachineCacheList.add( cloudLocationInfo ); diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java index dd926dbb11..6fba82182a 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java @@ -8,6 +8,7 @@ import android.location.LocationManager; import android.os.Bundle; import com.mogo.commons.AbsMogoApplication; +import com.mogo.module.common.MogoApisHandler; import com.mogo.module.common.uploadintime.SnapshotLocationController; import com.mogo.realtime.entity.CloudLocationInfo; import com.mogo.utils.logger.Logger; @@ -29,77 +30,79 @@ public class MogoRTKLocation { } public void init() { - locationManager = ( LocationManager ) AbsMogoApplication.getApp().getApplicationContext().getSystemService( Context.LOCATION_SERVICE ); - String provider = locationManager.getBestProvider( getCriteria(), true ); - Logger.d( TAG, "init provider : " + provider ); - if ( locationManager.isProviderEnabled( LocationManager.GPS_PROVIDER ) ) { + locationManager = (LocationManager) AbsMogoApplication.getApp().getApplicationContext().getSystemService(Context.LOCATION_SERVICE); + String provider = locationManager.getBestProvider(getCriteria(), true); + Logger.d(TAG, "init provider : " + provider); + if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { try { - locationManager.requestLocationUpdates( provider, 0, 0, locationListener ); - Location location = locationManager.getLastKnownLocation( provider ); - if ( location != null ) { - Logger.i( TAG, "location : " + location.toString() ); + locationManager.requestLocationUpdates(provider, 0, 0, locationListener); + Location location = locationManager.getLastKnownLocation(provider); + if (location != null) { + Logger.i(TAG, "location : " + location.toString()); } - } catch ( Exception e ) { + } catch (Exception e) { e.printStackTrace(); - Logger.d( TAG, "RTK LocationManager requestLocationUpdates has Exception : " + e.getMessage() ); + Logger.d(TAG, "RTK LocationManager requestLocationUpdates has Exception : " + e.getMessage()); } } else { - Logger.d( TAG, "RTK LocationManager Provider GPS_PROVIDER unable" ); + Logger.d(TAG, "RTK LocationManager Provider GPS_PROVIDER unable"); } } private Criteria getCriteria() { Criteria criteria = new Criteria(); - criteria.setAccuracy( Criteria.ACCURACY_FINE ); //高精 - criteria.setAltitudeRequired( false ); - criteria.setBearingRequired( true ); - criteria.setSpeedRequired( true ); - criteria.setPowerRequirement( Criteria.POWER_LOW ); + criteria.setAccuracy(Criteria.ACCURACY_FINE); //高精 + criteria.setAltitudeRequired(false); + criteria.setBearingRequired(true); + criteria.setSpeedRequired(true); + criteria.setPowerRequirement(Criteria.POWER_LOW); return criteria; } private final LocationListener locationListener = new LocationListener() { @Override - public void onLocationChanged( Location location ) { - if ( location != null ) { + public void onLocationChanged(Location location) { + if (location != null) { CloudLocationInfo cloudLocationInfo = new CloudLocationInfo(); - if(location.getLatitude() != 0.0 && location.getLongitude() != 0.0){ - cloudLocationInfo.setAlt( location.getAltitude() ); - cloudLocationInfo.setHeading( location.getBearing() ); - cloudLocationInfo.setLat( location.getLatitude() ); - cloudLocationInfo.setLon( location.getLongitude() ); - cloudLocationInfo.setSpeed( location.getSpeed() ); - cloudLocationInfo.setSatelliteTime( location.getTime() ); - cloudLocationInfo.setSystemTime( System.currentTimeMillis() ); - SnapshotLocationController.getInstance().syncLocationInfo( cloudLocationInfo ); + if (location.getLatitude() != 0.0 && location.getLongitude() != 0.0) { + cloudLocationInfo.setAlt(location.getAltitude()); + cloudLocationInfo.setHeading(location.getBearing()); + cloudLocationInfo.setLat(location.getLatitude()); + cloudLocationInfo.setLon(location.getLongitude()); + cloudLocationInfo.setSpeed(location.getSpeed()); + cloudLocationInfo.setSatelliteTime(location.getTime()); + cloudLocationInfo.setSystemTime(System.currentTimeMillis()); + cloudLocationInfo.setTileId(String.valueOf(MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController() + .getTileId(location.getLongitude(), location.getLatitude()))); + SnapshotLocationController.getInstance().syncLocationInfo(cloudLocationInfo); } } else { - Logger.e( TAG, "location == null" ); + Logger.e(TAG, "location == null"); } } @Override - public void onStatusChanged( String provider, int status, Bundle extras ) { - Logger.d( TAG, "onStatusChanged status: " + status ); + public void onStatusChanged(String provider, int status, Bundle extras) { + Logger.d(TAG, "onStatusChanged status: " + status); } @Override - public void onProviderEnabled( String provider ) { - Logger.d( TAG, "onProviderEnabled" ); + public void onProviderEnabled(String provider) { + Logger.d(TAG, "onProviderEnabled"); } @Override - public void onProviderDisabled( String provider ) { - Logger.d( TAG, "onProviderEnabled" ); + public void onProviderDisabled(String provider) { + Logger.d(TAG, "onProviderEnabled"); } }; public void stop() { - Logger.d( TAG, "stop RTK Location" ); - if ( locationManager != null && locationListener != null ) { - locationManager.removeUpdates( locationListener ); + Logger.d(TAG, "stop RTK Location"); + if (locationManager != null && locationListener != null) { + locationManager.removeUpdates(locationListener); } else { - Logger.d( TAG, "stop failed , reason : loc" + locationManager + " , or loc listener: " + locationListener + " is null" ); + Logger.d(TAG, "stop failed , reason : loc" + locationManager + " , or loc listener: " + locationListener + " is null"); } } } diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/adas/AdasObjectUtils.java b/services/mogo-service/src/main/java/com/mogo/service/impl/adas/AdasObjectUtils.java index 8183c0f01f..1836e7e73e 100644 --- a/services/mogo-service/src/main/java/com/mogo/service/impl/adas/AdasObjectUtils.java +++ b/services/mogo-service/src/main/java/com/mogo/service/impl/adas/AdasObjectUtils.java @@ -1,8 +1,10 @@ package com.mogo.service.impl.adas; -import com.mogo.cloud.commons.utils.CoordinateUtils; +import com.alibaba.android.arouter.launcher.ARouter; import com.mogo.commons.utils.MortonCode; +import com.mogo.map.uicontroller.IMogoMapUIController; import com.mogo.realtime.entity.ADASRecognizedResult; +import com.mogo.service.IMogoServiceApis; import com.mogo.service.adas.entity.ADASWarnMessage; import com.zhidao.autopilotservice.model.AdasAIDLOwnerCarRectModel; import com.zhidao.support.adas.high.bean.WarnMessageInfo; @@ -10,68 +12,71 @@ import com.zhidao.support.adas.high.bean.WarnMessageInfo; import java.util.ArrayList; import java.util.List; -public + /* * @author congtaowang * @since 2020/10/25 * * 对象转换类 */ -class AdasObjectUtils { +public class AdasObjectUtils { - public static ADASWarnMessage fromAdasObject( WarnMessageInfo info ) { - if ( info == null ) { + public static ADASWarnMessage fromAdasObject(WarnMessageInfo info) { + if (info == null) { return null; } ADASWarnMessage warnMessage = new ADASWarnMessage(); warnMessage.content = info.getContent(); warnMessage.level = info.getLevel(); try { - warnMessage.type = Integer.parseInt( info.getType() ); - } catch ( NumberFormatException e ) { + warnMessage.type = Integer.parseInt(info.getType()); + } catch (NumberFormatException e) { return null; } warnMessage.value = info.getValue(); return warnMessage; } - public static List regroupData(List< AdasAIDLOwnerCarRectModel > datums ) { - if ( datums == null || datums.isEmpty() ) { + public static List regroupData(List datums) { + if (datums == null || datums.isEmpty()) { return null; } - List< ADASRecognizedResult > recognizedListResults = new ArrayList<>(); - for ( AdasAIDLOwnerCarRectModel model : datums ) { - if ( model == null ) { + List recognizedListResults = new ArrayList<>(); + for (AdasAIDLOwnerCarRectModel model : datums) { + if (model == null) { continue; } - ADASRecognizedResult recognizedListResult = fromAdasObject( model ); - if ( recognizedListResult != null ) { - recognizedListResults.add( recognizedListResult ); + ADASRecognizedResult recognizedListResult = fromAdasObject(model); + if (recognizedListResult != null) { + recognizedListResults.add(recognizedListResult); } } return recognizedListResults; } - public static ADASRecognizedResult fromAdasObject( AdasAIDLOwnerCarRectModel model ) { - if ( model == null ) { + public static ADASRecognizedResult fromAdasObject(AdasAIDLOwnerCarRectModel model) { + if (model == null) { return null; } ADASRecognizedResult result = new ADASRecognizedResult(); result.uuid = model.getUuid(); - result.lat = model.getLat(); result.lon = model.getLon(); - result.type = Integer.parseInt( model.getType() ); + result.type = Integer.parseInt(model.getType()); result.heading = model.getHeading(); - result.systemTime = Long.parseLong( model.getSystemTime() ); - result.satelliteTime = Long.parseLong( model.getSatelliteTime() ); + result.systemTime = Long.parseLong(model.getSystemTime()); + result.satelliteTime = Long.parseLong(model.getSatelliteTime()); result.alt = model.getAlt(); result.color = model.getColor(); result.speed = model.getSpeed(); result.carId = model.getCarId(); result.dataAccuracy = model.dataAccuracy; result.distance = model.distance; - result.mortonCode = MortonCode.wrapEncodeMorton( result.lon, result.lat ); + result.mortonCode = MortonCode.wrapEncodeMorton(result.lon, result.lat); + IMogoMapUIController mogoMapUIController = ARouter.getInstance().navigation(IMogoServiceApis.class).getMapServiceApi().getMapUIController(); + if (mogoMapUIController != null) { + result.tileId = String.valueOf(mogoMapUIController.getTileId(result.lon, result.lat)); + } return result; } } diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/v2x/V2XManager.java b/services/mogo-service/src/main/java/com/mogo/service/impl/v2x/V2XManager.java index 7b7c867a67..5b3bcbee05 100644 --- a/services/mogo-service/src/main/java/com/mogo/service/impl/v2x/V2XManager.java +++ b/services/mogo-service/src/main/java/com/mogo/service/impl/v2x/V2XManager.java @@ -24,7 +24,7 @@ import java.util.concurrent.CopyOnWriteArrayList; */ @Route(path = MogoServicePaths.PATH_V2X_FRONT_CRASH_WARNING) public class V2XManager implements IV2XProvider { - private Map> mListeners = new ConcurrentHashMap<>(); + private final Map> mListeners = new ConcurrentHashMap<>(); @Override public void registerIntentListener(String intent, IV2XListener listener) { @@ -50,9 +50,7 @@ public class V2XManager implements IV2XProvider { public void warningChangedForListenerWithDirection(int direction, String command) { List listeners = mListeners.get(command); if (listeners != null && !listeners.isEmpty()) { - Iterator iterator = listeners.iterator(); - while (iterator.hasNext()) { - IV2XListener listener = iterator.next(); + for (IV2XListener listener : listeners) { if (listener != null) { listener.warningChangedWithDirection(direction); } From 4ce40db22b3ce2fc172ea0e1982fca65222ff750 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 22 Apr 2021 17:13:39 +0800 Subject: [PATCH 15/16] .. --- .../java/com/mogo/module/v2x/view/CarZegoLiveVideoView.java | 2 -- .../src/main/res/layout/view_video_layout_see_live.xml | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/CarZegoLiveVideoView.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/CarZegoLiveVideoView.java index 63280da45a..4b8e411b45 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/CarZegoLiveVideoView.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/CarZegoLiveVideoView.java @@ -109,8 +109,6 @@ public class CarZegoLiveVideoView extends RoundLayout { if (!TextUtils.isEmpty(liveSn)) { CarZegoLiveVideoView.this.liveSn = liveSn; } - mLoading.setVisibility(VISIBLE); - mClLoadError.setVisibility(GONE); refreshStatusToListener(true); mLoading.setVisibility(GONE); mClLoadError.setVisibility(GONE); diff --git a/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_see_live.xml b/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_see_live.xml index bd902cb049..8c6e2c3547 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_see_live.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_see_live.xml @@ -30,8 +30,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" - android:visibility="gone" - tools:visibility="visible"> + android:visibility="gone"> Date: Fri, 23 Apr 2021 11:58:38 +0800 Subject: [PATCH 16/16] remove unuse code --- .../module/v2x/view/V2XLiveGSYVideoView.java | 52 +------------------ 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XLiveGSYVideoView.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XLiveGSYVideoView.java index 10d9618c44..9df92acde9 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XLiveGSYVideoView.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XLiveGSYVideoView.java @@ -121,7 +121,7 @@ public class V2XLiveGSYVideoView extends RoundLayout implements IMogoSkinCompatS /** * 开始直播 * - * @param carLiveInfo 要直播的车机,如果没有直播的地址需要重新获取最新的直播地址 + * @param carLiveInfo 直播数据 */ public void startLive(MarkerCarInfo.CarLiveInfo carLiveInfo) { // 进行直播播放 @@ -131,36 +131,6 @@ public class V2XLiveGSYVideoView extends RoundLayout implements IMogoSkinCompatS setCarLiveInfo(carLiveInfo); playLiveVideo(carLiveInfo); } - // 根据SN重新获取直播流地址 - else { -// V2XServiceManager -// .getV2XRefreshModel() -// .livePush(new V2XRefreshCallback() { -// @Override -// public void onSuccess(V2XLivePushVoRes result) { -// Logger.e(MODULE_NAME, "从服务端获取最新直播信息:" + GsonUtil.jsonFromObject(result)); -// mClLoadError.setVisibility(GONE); -// mClLoadError.setVisibility(GONE); -// try { -// MarkerCarInfo.CarLiveInfo carRealLiveInfo = new MarkerCarInfo.CarLiveInfo(); -// carRealLiveInfo.setVideoUrl(result.getResult().getPlayUrl().getRtmp()); -// carRealLiveInfo.setVideoSn(carLiveInfo.getVideoSn()); -// carRealLiveInfo.setVideoChannel(result.getResult().getVideoChannel()); -// setCarLiveInfo(carLiveInfo); -// playLiveVideo(carRealLiveInfo); -// } catch (Exception e) { -// e.printStackTrace(); -// } -// } -// -// @Override -// public void onFail(String msg) { -// Logger.e(MODULE_NAME, "播放器:" + msg); -// mLoading.setVisibility(GONE); -// mClLoadError.setVisibility(VISIBLE); -// } -// }, carLiveInfo.getVideoSn(), 0); - } } } @@ -212,26 +182,6 @@ public class V2XLiveGSYVideoView extends RoundLayout implements IMogoSkinCompatS } } - /** - * 刷新直播心跳 - * - * @param carLiveInfo 直播info - */ - private void startHeartLive(MarkerCarInfo.CarLiveInfo carLiveInfo) { - try { - if (carLiveInfo != null && !TextUtils.isEmpty(carLiveInfo.getVideoSn()) - && !TextUtils.isEmpty(carLiveInfo.getVideoChannel())) { - V2XServiceManager - .getV2XRefreshModel() - .refreshHeartBeat(carLiveInfo.getVideoSn(), - carLiveInfo.getVideoChannel(), - null); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - public void stopLive(MarkerCarInfo.CarLiveInfo carLiveInfo) { try { Logger.w(MODULE_NAME, "心跳:关闭直播...");