Merge branch 'dev' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into dev
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
||||
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
||||
<groovy codeStyle="LEGACY" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -34,7 +34,7 @@ dependencies {
|
||||
// 长链
|
||||
implementation 'com.zhidao.socket:built-in-socket:1.0.13'
|
||||
// passport
|
||||
implementation 'com.zhidao.loginsdk:external:1.0.0'
|
||||
implementation 'com.zhidao.tcloginsdk:tclogin:1.0.7.3'
|
||||
|
||||
annotationProcessor 'com.elegant.spi:compiler:1.0.3'
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.mogo.service.passport.IMogoTicketCallback;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.accountsdk.manager.CarPadClientManagerImpl;
|
||||
import com.zhidao.accountsdk.manager.TicketInfoCallback;
|
||||
import com.zhidao.tcloginsdk.LoginManagerImpl;
|
||||
import com.zhidao.tcloginsdk.LoginManager;
|
||||
|
||||
public
|
||||
/**
|
||||
@@ -94,8 +94,7 @@ class PassportManager implements IMogoPassportManager {
|
||||
// 演示环境用 qa 的
|
||||
mode = DebugConfig.NET_MODE_QA;
|
||||
}
|
||||
LoginManagerImpl.getInstance(mContext).setClientType(DebugConfig.getProductFlavor());
|
||||
LoginManagerImpl.getInstance( context ).setNetEnviron( mode );
|
||||
LoginManagerImpl.getInstance( context ).showLoginView();
|
||||
LoginManager.getInstance( context ).setNetEnviron( mode );
|
||||
LoginManager.getInstance( context ).login(true, DebugConfig.getProductFlavor());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,8 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
V2XServiceManager.getMoGoV2XPolylineManager().clearLine();
|
||||
clearAlarmPOI();
|
||||
clearSpecialCarPOI();
|
||||
// 锁车
|
||||
V2XServiceManager.getMapUIController().recoverLockMode();
|
||||
// 开启主Launcher刷新
|
||||
V2XServiceManager.getIMogoRefreshStrategyController().restartAutoRefreshAtTime(500);
|
||||
}
|
||||
@@ -220,7 +222,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
@Override
|
||||
public void drawableSpecialCarPOI(Context context, V2XMarkerEntity v2XMarkerEntity, IMogoMarkerClickListener clickListener) {
|
||||
try {
|
||||
MarkerUtils.resetMapZoom(15);
|
||||
V2XServiceManager.getMapUIController().changeMapMode(EnumMapUI.NorthUP_2D);
|
||||
V2XServiceManager.getMoGoV2XStatusManager().setOtherSeekHelpPOIShow(TAG, true);
|
||||
|
||||
@@ -256,11 +257,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
// 当前Marker设置为最上面
|
||||
mAlarmInfoMarker.setToTop();
|
||||
// if (clickListener != null) {
|
||||
// mAlarmInfoMarker.setOnMarkerClickListener(clickListener);
|
||||
// }
|
||||
// 绘制连接线
|
||||
V2XServiceManager.getMoGoV2XPolylineManager().drawablePolyline(context, roadEventEntity);
|
||||
// 缩放地图
|
||||
MarkerUtils.zoomMap(
|
||||
new MogoLatLng(roadEventEntity.getLocation().getLat(),
|
||||
roadEventEntity.getLocation().getLon()
|
||||
), context);
|
||||
} else {
|
||||
Logger.e(MODULE_NAME, "Location 必须进行初始化!!!!!");
|
||||
}
|
||||
@@ -512,7 +515,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
@Override
|
||||
public void drawableAlarmPOI(Context context, V2XRoadEventEntity roadEventEntity, IMogoMarkerClickListener clickListener) {
|
||||
try {
|
||||
MarkerUtils.resetMapZoom(15);
|
||||
V2XServiceManager.getMapUIController().changeMapMode(EnumMapUI.NorthUP_2D);
|
||||
V2XServiceManager.getMoGoV2XStatusManager().setRoadEventPOIShow(TAG, true);
|
||||
//Logger.i(MODULE_NAME, "绘制道路事件====drawableAlarmPOI:");
|
||||
@@ -532,11 +534,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
// 当前Marker设置为最上面
|
||||
mAlarmInfoMarker.setToTop();
|
||||
// if (clickListener != null) {
|
||||
// mAlarmInfoMarker.setOnMarkerClickListener(clickListener);
|
||||
// }
|
||||
// 绘制连接线
|
||||
V2XServiceManager.getMoGoV2XPolylineManager().drawablePolyline(context, roadEventEntity);
|
||||
// 缩放地图
|
||||
MarkerUtils.zoomMap(
|
||||
new MogoLatLng(roadEventEntity.getLocation().getLat(),
|
||||
roadEventEntity.getLocation().getLon()
|
||||
), context);
|
||||
} else {
|
||||
Logger.e(MODULE_NAME, "Location 必须进行初始化!!!!!");
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.map.MapCenterPointStrategy;
|
||||
import com.mogo.module.common.map.Scene;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.scenario.view.IV2XMarker;
|
||||
@@ -83,16 +81,12 @@ public class V2XIllegalParkMarker implements IV2XMarker<List<MarkerExploreWay>>
|
||||
|
||||
countDownV2XEvent();
|
||||
} catch (Exception e) {
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
MarkerUtils.resetMapZoom(16);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPOI() {
|
||||
// 移动回原来的中心点
|
||||
MapCenterPointStrategy.setMapCenterPointByScene(V2XServiceManager.getMapUIController(), Scene.AIMLESS);
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
MarkerUtils.resetMapZoom(16);
|
||||
// 移除违章停车点
|
||||
|
||||
@@ -3,12 +3,10 @@ package com.mogo.module.v2x.scenario.scene.push;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerExploreWayItem;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.map.MapCenterPointStrategy;
|
||||
import com.mogo.module.common.map.Scene;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.listener.V2XMarkerClickListener;
|
||||
import com.mogo.module.v2x.scenario.view.IV2XMarker;
|
||||
import com.mogo.module.v2x.utils.MarkerUtils;
|
||||
@@ -62,16 +60,12 @@ public class V2XPushEventMarker implements IV2XMarker<V2XPushMessageEntity> {
|
||||
V2XMarkerClickListener.getInstance());
|
||||
|
||||
} catch (Exception e) {
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
MarkerUtils.resetMapZoom(16);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPOI() {
|
||||
// 移动回原来的中心点
|
||||
MapCenterPointStrategy.setMapCenterPointByScene(V2XServiceManager.getMapUIController(), Scene.AIMLESS);
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
MarkerUtils.resetMapZoom(16);
|
||||
// 移除线
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.mogo.module.v2x.scenario.scene.road;
|
||||
|
||||
import com.mogo.module.common.map.MapCenterPointStrategy;
|
||||
import com.mogo.module.common.map.Scene;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.scenario.view.IV2XMarker;
|
||||
import com.mogo.module.v2x.utils.MarkerUtils;
|
||||
|
||||
@@ -31,16 +29,12 @@ public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
|
||||
.drawableAlarmPOI(V2XServiceManager.getContext(), entity, null);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
MarkerUtils.resetMapZoom(16);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPOI() {
|
||||
// 移动回原来的中心点
|
||||
MapCenterPointStrategy.setMapCenterPointByScene(V2XServiceManager.getMapUIController(), Scene.AIMLESS);
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
MarkerUtils.resetMapZoom(16);
|
||||
// 移除线
|
||||
|
||||
@@ -92,7 +92,6 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
V2XServiceManager.getContext(),
|
||||
mV2XMessageEntity.getContent());
|
||||
if (V2XServiceManager.getMoGoStatusManager().isMainPageLaunched()) {
|
||||
drawPOI();
|
||||
showWindow();
|
||||
}
|
||||
}
|
||||
@@ -188,6 +187,9 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
@Override
|
||||
public void onViewAdded(View view) {
|
||||
Logger.d(MODULE_NAME, "展示 Window 动画结束");
|
||||
if (V2XServiceManager.getMoGoStatusManager().isMainPageLaunched()) {
|
||||
drawPOI();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,12 +7,12 @@ import android.view.ViewGroup;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
|
||||
import com.mogo.module.v2x.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.module.v2x.utils.ADASUtils;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
@@ -79,7 +79,6 @@ public class V2XSeekHelpScenario extends AbsV2XScenario<List<V2XMarkerEntity>> i
|
||||
@Override
|
||||
public void show() {
|
||||
showWindow();
|
||||
drawPOI();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -145,7 +144,7 @@ public class V2XSeekHelpScenario extends AbsV2XScenario<List<V2XMarkerEntity>> i
|
||||
(int) V2XUtils.getApp().getResources().getDimension(R.dimen.module_v2x_fatigue_driving_window_height_ground));
|
||||
V2XServiceManager
|
||||
.getMogoTopViewManager()
|
||||
.addView(mV2XWindow.getView(), layoutParams,this);
|
||||
.addView(mV2XWindow.getView(), layoutParams, this);
|
||||
mV2XWindow.show(mMarkerEntity);
|
||||
} else {
|
||||
blockingQueue.offer(mMarkerEntity);
|
||||
@@ -197,6 +196,7 @@ public class V2XSeekHelpScenario extends AbsV2XScenario<List<V2XMarkerEntity>> i
|
||||
@Override
|
||||
public void onViewAdded(View view) {
|
||||
Logger.d(MODULE_NAME, "展示 Window 动画结束");
|
||||
drawPOI();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,14 +7,13 @@ import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
|
||||
import com.mogo.utils.WindowUtils;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
@@ -75,12 +74,12 @@ public class MarkerUtils {
|
||||
final int paddingRight;
|
||||
final int paddingLeft;
|
||||
if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
|
||||
paddingTop = WindowUtils.dip2px(context, 150);
|
||||
paddingTop = WindowUtils.dip2px(context, 250);
|
||||
paddingBottom = WindowUtils.dip2px(context, 100);
|
||||
paddingRight = WindowUtils.dip2px(context, 100);
|
||||
paddingLeft = WindowUtils.dip2px(context, 475);
|
||||
} else {
|
||||
paddingTop = WindowUtils.dip2px(context, 170);
|
||||
paddingTop = WindowUtils.dip2px(context, 370);
|
||||
paddingBottom = WindowUtils.dip2px(context, 100);
|
||||
paddingRight = WindowUtils.dip2px(context, 100);
|
||||
paddingLeft = WindowUtils.dip2px(context, 575);
|
||||
@@ -110,32 +109,10 @@ public class MarkerUtils {
|
||||
* @param zoomScale 缩放级别
|
||||
*/
|
||||
public static void resetMapZoom(float zoomScale) {
|
||||
V2XServiceManager.getMapUIController().changeZoom(zoomScale);
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
V2XServiceManager.getMapUIController().setLockZoom((int) zoomScale);
|
||||
V2XServiceManager.getMapUIController().recoverLockMode();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据距离调整地图的缩放比例
|
||||
*
|
||||
* @param distance 距离
|
||||
*/
|
||||
public static void changeMapZoomWithDistance(double distance) {
|
||||
Logger.d(V2XConst.MODULE_NAME, "根据距离调整地图的缩放比例:" + distance);
|
||||
if (distance <= 500 && distance > 400) {
|
||||
resetMapZoom(15);
|
||||
} else if (distance <= 400 && distance > 300) {
|
||||
resetMapZoom(16);
|
||||
} else if (distance <= 300 && distance > 200) {
|
||||
resetMapZoom(16.5f);
|
||||
} else if (distance <= 200 && distance > 100) {
|
||||
resetMapZoom(17f);
|
||||
} else if (distance <= 100 && distance >= 0) {
|
||||
resetMapZoom(17.5f);
|
||||
} else if (distance >= 500) {
|
||||
resetMapZoom(12);
|
||||
}
|
||||
// V2XServiceManager.getMapUIController().changeZoom(zoomScale);
|
||||
// // 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
// V2XServiceManager.getMapUIController().setLockZoom((int) zoomScale);
|
||||
V2XServiceManager.getMapUIController().loseLockMode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"zoom": true,
|
||||
"zoomScale": 15,
|
||||
"location": {
|
||||
"lat": 39.9754100000,
|
||||
"lat": 39.9554100000,
|
||||
"lon": 116.4178276100
|
||||
},
|
||||
"userHead": "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/5.png",
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
"zoom": true,
|
||||
"zoomScale": 15,
|
||||
"location": {
|
||||
"lat": 39.9754100000,
|
||||
"lon": 116.4178276100
|
||||
"lat": 39.971417,
|
||||
"lon": 116.415853
|
||||
},
|
||||
"userHead": "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/5.png",
|
||||
"msgImgUrl": "https://upload.jianshu.io/users/upload_avatars/7663825/7c28763e-002b-4e89-8dea-5b8da210ef2c.jpg"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"location":{
|
||||
"address":"北五环(测试位置不准确)",
|
||||
"angle":270,
|
||||
"lat":39.96155,
|
||||
"lat":39.971417,
|
||||
"lon":116.415853
|
||||
},
|
||||
"noveltyInfo":{
|
||||
@@ -27,7 +27,7 @@
|
||||
"location":{
|
||||
"address":"北五环(测试位置不准确)",
|
||||
"angle":270,
|
||||
"lat":39.968155,
|
||||
"lat":39.971417,
|
||||
"lon":116.415853
|
||||
},
|
||||
"poiType":"10002",
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
{
|
||||
"createTime":1593678359872,
|
||||
"distance":100,
|
||||
"lat":39.96911187,
|
||||
"lon":116.41777396,
|
||||
"lat":39.968678,
|
||||
"lon":116.405467,
|
||||
"sn":"E841CC2018PZD20466",
|
||||
"targetId":20007,
|
||||
"targetName":"故障车",
|
||||
|
||||
Reference in New Issue
Block a user