抽离小地图访问到MoGoEagleEye.core.mogo-core-function-call

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-09-17 19:00:17 +08:00
parent 32c126fe17
commit 47670a7a4c
37 changed files with 58 additions and 19 deletions

2
.idea/gradle.xml generated
View File

@@ -19,6 +19,7 @@
<option value="$PROJECT_DIR$/core" />
<option value="$PROJECT_DIR$/core/function-impl" />
<option value="$PROJECT_DIR$/core/function-impl/mogo-core-function-hmi" />
<option value="$PROJECT_DIR$/core/function-impl/mogo-core-function-smp" />
<option value="$PROJECT_DIR$/core/mogo-core-data" />
<option value="$PROJECT_DIR$/core/mogo-core-function-api" />
<option value="$PROJECT_DIR$/core/mogo-core-function-call" />
@@ -56,7 +57,6 @@
<option value="$PROJECT_DIR$/modules/mogo-module-search" />
<option value="$PROJECT_DIR$/modules/mogo-module-service" />
<option value="$PROJECT_DIR$/modules/mogo-module-share" />
<option value="$PROJECT_DIR$/modules/mogo-module-smp" />
<option value="$PROJECT_DIR$/modules/mogo-module-v2x" />
<option value="$PROJECT_DIR$/modules/mogo-module-widgets" />
<option value="$PROJECT_DIR$/modules/tanlulib" />

View File

@@ -187,7 +187,7 @@ dependencies {
implementation project(':modules:mogo-module-monitor')
implementation project(':modules:mogo-module-extensions')
implementation project(':modules:mogo-module-map')
implementation project(':modules:mogo-module-smp')
implementation project(':core:function-impl:mogo-core-function-smp')
implementation project(':modules:mogo-module-obu-mogo')
implementation project(':modules:mogo-module-adas')
implementation project(':modules:mogo-module-back')

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.module.small.map">
package="com.mogo.eagle.core.function.smp">
</manifest>

View File

@@ -1,4 +1,4 @@
package com.mogo.module.small.map;
package com.mogo.eagle.core.function.smp;
import android.content.Context;
import android.graphics.BitmapFactory;
@@ -24,12 +24,12 @@ import com.amap.api.navi.AMapNaviViewOptions;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.smp.animation.DirectionRotateAnimation;
import com.mogo.eagle.core.function.smp.utils.MapAssetStyleUtils;
import com.mogo.eagle.core.function.smp.view.ISmallMapDirectionView;
import com.mogo.eagle.core.view.RoundLayout;
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.small.map.animation.DirectionRotateAnimation;
import com.mogo.module.small.map.utils.MapAssetStyleUtils;
import com.mogo.module.small.map.view.ISmallMapDirectionView;
import java.math.RoundingMode;
import java.text.NumberFormat;

View File

@@ -1,4 +1,4 @@
package com.mogo.module.small.map;
package com.mogo.eagle.core.function.smp;
import android.content.Context;
import android.os.Bundle;
@@ -11,6 +11,7 @@ import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.smp.R;
import java.util.List;

View File

@@ -1,4 +1,4 @@
package com.mogo.module.small.map;
package com.mogo.eagle.core.function.smp;
import android.content.Context;
import android.util.Log;

View File

@@ -1,4 +1,4 @@
package com.mogo.module.small.map;
package com.mogo.eagle.core.function.smp;
import android.content.Context;

View File

@@ -1,4 +1,5 @@
package com.mogo.module.small.map.animation;
package com.mogo.eagle.core.function.smp.animation;
import android.content.Context;
import android.util.AttributeSet;

View File

@@ -1,4 +1,5 @@
package com.mogo.module.small.map.utils;
package com.mogo.eagle.core.function.smp.utils;
import android.content.Context;

View File

@@ -1,4 +1,4 @@
package com.mogo.module.small.map.view;
package com.mogo.eagle.core.function.smp.view;
import com.mogo.eagle.core.data.map.MogoLatLng;

View File

@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.mogo.module.small.map.SmallMapDirectionView
<com.mogo.eagle.core.function.smp.SmallMapDirectionView
android:id="@+id/smallMapDirectionView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -0,0 +1,32 @@
package com.mogo.eagle.core.function.call.map;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider;
import com.mogo.eagle.core.function.call.base.CallerBase;
import com.mogo.service.MogoServicePaths;
import java.util.List;
/**
* @author xiaoyuzhou
* @date 2021/9/17 6:15 下午
*/
public class CallerSmpManager extends CallerBase {
private static IMogoSmallMapProvider getMogoSmallMapProvider() {
return getApiInstance(IMogoSmallMapProvider.class, MogoServicePaths.PATH_SMALL_MAP);
}
/**
* 绘制路径线
*/
public static void drawablePolyline(List<MogoLatLng> coordinates) {
getMogoSmallMapProvider().drawablePolyline(coordinates);
}
/**
* 清除路径线
*/
public static void clearPolyline() {
getMogoSmallMapProvider().clearPolyline();
}
}

View File

@@ -49,7 +49,7 @@ dependencies {
api project(":modules:mogo-module-main")
implementation project(":OCH:mogo-och")
implementation project(':modules:mogo-module-service')
implementation project(':modules:mogo-module-smp')
implementation project(':core:function-impl:mogo-core-function-smp')
}
}

View File

@@ -31,7 +31,7 @@
:modules:mogo-module-adas
:services:mogo-service
:modules:mogo-module-map
:modules:mogo-module-smp
:core:function-impl:mogo-core-function-smp
:modules:mogo-module-apps
:modules:mogo-module-service
:modules:mogo-module-authorize

View File

@@ -86,6 +86,7 @@ dependencies {
implementation project(':modules:mogo-module-obu')
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-function-call')
}
annotationProcessor rootProject.ext.dependencies.aroutercompiler

View File

@@ -7,6 +7,7 @@ import android.content.Intent;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.common.entity.V2XPushMessageEntity;
@@ -167,9 +168,9 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
V2XServiceManager.getMoGoStatusManager().setSeekHelping(MODULE_NAME, true);
} else if (sceneType == 20) {// 小地图绘制线
List<MogoLatLng> coordinates = TestOnLineCarUtils.getTestCoordinates();
V2XServiceManager.getMogoSmallMapProvider().drawablePolyline(coordinates);
CallerSmpManager.drawablePolyline(coordinates);
} else if (sceneType == 21) {// 小地图清除绘制线
V2XServiceManager.getMogoSmallMapProvider().clearPolyline();
CallerSmpManager.clearPolyline();
}
}

View File

@@ -17,7 +17,10 @@ include ':core:mogo-core-function-api'
// 模块对外暴露等调用接口
include ':core:mogo-core-function-call'
// 业务实现
// UI 展示及交互
include ':core:function-impl:mogo-core-function-hmi'
// 小地图控件
include ':core:function-impl:mogo-core-function-smp'
// 服务
@@ -43,7 +46,6 @@ include ':modules:mogo-module-monitor'
include ':modules:mogo-module-left-panel-noop'
include ':modules:mogo-module-left-panel'
include ':modules:mogo-module-obu'
include ':modules:mogo-module-smp'
include ':modules:mogo-module-adas'
include ':modules:mogo-module-check'
include ':modules:mogo-module-map'