opt
This commit is contained in:
@@ -70,7 +70,7 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
|
||||
# 在线车辆F
|
||||
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
|
||||
# v2x
|
||||
MOGO_MODULE_V2X_VERSION=1.1.2
|
||||
MOGO_MODULE_V2X_VERSION=1.1.4
|
||||
# 媒体卡片
|
||||
MOGO_MODULE_MEDIA_VERSION=1.0.4.11
|
||||
# 推送
|
||||
|
||||
@@ -42,7 +42,7 @@ public class MapCenterPointStrategy {
|
||||
{
|
||||
// 导航场景,定位视图右下角偏下
|
||||
Map< Integer, MapCenterPoint > navi = new HashMap<>();
|
||||
navi.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.734375D, 0.573333333333D ) );
|
||||
navi.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444D, 0.573333333333D ) );
|
||||
navi.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.705208333D, 0.575D ) );
|
||||
sStrategies.put( Scene.NAVI, navi );
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public class MapCenterPointStrategy {
|
||||
{
|
||||
// 导航场景 vs 道路事件展示场景,定位视图右下角偏下
|
||||
Map< Integer, MapCenterPoint > naviWithRoadEvent = new HashMap<>();
|
||||
naviWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.734375D, 0.68333333333D ) );
|
||||
naviWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.68333333333D ) );
|
||||
naviWithRoadEvent.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.705208333D, 0.683333333333D ) );
|
||||
sStrategies.put( Scene.NAVI_WITH_ROAD_EVENT, naviWithRoadEvent );
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class MapCenterPointStrategy {
|
||||
{
|
||||
// 巡航场景,定位视图右下角偏下
|
||||
Map< Integer, MapCenterPoint > aimless = new HashMap<>();
|
||||
aimless.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.734375D, 0.5D ) );
|
||||
aimless.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.5D ) );
|
||||
aimless.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.705208333D, 0.5D ) );
|
||||
sStrategies.put( Scene.AIMLESS, aimless );
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public class MapCenterPointStrategy {
|
||||
{
|
||||
// 巡航场景 vs 道路事件展示场景,定位视图右下角偏下
|
||||
Map< Integer, MapCenterPoint > aimlessWithRoadEvent = new HashMap<>();
|
||||
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.734375D, 0.585 ) );
|
||||
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.585 ) );
|
||||
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.705208333D, 0.599074074D ) );
|
||||
sStrategies.put( Scene.AIMLESS_WITH_ROAD_EVENT, aimlessWithRoadEvent );
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ public class WebSocketManager {
|
||||
super.onOpen( handshakedata );
|
||||
UiThreadHandler.post( () -> {
|
||||
TipToast.shortTip( "模拟GPS开启成功" );
|
||||
mServiceApis.getMapServiceApi().getSingletonLocationClient( AbsMogoApplication.getApp() ).stop();
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -78,6 +79,7 @@ public class WebSocketManager {
|
||||
super.onClose( code, reason, remote );
|
||||
UiThreadHandler.post( () -> {
|
||||
TipToast.shortTip( "模拟GPS关闭成功" );
|
||||
mServiceApis.getMapServiceApi().getSingletonLocationClient( AbsMogoApplication.getApp() ).start();
|
||||
} );
|
||||
shutdownServiceQuietly();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.mogo.module.main.EventDispatchCenter;
|
||||
import com.mogo.module.main.cards.MogoModulesManager;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.roadcondition.service.MainService;
|
||||
|
||||
@@ -50,9 +51,12 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
mServiceApis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation();
|
||||
initAndStartLocation();
|
||||
initGpsSimulatorListener();
|
||||
loadBaseModules();
|
||||
startTanluService();
|
||||
initADAS();
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
loadBaseModules();
|
||||
startTanluService();
|
||||
initADAS();
|
||||
}, 2_000L
|
||||
);
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
|
||||
@@ -194,11 +194,11 @@ public class MarkerServiceHandler {
|
||||
* 绘制Marker
|
||||
* 建议使用
|
||||
*
|
||||
* @see MapMarkerManager#drawMapMarker(MarkerShowEntity)
|
||||
* @see MapMarkerManager#drawMapMarker(MarkerShowEntity, int)
|
||||
*/
|
||||
@Deprecated
|
||||
public static IMogoMarker drawMapMarker( MarkerShowEntity markerShowEntity ) {
|
||||
return getMapMarkerManager().drawMapMarker( markerShowEntity );
|
||||
return getMapMarkerManager().drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -113,6 +113,9 @@ public class ServiceConst {
|
||||
*/
|
||||
public static final int MSG_LOCK_CAR = 0x202;
|
||||
|
||||
public static final int MARKER_Z_INDEX_HIGH = 100;
|
||||
public static final int MARKER_Z_INDEX_LOW = 2;
|
||||
|
||||
|
||||
/**
|
||||
* 切换卡片内容-上一个
|
||||
|
||||
@@ -320,7 +320,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
String sn = getCarSnFromEntity( markerOnlineCar );
|
||||
IMogoMarker mogoMarker = existCarMap.get( sn );
|
||||
if ( mogoMarker == null ) {
|
||||
mogoMarker = drawMapMarker( markerShowEntity );
|
||||
mogoMarker = drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_LOW );
|
||||
}
|
||||
startSmooth( mogoMarker, markerOnlineCar, markerLocation );
|
||||
}
|
||||
@@ -360,7 +360,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
IMogoMarker mogoMarker = existCarMap.get( sn );
|
||||
if ( mogoMarker == null ) {
|
||||
Logger.d( TAG, "draw road condition, sn = %s", sn );
|
||||
drawMapMarker( markerShowEntity );
|
||||
drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -392,7 +392,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
String sn = getCarSnFromEntity( markerShareMusic );
|
||||
IMogoMarker mogoMarker = existCarMap.get( sn );
|
||||
if ( mogoMarker == null ) {
|
||||
drawMapMarker( markerShowEntity );
|
||||
drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -425,7 +425,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
String sn = getCarSnFromEntity( noveltyInfo );
|
||||
IMogoMarker mogoMarker = existCarMap.get( sn );
|
||||
if ( mogoMarker == null ) {
|
||||
drawMapMarker( markerShowEntity );
|
||||
drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -634,20 +634,20 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
* @param markerShowEntity marker 绘制数据实体
|
||||
* @return 绘制的Marker
|
||||
*/
|
||||
public synchronized IMogoMarker drawMapMarker( MarkerShowEntity markerShowEntity ) {
|
||||
public synchronized IMogoMarker drawMapMarker( MarkerShowEntity markerShowEntity, int zIndex ) {
|
||||
try {
|
||||
return drawMapMarkerImpl( markerShowEntity );
|
||||
return drawMapMarkerImpl( markerShowEntity, zIndex );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private IMogoMarker drawMapMarkerImpl( MarkerShowEntity markerShowEntity ) {
|
||||
private IMogoMarker drawMapMarkerImpl( MarkerShowEntity markerShowEntity, int zIndex ) {
|
||||
if ( markerShowEntity == null || markerShowEntity.getMarkerLocation() == null ) {
|
||||
return null;
|
||||
}
|
||||
MogoMarkerOptions options = new MogoMarkerOptions().owner( markerShowEntity.getMarkerType() ).object( markerShowEntity ).latitude( markerShowEntity.getMarkerLocation().getLat() ).longitude( markerShowEntity.getMarkerLocation().getLon() );
|
||||
MogoMarkerOptions options = new MogoMarkerOptions().owner( markerShowEntity.getMarkerType() ).zIndex( zIndex ).object( markerShowEntity ).latitude( markerShowEntity.getMarkerLocation().getLat() ).longitude( markerShowEntity.getMarkerLocation().getLon() );
|
||||
IMarkerView markerView = MapMarkerAdapter.getMarkerView( mContext, markerShowEntity, options );
|
||||
if ( markerView instanceof OnlineCarMarkerView ) {
|
||||
try {
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.module.IMogoMarkerService;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -27,7 +28,7 @@ public class MogoMarkerServiceImpl implements IMogoMarkerService {
|
||||
@Override
|
||||
public IMogoMarker drawMarker( Object object ) {
|
||||
if ( object instanceof MarkerShowEntity ) {
|
||||
return MarkerServiceHandler.getMapMarkerManager().drawMapMarker( ( ( MarkerShowEntity ) object ) );
|
||||
return MarkerServiceHandler.getMapMarkerManager().drawMapMarker( ( ( MarkerShowEntity ) object ), ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
}
|
||||
Logger.w( TAG, "object must instance of [com.mogo.module.common.entity.MarkerShowEntity]" );
|
||||
return null;
|
||||
|
||||
@@ -10,7 +10,9 @@ public enum StatusDescriptor {
|
||||
|
||||
/**
|
||||
* adas UI
|
||||
* Deprecated, use {@link #V2X_UI} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
ADAS_UI,
|
||||
|
||||
/**
|
||||
@@ -20,10 +22,7 @@ public enum StatusDescriptor {
|
||||
|
||||
/**
|
||||
* v2x UI
|
||||
* <p>
|
||||
* Deprecated, use {@link #ADAS_UI} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
V2X_UI,
|
||||
|
||||
/**
|
||||
|
||||
@@ -133,7 +133,7 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
|
||||
@Override
|
||||
public void setV2XUIShow( String tag, boolean show ) {
|
||||
Logger.e( TAG, "do not implement" );
|
||||
doSetStatus( tag, StatusDescriptor.V2X_UI, show );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user