Merge branch 'dev_merge_shunyi_vr_map' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into dev_merge_shunyi_vr_map
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -84,6 +84,7 @@
|
|||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveModulePerSourceSet" value="false" />
|
<option name="resolveModulePerSourceSet" value="false" />
|
||||||
|
<option name="useQualifiedModuleNames" value="true" />
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ public class WebSocketManager implements IMogoWebSocketManager, ISocketMsgSettin
|
|||||||
IMogoOnWebSocketMessageListener listener = iterator.next();
|
IMogoOnWebSocketMessageListener listener = iterator.next();
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
Logger.d(TAG, "received msgId = " + webSocketData.getSeq() + ", content = " + webSocketData.getData());
|
Logger.d(TAG, "received msgId = " + webSocketData.getSeq() + ", content = " + webSocketData.getData());
|
||||||
|
Logger.d("CameraLiveNoticeHelper", "received msgId = " + webSocketData.getSeq() + ", content = " + webSocketData.getData());
|
||||||
Object receiveObj = GsonUtil.objectFromJson(webSocketData.getData(),listener.target());
|
Object receiveObj = GsonUtil.objectFromJson(webSocketData.getData(),listener.target());
|
||||||
listener.onMsgReceived(receiveObj);
|
listener.onMsgReceived(receiveObj);
|
||||||
}
|
}
|
||||||
|
|||||||
34905
libraries/map-custom/src/main/assets/20201105_1.csv
Normal file
34905
libraries/map-custom/src/main/assets/20201105_1.csv
Normal file
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@ import com.mogo.commons.debug.DebugConfig;
|
|||||||
import com.mogo.map.IMogoMap;
|
import com.mogo.map.IMogoMap;
|
||||||
import com.mogo.map.IMogoMapView;
|
import com.mogo.map.IMogoMapView;
|
||||||
import com.mogo.map.MogoLatLng;
|
import com.mogo.map.MogoLatLng;
|
||||||
|
import com.mogo.map.impl.custom.location.GpsTester;
|
||||||
import com.mogo.map.impl.custom.navi.NaviClient;
|
import com.mogo.map.impl.custom.navi.NaviClient;
|
||||||
import com.mogo.map.impl.custom.utils.MogoMapUtils;
|
import com.mogo.map.impl.custom.utils.MogoMapUtils;
|
||||||
import com.mogo.map.impl.custom.utils.ObjectUtils;
|
import com.mogo.map.impl.custom.utils.ObjectUtils;
|
||||||
@@ -76,7 +77,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
|||||||
|
|
||||||
private float mDefaultZoomLevel = 16.0f;
|
private float mDefaultZoomLevel = 16.0f;
|
||||||
private final CarCursorOption DEFAULT_OPTION = new CarCursorOption.Builder()
|
private final CarCursorOption DEFAULT_OPTION = new CarCursorOption.Builder()
|
||||||
.carCursorRes( R.drawable.map_custom_ic_current_location2 )
|
.carCursorRes( R.drawable.map_api_ic_current_location2 )
|
||||||
.naviCursorRes( R.drawable.ic_amap_navi_cursor )
|
.naviCursorRes( R.drawable.ic_amap_navi_cursor )
|
||||||
.build();
|
.build();
|
||||||
private CarCursorOption mCarCursorOption = DEFAULT_OPTION;
|
private CarCursorOption mCarCursorOption = DEFAULT_OPTION;
|
||||||
@@ -88,6 +89,9 @@ public class AMapViewWrapper implements IMogoMapView,
|
|||||||
startTime = System.currentTimeMillis();
|
startTime = System.currentTimeMillis();
|
||||||
Logger.i( TAG, "autoop--AMapViewWrapper: init" );
|
Logger.i( TAG, "autoop--AMapViewWrapper: init" );
|
||||||
this.mMapView = mMapView;
|
this.mMapView = mMapView;
|
||||||
|
if ( DebugConfig.isDebug() ) {
|
||||||
|
GpsTester.getInstance().init( mMapView );
|
||||||
|
}
|
||||||
initListeners();
|
initListeners();
|
||||||
this.mIMap = new AMapWrapper( this.mMapView.getMapAutoViewHelper(), this.mMapView, this );
|
this.mIMap = new AMapWrapper( this.mMapView.getMapAutoViewHelper(), this.mMapView, this );
|
||||||
}
|
}
|
||||||
@@ -787,4 +791,9 @@ public class AMapViewWrapper implements IMogoMapView,
|
|||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void testGpsData() {
|
||||||
|
GpsTester.getInstance().testGpsData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
|||||||
.setDebugMode( true )
|
.setDebugMode( true )
|
||||||
.setCoordinateType( MapParams.COORDINATETYPE_GCJ02 )
|
.setCoordinateType( MapParams.COORDINATETYPE_GCJ02 )
|
||||||
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
|
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
|
||||||
|
.setCachePath( "sdcard/tiles" )
|
||||||
.setZoom( 16 )
|
.setZoom( 16 )
|
||||||
.setPointToCenter( 0.734375f, 0.5f )
|
.setPointToCenter( 0.734375f, 0.5f )
|
||||||
.setStyleMode( MapParams.MAP_STYLE_NIGHT ), NavParams.Companion.init() );
|
.setStyleMode( MapParams.MAP_STYLE_NIGHT ), NavParams.Companion.init() );
|
||||||
|
|||||||
@@ -0,0 +1,171 @@
|
|||||||
|
package com.mogo.map.impl.custom.location;
|
||||||
|
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.HandlerThread;
|
||||||
|
import android.os.Looper;
|
||||||
|
import android.os.Message;
|
||||||
|
import android.os.SystemClock;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.TextureView;
|
||||||
|
|
||||||
|
import com.zhidaoauto.map.sdk.open.location.MogoLocation;
|
||||||
|
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
|
||||||
|
public
|
||||||
|
/**
|
||||||
|
* @author congtaowang
|
||||||
|
* @since 2020/12/22
|
||||||
|
*
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
class GpsTester {
|
||||||
|
|
||||||
|
private static volatile GpsTester sInstance;
|
||||||
|
private MapAutoView mMapAutoView;
|
||||||
|
|
||||||
|
private GpsTester() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GpsTester getInstance() {
|
||||||
|
if ( sInstance == null ) {
|
||||||
|
synchronized ( GpsTester.class ) {
|
||||||
|
if ( sInstance == null ) {
|
||||||
|
sInstance = new GpsTester();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized void release() {
|
||||||
|
sInstance = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Object readResolve() {
|
||||||
|
// 阻止反序列化,必须实现 Serializable 接口
|
||||||
|
return sInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init( MapAutoView view ) {
|
||||||
|
mMapAutoView = view;
|
||||||
|
}
|
||||||
|
|
||||||
|
private class GpsTestThreadHandler extends Handler {
|
||||||
|
|
||||||
|
public GpsTestThreadHandler( Looper looper ) {
|
||||||
|
super( looper );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleMessage( Message msg ) {
|
||||||
|
super.handleMessage( msg );
|
||||||
|
switch ( msg.what ) {
|
||||||
|
case 1:
|
||||||
|
try {
|
||||||
|
prepareGpsData();
|
||||||
|
sendEmptyMessageDelayed( 2, 0 );
|
||||||
|
} catch ( Exception e ) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
try {
|
||||||
|
readOneLineGpsDataAndSet2Map();
|
||||||
|
sendEmptyMessageDelayed( 2, 0 );
|
||||||
|
} catch ( Exception e ) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Handler mHandler = null;
|
||||||
|
private BufferedReader br = null;
|
||||||
|
private long mLastTime = 0;
|
||||||
|
private float mLastHeading = 0;
|
||||||
|
private int step = 0;
|
||||||
|
private MogoLocation mogoLocation = new MogoLocation();
|
||||||
|
|
||||||
|
public void testGpsData() {
|
||||||
|
if ( mHandler != null ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final HandlerThread ht = new HandlerThread( "gps-test-thread" );
|
||||||
|
ht.start();
|
||||||
|
mHandler = new GpsTestThreadHandler( ht.getLooper() );
|
||||||
|
mMapAutoView.getLocationClient().setIsUseExtraGPSData( true );
|
||||||
|
mHandler.sendEmptyMessage( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prepareGpsData() throws Exception {
|
||||||
|
InputStreamReader isr = new InputStreamReader( mMapAutoView.getContext().getAssets().open( "20201105_1.csv" ) );
|
||||||
|
br = new BufferedReader( isr );
|
||||||
|
}
|
||||||
|
|
||||||
|
private long readOneLineGpsDataAndSet2Map() throws Exception {
|
||||||
|
String line = br.readLine();
|
||||||
|
if ( TextUtils.isEmpty( line ) ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int count = 0;
|
||||||
|
long duration = 3;
|
||||||
|
|
||||||
|
|
||||||
|
String datums[] = line.split( "," );
|
||||||
|
long time = Long.valueOf( datums[0] );
|
||||||
|
mogoLocation.setProvider( "GPS_SELF" );
|
||||||
|
mogoLocation.setLon( Double.valueOf( datums[1] ) );
|
||||||
|
mogoLocation.setLat( Double.valueOf( datums[2] ) );
|
||||||
|
float angle = Float.valueOf( datums[4] );
|
||||||
|
if ( mLastTime > 0 ) {
|
||||||
|
duration = time - mLastTime;
|
||||||
|
} else {
|
||||||
|
duration = 3;
|
||||||
|
}
|
||||||
|
mogoLocation.setDuration( mogoLocation.getDuration() + duration - 2 );
|
||||||
|
mLastTime = time;
|
||||||
|
float heading = angle;
|
||||||
|
if ( heading == -100f ) {
|
||||||
|
if ( mLastHeading != 400f ) {
|
||||||
|
heading = mLastHeading;
|
||||||
|
} else {
|
||||||
|
heading = 0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ( mLastHeading == 400f || Math.abs( mLastHeading - heading ) > 0.5f ) {
|
||||||
|
mLastHeading = heading;
|
||||||
|
} else {
|
||||||
|
heading = mLastHeading;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( heading < 40 ) {
|
||||||
|
mogoLocation.setHeading( heading + 4f );
|
||||||
|
} else {
|
||||||
|
mogoLocation.setHeading( heading );
|
||||||
|
}
|
||||||
|
|
||||||
|
step++;
|
||||||
|
if ( step >= 50 ) {
|
||||||
|
step = 0;
|
||||||
|
count++;
|
||||||
|
|
||||||
|
long realDuration = mogoLocation.getDuration() + 75;
|
||||||
|
realDuration = realDuration / 4;
|
||||||
|
mogoLocation.setDuration( realDuration );
|
||||||
|
mMapAutoView.getLocationClient().setExtraSelfGPSData( mogoLocation );
|
||||||
|
mogoLocation.setDuration( 0L );
|
||||||
|
|
||||||
|
return realDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -359,7 +359,7 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MarkerScaleAnimation animationScale = new MarkerScaleAnimation( fromX, toX );
|
MarkerScaleAnimation animationScale = new MarkerScaleAnimation( fromX, toX );
|
||||||
animationScale.setDuration( duration * 1000 );
|
animationScale.setDuration( duration );
|
||||||
// animationScale.setFillMode(Animation.FILL_MODE_FORWARDS);
|
// animationScale.setFillMode(Animation.FILL_MODE_FORWARDS);
|
||||||
// animationScale.setInterpolator(interpolator);
|
// animationScale.setInterpolator(interpolator);
|
||||||
animationScale.setAnimationListener( new MarkerAnimationListener() {
|
animationScale.setAnimationListener( new MarkerAnimationListener() {
|
||||||
|
|||||||
@@ -237,4 +237,8 @@ public interface IMogoMapUIController {
|
|||||||
default void setAnchorRate( float rate ) {
|
default void setAnchorRate( float rate ) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default void testGpsData(){
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.mogo.module.common.drawer.marker;
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.mogo.map.marker.IMogoInfoWindowAdapter;
|
||||||
|
import com.mogo.map.marker.IMogoMarker;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 简单marker适配器
|
||||||
|
*
|
||||||
|
* @author tongchenfei
|
||||||
|
*/
|
||||||
|
public class SimpleWindow3DAdapter implements IMogoInfoWindowAdapter {
|
||||||
|
|
||||||
|
public View icon;
|
||||||
|
public SimpleWindow3DAdapter(View icon) {
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public View getInfoWindow(IMogoMarker marker) {
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import android.view.ViewGroup;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.mogo.commons.AbsMogoApplication;
|
import com.mogo.commons.AbsMogoApplication;
|
||||||
|
import com.mogo.module.common.MogoApisHandler;
|
||||||
import com.mogo.module.common.entity.CloudRoadData;
|
import com.mogo.module.common.entity.CloudRoadData;
|
||||||
import com.mogo.module.extensions.R;
|
import com.mogo.module.extensions.R;
|
||||||
import com.mogo.module.extensions.live.impl.AbsCameraScenario;
|
import com.mogo.module.extensions.live.impl.AbsCameraScenario;
|
||||||
@@ -61,8 +62,7 @@ public class CameraLiveManager extends AbsCameraScenario<CloudRoadData> implemen
|
|||||||
(int) AbsMogoApplication.getApp().getResources()
|
(int) AbsMogoApplication.getApp().getResources()
|
||||||
.getDimension(R.dimen.module_video_window_height_content));
|
.getDimension(R.dimen.module_video_window_height_content));
|
||||||
|
|
||||||
ExtensionServiceManager
|
MogoApisHandler.getInstance().getApis().getTopViewManager()
|
||||||
.getMogoTopViewManager()
|
|
||||||
.addViewNoLinkage(getV2XWindow().getView(), layoutParams, this);
|
.addViewNoLinkage(getV2XWindow().getView(), layoutParams, this);
|
||||||
getV2XWindow().show(getmCloudRoadData());
|
getV2XWindow().show(getmCloudRoadData());
|
||||||
isShowWindow = true;
|
isShowWindow = true;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import android.view.View;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
|
|
||||||
|
import com.mogo.module.common.MogoApisHandler;
|
||||||
import com.mogo.module.common.entity.CloudRoadData;
|
import com.mogo.module.common.entity.CloudRoadData;
|
||||||
import com.mogo.module.extensions.R;
|
import com.mogo.module.extensions.R;
|
||||||
import com.mogo.module.extensions.live.listener.CameraLiveWindowStatusListener;
|
import com.mogo.module.extensions.live.listener.CameraLiveWindowStatusListener;
|
||||||
@@ -59,9 +60,7 @@ public class PushCameraLiveWindow extends RelativeLayout implements ICameraWindo
|
|||||||
pushVideoClose = findViewById(R.id.pushVideoClose);
|
pushVideoClose = findViewById(R.id.pushVideoClose);
|
||||||
pushVideoClose.setOnClickListener(v -> {
|
pushVideoClose.setOnClickListener(v -> {
|
||||||
//移除窗体
|
//移除窗体
|
||||||
ExtensionServiceManager
|
MogoApisHandler.getInstance().getApis().getTopViewManager().removeViewNoLinkage(this);
|
||||||
.getMogoTopViewManager()
|
|
||||||
.removeViewNoLinkage(this);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,8 +74,8 @@ public class PushCameraLiveWindow extends RelativeLayout implements ICameraWindo
|
|||||||
if (!TextUtils.isEmpty(entity.getRtmpUrl())) {
|
if (!TextUtils.isEmpty(entity.getRtmpUrl())) {
|
||||||
Logger.w(TAG, "entity.getRtmpUrl() = " + entity.getRtmpUrl());
|
Logger.w(TAG, "entity.getRtmpUrl() = " + entity.getRtmpUrl());
|
||||||
mIvReportHead.setVisibility(INVISIBLE);
|
mIvReportHead.setVisibility(INVISIBLE);
|
||||||
ExtensionServiceManager.getImageLoader()
|
MogoApisHandler.getInstance().getApis().getImageLoaderApi().displayImage(entity.getRtmpUrl(),
|
||||||
.displayImage(entity.getRtmpUrl(), mIvReportHead);
|
mIvReportHead);
|
||||||
mLiveGSYVideoView.startLive(entity.getRtmpUrl());
|
mLiveGSYVideoView.startLive(entity.getRtmpUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,13 +97,11 @@ public class PushCameraLiveWindow extends RelativeLayout implements ICameraWindo
|
|||||||
}
|
}
|
||||||
|
|
||||||
//移除窗体
|
//移除窗体
|
||||||
ExtensionServiceManager
|
MogoApisHandler.getInstance().getApis().getTopViewManager().removeViewNoLinkage(this);
|
||||||
.getMogoTopViewManager()
|
|
||||||
.removeView(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 窗体倒计时 TODO
|
* 窗体倒计时
|
||||||
*/
|
*/
|
||||||
public void countDownV2XEvent(CloudRoadData data) {
|
public void countDownV2XEvent(CloudRoadData data) {
|
||||||
// 倒计时
|
// 倒计时
|
||||||
@@ -112,9 +109,7 @@ public class PushCameraLiveWindow extends RelativeLayout implements ICameraWindo
|
|||||||
runnableV2XEvent = () -> {
|
runnableV2XEvent = () -> {
|
||||||
//Logger.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。");
|
//Logger.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。");
|
||||||
//移除窗体
|
//移除窗体
|
||||||
ExtensionServiceManager
|
MogoApisHandler.getInstance().getApis().getTopViewManager().removeViewNoLinkage(this);
|
||||||
.getMogoTopViewManager()
|
|
||||||
.removeViewNoLinkage(this);
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
handlerV2XEvent.removeCallbacks(runnableV2XEvent);
|
handlerV2XEvent.removeCallbacks(runnableV2XEvent);
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import com.mogo.module.common.entity.MogoSnapshotSetData;
|
|||||||
import com.mogo.module.extensions.R;
|
import com.mogo.module.extensions.R;
|
||||||
import com.mogo.module.extensions.live.CameraLiveManager;
|
import com.mogo.module.extensions.live.CameraLiveManager;
|
||||||
import com.mogo.module.extensions.live.CameraWindow3DAdapter;
|
import com.mogo.module.extensions.live.CameraWindow3DAdapter;
|
||||||
import com.mogo.module.extensions.live.ExtensionServiceManager;
|
|
||||||
import com.mogo.module.extensions.live.PushDataType;
|
import com.mogo.module.extensions.live.PushDataType;
|
||||||
import com.mogo.service.connection.IMogoOnWebSocketMessageListener;
|
import com.mogo.service.connection.IMogoOnWebSocketMessageListener;
|
||||||
import com.mogo.service.connection.WebSocketMsgType;
|
import com.mogo.service.connection.WebSocketMsgType;
|
||||||
@@ -32,8 +31,8 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
|||||||
private Context mContext;
|
private Context mContext;
|
||||||
private static IMogoMarker mMogoMarker;
|
private static IMogoMarker mMogoMarker;
|
||||||
private CloudRoadData mCloudRoadData;
|
private CloudRoadData mCloudRoadData;
|
||||||
private boolean isVrMode;
|
private volatile boolean isVrMode;
|
||||||
private boolean isVrModeMarker;
|
private volatile boolean isVrModeMarker;
|
||||||
private volatile String mCurrentUuid;
|
private volatile String mCurrentUuid;
|
||||||
|
|
||||||
|
|
||||||
@@ -56,6 +55,8 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// loadMarker(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void release() {
|
public void release() {
|
||||||
@@ -64,14 +65,32 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void enterVrMode() {
|
public void enterVrMode() {
|
||||||
Logger.d(TAG, "进入vr模式===");
|
Logger.d(TAG, "进入vr模式=========");
|
||||||
isVrMode = true;
|
isVrMode = true;
|
||||||
|
|
||||||
|
// loadMarker(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void exitVrMode() {
|
public void exitVrMode() {
|
||||||
Logger.d(TAG, "退出vr模式===");
|
Logger.d(TAG, "退出vr模式=========");
|
||||||
isVrMode = false;
|
isVrMode = false;
|
||||||
|
|
||||||
|
// loadMarker(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
//test
|
||||||
|
private void loadMarker(boolean isVrMode) {
|
||||||
|
mCloudRoadData = new CloudRoadData();
|
||||||
|
mCloudRoadData.setRtmpUrl("rtmp://58.200.131.2:1935/livetv/hunantv");
|
||||||
|
|
||||||
|
mCloudRoadData.setLat(40.200583);
|
||||||
|
mCloudRoadData.setLon(116.738538);
|
||||||
|
mCloudRoadData.setUuid("10011");
|
||||||
|
if (isVrMode) {
|
||||||
|
addVrCameraMarker(mCloudRoadData);
|
||||||
|
} else {
|
||||||
|
addNormalCameraMarker(mCloudRoadData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,7 +100,7 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
|||||||
* @param roadData
|
* @param roadData
|
||||||
*/
|
*/
|
||||||
private void addVrCameraMarker(CloudRoadData roadData) {
|
private void addVrCameraMarker(CloudRoadData roadData) {
|
||||||
Logger.d(TAG, "addVrCameraMarker --lat = " + roadData.getLat() + "--lon =" + roadData.getLon() + "--uuid = " + roadData.getUuid() + "---rtmpUrl =" + roadData.getRtmpUrl());
|
Log.d(TAG, "addVrCameraMarker --lat = " + roadData.getLat() + "--lon =" + roadData.getLon() + "--uuid = " + roadData.getUuid() + "---rtmpUrl =" + roadData.getRtmpUrl());
|
||||||
if (!TextUtils.isEmpty(roadData.getRtmpUrl())) {
|
if (!TextUtils.isEmpty(roadData.getRtmpUrl())) {
|
||||||
removeCameraMarker();
|
removeCameraMarker();
|
||||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||||
@@ -92,7 +111,7 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
|||||||
|
|
||||||
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.icon_space, null);
|
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.icon_space, null);
|
||||||
options.icon(bitmap);
|
options.icon(bitmap);
|
||||||
mMogoMarker = ExtensionServiceManager.getMapService().getMarkerManager(mContext)
|
mMogoMarker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext)
|
||||||
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
|
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
|
||||||
if (mMogoMarker != null) {
|
if (mMogoMarker != null) {
|
||||||
mMogoMarker.setInfoWindowAdapter(new CameraWindow3DAdapter(AbsMogoApplication.getApp(), options));
|
mMogoMarker.setInfoWindowAdapter(new CameraWindow3DAdapter(AbsMogoApplication.getApp(), options));
|
||||||
@@ -108,10 +127,12 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
|||||||
* @param roadData
|
* @param roadData
|
||||||
*/
|
*/
|
||||||
private void addNormalCameraMarker(CloudRoadData roadData) {
|
private void addNormalCameraMarker(CloudRoadData roadData) {
|
||||||
Logger.d(TAG, "addNormalCameraMarker --lat = " + roadData.getLat() + " --lon =" + roadData.getLon() + "--uuid = " + roadData.getUuid() + "---rtmpUrl =" + roadData.getRtmpUrl());
|
Log.d(TAG, "addNormalCameraMarker --lat = " + roadData.getLat() + " --lon =" + roadData.getLon() + "--uuid = " + roadData.getUuid() + "---rtmpUrl =" + roadData.getRtmpUrl());
|
||||||
if (!TextUtils.isEmpty(roadData.getRtmpUrl())) {
|
if (!TextUtils.isEmpty(roadData.getRtmpUrl())) {
|
||||||
removeCameraMarker();
|
removeCameraMarker();
|
||||||
mMogoMarker.hideInfoWindow();
|
if (mMogoMarker != null) {
|
||||||
|
mMogoMarker.hideInfoWindow();
|
||||||
|
}
|
||||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||||
.object(roadData)
|
.object(roadData)
|
||||||
.latitude(roadData.getLat())
|
.latitude(roadData.getLat())
|
||||||
@@ -120,7 +141,7 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
|||||||
|
|
||||||
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.module_camera_normal_traffic, null);
|
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.module_camera_normal_traffic, null);
|
||||||
options.icon(bitmap);
|
options.icon(bitmap);
|
||||||
mMogoMarker = ExtensionServiceManager.getMapService().getMarkerManager(mContext)
|
mMogoMarker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext)
|
||||||
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
|
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
|
||||||
if (mMogoMarker != null) {
|
if (mMogoMarker != null) {
|
||||||
mMogoMarker.setOwner(PushDataType.TYPE_PUSH_CAMERA_DATA);
|
mMogoMarker.setOwner(PushDataType.TYPE_PUSH_CAMERA_DATA);
|
||||||
@@ -153,19 +174,19 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
|||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
if (obj.getCamera() != null && !TextUtils.isEmpty(obj.getCamera().getRtmpUrl())) {
|
if (obj.getCamera() != null && !TextUtils.isEmpty(obj.getCamera().getRtmpUrl())) {
|
||||||
mCloudRoadData = obj.getCamera();
|
mCloudRoadData = obj.getCamera();
|
||||||
Log.d(TAG, "onMsgReceived getRtmpUrl = " + mCloudRoadData.getRtmpUrl() + "--- isVrMode = " + isVrMode + ">>>>mCurrentUuid = " + mCurrentUuid + ">>>mCloudRoadData.getUuid() = " + mCloudRoadData.getUuid());
|
Log.d(TAG, "onMsgReceived getRtmpUrl = " + mCloudRoadData.getRtmpUrl() + "--- isVrMode = " + isVrMode + " ---isVrModeMarker = " + isVrModeMarker + ">>>>mCurrentUuid = " + mCurrentUuid + ">>>mCloudRoadData.getUuid() = " + mCloudRoadData.getUuid());
|
||||||
if (TextUtils.equals(mCurrentUuid, mCloudRoadData.getUuid())) {
|
if (TextUtils.equals(mCurrentUuid, mCloudRoadData.getUuid())) {
|
||||||
if (isVrMode == isVrModeMarker) {
|
if (isVrMode == isVrModeMarker) {
|
||||||
// do nothing.
|
// do nothing.
|
||||||
Log.e(TAG, "-------------1------------");
|
Log.e(TAG, "-------------1------------");
|
||||||
} else {
|
} else {
|
||||||
if (isVrMode) {
|
if (isVrMode) {
|
||||||
|
Log.d(TAG, "-------------2------------");
|
||||||
addVrCameraMarker(mCloudRoadData);
|
addVrCameraMarker(mCloudRoadData);
|
||||||
isVrModeMarker = true;
|
isVrModeMarker = true;
|
||||||
Log.d(TAG, "-------------2------------");
|
|
||||||
} else {
|
} else {
|
||||||
addNormalCameraMarker(mCloudRoadData);
|
|
||||||
Log.d(TAG, "-------------3------------");
|
Log.d(TAG, "-------------3------------");
|
||||||
|
addNormalCameraMarker(mCloudRoadData);
|
||||||
isVrModeMarker = false;
|
isVrModeMarker = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -183,11 +204,15 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//删除marker
|
//删除marker
|
||||||
Logger.e(TAG, "onMsgReceived mCloudRoadData == null ");
|
if (obj.getCamera() != null) {
|
||||||
|
Log.e(TAG, "onMsgReceived RtmpUrl() = " + obj.getCamera().getRtmpUrl());
|
||||||
|
} else {
|
||||||
|
Log.e(TAG,"obj.getCamera() == null ----------- ");
|
||||||
|
}
|
||||||
removeCameraMarker();
|
removeCameraMarker();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Logger.e(TAG, "onMsgReceived obj == null ");
|
Log.e(TAG, "onMsgReceived obj == null ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.mogo.commons.debug.DebugConfig;
|
||||||
import com.mogo.map.MogoLatLng;
|
import com.mogo.map.MogoLatLng;
|
||||||
import com.mogo.map.location.MogoLocation;
|
import com.mogo.map.location.MogoLocation;
|
||||||
import com.mogo.map.search.geo.IMogoGeoSearch;
|
import com.mogo.map.search.geo.IMogoGeoSearch;
|
||||||
@@ -53,6 +54,10 @@ class OnlineCarSearchIntentHandler implements IntentHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void handle( Context context, Intent intent ) {
|
public void handle( Context context, Intent intent ) {
|
||||||
|
|
||||||
|
if ( DebugConfig.isNeedUploadCoordinatesDurationInTime() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String command = intent.getStringExtra( MogoReceiver.PARAM_COMMAND );
|
String command = intent.getStringExtra( MogoReceiver.PARAM_COMMAND );
|
||||||
if ( TextUtils.isEmpty( command ) ) {
|
if ( TextUtils.isEmpty( command ) ) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -48,10 +48,13 @@ public class MogoRTKLocation {
|
|||||||
if (msg.what == MSG_DATA_CHANGED) {
|
if (msg.what == MSG_DATA_CHANGED) {
|
||||||
mHandler.sendEmptyMessageDelayed(MSG_DATA_CHANGED, uploadDelay);
|
mHandler.sendEmptyMessageDelayed(MSG_DATA_CHANGED, uploadDelay);
|
||||||
sendLocationData();
|
sendLocationData();
|
||||||
|
|
||||||
|
Logger.d(TAG,"handleMessage开始发送消息");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mHandler.sendEmptyMessage(MSG_DATA_CHANGED);
|
mHandler.sendEmptyMessage(MSG_DATA_CHANGED);
|
||||||
|
Logger.d(TAG,"构造方法开始发送消息");
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface RTKLocationListener {
|
public interface RTKLocationListener {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.mogo.module.service.marker;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import com.mogo.commons.AbsMogoApplication;
|
import com.mogo.commons.AbsMogoApplication;
|
||||||
import com.mogo.commons.debug.DebugConfig;
|
import com.mogo.commons.debug.DebugConfig;
|
||||||
@@ -574,6 +575,11 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
|||||||
int radius,
|
int radius,
|
||||||
boolean fitBounds ) {
|
boolean fitBounds ) {
|
||||||
|
|
||||||
|
if ( DebugConfig.isNeedUploadCoordinatesDurationInTime() ) {
|
||||||
|
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( DebugConfig.isDebug() ) {
|
if ( DebugConfig.isDebug() ) {
|
||||||
if ( !DebugConfig.isRequestOnlineCarData() ) {
|
if ( !DebugConfig.isRequestOnlineCarData() ) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ import com.mogo.module.common.machinevision.IMachineVisionInterface;
|
|||||||
import com.mogo.module.common.wm.WindowManagerView;
|
import com.mogo.module.common.wm.WindowManagerView;
|
||||||
import com.mogo.utils.logger.Logger;
|
import com.mogo.utils.logger.Logger;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author donghongyu
|
* @author donghongyu
|
||||||
* @date 12/10/20 1:35 PM
|
* @date 12/10/20 1:35 PM
|
||||||
@@ -69,9 +67,11 @@ public class SmallMapService extends Service {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加小地图View
|
||||||
|
*/
|
||||||
private void addSmallMapView() {
|
private void addSmallMapView() {
|
||||||
Logger.d(TAG, "addSmallMapView");
|
Logger.d(TAG, "addSmallMapView");
|
||||||
|
|
||||||
mWindowManagerView = new WindowManagerView.Builder(getApplicationContext())
|
mWindowManagerView = new WindowManagerView.Builder(getApplicationContext())
|
||||||
.contentView(R.layout.module_small_map_direction_view)
|
.contentView(R.layout.module_small_map_direction_view)
|
||||||
.size(
|
.size(
|
||||||
@@ -85,9 +85,7 @@ public class SmallMapService extends Service {
|
|||||||
.gravity(Gravity.TOP | Gravity.LEFT)
|
.gravity(Gravity.TOP | Gravity.LEFT)
|
||||||
.showInWindowManager();
|
.showInWindowManager();
|
||||||
mWindowManagerView.show();
|
mWindowManagerView.show();
|
||||||
|
|
||||||
mSmallMapDirectionView = mWindowManagerView.findViewById(R.id.smallMapDirectionView);
|
mSmallMapDirectionView = mWindowManagerView.findViewById(R.id.smallMapDirectionView);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ import com.mogo.service.map.IMogoSmallMapProvider;
|
|||||||
import com.mogo.service.module.ModuleType;
|
import com.mogo.service.module.ModuleType;
|
||||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||||
import com.mogo.utils.FileUtils;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author donghongyu
|
* @author donghongyu
|
||||||
@@ -65,6 +62,14 @@ public class SmallVisionProvider implements IMogoSmallMapProvider, IMogoStatusCh
|
|||||||
MogoServicePaths.PATH_SMALL_MAP,
|
MogoServicePaths.PATH_SMALL_MAP,
|
||||||
StatusDescriptor.VR_MODE,
|
StatusDescriptor.VR_MODE,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
|
MogoApisHandler.getInstance()
|
||||||
|
.getApis()
|
||||||
|
.getStatusManagerApi()
|
||||||
|
.registerStatusChangedListener(
|
||||||
|
MogoServicePaths.PATH_SMALL_MAP,
|
||||||
|
StatusDescriptor.MAIN_PAGE_RESUME,
|
||||||
|
this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -106,5 +111,12 @@ public class SmallVisionProvider implements IMogoSmallMapProvider, IMogoStatusCh
|
|||||||
hidePanel();
|
hidePanel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (descriptor == StatusDescriptor.MAIN_PAGE_RESUME) {
|
||||||
|
if (isTrue) {
|
||||||
|
showPanel();
|
||||||
|
} else {
|
||||||
|
hidePanel();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,14 +9,11 @@ import com.mogo.map.MogoLatLng;
|
|||||||
import com.mogo.map.location.MogoLocation;
|
import com.mogo.map.location.MogoLocation;
|
||||||
import com.mogo.map.marker.IMogoMarker;
|
import com.mogo.map.marker.IMogoMarker;
|
||||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||||
import com.mogo.map.marker.IMogoMarkerIconViewCreator;
|
|
||||||
import com.mogo.map.marker.IMogoMarkerManager;
|
|
||||||
import com.mogo.map.marker.MogoMarkerOptions;
|
import com.mogo.map.marker.MogoMarkerOptions;
|
||||||
import com.mogo.map.uicontroller.EnumMapUI;
|
import com.mogo.map.uicontroller.EnumMapUI;
|
||||||
import com.mogo.module.common.drawer.MarkerDrawer;
|
import com.mogo.module.common.drawer.MarkerDrawer;
|
||||||
import com.mogo.module.common.drawer.marker.IMarkerView;
|
import com.mogo.module.common.drawer.marker.IMarkerView;
|
||||||
import com.mogo.module.common.drawer.marker.MapMarkerAdapter;
|
import com.mogo.module.common.drawer.marker.MapMarkerAdapter;
|
||||||
import com.mogo.module.common.drawer.marker.MapMarkerView;
|
|
||||||
import com.mogo.module.common.drawer.marker.RoadConditionInfoWindow3DAdapter;
|
import com.mogo.module.common.drawer.marker.RoadConditionInfoWindow3DAdapter;
|
||||||
import com.mogo.module.common.entity.MarkerCardResult;
|
import com.mogo.module.common.entity.MarkerCardResult;
|
||||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||||
@@ -63,7 +60,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
|||||||
private static CopyOnWriteArraySet<V2XRoadEventEntity> mV2XRoadEventEntityArrayList = new CopyOnWriteArraySet<>();
|
private static CopyOnWriteArraySet<V2XRoadEventEntity> mV2XRoadEventEntityArrayList = new CopyOnWriteArraySet<>();
|
||||||
// 上次的道路事件的预警Marker
|
// 上次的道路事件的预警Marker
|
||||||
private static IMogoMarker mAlarmInfoMarker;
|
private static IMogoMarker mAlarmInfoMarker;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawableLastAllPOI() {
|
public void drawableLastAllPOI() {
|
||||||
//Logger.w(MODULE_NAME, "V2X---绘制上一次的POI,回调给Launcher底层逻辑让其进行绘制");
|
//Logger.w(MODULE_NAME, "V2X---绘制上一次的POI,回调给Launcher底层逻辑让其进行绘制");
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ package com.mogo.module.v2x.scenario.scene.obu;
|
|||||||
import com.mogo.map.MogoLatLng;
|
import com.mogo.map.MogoLatLng;
|
||||||
import com.mogo.map.marker.IMogoMarker;
|
import com.mogo.map.marker.IMogoMarker;
|
||||||
import com.mogo.map.marker.MogoMarkerOptions;
|
import com.mogo.map.marker.MogoMarkerOptions;
|
||||||
|
import com.mogo.module.common.drawer.MarkerDrawer;
|
||||||
|
import com.mogo.module.common.drawer.marker.EmptyMarkerView;
|
||||||
|
import com.mogo.module.common.drawer.marker.SimpleWindow3DAdapter;
|
||||||
import com.mogo.module.v2x.V2XServiceManager;
|
import com.mogo.module.v2x.V2XServiceManager;
|
||||||
import com.mogo.module.v2x.marker.OptimalSpeedMarkerView;
|
import com.mogo.module.v2x.marker.OptimalSpeedMarkerView;
|
||||||
import com.mogo.module.v2x.scenario.view.IV2XMarker;
|
import com.mogo.module.v2x.scenario.view.IV2XMarker;
|
||||||
@@ -22,10 +25,23 @@ class OptimalSpeedMarker implements IV2XMarker<MogoLatLng> {
|
|||||||
@Override
|
@Override
|
||||||
public void drawPOI(MogoLatLng entity) {
|
public void drawPOI(MogoLatLng entity) {
|
||||||
Logger.d(MODULE_NAME, "绘制绿波marker===" + entity);
|
Logger.d(MODULE_NAME, "绘制绿波marker===" + entity);
|
||||||
|
|
||||||
MogoMarkerOptions optionsRipple = new MogoMarkerOptions()
|
MogoMarkerOptions optionsRipple = new MogoMarkerOptions()
|
||||||
.latitude(entity.getLat())
|
.latitude(entity.getLat())
|
||||||
.longitude(entity.getLon()).anchor(0.5f,0.9f).icon( ViewUtils.fromView(new OptimalSpeedMarkerView(V2XServiceManager.getContext())));
|
.longitude(entity.getLon())
|
||||||
optimalMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_OPTIMAL_SPEED_MARKER, optionsRipple);
|
.anchor(0.5f, 0.9f)
|
||||||
|
.zIndex(MarkerDrawer.MARKER_Z_INDEX_HIGH);
|
||||||
|
if (V2XServiceManager.getMoGoStatusManager().isVrMode()) {
|
||||||
|
optionsRipple
|
||||||
|
.icon(ViewUtils.fromView(new EmptyMarkerView(V2XServiceManager.getContext())));
|
||||||
|
optimalMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_OPTIMAL_SPEED_MARKER, optionsRipple);
|
||||||
|
optimalMarker.setInfoWindowAdapter(new SimpleWindow3DAdapter(new OptimalSpeedMarkerView(V2XServiceManager.getContext())));
|
||||||
|
optimalMarker.showInfoWindow();
|
||||||
|
} else {
|
||||||
|
optionsRipple
|
||||||
|
.icon(ViewUtils.fromView(new OptimalSpeedMarkerView(V2XServiceManager.getContext())));
|
||||||
|
optimalMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_OPTIMAL_SPEED_MARKER, optionsRipple);
|
||||||
|
}
|
||||||
if (optimalMarker != null) {
|
if (optimalMarker != null) {
|
||||||
optimalMarker.setClickable(false);
|
optimalMarker.setClickable(false);
|
||||||
}
|
}
|
||||||
@@ -33,7 +49,7 @@ class OptimalSpeedMarker implements IV2XMarker<MogoLatLng> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearPOI() {
|
public void clearPOI() {
|
||||||
Logger.d(MODULE_NAME,"准备清除绿波marker");
|
Logger.d(MODULE_NAME, "准备清除绿波marker");
|
||||||
if (optimalMarker != null) {
|
if (optimalMarker != null) {
|
||||||
Logger.d(MODULE_NAME, "清除绿波marker===" + optimalMarker);
|
Logger.d(MODULE_NAME, "清除绿波marker===" + optimalMarker);
|
||||||
optimalMarker.remove();
|
optimalMarker.remove();
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ public class V2XIllegalParkMarker implements IV2XMarker<List<MarkerExploreWay>>
|
|||||||
// 清除道路事件
|
// 清除道路事件
|
||||||
V2XServiceManager
|
V2XServiceManager
|
||||||
.getMoGoV2XMarkerManager().clearALLPOI();
|
.getMoGoV2XMarkerManager().clearALLPOI();
|
||||||
|
//清除连线
|
||||||
|
V2XServiceManager.getMoGoV2XPolylineManager().clearLine();
|
||||||
if (entityList != null) {
|
if (entityList != null) {
|
||||||
for (int i = 0; i < entityList.size(); i++) {
|
for (int i = 0; i < entityList.size(); i++) {
|
||||||
MarkerExploreWay markerExploreWay = entityList.get(i);
|
MarkerExploreWay markerExploreWay = entityList.get(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user