opt
This commit is contained in:
@@ -176,7 +176,7 @@ android {
|
||||
// 分享时是否隐藏 adas
|
||||
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'false'
|
||||
}
|
||||
// e系列,采用Launcher方案
|
||||
e8xx {
|
||||
|
||||
@@ -31,7 +31,9 @@ class HttpDnsNoop implements IMogoHttpDns {
|
||||
|
||||
@Override
|
||||
public void getHttpDnsIp( String host, boolean useCache, IHttpDnsCallback callback ) {
|
||||
|
||||
if ( callback != null ) {
|
||||
callback.onParsed( null );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -67,7 +67,7 @@ dependencies {
|
||||
implementation project(':foudations:mogo-commons')
|
||||
}
|
||||
|
||||
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-6.9'
|
||||
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.1.3'
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
|
||||
@@ -25,9 +25,9 @@ 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.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi;
|
||||
import com.zhidaoauto.map.sdk.open.MapParams;
|
||||
import com.zhidaoauto.map.sdk.open.abs.MapStatusListener;
|
||||
import com.zhidaoauto.map.sdk.open.abs.OnCameraChangeListener;
|
||||
import com.zhidaoauto.map.sdk.open.abs.OnMapClickListener;
|
||||
@@ -82,6 +82,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
private CarCursorOption mCarCursorOption = DEFAULT_OPTION;
|
||||
|
||||
private Location mLastDriveLocationShadow = null;
|
||||
private EnumMapUI mCurrentUI;
|
||||
|
||||
public AMapViewWrapper( MapAutoView mMapView ) {
|
||||
startTime = System.currentTimeMillis();
|
||||
@@ -171,6 +172,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
mMapView.registerListener( this, MapAutoApi.LISTENER_TYPE_3D );
|
||||
mMapView.setMOnCameraChangeListener( this );
|
||||
mMapView.setOnMapStyleListener( this );
|
||||
Logger.d( TAG, "styleop - initListeners - setOnMapStyleListener - view %s", mMapView );
|
||||
|
||||
// mMapView.setOnPolylineClickListener( this );
|
||||
// mMapView.setAMapNaviViewListener( this );
|
||||
@@ -257,7 +259,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
public MapControlResult changeZoom( boolean zoom ) {
|
||||
if ( checkAMapView() ) {
|
||||
mDefaultZoomLevel = ( getMap().getZoomLevel() + 0.5f );
|
||||
|
||||
if ( zoom ) {
|
||||
if ( mDefaultZoomLevel >= 20f ) {
|
||||
return MapControlResult.TARGET;
|
||||
@@ -290,7 +291,9 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
if ( DebugConfig.isDebug() ) {
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
}
|
||||
|
||||
if ( mCurrentUI == EnumMapUI.Type_VR ) {
|
||||
return MapControlResult.ERROR;
|
||||
}
|
||||
getMap().changeZoom( zoom );
|
||||
return MapControlResult.SUCCESS;
|
||||
}
|
||||
@@ -305,6 +308,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
case CarUp_2D:
|
||||
case CarUp_3D:
|
||||
case NorthUP_2D:
|
||||
setUIMode( ui );
|
||||
break;
|
||||
case Type_VR:
|
||||
mMapView.getMapAutoViewHelper().setMapStyle( MapAutoApi.MAP_STYLE_VR );
|
||||
@@ -762,8 +766,27 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
|
||||
@Override
|
||||
public void onChangeMapStyle( int i ) {
|
||||
if ( i == MapParams.MAP_STYLE_VR ) {
|
||||
MogoMapListenerHandler.getInstance().onMapModeChanged( EnumMapUI.Type_VR );
|
||||
if ( i == MapAutoApi.MAP_STYLE_DAY
|
||||
|| i == MapAutoApi.MAP_STYLE_DAY_NAV ) {
|
||||
mCurrentUI = EnumMapUI.Type_Light;
|
||||
} else if ( i == MapAutoApi.MAP_STYLE_NIGHT
|
||||
|| i == MapAutoApi.MAP_STYLE_NIGHT_NAV ) {
|
||||
mCurrentUI = EnumMapUI.Type_Night;
|
||||
} else if ( i == MapAutoApi.MAP_STYLE_VR ) {
|
||||
mCurrentUI = EnumMapUI.Type_VR;
|
||||
} else if ( i == MapAutoApi.MAP_PERSPECTIVE_2D ) {
|
||||
mCurrentUI = EnumMapUI.CarUp_2D;
|
||||
} else if ( i == MapAutoApi.MAP_PERSPECTIVE_3D ) {
|
||||
mCurrentUI = EnumMapUI.CarUp_3D;
|
||||
}
|
||||
if ( mCurrentUI != null ) {
|
||||
UiThreadHandler.post( () -> {
|
||||
try {
|
||||
MogoMapListenerHandler.getInstance().onMapModeChanged( mCurrentUI );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
||||
@Override
|
||||
public IMogoMapView getMapView( Context context ) {
|
||||
NavAutoApi.INSTANCE.init( context, MapParams.Companion.init()
|
||||
.setDebugMode( false )
|
||||
.setDebugMode( true )
|
||||
.setCoordinateType( MapParams.COORDINATETYPE_GCJ02 )
|
||||
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
|
||||
.setZoom( 16 )
|
||||
|
||||
@@ -77,7 +77,6 @@ public class ObjectUtils {
|
||||
// .icons( descriptors )
|
||||
// .period( opt.getPeriod() )
|
||||
.rotateAngle( opt.getRotate() )
|
||||
.marker3DIcon( opt.getIcon3DRes() )
|
||||
.setFlat( opt.isFlat() )
|
||||
.visible( opt.isVisible() )
|
||||
.infoWindowEnable( opt.isInifoWindowEnable() )
|
||||
@@ -86,6 +85,9 @@ public class ObjectUtils {
|
||||
// .draggable( opt.isDraggable() )
|
||||
.setInfoWindowOffset( opt.getOffsetX(), opt.getOffsetY() )
|
||||
.zIndex( opt.getzIndex() );
|
||||
if ( opt.getIcon3DRes() != 0 ) {
|
||||
markerOptions.marker3DIcon( opt.getIcon3DRes() );
|
||||
}
|
||||
if ( !TextUtils.isEmpty( opt.getTitle() ) ) {
|
||||
markerOptions.title( opt.getTitle() );
|
||||
}
|
||||
@@ -699,7 +701,7 @@ public class ObjectUtils {
|
||||
target.setLonLatPoints( points );
|
||||
}
|
||||
target.setLineWidth( options.getWidth() );
|
||||
target.setColor( options.getColor());
|
||||
target.setColor( options.getColor() );
|
||||
// target.zIndex( options.getWidth() );
|
||||
// target.visible( options.isVisible() );
|
||||
//// target.geodesic( options.isGeodesic() );
|
||||
|
||||
@@ -432,17 +432,13 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
tvEnterVrMode = findViewById(R.id.module_ext_enter_vr_mode);
|
||||
tvEnterVrMode.setOnClickListener((v)->{
|
||||
// 进入vr模式
|
||||
enterVrMode();
|
||||
mApis.getStatusManagerApi().setVrMode(TAG, true);
|
||||
// mApis.getMapFrameControllerApi().changeToVRMode();
|
||||
mMApUIController.changeMapMode( EnumMapUI.Type_VR );
|
||||
});
|
||||
|
||||
tvExitVrMode = findViewById(R.id.module_ext_exit_vr_mode);
|
||||
tvExitVrMode.setOnClickListener((v)->{
|
||||
// 退出vr模式
|
||||
exitVrMode();
|
||||
mApis.getStatusManagerApi().setVrMode(TAG, false);
|
||||
// mApis.getMapFrameControllerApi().changeTo2dMode();
|
||||
mMApUIController.changeMapMode( EnumMapUI.CarUp_2D );
|
||||
});
|
||||
|
||||
dealWeatherContainer();
|
||||
@@ -497,8 +493,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mCameraLiveNoticeHelper.enterVrMode();
|
||||
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().registerMogoLocationListener(TAG,this);
|
||||
|
||||
mMApUIController.changeMapMode( EnumMapUI.Type_VR );
|
||||
}
|
||||
|
||||
private void exitVrMode(){
|
||||
@@ -518,8 +512,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mCameraLiveNoticeHelper.exitVrMode();
|
||||
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().unregisterMogoLocationListener(TAG);
|
||||
|
||||
mMApUIController.changeMapMode( EnumMapUI.CarUp_2D );
|
||||
}
|
||||
|
||||
private void debugCrashWarn(){
|
||||
|
||||
@@ -33,6 +33,7 @@ import com.mogo.map.navi.MogoCongestionInfo;
|
||||
import com.mogo.map.navi.MogoTraffic;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.common.entity.MarkerResponse;
|
||||
@@ -938,8 +939,10 @@ public class MogoServices implements IMogoMapListener,
|
||||
@Override
|
||||
public void onMapModeChanged( EnumMapUI ui ) {
|
||||
if ( ui == EnumMapUI.Type_VR ) {
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode( TAG, true );
|
||||
MapCenterPointStrategy.resetByChangeMode();
|
||||
} else {
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode( TAG, false );
|
||||
MapCenterPointStrategy.resetByChangeMode();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user