Merge branch 'dev_robotaxi-d_231218_6.2.6' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_231218_6.2.6

# Conflicts:
#	OCH/charter/passenger/src/main/java/com/mogo/och/charter/passenger/ui/video/VideoView.kt
#	OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/video/InfoVideoView.kt
This commit is contained in:
aibingbing
2023-12-27 11:51:52 +08:00
22 changed files with 229 additions and 110 deletions

View File

@@ -50,6 +50,13 @@ internal class InfoVideoView @JvmOverloads constructor(
private val arrayListOf by lazy {
arrayListOf<TaxiPassengerVideoPlay>().apply {
add(
TaxiPassengerVideoPlay(
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"蘑菇车联牵手成都大运会"
)
)
add(TaxiPassengerVideoPlay(
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969511280/车队.png",
@@ -60,13 +67,6 @@ internal class InfoVideoView @JvmOverloads constructor(
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"蘑菇车联之红旗车队"
))
add(
TaxiPassengerVideoPlay(
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"蘑菇车联牵手成都大运会"
)
)
add(
TaxiPassengerVideoPlay(
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 KiB

After

Width:  |  Height:  |  Size: 381 KiB

View File

@@ -10,8 +10,8 @@
android:layout_height="match_parent"
android:layout_gravity="center"
app:bgColor="#00000000"
app:blurRadius="@dimen/dp_36"
app:shadowColor="#80121526"
app:blurRadius="@dimen/dp_30"
app:shadowColor="#A63F5388"
app:shadowRadius="@dimen/dp_54"
app:shadow_position="outer"
app:xOffset="0dp"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -10,8 +10,8 @@
android:layout_height="match_parent"
android:layout_gravity="center"
app:bgColor="#00000000"
app:blurRadius="@dimen/dp_36"
app:shadowColor="#80121526"
app:blurRadius="@dimen/dp_30"
app:shadowColor="#A63F5388"
app:shadowRadius="@dimen/dp_54"
app:shadow_position="outer"
app:xOffset="0dp"

View File

@@ -146,6 +146,12 @@
},
"taxiunmannedpassengerochdfhq": {
"medias": [
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
@@ -158,12 +164,6 @@
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
@@ -174,6 +174,12 @@
},
"charterpassengerochm1": {
"medias": [
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
@@ -186,12 +192,6 @@
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
@@ -348,6 +348,12 @@
},
"taxiunmannedpassengerochdfhq": {
"medias": [
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
@@ -360,12 +366,6 @@
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
@@ -376,6 +376,12 @@
},
"charterpassengerochm1": {
"medias": [
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
@@ -388,12 +394,6 @@
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
@@ -454,6 +454,12 @@
},
"taxiunmannedpassengerochdfhq": {
"medias": [
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
@@ -466,12 +472,6 @@
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
@@ -482,6 +482,12 @@
},
"charterpassengerochm1": {
"medias": [
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
@@ -494,12 +500,6 @@
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
@@ -656,6 +656,12 @@
},
"taxiunmannedpassengerochdfhq": {
"medias": [
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
@@ -668,12 +674,6 @@
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
@@ -684,6 +684,12 @@
},
"charterpassengerochm1": {
"medias": [
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
@@ -696,12 +702,6 @@
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,

View File

@@ -1,6 +1,7 @@
package com.mogo.launcher.lancet.jank.ui
import android.app.Activity
import android.os.SystemClock
import android.view.View
import com.knightboost.lancet.api.Scope
import com.knightboost.lancet.api.annotations.Group
@@ -10,11 +11,28 @@ import com.knightboost.lancet.api.annotations.TargetMethod
import com.knightboost.lancet.api.annotations.Weaver
import com.mogo.eagle.core.block.runtime.message.Message
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.launcher.R
@Weaver
@Group("main_block_check")
class UiPostLancet {
class ActionWrapper(private val extra:Map<String, String>, private val delegate: Runnable): Runnable {
override fun run() {
val startTime = SystemClock.uptimeMillis()
try {
delegate.run()
} finally {
val duration = SystemClock.uptimeMillis() - startTime
CallerDevaToolsManager.block()?.takeIf {
it.hasInit()
}?.recorder()?.recycle(Message.acquire(handler = null, action = delegate, duration = duration, extra = extra))
}
}
}
companion object {
@JvmStatic
@@ -22,12 +40,13 @@ class UiPostLancet {
@TargetMethod(methodName = "runOnUiThread")
@ReplaceInvoke
fun runOnUiThreadOfActivity(activity: Activity, action: Runnable) {
val extra = mapOf(activity.javaClass.name to "runOnUiThread")
try {
activity.runOnUiThread(action)
activity.runOnUiThread(ActionWrapper(extra, action))
} finally {
CallerDevaToolsManager.block()?.takeIf {
it.hasInit()
}?.recorder()?.insert(Message.acquire(handler = null, action = action, extra = mapOf(activity.javaClass.name to "runOnUiThread")))
}?.recorder()?.insert(Message.acquire(handler = null, action = action, extra = extra))
}
}
@@ -36,12 +55,20 @@ class UiPostLancet {
@TargetMethod(methodName = "post")
@ReplaceInvoke
fun post(view: View, action: Runnable): Boolean {
return try {
view.post(action)
val extra = mapOf(view.javaClass.name to "post")
try {
var map = view.getTag(R.id.action_wrapper_tag_id) as? HashMap<Runnable, ActionWrapper>
if (map == null) {
map = HashMap()
view.setTag(R.id.action_wrapper_tag_id, map)
}
val wrapper = ActionWrapper(extra, action)
map[action] = wrapper
return view.post(wrapper)
} finally {
CallerDevaToolsManager.block()?.takeIf {
it.hasInit()
}?.recorder()?.insert(Message.acquire(handler = null, action = action, extra = mapOf(view.javaClass.name to "post")))
}?.recorder()?.insert(Message.acquire(handler = null, action = action, extra = extra))
}
}
@@ -50,12 +77,20 @@ class UiPostLancet {
@TargetMethod(methodName = "postDelayed")
@ReplaceInvoke
fun postDelayed(view: View, action: Runnable, delayMillis: Long): Boolean {
return try {
view.postDelayed(action, delayMillis)
val extra = mapOf(view.javaClass.name to "postDelayed")
try {
var map = view.getTag(R.id.action_wrapper_tag_id) as? HashMap<Runnable, ActionWrapper>
if (map == null) {
map = HashMap()
view.setTag(R.id.action_wrapper_tag_id, map)
}
val wrapper = ActionWrapper(extra, action)
map[action] = wrapper
return view.postDelayed(wrapper, delayMillis)
} finally {
CallerDevaToolsManager.block()?.takeIf {
it.hasInit()
}?.recorder()?.insert(Message.acquire(handler = null, action = action, delay = delayMillis, extra = mapOf(view.javaClass.name to "postDelayed")))
}?.recorder()?.insert(Message.acquire(handler = null, action = action, delay = delayMillis, extra = extra))
}
}
@@ -64,8 +99,14 @@ class UiPostLancet {
@TargetMethod(methodName = "removeCallbacks")
@ReplaceInvoke
fun removeCallbacks(view: View, action: Runnable): Boolean {
return try {
view.removeCallbacks(action)
try {
val tag = view.getTag(R.id.action_wrapper_tag_id)
if (tag != null && tag is HashMap<*, *>) {
(tag.remove(action) as? Runnable)?.also {
return view.removeCallbacks(it)
}
}
return false
} finally {
CallerDevaToolsManager.block()?.takeIf {
it.hasInit()

View File

@@ -228,7 +228,7 @@ ext {
passport_secret : "com.zhidaoauto:sdk-java:1.0.5-SNAPSHOT",
// 主线程卡顿监测
block_detector : "com.mogo.eagle.core.block:runtime:10.90.50",
block_detector : "com.mogo.eagle.core.block:runtime:10.90.60",
//======================== google auto-service ===============
google_auto_service : "com.google.auto.service:auto-service:1.0-rc7",

View File

@@ -25,7 +25,7 @@ class V2XAiRoadEventMarker {
.Builder(V2XConst.V2X_MARKER_OWNER, Level.MAP_MARKER)
.longitude(entity.location.lon)
.latitude(entity.location.lat)
.scale(if (EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.poiType == entity.poiType && AppIdentityModeUtils.isTaxi(
.scale(if (EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.poiType == entity.poiType && AppIdentityModeUtils.isTaxiPassenger(
FunctionBuildConfig.appIdentityMode)) 0.6f else 1.0f)
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.poiType))
.set3DMode(true)

View File

@@ -58,7 +58,7 @@ public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
.longitude(entity.getLocation().getLon())
.latitude(entity.getLocation().getLat())
.set3DMode(true)
.scale(EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.getPoiType().equals(entity.getPoiType()) && AppIdentityModeUtils.isTaxi(
.scale(EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.getPoiType().equals(entity.getPoiType()) && AppIdentityModeUtils.isTaxiPassenger(
FunctionBuildConfig.appIdentityMode) ? 0.6f : 1.0f)
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build(),DEFAULT);
if (point != null) {

View File

@@ -8,15 +8,23 @@ import android.os.Handler;
import android.os.HandlerThread;
import android.util.Log;
import androidx.core.util.Pools;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils;
import com.mogo.map.overlay.IMoGoOverlayManager;
import com.mogo.map.overlay.core.Level;
import com.mogo.map.overlay.line.Polyline;
import com.zhidaoauto.map.sdk.open.tools.MapTools;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import kotlin.Pair;
import mogo.telematics.pad.MessagePad;
public class RouteOverlayDrawer {
@@ -32,6 +40,9 @@ public class RouteOverlayDrawer {
private static final int COLOR_LIGHT = Color.parseColor("#BAEBF5");
//用于taxi乘客屏渐变颜色集合
private static List<Integer> colors = null;
private RouteOverlayDrawer() {
// 渐变色
mogoOverlayManager = CallerMapUIServiceManager.INSTANCE.getOverlayManager();
@@ -110,7 +121,25 @@ public class RouteOverlayDrawer {
isExcept = true;
return;
}
RouteStrategy.INSTANCE.start();
boolean isColorfulStrategy = !AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) || !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode);
if (isColorfulStrategy) {
RouteStrategy.INSTANCE.start();
} else {
if (colors == null) {
ArrayList<Pair<Integer, Integer>> temps = new ArrayList<>();
temps.add(new Pair<>(0, 51));
temps.add(new Pair<>(10, 102));
temps.add(new Pair<>(30, 51));
temps.add(new Pair<>(100, 0));
List<Integer> alphas = MapTools.INSTANCE.getColorAlpha(temps);
if (alphas != null && !alphas.isEmpty()) {
colors = new ArrayList<>();
for (int i : alphas) {
colors.add(Color.argb(i, 48,203,251));
}
}
}
}
for (int i = 0; i < total; i++) {
MessagePad.TrajectoryPoint route = null;
try {
@@ -137,7 +166,9 @@ public class RouteOverlayDrawer {
acquire.acc = route.getAcceleration();
acquire.speed = route.getVelocity();
pps.add(acquire);
RouteStrategy.INSTANCE.check(route.getVelocity(), route.getAcceleration(), routeList.size());
if (isColorfulStrategy) {
RouteStrategy.INSTANCE.check(route.getVelocity(), route.getAcceleration(), routeList.size());
}
}
double lon = CallerChassisLocationWGS84ListenerManager.INSTANCE.getChassisLocationWGS84().getLongitude();
double lat = CallerChassisLocationWGS84ListenerManager.INSTANCE.getChassisLocationWGS84().getLatitude();
@@ -155,7 +186,9 @@ public class RouteOverlayDrawer {
lat = CallerChassisLocationWGS84ListenerManager.INSTANCE.getChassisLocationWGS84().getLatitude();
long angle = isPointOnCarFront(lon, lat, bearing, first.lon, first.lat);
if (angle >= 90) {
RouteStrategy.INSTANCE.remove(first.acc);
if (isColorfulStrategy) {
RouteStrategy.INSTANCE.remove(first.acc);
}
pools.release(first);
points.poll();
}
@@ -173,10 +206,7 @@ public class RouteOverlayDrawer {
self.lon = lon;
}
points.addFirst(self);
RouteStrategy.INSTANCE.end();
Strategy strategy = RouteStrategy.INSTANCE.getStrategy();
List<Integer> colors = strategy.getColors();
boolean isLightOn = strategy instanceof ColorfulStrategy && ((ColorfulStrategy) strategy).isLightOn();
Polyline.Options.Builder builder;
if (mPolylineOptions == null) {
builder = new Polyline.Options.Builder("router_overlay", Level.GUIDE_ROUTE_LINE)
@@ -186,15 +216,24 @@ public class RouteOverlayDrawer {
} else {
builder = mPolylineOptions.builder();
}
builder.points(points);
builder.colors(colors);
if (isLightOn) {
builder.setLightOn(true);
if (isColorfulStrategy) {
RouteStrategy.INSTANCE.end();
Strategy strategy = RouteStrategy.INSTANCE.getStrategy();
List<Integer> colors = strategy.getColors();
boolean isLightOn = strategy instanceof ColorfulStrategy && ((ColorfulStrategy) strategy).isLightOn();
builder.colors(colors);
builder.setLightOn(isLightOn);
builder.setLightColor(COLOR_LIGHT);
builder.setLightSpeed(0.5f);
} else {
builder.setLightOn(false);
} else {
if (colors != null && !colors.isEmpty()) {
builder.colors(colors);
builder.setIsGradient(true);
builder.setLightOn(false);
}
}
builder.points(points);
builder.setVisible(true);
Polyline.Options options = builder.build();
if (mPolylineOptions == null) {

View File

@@ -740,7 +740,7 @@ enum class EventTypeEnumNew(
TYPE_SOCKET_ROAD_SHIGONG.poiType -> R.raw.v2x_shigong_warning// 施工气泡
TYPE_SOCKET_ROAD_JINGZHI.poiType -> R.raw.v2x_zhangai
TYPE_SOCKET_ROAD_SHIGU.poiType -> {
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
if (AppIdentityModeUtils.isTaxiPassenger(FunctionBuildConfig.appIdentityMode)) {
R.raw.v2x_shigu_sanjiaopai
} else {
R.raw.taxi_sanjiaopai

View File

@@ -124,7 +124,7 @@ enum class TrafficTypeEnum(
@JvmStatic
fun getMarker3DRes(type: Int): Int {
// Taxi和Bus使用不同的模型
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
if (AppIdentityModeUtils.isTaxiPassenger(FunctionBuildConfig.appIdentityMode)) {
return when (type) {
TYPE_TRAFFIC_ID_WEI_ZHI.type -> R.raw.traffic_xiankuang
TYPE_TRAFFIC_ID_PEOPLE.type -> R.raw.taxi_traffic_people
@@ -158,7 +158,7 @@ enum class TrafficTypeEnum(
@JvmStatic
fun getMarkerNight3DRes(type: Int): Int {
// Taxi和Bus使用不同的模型
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
if (AppIdentityModeUtils.isTaxiPassenger(FunctionBuildConfig.appIdentityMode)) {
return when (type) {
TYPE_TRAFFIC_ID_WEI_ZHI.type -> R.raw.traffic_xiankuang
TYPE_TRAFFIC_ID_PEOPLE.type -> R.raw.taxi_traffic_people

View File

@@ -4,4 +4,5 @@
<item name="click_pressed_attr_enabled" type="id" />
<item name="click_pressed_attr_replaced" type="id" />
<item name="click_pressed_attr_replaced_color" type="id" />
<item name="action_wrapper_tag_id" type="id" />
</resources>

View File

@@ -1083,13 +1083,13 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
private var isScroll = true
//可以斜滑
private var isFling = true
private var isFling = false
//可以旋转
private var isRotate = true
private var isRotate = false
//可以缩放
private var isCanZoom = true
private var isCanZoom = false
private var isVr = true

View File

@@ -517,13 +517,15 @@ class RoadHelper private constructor() {
roadRectInfos.angle = buf.long / 1e8
val rectList = ArrayList<RoadRect>()
val size = buf.int
for (i in 0 until size step 8) {
val rect = RoadRect()
rect.topLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8)
rect.topRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8)
rect.bottomLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8)
rect.bottomRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8)
rectList.add(rect)
if(size > 0 && size % 8 == 0) {
for (i in 0 until size step 8) {
val rect = RoadRect()
rect.topLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8)
rect.topRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8)
rect.bottomLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8)
rect.bottomRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8)
rectList.add(rect)
}
}
roadRectInfos.roadRects = rectList
if (CompileConfig.DEBUG) {

View File

@@ -186,7 +186,7 @@ open class MapAutoView : FrameLayout, LonLatPointListener, ITraffic,ILockLocatio
val isWeatherEnable = typedArray.getBoolean(R.styleable.MapAutoView_isWeatherEnable, true)
val locationIcon3DRes = typedArray.getResourceId(R.styleable.MapAutoView_locationIcon3DRes, R.raw.car)
val locationIconRes = typedArray.getResourceId(R.styleable.MapAutoView_locationIconRes, R.mipmap.map_custom_self_car_night)
val isDisplayAnim = typedArray.getBoolean(R.styleable.MapAutoView_isDisplayAnim, false)
val isDisplayAnim = typedArray.getBoolean(R.styleable.MapAutoView_isDisplayAnim, true)
typedArray.recycle()
val mapStyleParams = MapStyleParams()
mapStyleParams.setZoom(zoom)

View File

@@ -101,7 +101,7 @@ class MapStyleParams: IMapStyleParams {
private var isWeatherEnable = false
//是否使用光圈
private var isDisplayAnim = false
private var isDisplayAnim = true
companion object {

View File

@@ -37,7 +37,22 @@ enum class VisualAngleMode(val code: Int) : IMogoMapVisualAngle {
/**
* 漫游模式
*/
MAP_STYLE_VR_ROMA(7);
MAP_STYLE_VR_ROMA(7),
/**
* 过渡模式
*/
MAP_STYLE_VR_TRANS(8),
/**
* 洱海模式
*/
MAP_STYLE_VR_ERHAI_B2(9),
/**
* 天空盒模式
*/
MAP_STYLE_VR_SKY_BOX(10);
override val isLongSight: Boolean
get() = code == MODE_LONG_SIGHT.code

View File

@@ -10,6 +10,7 @@ import android.text.TextUtils
import android.view.MotionEvent
import android.view.View
import com.autonavi.nge.map.OnMapScreenShotListener
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
import com.mogo.eagle.core.data.map.MogoLatLng
@@ -22,6 +23,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.invoke
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeMapRomaRange
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeMapRomaStatus
import com.mogo.eagle.core.function.call.map.CallerMapScreenListenerManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
@@ -64,7 +66,7 @@ import kotlin.properties.Delegates
class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIController,
OnMapLoadedListener, OnMapClickListener, OnMapTouchListener,
OnMarkClickListener, OnMapStyleListener, OnMapViewVisualAngleChangeListener, OnRoadInfoListener,
ILog, OnRoamStatusListener, OnRoadSideFenceRegionListener,OnMapScreenShotListener {
ILog, OnRoamStatusListener, OnRoadSideFenceRegionListener, OnMapScreenShotListener {
companion object {
private const val TAG = "AMapViewWrapper"
@@ -126,7 +128,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
mMapView.setOnRoamStatusListener(this)
mMapView.setOnMapViewVisualAngleChangeListener(this)
mMapView.setOnRoadInfoListener(this, 1)
mMapView.setOnRoadSideFenceRegionListener(this,5000)
mMapView.setOnRoadSideFenceRegionListener(this, 5000)
mMapView.registerScreenListener(this)
registerLogListener(this, mMapView.getEventController())
d(M_MAP + TAG, "initListeners - setOnMapStyleListener - view $mMapView")
@@ -197,7 +199,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
override fun onMapLoaded() {
i(M_MAP + TAG, "onMapLoaded: ")
if (checkAMapView()) {
val hdVisibleArray = intArrayOf(
val hdVisibleArray = arrayListOf(
HDTypes.DIVIDER.type,
HDTypes.ROAD_AREA.type,
HDTypes.STOP_LINE.type,
@@ -216,8 +218,16 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
HDTypes.regional.type,
HDTypes.geometricLinear.type,
HDTypes.geometricSurface.type,
HDTypes.poi.type)
mMapView.getMapAutoViewHelper()!!.setHDTypeVisible(hdVisibleArray)
HDTypes.poi.type
)
if (AppIdentityModeUtils.isTaxiPassenger(
FunctionBuildConfig.appIdentityMode
)
) {
hdVisibleArray.add(HDTypes.CABLE.type)
hdVisibleArray.add(HDTypes.SIGNAL_LINE.type)
}
mMapView.getMapAutoViewHelper()!!.setHDTypeVisible(hdVisibleArray.toIntArray())
loadPreVehicleModel()
}
}
@@ -610,7 +620,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
if (count >= 3) {
return@post
}
handler.postDelayed({ changeCurrentIcon(iconId) },300L)
handler.postDelayed({ changeCurrentIcon(iconId) }, 300L)
reChangeIconCount.set(0)
}
}
@@ -656,15 +666,19 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
MapAutoApi.MAP_STYLE_DAY, MapAutoApi.MAP_STYLE_DAY_NAV -> {
mCurrentUI = EnumMapUI.MAP_STYLE_DAY_NAV
}
MapAutoApi.MAP_STYLE_NIGHT -> {
mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT
}
MapAutoApi.MAP_STYLE_NIGHT_NAV -> {
mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_NAV
}
MapAutoApi.MAP_STYLE_NIGHT_VR -> {
mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_VR
}
MapAutoApi.MAP_STYLE_DAY_VR -> {
mCurrentUI = EnumMapUI.MAP_STYLE_DAY_VR
}
@@ -753,9 +767,15 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
private fun addPreVehicleModelWeiZhi(typeTrafficId: TrafficTypeEnum, logMsg: String) {
// 根据当前的地图皮肤模式动态替换
val preVehicleStrWeiZhi: String? = if (isDayMode) {
map.addPreVehicleModel(typeTrafficId.type, TrafficTypeEnum.getMarker3DRes(typeTrafficId.type))
map.addPreVehicleModel(
typeTrafficId.type,
TrafficTypeEnum.getMarker3DRes(typeTrafficId.type)
)
} else {
map.addPreVehicleModel(typeTrafficId.type, TrafficTypeEnum.getMarkerNight3DRes(typeTrafficId.type))
map.addPreVehicleModel(
typeTrafficId.type,
TrafficTypeEnum.getMarkerNight3DRes(typeTrafficId.type)
)
}
d(M_MAP + TAG, logMsg + preVehicleStrWeiZhi)
if (preVehicleStrWeiZhi == null) {
@@ -893,7 +913,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
}
override fun getMapScreenShot() {
if(checkAMapView()){
if (checkAMapView()) {
mMapView.getMapAutoViewHelper()?.toScreen()
}
}
@@ -905,6 +925,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
}
return MODE_MEDIUM_SIGHT
}
/**
* 高精地图屏幕截图
*/