opt
This commit is contained in:
@@ -67,7 +67,7 @@ dependencies {
|
||||
implementation project(':foudations:mogo-commons')
|
||||
}
|
||||
|
||||
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.1.8'
|
||||
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.3.3'
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
|
||||
@@ -96,6 +96,7 @@ class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
||||
.setCoordinateType( MapParams.COORDINATETYPE_GCJ02 )
|
||||
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
|
||||
.setZoom( 16 )
|
||||
.setPointToCenter( 0.734375f, 0.5f )
|
||||
.setStyleMode( MapParams.MAP_STYLE_NIGHT ), NavParams.Companion.init() );
|
||||
MapAutoView mapAutoView = new MapAutoView( context );
|
||||
IMogoMapView mapView = new AMapViewWrapper( mapAutoView );
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.module.common.drawer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -14,6 +15,7 @@ import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.R;
|
||||
import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.service.adas.entity.ADASRecognizedListResult;
|
||||
import com.mogo.utils.ViewUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -38,6 +40,10 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
}
|
||||
|
||||
private long mLastReceiveTime = 0L;
|
||||
|
||||
private Map< String, MogoLatLng > mLastPositions = new ConcurrentHashMap<>();
|
||||
|
||||
public static AdasRecognizedResultDrawer getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( AdasRecognizedResultDrawer.class ) {
|
||||
@@ -61,6 +67,8 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
// adas marker 缓存
|
||||
private Map< String, IMogoMarker > mAdasRecognizedMarkersCaches = new ConcurrentHashMap<>();
|
||||
|
||||
private boolean mIsVrMode = false;
|
||||
|
||||
public void renderAdasRecognizedResult( List< ADASRecognizedListResult > resultList, boolean machineVision, double curSpeed ) {
|
||||
if ( resultList == null || resultList.isEmpty() ) {
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( mContext ).removeMarkers( DataTypes.TYPE_MARKER_ADAS );
|
||||
@@ -85,10 +93,18 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
continue;
|
||||
}
|
||||
mAdasRecognizedMarkersCaches.put( uniqueKey, marker );
|
||||
} else {
|
||||
if ( mIsVrMode != MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
mIsVrMode = MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode();
|
||||
if ( mIsVrMode ) {
|
||||
marker.use3DResource( getVrModel() );
|
||||
} else {
|
||||
marker.setIcon( ViewUtils.fromView( inflateView( recognizedListResult, machineVision, 0 ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( marker.getObject() instanceof MogoLatLng ) {
|
||||
marker.setPosition( ( ( MogoLatLng ) marker.getObject() ).lat, ( ( MogoLatLng ) marker.getObject() ).lon );
|
||||
}
|
||||
|
||||
MogoLatLng lastPosition = mLastPositions.get( uniqueKey );
|
||||
|
||||
List< MogoLatLng > points = new ArrayList<>();
|
||||
MogoLatLng endLatLon = null;
|
||||
@@ -107,23 +123,21 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
} else if ( recognizedListResult.latLonList != null
|
||||
&& recognizedListResult.latLonList.size() == 1 ) {
|
||||
// 原来的点和新的点做一个数组进行平滑移动
|
||||
MogoLatLng latLng = marker.getPosition();
|
||||
ADASRecognizedListResult.LatLon latLon = recognizedListResult.latLonList.get( 0 );
|
||||
if ( latLon == null ) {
|
||||
continue;
|
||||
}
|
||||
points.add( latLng );
|
||||
points.add( lastPosition );
|
||||
// double targetPos[] = transformGcj02ToFitMap( latLon.lat, latLon.lon );
|
||||
// points.add( endLatLon = new MogoLatLng( targetPos[POS_LAT], targetPos[POS_LON] ) );
|
||||
points.add( endLatLon = new MogoLatLng( latLon.lat, latLon.lon ) );
|
||||
}
|
||||
if ( endLatLon != null ) {
|
||||
marker.setObject( endLatLon );
|
||||
}
|
||||
mLastPositions.put( uniqueKey, endLatLon );
|
||||
if ( points.size() >= 1 ) {
|
||||
marker.startSmooth( points, 1 );
|
||||
marker.startSmoothInMs( points, SystemClock.elapsedRealtime() - mLastReceiveTime );
|
||||
}
|
||||
}
|
||||
mLastReceiveTime = SystemClock.elapsedRealtime();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,6 +165,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
if ( !existMarker.isEmpty() ) {
|
||||
for ( String key : mAdasRecognizedMarkersCaches.keySet() ) {
|
||||
if ( !existMarker.containsKey( key ) ) {
|
||||
mLastPositions.remove( key );
|
||||
try {
|
||||
IMogoMarker marker = mAdasRecognizedMarkersCaches.remove( key );
|
||||
marker.destroy();
|
||||
@@ -172,14 +187,24 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
// double targetPos[] = transformGcj02ToFitMap( recognizedListResult.latLonList.get( 0 ).lat, recognizedListResult.latLonList.get( 0 ).lon );
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner( DataTypes.TYPE_MARKER_ADAS )
|
||||
.icon( inflateView( recognizedListResult, machineVision, curSpeed ) )
|
||||
.anchor( 0.5f, 0.5f )
|
||||
.rotate( ( float ) recognizedListResult.heading )
|
||||
// .position( new MogoLatLng( targetPos[POS_LAT], targetPos[POS_LON] ) );
|
||||
.position( new MogoLatLng( recognizedListResult.latLonList.get( 0 ).lat, recognizedListResult.latLonList.get( 0 ).lon ) );
|
||||
|
||||
if ( mIsVrMode = MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
options.icon3DRes( getVrModel() );
|
||||
} else {
|
||||
options.icon( inflateView( recognizedListResult, machineVision, curSpeed ) );
|
||||
}
|
||||
|
||||
return MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( mContext ).addMarker( DataTypes.TYPE_MARKER_ADAS, options );
|
||||
}
|
||||
|
||||
private int getVrModel() {
|
||||
return R.raw.taxi;
|
||||
}
|
||||
|
||||
private View inflateView( ADASRecognizedListResult data, boolean machineVision, double curSpeed ) {
|
||||
View rootView = LayoutInflater.from( AbsMogoApplication.getApp() ).inflate( R.layout.module_commons_layout_car, null );
|
||||
// SafeType safeType = getSafeType( data.distanceX, data.distanceY, data.speed, curSpeed );
|
||||
@@ -193,7 +218,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
// safeType
|
||||
// ) );
|
||||
|
||||
iv.setImageResource( R.drawable.icon_map_marker_car_gray );
|
||||
iv.setImageResource( R.drawable.icon_map_marker_car_type_taxi );
|
||||
return rootView;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.module.common.drawer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -72,6 +73,8 @@ class SnapshotSetDataDrawer extends BaseDrawer {
|
||||
|
||||
private boolean mIsVrMode = false;
|
||||
|
||||
private long mLastReceiveTime = 0L;
|
||||
|
||||
/**
|
||||
* 其他车辆、rsu 车辆数据
|
||||
*
|
||||
@@ -123,7 +126,7 @@ class SnapshotSetDataDrawer extends BaseDrawer {
|
||||
if ( mIsVrMode != MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
mIsVrMode = MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode();
|
||||
if ( mIsVrMode ) {
|
||||
marker.use3DResource( getVrModel() );
|
||||
marker.use3DResource( getVrModel( cloudRoadData ) );
|
||||
} else {
|
||||
marker.setIcon( ViewUtils.fromView( inflateView( cloudRoadData, machineVision, 0 ) ) );
|
||||
}
|
||||
@@ -139,7 +142,7 @@ class SnapshotSetDataDrawer extends BaseDrawer {
|
||||
List< MogoLatLng > points = new ArrayList<>();
|
||||
points.add( new MogoLatLng( lastPosition.lat, lastPosition.lon ) );
|
||||
points.add( new MogoLatLng( target.lat, target.lon ) );
|
||||
marker.startSmoothInMs( points, 1000L );
|
||||
marker.startSmoothInMs( points, SystemClock.elapsedRealtime() - mLastReceiveTime );
|
||||
}
|
||||
} else {
|
||||
marker.setRotateAngle( 360 - ( float ) cloudRoadData.getHeading() );
|
||||
@@ -147,6 +150,7 @@ class SnapshotSetDataDrawer extends BaseDrawer {
|
||||
}
|
||||
}
|
||||
mLastPositions.put( uniqueKey, target );
|
||||
mLastReceiveTime = SystemClock.elapsedRealtime();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,15 +209,23 @@ class SnapshotSetDataDrawer extends BaseDrawer {
|
||||
// .position( new MogoLatLng( coor[POS_LAT], coor[POS_LON] ) );
|
||||
.position( new MogoLatLng( data.getLat(), data.getLon() ) );
|
||||
if ( mIsVrMode = MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
options.icon3DRes( getVrModel() );
|
||||
options.icon3DRes( getVrModel( data ) );
|
||||
} else {
|
||||
options.icon( inflateView( data, machineVision, curSpeed ) );
|
||||
}
|
||||
return MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( mContext ).addMarker( DataTypes.TYPE_MARKER_CLOUD_DATA, options );
|
||||
}
|
||||
|
||||
private int getVrModel() {
|
||||
return R.raw.taxi;
|
||||
private int getVrModel( CloudRoadData data ) {
|
||||
switch ( data.getFromType() ) {
|
||||
case CloudRoadData.FROM_ADAS:
|
||||
return R.raw.taxi;
|
||||
case CloudRoadData.FROM_ROAD_UNIT:
|
||||
return R.raw.bus;
|
||||
case CloudRoadData.FROM_MY_LOCATION:
|
||||
default:
|
||||
return R.raw.carred;
|
||||
}
|
||||
}
|
||||
|
||||
private View inflateView( CloudRoadData data, boolean machineVision, double curSpeed ) {
|
||||
@@ -229,7 +241,19 @@ class SnapshotSetDataDrawer extends BaseDrawer {
|
||||
// getCarModelType(),
|
||||
// safeType
|
||||
// ) );
|
||||
iv.setImageResource( R.drawable.icon_map_marker_car_gray );
|
||||
iv.setImageResource( get2DModel( data ) );
|
||||
return rootView;
|
||||
}
|
||||
|
||||
private int get2DModel( CloudRoadData data ) {
|
||||
switch ( data.getFromType() ) {
|
||||
case CloudRoadData.FROM_ADAS:
|
||||
return R.drawable.icon_map_marker_car_type_taxi;
|
||||
case CloudRoadData.FROM_ROAD_UNIT:
|
||||
return R.drawable.icon_map_marker_car_type_bus;
|
||||
case CloudRoadData.FROM_MY_LOCATION:
|
||||
default:
|
||||
return R.drawable.icon_map_marker_car_gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -33,7 +34,7 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
|
||||
private String TAG = "MapMarkerInfoView";
|
||||
|
||||
private TextView tvMarkerContent;
|
||||
private ConstraintLayout clMarkerContent;
|
||||
private LinearLayout clMarkerContent;
|
||||
private ImageView ivReverseTriangle;
|
||||
|
||||
public MapMarkerInfoView( Context context ) {
|
||||
|
||||
@@ -49,7 +49,11 @@ public class MapMarkerView extends MapMarkerBaseView {
|
||||
|
||||
@Override
|
||||
protected void initView( Context context ) {
|
||||
LayoutInflater.from( context ).inflate( R.layout.modudle_services_marker_layout, this );
|
||||
if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
LayoutInflater.from( context ).inflate( R.layout.modudle_services_marker_vr_layout, this );
|
||||
} else {
|
||||
LayoutInflater.from( context ).inflate( R.layout.modudle_services_marker_layout, this );
|
||||
}
|
||||
ivIcon = findViewById( R.id.ivIcon );
|
||||
clMarkerTopView = findViewById( R.id.clMarkerTopView );
|
||||
ivCar = findViewById( R.id.ivCar );
|
||||
@@ -59,13 +63,6 @@ public class MapMarkerView extends MapMarkerBaseView {
|
||||
public void updateView( MarkerShowEntity markerShowEntity ) {
|
||||
try {
|
||||
Object bindObj = markerShowEntity.getBindObj();
|
||||
if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
ivCar.setImageResource( R.drawable.icon_map_marker_location_yellow_vr );
|
||||
clMarkerTopView.setBackgroundResource( R.drawable.module_services_marker_vr_bkg );
|
||||
} else {
|
||||
clMarkerTopView.setBackgroundResource( R.drawable.module_services_marker_bkg );
|
||||
ivCar.setImageResource( R.drawable.icon_map_marker_location_yellow );
|
||||
}
|
||||
switch ( markerShowEntity.getMarkerType() ) {
|
||||
case ModuleNames.CARD_TYPE_ROAD_CONDITION:
|
||||
case ModuleNames.CARD_TYPE_NOVELTY:
|
||||
|
||||
@@ -21,9 +21,6 @@ public class CloudLocationInfo implements Parcelable {
|
||||
private double alt;
|
||||
private double speed;
|
||||
|
||||
public double oldLat;
|
||||
public double oldLon;
|
||||
|
||||
public CloudLocationInfo() {
|
||||
}
|
||||
|
||||
@@ -38,8 +35,6 @@ public class CloudLocationInfo implements Parcelable {
|
||||
}
|
||||
|
||||
public void convertCoor2GCJ02(){
|
||||
this.oldLat = lat;
|
||||
this.oldLon = lon;
|
||||
double[] amapCoord = CoordinateUtils.transformFromWGSToGCJ( lat, lon );
|
||||
if ( amapCoord != null ) {
|
||||
this.lat = amapCoord[0];
|
||||
|
||||
@@ -8,12 +8,22 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 云端道路数据
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class CloudRoadData implements Parcelable {
|
||||
/**物体类型*/
|
||||
|
||||
public static final int FROM_MY_LOCATION = 1;
|
||||
public static final int FROM_ADAS = 2;
|
||||
public static final int FROM_ROAD_UNIT = 3;
|
||||
|
||||
/**
|
||||
* 物体类型
|
||||
*/
|
||||
private int type = -1;
|
||||
|
||||
private int fromType;
|
||||
|
||||
private double lat;
|
||||
private double lon;
|
||||
|
||||
@@ -25,23 +35,29 @@ public class CloudRoadData implements Parcelable {
|
||||
|
||||
private long systemTime;
|
||||
|
||||
/**红绿灯状态 1红 2绿 3黄*/
|
||||
/**
|
||||
* 红绿灯状态 1红 2绿 3黄
|
||||
*/
|
||||
private int lightStatus;//
|
||||
/**红绿灯剩余时间 读秒*/
|
||||
/**
|
||||
* 红绿灯剩余时间 读秒
|
||||
*/
|
||||
private int lightLeftTime;
|
||||
/**视频流直播地址*/
|
||||
/**
|
||||
* 视频流直播地址
|
||||
*/
|
||||
private String rtmpUrl;//
|
||||
|
||||
private double distance ;//距离
|
||||
private double distance;//距离
|
||||
|
||||
private List<CloudLocationInfo> coordinates;
|
||||
private List< CloudLocationInfo > coordinates;
|
||||
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
public void setType( int type ) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@@ -49,7 +65,7 @@ public class CloudRoadData implements Parcelable {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
public void setLat( double lat ) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
@@ -57,7 +73,7 @@ public class CloudRoadData implements Parcelable {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
public void setLon( double lon ) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
@@ -65,7 +81,7 @@ public class CloudRoadData implements Parcelable {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
public void setSpeed( double speed ) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
@@ -73,7 +89,7 @@ public class CloudRoadData implements Parcelable {
|
||||
return systemTime;
|
||||
}
|
||||
|
||||
public void setSystemTime(long systemTime) {
|
||||
public void setSystemTime( long systemTime ) {
|
||||
this.systemTime = systemTime;
|
||||
}
|
||||
|
||||
@@ -81,7 +97,7 @@ public class CloudRoadData implements Parcelable {
|
||||
return lightStatus;
|
||||
}
|
||||
|
||||
public void setLightStatus(int lightStatus) {
|
||||
public void setLightStatus( int lightStatus ) {
|
||||
this.lightStatus = lightStatus;
|
||||
}
|
||||
|
||||
@@ -89,7 +105,7 @@ public class CloudRoadData implements Parcelable {
|
||||
return lightLeftTime;
|
||||
}
|
||||
|
||||
public void setLightLeftTime(int lightLeftTime) {
|
||||
public void setLightLeftTime( int lightLeftTime ) {
|
||||
this.lightLeftTime = lightLeftTime;
|
||||
}
|
||||
|
||||
@@ -97,7 +113,7 @@ public class CloudRoadData implements Parcelable {
|
||||
return rtmpUrl;
|
||||
}
|
||||
|
||||
public void setRtmpUrl(String rtmpUrl) {
|
||||
public void setRtmpUrl( String rtmpUrl ) {
|
||||
this.rtmpUrl = rtmpUrl;
|
||||
}
|
||||
|
||||
@@ -105,15 +121,15 @@ public class CloudRoadData implements Parcelable {
|
||||
return distance * 1000;
|
||||
}
|
||||
|
||||
public void setDistance(double distance) {
|
||||
public void setDistance( double distance ) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public List<CloudLocationInfo> getCoordinates() {
|
||||
public List< CloudLocationInfo > getCoordinates() {
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
public void setCoordinates(List<CloudLocationInfo> coordinates) {
|
||||
public void setCoordinates( List< CloudLocationInfo > coordinates ) {
|
||||
this.coordinates = coordinates;
|
||||
}
|
||||
|
||||
@@ -133,13 +149,21 @@ public class CloudRoadData implements Parcelable {
|
||||
this.heading = heading;
|
||||
}
|
||||
|
||||
public String getUniqueKey(){
|
||||
if (! TextUtils.isEmpty( uuid ) ) {
|
||||
public String getUniqueKey() {
|
||||
if ( !TextUtils.isEmpty( uuid ) ) {
|
||||
return uuid;
|
||||
}
|
||||
return sn;
|
||||
}
|
||||
|
||||
public int getFromType() {
|
||||
return fromType;
|
||||
}
|
||||
|
||||
public void setFromType( int fromType ) {
|
||||
this.fromType = fromType;
|
||||
}
|
||||
|
||||
public CloudRoadData() {
|
||||
}
|
||||
|
||||
@@ -151,6 +175,7 @@ public class CloudRoadData implements Parcelable {
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeInt( this.type );
|
||||
dest.writeInt( this.fromType );
|
||||
dest.writeDouble( this.lat );
|
||||
dest.writeDouble( this.lon );
|
||||
dest.writeString( this.uuid );
|
||||
@@ -167,6 +192,7 @@ public class CloudRoadData implements Parcelable {
|
||||
|
||||
protected CloudRoadData( Parcel in ) {
|
||||
this.type = in.readInt();
|
||||
this.fromType = in.readInt();
|
||||
this.lat = in.readDouble();
|
||||
this.lon = in.readDouble();
|
||||
this.uuid = in.readString();
|
||||
|
||||
@@ -6,59 +6,49 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="1px"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
android:padding="1px">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/clMarkerContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:background="@drawable/bg_map_marker_yellow_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:background="@drawable/bg_map_marker_yellow_info">
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/ivUserHead"
|
||||
android:layout_width="@dimen/dp_76"
|
||||
android:layout_height="@dimen/dp_76"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:miv_failureHolder="@drawable/icon_default_user_head"
|
||||
app:miv_overlayImageId="@drawable/icon_default_user_head"
|
||||
app:miv_placeHolder="@drawable/icon_default_user_head"
|
||||
app:miv_shape="circle" />
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/ivUserHead"
|
||||
android:layout_width="@dimen/dp_76"
|
||||
android:layout_height="@dimen/dp_76"
|
||||
android:layout_gravity="center_vertical"
|
||||
app:miv_failureHolder="@drawable/icon_default_user_head"
|
||||
app:miv_overlayImageId="@drawable/icon_default_user_head"
|
||||
app:miv_placeHolder="@drawable/icon_default_user_head"
|
||||
app:miv_shape="circle" />
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="@dimen/module_service_marker_bubble_icon_width"
|
||||
android:layout_height="@dimen/module_service_marker_bubble_icon_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:visibility="invisible"
|
||||
tools:src="@drawable/icon_map_marker_road_block_up"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="@dimen/module_service_marker_bubble_icon_width"
|
||||
android:layout_height="@dimen/module_service_marker_bubble_icon_height"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/icon_map_marker_road_block_up"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMarkerContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/sp_32"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivUserHead"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivUserHead"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivUserHead"
|
||||
tools:text="诗一样的女子" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
android:textSize="@dimen/sp_32" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="1px"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/clMarkerTopView"
|
||||
android:layout_width="@dimen/module_service_marker_bubble_vr_width"
|
||||
android:background="@drawable/module_services_marker_vr_bkg"
|
||||
android:layout_height="@dimen/module_service_marker_bubble_vr_height">
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="@dimen/module_service_marker_bubble_icon_vr_width"
|
||||
android:layout_height="@dimen/module_service_marker_bubble_icon_vr_height"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="@dimen/module_service_marker_bubble_icon_marginBottom"
|
||||
tools:src="@drawable/icon_map_marker_road_block_up2" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/module_service_marker_dot_marginTop"
|
||||
android:src="@drawable/icon_map_marker_location_yellow_vr" />
|
||||
</LinearLayout>
|
||||
BIN
modules/mogo-module-common/src/main/res/raw/bus.n3d
Normal file
BIN
modules/mogo-module-common/src/main/res/raw/bus.n3d
Normal file
Binary file not shown.
BIN
modules/mogo-module-common/src/main/res/raw/carred.n3d
Normal file
BIN
modules/mogo-module-common/src/main/res/raw/carred.n3d
Normal file
Binary file not shown.
@@ -1065,9 +1065,13 @@
|
||||
<dimen name="module_service_marker_anchor_size">20dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">100px</dimen>
|
||||
<dimen name="module_service_marker_bubble_vr_width">55px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">117px</dimen>
|
||||
<dimen name="module_service_marker_bubble_vr_height">69px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">60px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_vr_width">35px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_vr_height">35px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>
|
||||
|
||||
<!-- 导航查看全程显示范围-->
|
||||
|
||||
@@ -275,13 +275,6 @@ public class EventDispatchCenter implements
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( ui == EnumMapUI.Type_VR ) {
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi()
|
||||
.setVrMode( TAG, true );
|
||||
} else {
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi()
|
||||
.setVrMode( TAG, false );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="1px"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clMarkerContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:background="@drawable/bg_map_marker_yellow_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/ivUserHead"
|
||||
android:layout_width="@dimen/dp_76"
|
||||
android:layout_height="@dimen/dp_76"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:miv_failureHolder="@drawable/icon_default_user_head"
|
||||
app:miv_overlayImageId="@drawable/icon_default_user_head"
|
||||
app:miv_placeHolder="@drawable/icon_default_user_head"
|
||||
app:miv_shape="circle" />
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="@dimen/module_service_marker_bubble_icon_width"
|
||||
android:layout_height="@dimen/module_service_marker_bubble_icon_height"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/icon_map_marker_road_block_up"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMarkerContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/sp_32"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivUserHead"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivUserHead"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivUserHead"
|
||||
tools:text="诗一样的女子" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="@+id/clMarkerContent"
|
||||
app:layout_constraintStart_toStartOf="@+id/clMarkerContent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/clMarkerContent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivReverseTriangle"
|
||||
android:layout_width="@dimen/module_service_marker_anchor_size"
|
||||
android:layout_height="@dimen/module_service_marker_anchor_size"
|
||||
android:src="@drawable/bg_shape_reverse_yellow" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_map_marker_location_yellow" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user