优化
This commit is contained in:
@@ -76,7 +76,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
}
|
||||
|
||||
// 暂时只显示车辆
|
||||
if ( isCarType( recognizedListResult.type ) ) {
|
||||
if ( !isCarType( recognizedListResult.type ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -113,9 +113,13 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
interval -= 25;
|
||||
marker.startSmoothInMs( points, interval );
|
||||
}
|
||||
marker.setRotateAngle( ( ( float ) recognizedListResult.heading ) );
|
||||
marker.setPosition( recognizedListResult.lat, recognizedListResult.lon );
|
||||
} else {
|
||||
marker.setPosition( recognizedListResult.lat, recognizedListResult.lon );
|
||||
}
|
||||
// marker.setRotateAngle( ( ( float ) recognizedListResult.heading ) );
|
||||
// marker.setPosition( recognizedListResult.lat, recognizedListResult.lon );
|
||||
}
|
||||
showSelfSpeed( mContext,
|
||||
marker,
|
||||
@@ -181,7 +185,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
}
|
||||
|
||||
private int getVrModel() {
|
||||
return R.raw.carred;
|
||||
return R.raw.cargrey;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -94,12 +94,12 @@ class BaseDrawer {
|
||||
|
||||
protected boolean isCarType( int type ) {
|
||||
AdasRecognizedType recognizedType = AdasRecognizedType.valueFrom( type );
|
||||
if ( recognizedType != AdasRecognizedType.classIdCar
|
||||
|| recognizedType != AdasRecognizedType.classIdTrafficBus
|
||||
|| recognizedType != AdasRecognizedType.classIdTrafficTruck ) {
|
||||
return false;
|
||||
if ( recognizedType == AdasRecognizedType.classIdCar
|
||||
|| recognizedType == AdasRecognizedType.classIdTrafficBus
|
||||
|| recognizedType == AdasRecognizedType.classIdTrafficTruck ) {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
package com.mogo.module.common.drawer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.MapCameraPosition;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.R;
|
||||
import com.mogo.module.common.api.CallChatApi;
|
||||
@@ -151,7 +145,7 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
|
||||
// 暂时只显示车辆
|
||||
if ( TextUtils.isEmpty( cloudRoadData.getSn() ) ) {
|
||||
if ( isCarType( cloudRoadData.getType() ) ) {
|
||||
if ( !isCarType( cloudRoadData.getType() ) ) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -192,12 +186,12 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
if ( lastPosition != null ) {
|
||||
if ( lastPosition.equals( cloudRoadData ) ) {
|
||||
if ( ( ( int ) cloudRoadData.getSpeed() ) == 0 ) {
|
||||
MapCameraPosition position = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().getMapCameraPosition();
|
||||
if ( position != null ) {
|
||||
marker.setRotateAngle( 360 - ( float ) cloudRoadData.getHeading() - position.getBearing() );
|
||||
} else {
|
||||
marker.setRotateAngle( 360 - ( float ) cloudRoadData.getHeading() );
|
||||
}
|
||||
// MapCameraPosition position = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().getMapCameraPosition();
|
||||
// if ( position != null ) {
|
||||
// marker.setRotateAngle( 360 - ( float ) cloudRoadData.getHeading() - position.getBearing() );
|
||||
// } else {
|
||||
// }
|
||||
marker.setRotateAngle( ( ( float ) cloudRoadData.getHeading() ) );
|
||||
}
|
||||
Logger.d( TAG, "保持位置 - %s", uniqueKey );
|
||||
// marker.setPosition( lastPosition.getLat(), lastPosition.getLon() );
|
||||
@@ -222,12 +216,7 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
Logger.d( TAG, "平滑移动 - %s duration = %s", uniqueKey, interval2 );
|
||||
}
|
||||
} else {
|
||||
MapCameraPosition position = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().getMapCameraPosition();
|
||||
if ( position != null ) {
|
||||
marker.setRotateAngle( 360 - ( float ) cloudRoadData.getHeading() - position.getBearing() );
|
||||
} else {
|
||||
marker.setRotateAngle( 360 - ( float ) cloudRoadData.getHeading() );
|
||||
}
|
||||
marker.setRotateAngle( ( float ) cloudRoadData.getHeading() );
|
||||
marker.setPosition( cloudRoadData.getLat(), cloudRoadData.getLon() );
|
||||
}
|
||||
showSelfSpeed( mContext, marker, cloudRoadData.getSpeed(), mIsVrMode );
|
||||
@@ -349,9 +338,9 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
private int getVrModel( CloudRoadData data ) {
|
||||
switch ( data.getFromType() ) {
|
||||
case CloudRoadData.FROM_ADAS:
|
||||
// return R.raw.taxi;
|
||||
return R.raw.cargrey;
|
||||
case CloudRoadData.FROM_ROAD_UNIT:
|
||||
// return R.raw.bus;
|
||||
return R.raw.cargreen;
|
||||
case CloudRoadData.FROM_MY_LOCATION:
|
||||
default:
|
||||
return R.raw.carblue;
|
||||
|
||||
Reference in New Issue
Block a user