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.3'
|
||||
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.1.5'
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
|
||||
@@ -251,7 +251,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
@Override
|
||||
public void setTrafficEnabled( boolean visible ) {
|
||||
if ( checkAMapView() ) {
|
||||
mMapView.getMapAutoViewHelper().setTraffic( visible );
|
||||
// mMapView.getMapAutoViewHelper().setTraffic( visible );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,10 +60,14 @@ class MarkerDrawer {
|
||||
}
|
||||
|
||||
public IMogoMarker drawMapMarkerImpl( MarkerShowEntity markerShowEntity, int zIndex, IMogoMarkerClickListener listener ) {
|
||||
return drawMapMarkerImpl(markerShowEntity, zIndex, 0, listener);
|
||||
}
|
||||
|
||||
public IMogoMarker drawMapMarkerImpl( MarkerShowEntity markerShowEntity, int zIndex, int icon3DRes, IMogoMarkerClickListener listener ) {
|
||||
if ( markerShowEntity == null || markerShowEntity.getMarkerLocation() == null ) {
|
||||
return null;
|
||||
}
|
||||
MogoMarkerOptions options = new MogoMarkerOptions().owner( markerShowEntity.getMarkerType() ).zIndex( zIndex ).object( markerShowEntity ).latitude( markerShowEntity.getMarkerLocation().getLat() ).longitude( markerShowEntity.getMarkerLocation().getLon() );
|
||||
MogoMarkerOptions options = new MogoMarkerOptions().icon3DRes( icon3DRes ).owner( markerShowEntity.getMarkerType() ).zIndex( zIndex ).object( markerShowEntity ).latitude( markerShowEntity.getMarkerLocation().getLat() ).longitude( markerShowEntity.getMarkerLocation().getLon() );
|
||||
IMarkerView markerView = MapMarkerAdapter.getMarkerView( AbsMogoApplication.getApp(), markerShowEntity, options );
|
||||
if ( markerView instanceof OnlineCarMarkerView ) {
|
||||
try {
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.module.common.ModuleNames;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.R;
|
||||
import com.mogo.module.common.entity.MarkerCarPois;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
@@ -104,7 +105,7 @@ class OnlineCarDrawer {
|
||||
String sn = MarkerDrawer.getInstance().getPrimaryKeyFromEntity( markerOnlineCar );
|
||||
IMogoMarker mogoMarker = existCarMap.get( sn );
|
||||
if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
|
||||
mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl( markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_LOW, listener );
|
||||
mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl( markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_LOW, R.raw.taxi, listener );
|
||||
}
|
||||
if ( mogoMarker != null ) {
|
||||
mogoMarker.setVisible( true );
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
|
||||
import com.mogo.module.common.ModuleNames;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.drawer.marker.RoadConditionInfoWindow3DAdapter;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
@@ -84,10 +85,16 @@ class RoadConditionDrawer {
|
||||
if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
|
||||
Logger.d( TAG, "draw road condition, sn = %s", sn );
|
||||
try {
|
||||
if ( DebugConfig.isRoadEventAnimated() ) {
|
||||
post2AddAndStartAnimation( markerShowEntity, i * 100L, listener );
|
||||
} else {
|
||||
if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl( markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, listener );
|
||||
mogoMarker.setInfoWindowAdapter( new RoadConditionInfoWindow3DAdapter( markerShowEntity, AbsMogoApplication.getApp(), mogoMarker.getMogoMarkerOptions() ) );
|
||||
mogoMarker.showInfoWindow();
|
||||
} else {
|
||||
if ( DebugConfig.isRoadEventAnimated() ) {
|
||||
post2AddAndStartAnimation( markerShowEntity, i * 100L, listener );
|
||||
} else {
|
||||
mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl( markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, listener );
|
||||
}
|
||||
}
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.mogo.module.common.drawer.marker;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.map.marker.IMogoInfoWindowAdapter;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/12/15
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
class RoadConditionInfoWindow3DAdapter implements IMogoInfoWindowAdapter {
|
||||
|
||||
private MarkerShowEntity mEntity;
|
||||
private Context mContext;
|
||||
private MogoMarkerOptions mOptions;
|
||||
|
||||
public RoadConditionInfoWindow3DAdapter( MarkerShowEntity entity,
|
||||
Context context,
|
||||
MogoMarkerOptions options ) {
|
||||
this.mEntity = entity;
|
||||
this.mContext = context;
|
||||
this.mOptions = options;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getInfoWindow( IMogoMarker marker ) {
|
||||
IMarkerView creator = MapMarkerAdapter.getMarkerView( mContext, mEntity, mOptions );
|
||||
return creator.getView();
|
||||
}
|
||||
}
|
||||
BIN
modules/mogo-module-common/src/main/res/raw/taxi.n3d
Normal file
BIN
modules/mogo-module-common/src/main/res/raw/taxi.n3d
Normal file
Binary file not shown.
@@ -941,9 +941,11 @@ public class MogoServices implements IMogoMapListener,
|
||||
if ( ui == EnumMapUI.Type_VR ) {
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode( TAG, true );
|
||||
MapCenterPointStrategy.resetByChangeMode();
|
||||
MapMarkerManager.getInstance().redrawMarkerByStyleChanged();
|
||||
} else {
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode( TAG, false );
|
||||
MapCenterPointStrategy.resetByChangeMode();
|
||||
MapMarkerManager.getInstance().redrawMarkerByStyleChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -693,17 +693,21 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
// if ( !AppUtils.isAppForeground( mContext ) ) {
|
||||
// return;
|
||||
// }
|
||||
if ( mLastDataResult != null ) {
|
||||
runOnTargetThread( () -> {
|
||||
MarkerServiceHandler.getMarkerManager().removeMarkers( ModuleNames.CARD_TYPE_ROAD_CONDITION );
|
||||
drawMarkerByCurrentType( mLastDataResult );
|
||||
mLastCheckMarker = null;
|
||||
} );
|
||||
}
|
||||
redrawMarkerByStyleChanged();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void redrawMarkerByStyleChanged(){
|
||||
if ( mLastDataResult != null ) {
|
||||
runOnTargetThread( () -> {
|
||||
MarkerServiceHandler.getMarkerManager().removeMarkers( ModuleNames.CARD_TYPE_ROAD_CONDITION );
|
||||
drawMarkerByCurrentType( mLastDataResult );
|
||||
mLastCheckMarker = null;
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
public void onCloseCurrentSelectedMarker(){
|
||||
if ( mLastCheckMarker != null && !mLastCheckMarker.isDestroyed()) {
|
||||
closeMarker( mLastCheckMarker );
|
||||
|
||||
Reference in New Issue
Block a user