Merge branch 'dev_robotaxi-d-app-module_251_220125_2.5.1' into dev_MogoAP_eagle-220_211207_8.0.17_merge
# Conflicts: # app/build.gradle
This commit is contained in:
@@ -128,9 +128,10 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
}
|
||||
MapAutoViewHelper options = mMapView.getMapAutoViewHelper();
|
||||
if (options != null) {
|
||||
//设置手势是否可以缩放 isCanZoom true 可缩放 false 不可缩放
|
||||
options.setZoomGesturesEnabled(true);
|
||||
// 设置自车的图片对象
|
||||
options.setMyLocationStyle(options.getMyLocationStyle().myLocationIcon(DEFAULT_OPTION.getCarCursorRes()));
|
||||
//options.setMyLocationStyle(options.getMyLocationStyle().myLocationIcon(DEFAULT_OPTION.getCarCursorRes()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,10 +378,11 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
@Override
|
||||
public void showMyLocation(boolean visible) {
|
||||
Logger.d(TAG, "showMyLocation1 %s", visible);
|
||||
|
||||
// 如果是VR模式
|
||||
if (mCurrentUI == EnumMapUI.Type_VR) {
|
||||
return;
|
||||
}
|
||||
// 不是VR模式情况强制刷新下
|
||||
if (checkAMapView()) {
|
||||
MyLocationStyle style = mMapView.getMapAutoViewHelper().getMyLocationStyle();
|
||||
if (visible) {
|
||||
@@ -425,7 +427,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "锁车");
|
||||
// mMapView.getMapAutoViewHelper().setZoom(mLockZoom);
|
||||
mMapView.getMapAutoViewHelper().setLockMode(true);
|
||||
mIsCarLocked = true;
|
||||
}
|
||||
@@ -668,9 +669,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(@NotNull com.zhidaoauto.map.sdk.open.location.MogoLocation location) {
|
||||
// Log.w("DHY-location", location.getLon() + "," + location.getLat() + " AMapViewWrapper-onLocationChanged:location");
|
||||
MogoLocation mLastLocation = ObjectUtils.fromLocation(location);
|
||||
// Log.w("DHY-location", mLastLocation.getLongitude() + "," + mLastLocation.getLatitude() + " AMapViewWrapper-onLocationChanged:mLastLocation");
|
||||
UiThreadHandler.post(() -> CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(mLastLocation));
|
||||
|
||||
Location sysLocation = new Location(location.getProvider());
|
||||
@@ -732,8 +731,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
public void onMapLoaded() {
|
||||
Logger.i(TAG, "autoop--onMapLoaded: ");
|
||||
MapAutoApi.INSTANCE.getMyLocationStyle().myLocationIcon(HdMapBuildConfig.currentCarVrIconRes, true); //修改自车模型,未来需区分车的类型
|
||||
//mMapView.getMapAutoViewHelper().setRenderFrequency(true, 50);// 地图刷新频率
|
||||
//MogoMapListenerHandler.getInstance().onMapLoaded();
|
||||
mMapLoaded = true;
|
||||
CameraPosition cameraPosition = mMapView.getMapAutoViewHelper().getCameraPosition();
|
||||
Trace.beginSection("timer.onCameraChangeFinish");
|
||||
|
||||
@@ -57,18 +57,18 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
||||
@Override
|
||||
public IMogoMapView getMapView(Context context) {
|
||||
Log.d(TAG, "setDebugMode==true");
|
||||
|
||||
MapParams mapParams = MapParams.Companion.init();
|
||||
mapParams.setDebugMode(false)
|
||||
//.setDataFileSource(1) //todo 1-使用本地地图数据,0-使用在线地图数据
|
||||
//todo 1-使用本地地图数据,0-使用在线地图数据
|
||||
//.setDataFileSource(1)
|
||||
.setCoordinateType(MapParams.COORDINATETYPE_GCJ02)
|
||||
.setPerspectiveMode(MapParams.MAP_PERSPECTIVE_3D)
|
||||
// .setZoom( 20 )
|
||||
// .setPointToCenter( 0.734375f, 0.5f )
|
||||
.setPointToCenter(0.5f, 0.5f) //todo 2D模式下需要注意ADAS部分遮挡
|
||||
//todo 2D模式下需要注意ADAS部分遮挡
|
||||
.setPointToCenter(0.5f, 0.5f)
|
||||
.setStyleMode(MapParams.MAP_STYLE_VR);
|
||||
|
||||
|
||||
MapAutoApi.INSTANCE.init(context, mapParams);
|
||||
MapAutoView mapAutoView = new MapAutoView(context);
|
||||
//mapAutoView.registerRenderListener(l -> Log.i(TAG, "renderTime: " + l));
|
||||
|
||||
@@ -88,10 +88,12 @@ public class ObjectUtils {
|
||||
.zIndex(opt.getzIndex());
|
||||
|
||||
try {
|
||||
Color.parseColor(opt.getAnchorColor());
|
||||
markerOptions.anchorColor(opt.getAnchorColor());
|
||||
if (!TextUtils.isEmpty(opt.getAnchorColor())) {
|
||||
Color.parseColor(opt.getAnchorColor());
|
||||
markerOptions.anchorColor(opt.getAnchorColor());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
//e.printStackTrace();
|
||||
}
|
||||
markerOptions.vrEnable(opt.is3DMode());
|
||||
if (!TextUtils.isEmpty(opt.getResName())) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.map.listener;
|
||||
|
||||
import com.mogo.map.marker.IMogoMarkerClickListenerRegister;
|
||||
import com.mogo.map.navi.IMogoNaviListenerRegister;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -9,7 +8,7 @@ import com.mogo.map.navi.IMogoNaviListenerRegister;
|
||||
* <p>
|
||||
* 主模块需要注册监听的事件
|
||||
*/
|
||||
public interface IMogoHosListenerRegister extends IMogoNaviListenerRegister,
|
||||
public interface IMogoHosListenerRegister extends
|
||||
IMogoMapListenerRegister,
|
||||
IMogoMarkerClickListenerRegister {
|
||||
}
|
||||
|
||||
@@ -2,9 +2,6 @@ package com.mogo.map.listener;
|
||||
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.MogoMarkersHandler;
|
||||
import com.mogo.map.navi.IMogoAimlessModeListener;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoNaviListenerHandler;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -45,16 +42,6 @@ public class MogoHosListenerRegister implements IMogoHosListenerRegister {
|
||||
MogoMapListenerHandler.getInstance().unregisterHostMapListener();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHostNaviListener( IMogoNaviListener listener ) {
|
||||
MogoNaviListenerHandler.getInstance().registerHostNaviListener( listener );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterHostNaviListener() {
|
||||
MogoNaviListenerHandler.getInstance().unregisterHostNaviListener();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerMarkerClickListener( IMogoMarkerClickListener listener ) {
|
||||
MogoMarkersHandler.getInstance().registerMarkerClickListener( listener );
|
||||
@@ -65,13 +52,4 @@ public class MogoHosListenerRegister implements IMogoHosListenerRegister {
|
||||
MogoMarkersHandler.getInstance().unregisterMarkerClickListener();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHostAimlessModeListener( IMogoAimlessModeListener listener ) {
|
||||
MogoNaviListenerHandler.getInstance().registerHostAimlessModeListener( listener );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterHostAimlessModeListener() {
|
||||
MogoNaviListenerHandler.getInstance().unregisterHostAimlessModeListener();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.mogo.map.navi;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-03-09
|
||||
* <p>
|
||||
* 续航模式回调
|
||||
*/
|
||||
public interface IMogoAimlessModeListener {
|
||||
|
||||
/**
|
||||
* 巡航信息发生改变
|
||||
*/
|
||||
default void onUpdateTraffic2( MogoTraffic traffic ){}
|
||||
|
||||
/**
|
||||
* 拥堵信息
|
||||
*
|
||||
* @param info
|
||||
*/
|
||||
default void onUpdateCongestion( MogoCongestionInfo info ){}
|
||||
}
|
||||
@@ -45,10 +45,4 @@ public interface IMogoNaviListener {
|
||||
*/
|
||||
default void onoCalculateFailed(){}
|
||||
|
||||
/**
|
||||
* 巡航信息发生改变
|
||||
* Deprecated, use {@link IMogoAimlessModeListener#onUpdateTraffic2(MogoTraffic)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
default void onUpdateTraffic( MogoTraffic traffic ){}
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.map.navi;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-25
|
||||
* <p>
|
||||
* 导航监听:区分导航结束
|
||||
*/
|
||||
public interface IMogoNaviListener2 extends IMogoNaviListener {
|
||||
|
||||
/**
|
||||
* 实际导航结束
|
||||
*/
|
||||
default void onArriveDestination() { }
|
||||
|
||||
/**
|
||||
* 模拟导航结束
|
||||
*/
|
||||
default void onEndEmulatorNavi(){}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package com.mogo.map.navi;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 地图操作回调
|
||||
*/
|
||||
public interface IMogoNaviListenerRegister {
|
||||
|
||||
/**
|
||||
* 注册导航回调,各业务模块不用关注
|
||||
*
|
||||
* @param listener 回调函数
|
||||
*/
|
||||
void registerHostNaviListener( IMogoNaviListener listener );
|
||||
|
||||
/**
|
||||
* 注册巡航模式回调,各业务模块不用关注
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
void registerHostAimlessModeListener( IMogoAimlessModeListener listener );
|
||||
|
||||
/**
|
||||
* 注销导航回调,各业务模块不用关注
|
||||
*/
|
||||
void unregisterHostNaviListener();
|
||||
|
||||
/**
|
||||
* 注销巡航回调,各业务模块不用关注
|
||||
*/
|
||||
void unregisterHostAimlessModeListener();
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
package com.mogo.map.navi;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-03-09
|
||||
* <p>
|
||||
* 拥堵详情
|
||||
*/
|
||||
public class MogoCongestionInfo implements Parcelable {
|
||||
|
||||
private int mTime;
|
||||
private int mLength;
|
||||
private String mRoadName;
|
||||
private int mCongestionStatus;
|
||||
private int mEventType;
|
||||
private double mEventLon;
|
||||
private double mEventLat;
|
||||
|
||||
private List< MogoCongestionLink > mCongestionLinks;
|
||||
|
||||
|
||||
public MogoCongestionInfo() {
|
||||
}
|
||||
|
||||
public int getTime() {
|
||||
return mTime;
|
||||
}
|
||||
|
||||
public void setTime( int mTime ) {
|
||||
this.mTime = mTime;
|
||||
}
|
||||
|
||||
public int getLength() {
|
||||
return mLength;
|
||||
}
|
||||
|
||||
public void setLength( int mLength ) {
|
||||
this.mLength = mLength;
|
||||
}
|
||||
|
||||
public String getRoadName() {
|
||||
return mRoadName;
|
||||
}
|
||||
|
||||
public void setRoadName( String mRoadName ) {
|
||||
this.mRoadName = mRoadName;
|
||||
}
|
||||
|
||||
public int getCongestionStatus() {
|
||||
return mCongestionStatus;
|
||||
}
|
||||
|
||||
public void setCongestionStatus( int mCongestionStatus ) {
|
||||
this.mCongestionStatus = mCongestionStatus;
|
||||
}
|
||||
|
||||
public int getEventType() {
|
||||
return mEventType;
|
||||
}
|
||||
|
||||
public void setEventType( int mEventType ) {
|
||||
this.mEventType = mEventType;
|
||||
}
|
||||
|
||||
public double getEventLon() {
|
||||
return mEventLon;
|
||||
}
|
||||
|
||||
public void setEventLon( double mEventLon ) {
|
||||
this.mEventLon = mEventLon;
|
||||
}
|
||||
|
||||
public double getEventLat() {
|
||||
return mEventLat;
|
||||
}
|
||||
|
||||
public void setEventLat( double mEventLat ) {
|
||||
this.mEventLat = mEventLat;
|
||||
}
|
||||
|
||||
public List< MogoCongestionLink > getCongestionLinks() {
|
||||
return mCongestionLinks;
|
||||
}
|
||||
|
||||
public void setCongestionLinks( List< MogoCongestionLink > mCongestionLinks ) {
|
||||
this.mCongestionLinks = mCongestionLinks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeInt( this.mTime );
|
||||
dest.writeInt( this.mLength );
|
||||
dest.writeString( this.mRoadName );
|
||||
dest.writeInt( this.mCongestionStatus );
|
||||
dest.writeInt( this.mEventType );
|
||||
dest.writeDouble( this.mEventLon );
|
||||
dest.writeDouble( this.mEventLat );
|
||||
dest.writeTypedList( this.mCongestionLinks );
|
||||
}
|
||||
|
||||
protected MogoCongestionInfo( Parcel in ) {
|
||||
this.mTime = in.readInt();
|
||||
this.mLength = in.readInt();
|
||||
this.mRoadName = in.readString();
|
||||
this.mCongestionStatus = in.readInt();
|
||||
this.mEventType = in.readInt();
|
||||
this.mEventLon = in.readDouble();
|
||||
this.mEventLat = in.readDouble();
|
||||
this.mCongestionLinks = in.createTypedArrayList( MogoCongestionLink.CREATOR );
|
||||
}
|
||||
|
||||
public static final Creator< MogoCongestionInfo > CREATOR = new Creator< MogoCongestionInfo >() {
|
||||
@Override
|
||||
public MogoCongestionInfo createFromParcel( Parcel source ) {
|
||||
return new MogoCongestionInfo( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoCongestionInfo[] newArray( int size ) {
|
||||
return new MogoCongestionInfo[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
package com.mogo.map.navi;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-03-09
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoCongestionLink implements Parcelable {
|
||||
|
||||
private ArrayList< MogoLatLng > mCoords;
|
||||
private int mCongestionStatus;
|
||||
|
||||
|
||||
public MogoCongestionLink() {
|
||||
}
|
||||
|
||||
public List< MogoLatLng > getCoords() {
|
||||
return mCoords;
|
||||
}
|
||||
|
||||
public void setCoords( ArrayList< MogoLatLng > mCoords ) {
|
||||
this.mCoords = mCoords;
|
||||
}
|
||||
|
||||
public int getCongestionStatus() {
|
||||
return mCongestionStatus;
|
||||
}
|
||||
|
||||
public void setCongestionStatus( int mCongestionStatus ) {
|
||||
this.mCongestionStatus = mCongestionStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeTypedList( this.mCoords );
|
||||
dest.writeInt( this.mCongestionStatus );
|
||||
}
|
||||
|
||||
protected MogoCongestionLink( Parcel in ) {
|
||||
this.mCoords = in.createTypedArrayList( MogoLatLng.CREATOR );
|
||||
this.mCongestionStatus = in.readInt();
|
||||
}
|
||||
|
||||
public static final Creator< MogoCongestionLink > CREATOR = new Creator< MogoCongestionLink >() {
|
||||
@Override
|
||||
public MogoCongestionLink createFromParcel( Parcel source ) {
|
||||
return new MogoCongestionLink( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoCongestionLink[] newArray( int size ) {
|
||||
return new MogoCongestionLink[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
package com.mogo.map.navi;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* 地图监听注册管理
|
||||
*/
|
||||
public class MogoNaviListenerHandler implements IMogoNaviListener2, IMogoNaviListenerRegister, IMogoAimlessModeListener {
|
||||
|
||||
private static volatile MogoNaviListenerHandler sInstance;
|
||||
|
||||
private MogoNaviListenerHandler() {
|
||||
}
|
||||
|
||||
public static MogoNaviListenerHandler getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( MogoNaviListenerHandler.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new MogoNaviListenerHandler();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上层模块代理对象
|
||||
*/
|
||||
private IMogoNaviListener mDelegateListener = null;
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public boolean hasDelegateListener(){
|
||||
return mDelegateListener != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上层模块代理对象
|
||||
*/
|
||||
private IMogoAimlessModeListener mAimlessDelegateListener = null;
|
||||
|
||||
@Override
|
||||
public void registerHostNaviListener( IMogoNaviListener listener ) {
|
||||
mDelegateListener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterHostNaviListener() {
|
||||
mDelegateListener = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHostAimlessModeListener( IMogoAimlessModeListener listener ) {
|
||||
mAimlessDelegateListener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterHostAimlessModeListener() {
|
||||
mAimlessDelegateListener = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void onInitNaviFailure() {
|
||||
if ( mDelegateListener != null ) {
|
||||
mDelegateListener.onInitNaviFailure();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void onInitNaviSuccess() {
|
||||
if ( mDelegateListener != null ) {
|
||||
mDelegateListener.onInitNaviSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void onNaviInfoUpdate( MogoNaviInfo naviinfo ) {
|
||||
if ( mDelegateListener != null ) {
|
||||
mDelegateListener.onNaviInfoUpdate( naviinfo );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void onStartNavi() {
|
||||
if ( mDelegateListener != null ) {
|
||||
mDelegateListener.onStartNavi();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void onStopNavi() {
|
||||
if ( mDelegateListener != null ) {
|
||||
mDelegateListener.onStopNavi();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCalculateSuccess() {
|
||||
if ( mDelegateListener != null ) {
|
||||
mDelegateListener.onCalculateSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onoCalculateFailed() {
|
||||
if ( mDelegateListener != null ) {
|
||||
mDelegateListener.onoCalculateFailed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void onUpdateTraffic( MogoTraffic traffic ) {
|
||||
if ( mDelegateListener != null ) {
|
||||
mDelegateListener.onUpdateTraffic( traffic );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateTraffic2( MogoTraffic traffic ) {
|
||||
if ( mAimlessDelegateListener != null ) {
|
||||
mAimlessDelegateListener.onUpdateTraffic2( traffic );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateCongestion( MogoCongestionInfo info ) {
|
||||
if ( mAimlessDelegateListener != null ) {
|
||||
mAimlessDelegateListener.onUpdateCongestion( info );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArriveDestination() {
|
||||
if ( mDelegateListener instanceof IMogoNaviListener2 ) {
|
||||
( ( IMogoNaviListener2 ) mDelegateListener ).onArriveDestination();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEndEmulatorNavi() {
|
||||
if ( mDelegateListener instanceof IMogoNaviListener2 ) {
|
||||
( ( IMogoNaviListener2 ) mDelegateListener ).onEndEmulatorNavi();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,246 +0,0 @@
|
||||
package com.mogo.map.navi;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-16
|
||||
* <p>
|
||||
* 巡航信息、导航信息
|
||||
*/
|
||||
public class MogoTraffic {
|
||||
|
||||
/**
|
||||
* 导航
|
||||
*/
|
||||
public static final int TYPE_NAVI = 1;
|
||||
|
||||
/**
|
||||
* 巡航
|
||||
*/
|
||||
public static final int TYPE_AIM = 2;
|
||||
|
||||
/**
|
||||
* 导航 or 巡航
|
||||
*/
|
||||
private int mFromType;
|
||||
|
||||
/**
|
||||
* 距离
|
||||
*/
|
||||
private int mDistance;
|
||||
|
||||
/**
|
||||
* 限速
|
||||
*/
|
||||
private int mSpeedLimit;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private double mLon;
|
||||
|
||||
/**
|
||||
* 维度
|
||||
*/
|
||||
private double mLat;
|
||||
|
||||
/**
|
||||
* 交通类型
|
||||
* 0 未知道路设施
|
||||
* 4 测速摄像头、测速雷达
|
||||
* 5 违章摄像头
|
||||
* 10 请谨慎驾驶
|
||||
* 11 有连续拍照
|
||||
* 12 铁路道口
|
||||
* 13 注意落石(左侧)
|
||||
* 14 事故易发地段
|
||||
* 15 易滑
|
||||
* 16 村庄
|
||||
* 18 前方学校
|
||||
* 19 有人看管的铁路道口
|
||||
* 20 无人看管的铁路道口
|
||||
* 21 两侧变窄
|
||||
* 22 向左急弯路
|
||||
* 23 向右急弯路
|
||||
* 24 反向弯路
|
||||
* 25 连续弯路
|
||||
* 26 左侧合流标识牌
|
||||
* 27 右侧合流标识牌
|
||||
* 28 监控摄像头
|
||||
* 29 专用道摄像头
|
||||
* 31 禁止超车
|
||||
* 36 右侧变窄
|
||||
* 37 左侧变窄
|
||||
* 38 窄桥
|
||||
* 39 左右绕行
|
||||
* 40 左侧绕行
|
||||
* 41 右侧绕行
|
||||
* 42 注意落石(右侧)
|
||||
* 43 傍山险路(左侧)
|
||||
* 44 傍山险路(右侧)
|
||||
* 47 上陡坡
|
||||
* 48 下陡坡
|
||||
* 49 过水路面
|
||||
* 50 路面不平
|
||||
* 52 慢行
|
||||
* 53 注意危险
|
||||
* 58 隧道
|
||||
* 59 渡口
|
||||
* 92 闯红灯
|
||||
* 93 应急车道
|
||||
* 94 非机动车道
|
||||
* 100 不绑定电子眼高发地
|
||||
* 101 车道违章
|
||||
* 102 超速违章
|
||||
*/
|
||||
private int mTrafficType;
|
||||
|
||||
public MogoTraffic( int fromType ) {
|
||||
mFromType = fromType;
|
||||
}
|
||||
|
||||
public int getFromType() {
|
||||
return mFromType;
|
||||
}
|
||||
|
||||
public void setFromType( int fromType ) {
|
||||
this.mFromType = fromType;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
return mDistance;
|
||||
}
|
||||
|
||||
public void setDistance( int distance ) {
|
||||
this.mDistance = distance;
|
||||
}
|
||||
|
||||
public int getSpeedLimit() {
|
||||
return mSpeedLimit < 0 ? 0 : mSpeedLimit;
|
||||
}
|
||||
|
||||
public void setSpeedLimit( int speedLimit ) {
|
||||
this.mSpeedLimit = speedLimit;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
switch ( getTrafficType() ) {
|
||||
case 0:
|
||||
default:
|
||||
return "未知道路设施";
|
||||
case 4:
|
||||
return "测速摄像头、测速雷达";
|
||||
case 5:
|
||||
return "违章摄像头";
|
||||
case 10:
|
||||
return "请谨慎驾驶";
|
||||
case 11:
|
||||
return "有连续拍照";
|
||||
case 12:
|
||||
return "铁路道口";
|
||||
case 13:
|
||||
return "注意落石(左侧)";
|
||||
case 14:
|
||||
return "事故易发地段";
|
||||
case 15:
|
||||
return "易滑";
|
||||
case 16:
|
||||
return "村庄";
|
||||
case 18:
|
||||
return "前方学校";
|
||||
case 19:
|
||||
return "有人看管的铁路道口";
|
||||
case 20:
|
||||
return "无人看管的铁路道口";
|
||||
case 21:
|
||||
return "两侧变窄";
|
||||
case 22:
|
||||
return "向左急弯路";
|
||||
case 23:
|
||||
return "向右急弯路";
|
||||
case 24:
|
||||
return "反向弯路";
|
||||
case 25:
|
||||
return "连续弯路";
|
||||
case 26:
|
||||
return "左侧合流标识牌";
|
||||
case 27:
|
||||
return "右侧合流标识牌";
|
||||
case 28:
|
||||
return "监控摄像头";
|
||||
case 29:
|
||||
return "专用道摄像头";
|
||||
case 31:
|
||||
return "禁止超车";
|
||||
case 36:
|
||||
return "右侧变窄";
|
||||
case 37:
|
||||
return "左侧变窄";
|
||||
case 38:
|
||||
return "窄桥";
|
||||
case 39:
|
||||
return "左右绕行";
|
||||
case 40:
|
||||
return "左侧绕行";
|
||||
case 41:
|
||||
return "右侧绕行";
|
||||
case 42:
|
||||
return "注意落石(右侧)";
|
||||
case 43:
|
||||
return "傍山险路(左侧)";
|
||||
case 44:
|
||||
return "傍山险路(右侧)";
|
||||
case 47:
|
||||
return "上陡坡";
|
||||
case 48:
|
||||
return "下陡坡";
|
||||
case 49:
|
||||
return "过水路面";
|
||||
case 50:
|
||||
return "路面不平";
|
||||
case 52:
|
||||
return "慢行";
|
||||
case 53:
|
||||
return "注意危险";
|
||||
case 58:
|
||||
return "隧道";
|
||||
case 59:
|
||||
return "渡口";
|
||||
case 92:
|
||||
return "闯红灯";
|
||||
case 93:
|
||||
return "应急车道";
|
||||
case 94:
|
||||
return "非机动车道";
|
||||
case 100:
|
||||
return "不绑定电子眼高发地";
|
||||
case 101:
|
||||
return "车道违章";
|
||||
case 102:
|
||||
return "超速违章";
|
||||
}
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return mLon;
|
||||
}
|
||||
|
||||
public void setLon( double lon ) {
|
||||
this.mLon = lon;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return mLat;
|
||||
}
|
||||
|
||||
public void setLat( double lat ) {
|
||||
this.mLat = lat;
|
||||
}
|
||||
|
||||
public int getTrafficType() {
|
||||
return mTrafficType;
|
||||
}
|
||||
|
||||
public void setTrafficType( int trafficType ) {
|
||||
this.mTrafficType = trafficType;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.mogo.map.search.drive;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/6/1
|
||||
* <p>
|
||||
* 驾驶路线
|
||||
*/
|
||||
public interface IMogoRoadSearch {
|
||||
|
||||
void searchRoadPath( Context context, MogoRoadSearchQuery query );
|
||||
|
||||
void setRoadPathSearchListener( IMogoRoadSearchListener listener );
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.mogo.map.search.drive;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/6/1
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public interface IMogoRoadSearchListener {
|
||||
|
||||
void onDrivePathSearched( List< MogoLatLng > points );
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.mogo.map.search.drive;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/6/1
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoRoadSearchQuery {
|
||||
|
||||
public MogoLatLng mStart;
|
||||
public MogoLatLng mTarget;
|
||||
public List<MogoLatLng> mWays;
|
||||
|
||||
public MogoRoadSearchQuery() {
|
||||
}
|
||||
|
||||
public MogoRoadSearchQuery setStart( MogoLatLng start ) {
|
||||
this.mStart = start;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MogoRoadSearchQuery setTarget( MogoLatLng target ) {
|
||||
this.mTarget = target;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MogoRoadSearchQuery setWays( List< MogoLatLng > ways ) {
|
||||
this.mWays = ways;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user