Merge remote-tracking branch 'origin/feature/v1.0.0' into feature/v1.0.0
# Conflicts: # app/src/main/java/com/mogo/launcher/MogoApplication.java
2
.idea/misc.xml
generated
@@ -5,7 +5,7 @@
|
||||
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
||||
</configurations>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -61,6 +61,8 @@ dependencies {
|
||||
|
||||
// implementation rootProject.ext.dependencies.moduledemo
|
||||
// implementation rootProject.ext.dependencies.moduledemo2
|
||||
implementation rootProject.ext.dependencies.modulechatting
|
||||
|
||||
|
||||
implementation rootProject.ext.dependencies.moduleonlinecar
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.mogo.launcher;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith( AndroidJUnit4.class )
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
|
||||
assertEquals( "com.mogo.launcher", appContext.getPackageName() );
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import android.content.Context;
|
||||
import androidx.multidex.MultiDex;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.carchatting.CallChatConstant;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.onlinecar.OnLineCarConstants;
|
||||
@@ -23,9 +25,10 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
super.onCreate();
|
||||
// MogoModulePaths.addModule( new MogoModule( DemoConstants.TAG, "CARD_DEMO" ) );
|
||||
// MogoModulePaths.addModule( new MogoModule( Demo2Constants.TAG, "CARD_DEMO2" ) );
|
||||
MogoModulePaths.addModule(new MogoModule(OnLineCarConstants.TAG, "CARD_TYPE_ROAD_ONLINECAR"));
|
||||
DebugConfig.setNetMode( DebugConfig.NET_MODE_QA );
|
||||
MogoModulePaths.addModule( new MogoModule( TanluConstants.TAG, "CARD_TYPE_ROAD_CODITION" ) );
|
||||
|
||||
MogoModulePaths.addModule(new MogoModule( CallChatConstant.PROVIDER, CallChatConstant.MODULE_NAME));
|
||||
MogoModulePaths.addModule(new MogoModule(OnLineCarConstants.TAG, "CARD_TYPE_ROAD_ONLINECAR"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.mogo.launcher;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals( 4, 2 + 2 );
|
||||
}
|
||||
}
|
||||
@@ -94,6 +94,7 @@ ext {
|
||||
moduleapps : "com.mogo.module:module-apps:${MOGO_MODULE_APPS_VERSION}",
|
||||
mogoconnection : "com.mogo.connection:mogo-connection:${MOGO_CONNECTION_VERSION}",
|
||||
moduleextensions : "com.mogo.module:module-extensions:${MOGO_MODULE_EXTENSIONS_VERSION}",
|
||||
modulechatting : "com.mogo.module.carchatting:module-carchatting:${CARCHATTING_VERSION}",
|
||||
moduleonlinecar : "com.mogo.module:module-onlinecar:${MOGO_MODULE_ONLINECAR_VERSION}",
|
||||
|
||||
// 长链
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.mogo.commons.mvp;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* mvp fragment
|
||||
*/
|
||||
public abstract class MvpDialogFragment< V extends IView, P extends Presenter< V > > extends DialogFragment implements IView {
|
||||
|
||||
private Context mContext;
|
||||
protected P mPresenter;
|
||||
protected View mRootView;
|
||||
|
||||
@Override
|
||||
public void onAttach( Context context ) {
|
||||
super.onAttach( context );
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView( @NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState ) {
|
||||
if ( mRootView == null ) {
|
||||
mRootView = inflater.inflate( getLayoutId(), container, false );
|
||||
} else {
|
||||
ViewGroup viewGroup = ( ViewGroup ) mRootView.getParent();
|
||||
if ( viewGroup != null )
|
||||
viewGroup.removeView( mRootView );
|
||||
}
|
||||
return mRootView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated( @NonNull View view, @Nullable Bundle savedInstanceState ) {
|
||||
super.onViewCreated( view, savedInstanceState );
|
||||
}
|
||||
|
||||
/**
|
||||
* 布局资源
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected abstract int getLayoutId();
|
||||
|
||||
@Override
|
||||
public void onActivityCreated( @Nullable Bundle savedInstanceState ) {
|
||||
super.onActivityCreated( savedInstanceState );
|
||||
initViews();
|
||||
mPresenter = createPresenter();
|
||||
getViewLifecycleOwner().getLifecycle().addObserver( mPresenter );
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化控件,必须在初始化完成之后才可以实例化presenter,避免
|
||||
* presenter 生命周期错乱
|
||||
*/
|
||||
protected abstract void initViews();
|
||||
|
||||
/**
|
||||
* 创建 presenter 实例
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@NonNull
|
||||
protected abstract P createPresenter();
|
||||
|
||||
@Nullable
|
||||
protected < T extends View > T findViewById( int id ) {
|
||||
if ( mRootView != null ) {
|
||||
return ( T ) mRootView.findViewById( id );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Context getContext() {
|
||||
if ( mContext == null ) {
|
||||
mContext = super.getContext();
|
||||
}
|
||||
return mContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if ( mPresenter != null ) {
|
||||
getViewLifecycleOwner().getLifecycle().removeObserver( mPresenter );
|
||||
}
|
||||
mPresenter = null;
|
||||
mRootView = null;
|
||||
mContext = null;
|
||||
}
|
||||
}
|
||||
@@ -44,5 +44,6 @@ MOGO_CONNECTION_VERSION=1.0.0-SNAPSHOT
|
||||
MOGO_MODULE_NAVI_VERSION=1.0.0-SNAPSHOT
|
||||
MOGO_MODULE_SERVICE_VERSION=1.0.0-SNAPSHOT
|
||||
MOGO_MODULE_EXTENSIONS_VERSION=1.0.0-SNAPSHOT
|
||||
CARCHATTING_VERSION=1.0.0-SNAPSHOT
|
||||
MOGO_MODULE_ONLINECAR_VERSION=1.0.0-SNAPSHOT
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
// 设置是否开启自动黑夜模式切换,默认为false,不自动切换
|
||||
options.setAutoNaviViewNightMode( false );
|
||||
// 设置6秒后是否自动锁车
|
||||
options.setAutoLockCar( true );
|
||||
options.setAutoLockCar( false );
|
||||
// 设置路线上的摄像头气泡是否显示
|
||||
options.setCameraBubbleShow( true );
|
||||
// 设置路线相关的配置属性,如:路线的路况颜色,路线上是否显示摄像头气泡等。
|
||||
@@ -80,6 +80,8 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
options.setCarBitmap( BitmapFactory.decodeResource( getContext().getResources(), R.drawable.ic_amap_navi_cursor ) );
|
||||
// 设置指南针图标否在导航界面显示,默认显示。true,显示;false,隐藏。
|
||||
options.setCompassEnabled( false );
|
||||
// 黑夜模式
|
||||
options.setNaviNight( true );
|
||||
//设置路况光柱条是否显示(只适用于驾车导航,需要联网)。
|
||||
options.setTrafficBarEnabled( false );
|
||||
// 设置[实时交通图层开关按钮]是否显示(只适用于驾车导航,需要联网)。
|
||||
@@ -391,8 +393,8 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
|
||||
@Override
|
||||
public void moveToCenter( MogoLatLng latLng ) {
|
||||
if ( latLng == null ) {
|
||||
Logger.e( TAG, "latlng = null" );
|
||||
if ( latLng == null || latLng.lat == 0.0d || latLng.lng == 0.0d ) {
|
||||
Logger.e( TAG, "latlng = null or is illegal" );
|
||||
return;
|
||||
}
|
||||
mMapView.getMap().animateCamera( CameraUpdateFactory.newLatLng( new LatLng( latLng.lat, latLng.lng ) ) );
|
||||
|
||||
@@ -109,7 +109,7 @@ public class NaviListenerAdapter extends AMapNaviListenerAdapter {
|
||||
|
||||
@Override
|
||||
public void onNaviInfoUpdate( NaviInfo naviInfo ) {
|
||||
MogoNaviListenerHandler.getInstance().onNaviInfoUpdate( ObjectUtils.fromAMap( naviInfo ) );
|
||||
MogoNaviListenerHandler.getInstance().onNaviInfoUpdate( ObjectUtils.fromAMap( mContext, naviInfo ) );
|
||||
mNaviOverlayHelper.handleNaviInfoUpdate( naviInfo );
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.mogo.map.impl.amap.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.SparseArray;
|
||||
|
||||
import com.amap.api.navi.enums.IconType;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-09-29
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class IconTypeUtils {
|
||||
|
||||
private static SparseArray< String > sIconName = new SparseArray<>();
|
||||
|
||||
static {
|
||||
sIconName.put( IconType.ARRIVED_DESTINATION, "到达目的地" );
|
||||
sIconName.put( IconType.ARRIVED_SERVICE_AREA, "到达服务区" );
|
||||
sIconName.put( IconType.ARRIVED_TOLLGATE, "到达收费站" );
|
||||
sIconName.put( IconType.ARRIVED_TUNNEL, "到达隧道" );
|
||||
sIconName.put( IconType.ARRIVED_WAYPOINT, "到达途经点" );
|
||||
sIconName.put( IconType.BRIDGE, "通过桥" );
|
||||
sIconName.put( IconType.BY_ELEVATOR, "电梯换层" );
|
||||
sIconName.put( IconType.BY_ESCALATOR, "扶梯换层" );
|
||||
sIconName.put( IconType.BY_STAIR, "楼梯换层" );
|
||||
sIconName.put( IconType.CABLEWAY, "通过索道" );
|
||||
sIconName.put( IconType.CHANNEL, "通过通道" );
|
||||
sIconName.put( IconType.CROSSWALK, "通过人行横道" );
|
||||
sIconName.put( IconType.CRUISE_ROUTE, "通过游船路线" );
|
||||
sIconName.put( IconType.DEFAULT, "自车" );
|
||||
sIconName.put( IconType.ENTER_BUILDING, "进入建筑物" );
|
||||
sIconName.put( IconType.ENTER_ROUNDABOUT, "进入环岛" );
|
||||
sIconName.put( IconType.ENTRY_LEFT_RING, "进入环岛" );
|
||||
sIconName.put( IconType.ENTRY_LEFT_RING_CONTINUE, "绕环岛直行" );
|
||||
sIconName.put( IconType.ENTRY_LEFT_RING_LEFT, "绕环岛左转" );
|
||||
sIconName.put( IconType.ENTRY_LEFT_RING_RIGHT, "绕环岛右转" );
|
||||
sIconName.put( IconType.ENTRY_LEFTRINGU_TURN, "绕环岛调头" );
|
||||
sIconName.put( IconType.ENTRY_RING_CONTINUE, "绕环岛直行" );
|
||||
sIconName.put( IconType.ENTRY_RING_LEFT, "绕环岛左转" );
|
||||
sIconName.put( IconType.ENTRY_RING_RIGHT, "绕环岛右转" );
|
||||
sIconName.put( IconType.ENTRY_RING_UTURN, "绕环岛调头" );
|
||||
sIconName.put( IconType.FERRY, "通过轮渡" );
|
||||
sIconName.put( IconType.LADDER, "通过阶梯" );
|
||||
sIconName.put( IconType.LEAVE_BUILDING, "离开建筑物" );
|
||||
sIconName.put( IconType.LEAVE_LEFT_RING, "驶出环岛" );
|
||||
sIconName.put( IconType.LEFT, "左转" );
|
||||
sIconName.put( IconType.LEFT_BACK, "左后" );
|
||||
sIconName.put( IconType.LEFT_FRONT, "左前方" );
|
||||
sIconName.put( IconType.LEFT_TURN_AROUND, "左转掉头" );
|
||||
sIconName.put( IconType.LIFT, "通过直梯" );
|
||||
sIconName.put( IconType.LOW_CROSS, "通过普通路口" );
|
||||
sIconName.put( IconType.LOW_TRAFFIC_CROSS, "红绿灯路口" );
|
||||
sIconName.put( IconType.NONE, "无定义" );
|
||||
sIconName.put( IconType.OUT_ROUNDABOUT, "驶出环岛" );
|
||||
sIconName.put( IconType.OVERPASS, "通过过街天桥" );
|
||||
sIconName.put( IconType.PARK, "通过公园" );
|
||||
sIconName.put( IconType.RIGHT, "右转" );
|
||||
sIconName.put( IconType.RIGHT_BACK, "右后方" );
|
||||
sIconName.put( IconType.RIGHT_FRONT, "右前方" );
|
||||
sIconName.put( IconType.SIGHTSEEING_BUSLINE, "通过观光车路线" );
|
||||
sIconName.put( IconType.SKY_CHANNEL, "通过空中通道" );
|
||||
sIconName.put( IconType.SLIDEWAY, "通过滑道" );
|
||||
sIconName.put( IconType.SLOPE, "通过斜坡" );
|
||||
sIconName.put( IconType.SPECIAL_CONTINUE, "顺行" );
|
||||
sIconName.put( IconType.SQUARE, "通过广场" );
|
||||
sIconName.put( IconType.STAIRCASE, "通过扶梯" );
|
||||
sIconName.put( IconType.STRAIGHT, "直行" );
|
||||
sIconName.put( IconType.SUBWAY, "通过地铁通道" );
|
||||
sIconName.put( IconType.U_TURN_RIGHT, "右转掉头" );
|
||||
sIconName.put( IconType.UNDERPASS, "通过地下通道" );
|
||||
sIconName.put( IconType.WALK_ROAD, "通过行人道路" );
|
||||
}
|
||||
|
||||
private static int lastIconType = 0;
|
||||
private static int lastIconResId = 0;
|
||||
|
||||
public static String getNameByIconType( int iconType ) {
|
||||
return sIconName.get( iconType );
|
||||
}
|
||||
|
||||
public static int getResIdByIconType( Context context, int iconType ) {
|
||||
try {
|
||||
if ( iconType == lastIconType ) {
|
||||
return lastIconResId;
|
||||
}
|
||||
int target = context.getResources().getIdentifier( "ic_" + iconType, "drawable", context.getPackageName() );
|
||||
lastIconType = iconType;
|
||||
lastIconResId = target;
|
||||
return target;
|
||||
} catch ( Exception e ) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.map.impl.amap.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.view.View;
|
||||
|
||||
@@ -622,7 +623,7 @@ public class ObjectUtils {
|
||||
return mogoPoiResult;
|
||||
}
|
||||
|
||||
public static MogoNaviInfo fromAMap( NaviInfo naviInfo ) {
|
||||
public static MogoNaviInfo fromAMap( Context context, NaviInfo naviInfo ) {
|
||||
if ( naviInfo == null ) {
|
||||
return null;
|
||||
}
|
||||
@@ -631,7 +632,7 @@ public class ObjectUtils {
|
||||
mogoNaviInfo.setCurrentSpeed( naviInfo.getCurrentSpeed() );
|
||||
mogoNaviInfo.setCurStepRetainDistance( naviInfo.getCurStepRetainDistance() );
|
||||
mogoNaviInfo.setCurStepRetainTime( naviInfo.getCurStepRetainTime() );
|
||||
mogoNaviInfo.setIconType( naviInfo.getIconType() );
|
||||
mogoNaviInfo.setIconResId( IconTypeUtils.getResIdByIconType( context, naviInfo.getIconType() ) );
|
||||
mogoNaviInfo.setNextRoadName( naviInfo.getNextRoadName() );
|
||||
mogoNaviInfo.setPathRetainDistance( naviInfo.getPathRetainDistance() );
|
||||
mogoNaviInfo.setPathRetainTime( naviInfo.getPathRetainTime() );
|
||||
|
||||
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_1.png
Executable file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_10.png
Executable file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_11.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_12.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_13.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_14.png
Executable file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_15.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_16.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_17.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_18.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_19.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_2.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_20.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_21.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_22.png
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_23.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_24.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_25.png
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_26.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_27.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_28.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_3.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_4.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_5.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_50.png
Executable file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_51.png
Executable file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_52.png
Executable file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_53.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_54.png
Executable file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_55.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_56.png
Executable file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_57.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_58.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_59.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_6.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_60.png
Executable file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_61.png
Executable file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_62.png
Executable file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_63.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_64.png
Executable file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_65.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_66.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_67.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_68.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_69.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_7.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_8.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/ic_9.png
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_10.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_11.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_12.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_13.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_14.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_15.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_16.png
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_17.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_20.png
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_21.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_22.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_23.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_24.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_25.png
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_26.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_27.png
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_28.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_30.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_31.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_32.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_33.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_34.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_35.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_36.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_37.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_38.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_39.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_40.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_41.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_42.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_43.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_44.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_68.png
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_84.png
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
libraries/map-amap/src/main/res/drawable-xhdpi/tc_85.png
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
@@ -48,4 +48,11 @@ public interface IMogoMarkerManager {
|
||||
* @return
|
||||
*/
|
||||
List< IMogoMarker > getMarkers( String tag );
|
||||
|
||||
/**
|
||||
* 仅保留指定类型的tag
|
||||
*
|
||||
* @param tag 需要保留的类型
|
||||
*/
|
||||
void removeMarkersExcept( String tag );
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.map.marker;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.listener.IMogoMapListenerRegister;
|
||||
|
||||
@@ -112,4 +114,23 @@ public class MogoMarkersHandler implements IMogoMarkerClickListener, IMogoMarker
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tag 需要保留的类型
|
||||
*/
|
||||
public void deleteAllExcept( String tag ) {
|
||||
if ( TextUtils.isEmpty( tag ) ) {
|
||||
return;
|
||||
}
|
||||
List< IMogoMarker > mogoMarkerList = mServicesMarkers.remove( tag );
|
||||
for ( List< IMogoMarker > value : mServicesMarkers.values() ) {
|
||||
if ( value != null && !value.isEmpty() ) {
|
||||
for ( IMogoMarker mogoMarker : value ) {
|
||||
mogoMarker.destroy();
|
||||
}
|
||||
value.clear();
|
||||
}
|
||||
}
|
||||
mServicesMarkers.put( tag, mogoMarkerList );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mogo.map.navi;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-25
|
||||
@@ -32,9 +34,10 @@ public class MogoNaviInfo implements Parcelable {
|
||||
private int curStepRetainTime;
|
||||
|
||||
/**
|
||||
* 导航转向图标
|
||||
* 导航转向图标资源ID
|
||||
*/
|
||||
private int iconType;
|
||||
@DrawableRes
|
||||
private int iconResId;
|
||||
|
||||
/**
|
||||
* 下条路名
|
||||
@@ -83,12 +86,12 @@ public class MogoNaviInfo implements Parcelable {
|
||||
this.curStepRetainTime = curStepRetainTime;
|
||||
}
|
||||
|
||||
public int getIconType() {
|
||||
return iconType;
|
||||
public int getIconResId() {
|
||||
return iconResId;
|
||||
}
|
||||
|
||||
public void setIconType( int iconType ) {
|
||||
this.iconType = iconType;
|
||||
public void setIconResId( int iconResId ) {
|
||||
this.iconResId = iconResId;
|
||||
}
|
||||
|
||||
public String getNextRoadName() {
|
||||
@@ -126,7 +129,7 @@ public class MogoNaviInfo implements Parcelable {
|
||||
dest.writeInt( this.currentSpeed );
|
||||
dest.writeInt( this.curStepRetainDistance );
|
||||
dest.writeInt( this.curStepRetainTime );
|
||||
dest.writeInt( this.iconType );
|
||||
dest.writeInt( this.iconResId );
|
||||
dest.writeString( this.nextRoadName );
|
||||
dest.writeInt( this.pathRetainTime );
|
||||
dest.writeInt( this.pathRetainDistance );
|
||||
@@ -140,7 +143,7 @@ public class MogoNaviInfo implements Parcelable {
|
||||
this.currentSpeed = in.readInt();
|
||||
this.curStepRetainDistance = in.readInt();
|
||||
this.curStepRetainTime = in.readInt();
|
||||
this.iconType = in.readInt();
|
||||
this.iconResId = in.readInt();
|
||||
this.nextRoadName = in.readString();
|
||||
this.pathRetainTime = in.readInt();
|
||||
this.pathRetainDistance = in.readInt();
|
||||
|
||||
@@ -76,4 +76,9 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
public List< IMogoMarker > getMarkers( String tag ) {
|
||||
return MogoMarkersHandler.getInstance().getMarkers( tag );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeMarkersExcept( String tag ) {
|
||||
MogoMarkersHandler.getInstance().deleteAllExcept( tag );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,11 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||