opt
This commit is contained in:
@@ -23,6 +23,7 @@ import com.mogo.map.model.MogoPoi;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.navi.MogoTraffic;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
@@ -41,6 +42,7 @@ import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.windowview.IMogoWindowManager;
|
||||
import com.mogo.utils.TipToast;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
@@ -67,6 +69,10 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
private NaviInfoView mNaviInfo;
|
||||
private TextView mExitNavi;
|
||||
|
||||
private View mSpeedLimit;
|
||||
private TextView mSpeedLimitValue;
|
||||
private View mSpeedLimitUnit;
|
||||
|
||||
private IMogoMapService mService;
|
||||
private IMogoMapUIController mMApUIController;
|
||||
private IMogoLocationClient mMogoLocationClient;
|
||||
@@ -91,7 +97,7 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
@Override
|
||||
protected void initViews() {
|
||||
mMogoFragmentManager = ( IMogoFragmentManager ) ARouter.getInstance().build( MogoServicePaths.PATH_FRAGMENT_MANAGER ).navigation();
|
||||
mMogoAddressManager = (IMogoAddressManager) ARouter.getInstance().build( MogoServicePaths.PATH_ADDRESS_MANAGER ).navigation();
|
||||
mMogoAddressManager = ( IMogoAddressManager ) ARouter.getInstance().build( MogoServicePaths.PATH_ADDRESS_MANAGER ).navigation();
|
||||
mCommonAddress = findViewById( R.id.module_entrance_id_common_address );
|
||||
|
||||
mSearch = findViewById( R.id.module_entrance_id_search );
|
||||
@@ -135,7 +141,7 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
mExitNavi.setOnClickListener( view -> {
|
||||
if ( mMogoNavi != null ) {
|
||||
if ( mIsLock ) {
|
||||
NaviNoticeDialog naviNoticeDialog = new NaviNoticeDialog(getContext());
|
||||
NaviNoticeDialog naviNoticeDialog = new NaviNoticeDialog( getContext() );
|
||||
naviNoticeDialog.show();
|
||||
} else {
|
||||
mMApUIController.recoverLockMode();
|
||||
@@ -143,6 +149,10 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
}
|
||||
} );
|
||||
|
||||
mSpeedLimit = findViewById( R.id.module_entrance_id_speed_limit_container );
|
||||
mSpeedLimitValue = findViewById( R.id.module_entrance_id_speed_limit_value );
|
||||
mSpeedLimitUnit = findViewById( R.id.module_entrance_id_speed_limit_unit );
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -188,9 +198,9 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
mCommonAddress.setVisibility( View.GONE );
|
||||
mNaviInfo.setVisibility( View.VISIBLE );
|
||||
mExitNavi.setVisibility( View.VISIBLE );
|
||||
AnalyticsUtils.track("Navigation_guide_type", new HashMap<>());
|
||||
AnalyticsUtils.track( "Navigation_guide_type", new HashMap<>() );
|
||||
|
||||
mMApUIController.setPointToCenter(0.675926, 0.77552);
|
||||
mMApUIController.setPointToCenter( 0.675926, 0.77552 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -198,9 +208,10 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
mCommonAddress.setVisibility( View.VISIBLE );
|
||||
mNaviInfo.setVisibility( View.GONE );
|
||||
mExitNavi.setVisibility( View.GONE );
|
||||
AnalyticsUtils.track("Navigation_guide_type", new HashMap<>());
|
||||
mSpeedLimit.setVisibility( View.GONE );
|
||||
AnalyticsUtils.track( "Navigation_guide_type", new HashMap<>() );
|
||||
|
||||
mMApUIController.setPointToCenter(0.66145, 0.590688);
|
||||
mMApUIController.setPointToCenter( 0.66145, 0.590688 );
|
||||
|
||||
}
|
||||
|
||||
@@ -212,6 +223,20 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
public void onoCalculateFailed() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateTraffic( MogoTraffic traffic ) {
|
||||
if ( traffic == null ) {
|
||||
return;
|
||||
}
|
||||
if ( traffic.getSpeedLimit() <= 0 ) {
|
||||
mSpeedLimit.setVisibility( View.INVISIBLE );
|
||||
mSpeedLimitValue.setText( "--" );
|
||||
} else {
|
||||
mSpeedLimit.setVisibility( View.VISIBLE );
|
||||
mSpeedLimitValue.setText( String.valueOf( traffic.getSpeedLimit() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapLoaded() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user