opt
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mogo.module.common.drawer;
|
||||
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@@ -149,7 +150,7 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
}
|
||||
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner( DataTypes.TYPE_MARKER_CLOUD_DATA )
|
||||
.owner( DataTypes.TYPE_MARKER_CLOUD_WARN_DATA )
|
||||
.anchor( 0.5f, 0.5f )
|
||||
.rotate( ( float ) data.getHeading() )
|
||||
.object( data )
|
||||
@@ -158,6 +159,8 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
.position( new MogoLatLng( data.getLat(), data.getLon()));
|
||||
|
||||
String resIdVal = null;
|
||||
IMogoMarker marker = null;
|
||||
|
||||
if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
options.set3DMode( true );
|
||||
options.anchorColor(data.color);
|
||||
@@ -165,13 +168,15 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
resIdVal = resId + "";
|
||||
// options.resName( mMarkerCachesResMd5Values.get( resIdVal ) );
|
||||
options.icon3DRes( resId );
|
||||
marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( mContext ).addMarker( DataTypes.TYPE_MARKER_CLOUD_WARN_DATA, options );
|
||||
|
||||
} else {
|
||||
// options.set3DMode( false );
|
||||
// View view = inflateView( data );
|
||||
// options.icon( view );
|
||||
// resIdVal = view.getId() + "";
|
||||
}
|
||||
IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( mContext ).addMarker( DataTypes.TYPE_MARKER_CLOUD_DATA, options );
|
||||
|
||||
// cacheMarkerIconResMd5Val( resIdVal, marker );
|
||||
|
||||
return marker;
|
||||
@@ -179,19 +184,20 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 绘制行人和二轮车
|
||||
* @param data
|
||||
*/
|
||||
// public void renderWarnData(V2XWarningEntity data ) {
|
||||
// IMogoMarker marker = drawWarnDataMarker(data);
|
||||
//
|
||||
// if ( marker == null ) {
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// renderSnapshotOneFrame( marker, uniqueKey, cloudRoadData, newMarkersCaches );
|
||||
//
|
||||
// }
|
||||
public void renderWarnData(V2XWarningEntity data ) {
|
||||
IMogoMarker marker = drawWarnDataMarker(data);
|
||||
|
||||
if ( marker != null ) {
|
||||
marker.addDynamicAnchorPosition( new MogoLatLng(data.getCollisionLat(), data.getCollisionLon()), ( float ) data.getHeading(), 2000);
|
||||
|
||||
} else {
|
||||
Log.e("liyz", "renderWarnData marker == null ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user