[Add function]增加外部设置自车模型的方法
CallerHDMapManager.changeCurrentIcon(R.raw.xiaobache) Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -7,6 +7,7 @@
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="1.8" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
||||
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
@@ -24,6 +24,7 @@
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_vr.xml" value="0.18996305418719212" />
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_vip_identification.xml" value="0.45" />
|
||||
<entry key="core/function-impl/mogo-core-function-map/src/main/res/layout/function_map_fragment_hd_map.xml" value="0.29322916666666665" />
|
||||
<entry key="core/mogo-core-network/src/main/res/layout/item_v2x_crossroad_live_video.xml" value="0.1984375" />
|
||||
<entry key="foudations/mogo-commons/src/main/res/layout/module_commons_layout_toast.xml" value="0.3117283950617284" />
|
||||
<entry key="modules/mogo-module-authorize/src/main/res/layout/module_authorize_fragment.xml" value="0.273046875" />
|
||||
<entry key="modules/mogo-module-carchatting/src/main/res/drawable/module_carchatting_vr_calling_bg.xml" value="0.231875" />
|
||||
|
||||
@@ -85,6 +85,17 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
tbChangeCurrentCarIcon.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
if (!isChecked) {
|
||||
// 替换为出租车图标
|
||||
CallerHDMapManager.changeCurrentIcon(R.raw.xiaobache)
|
||||
} else {
|
||||
// 替换为小巴车图标
|
||||
CallerHDMapManager.changeCurrentIcon(R.raw.xiaobache)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tbSpeedView.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setSpeedChartViewVisibility(View.VISIBLE)
|
||||
|
||||
@@ -41,6 +41,16 @@
|
||||
app:justifyContent="flex_start"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbChangeCurrentCarIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:textOff="修改自车为「小巴车」"
|
||||
android:textOn="修改自车为「出租车」"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbSpeedView"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.api.map.hd
|
||||
|
||||
import androidx.annotation.RawRes
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
|
||||
/**
|
||||
@@ -16,4 +17,10 @@ interface IMoGoMapFragmentProvider : IMoGoFunctionServerProvider {
|
||||
* MapAutoApi.CAR_CENTER_100 2/5
|
||||
*/
|
||||
fun changeMaoViewAngle(type: Int)
|
||||
|
||||
/**
|
||||
* 修改高精地图自车图标
|
||||
* 传入资源ID
|
||||
*/
|
||||
fun changeCurrentIcon(@RawRes iconId: Int)
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import androidx.annotation.RawRes
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
|
||||
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider
|
||||
@@ -25,4 +26,13 @@ object CallerHDMapManager : CallerBase() {
|
||||
fun changeMaoViewAngle(type: Int) {
|
||||
mapProviderApi.changeMaoViewAngle(type)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改高精地图自车图标
|
||||
* 传入资源ID
|
||||
*/
|
||||
fun changeCurrentIcon(@RawRes iconId: Int){
|
||||
mapProviderApi.changeCurrentIcon(iconId)
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/item_video_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/surface_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/start"
|
||||
android:layout_width="56px"
|
||||
android:layout_height="56px"
|
||||
android:visibility="gone"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center_vertical" />
|
||||
</RelativeLayout>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_ext_speed_width">460px</dimen>
|
||||
<dimen name="module_ext_speed_height">460px</dimen>
|
||||
|
||||
<dimen name="module_ext_speed_width_sm_radius">30px</dimen>
|
||||
<dimen name="module_ext_speed_width_big_radius">130px</dimen>
|
||||
|
||||
<dimen name="module_ext_arcView_top">40px</dimen>
|
||||
<dimen name="module_ext_arcView_width">320px</dimen>
|
||||
<dimen name="module_ext_arcView_height">320px</dimen>
|
||||
<dimen name="module_ext_arcView_stroke_with">20px</dimen>
|
||||
<dimen name="module_ext_arcView_center_text_size">110px</dimen>
|
||||
<dimen name="module_ext_arcView_des_text_size">40px</dimen>
|
||||
|
||||
<dimen name="module_mogo_autopilot_status_icon_width">74px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_icon_margin">92px</dimen>
|
||||
|
||||
<dimen name="module_mogo_autopilot_status_bg_width">460px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_bg_height">140px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_margin_left">40px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_margin_top">30px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_padding">92px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_text_size">44px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_text_margin_start">28px</dimen>
|
||||
|
||||
<dimen name="module_hmi_autopilot_status_bg_sm_radius">30px</dimen>
|
||||
<dimen name="module_hmi_autopilot_status_bg_big_radius">70px</dimen>
|
||||
|
||||
<dimen name="module_hmi_check_size">138px</dimen>
|
||||
<dimen name="module_hmi_check_left">368px</dimen>
|
||||
<dimen name="module_hmi_btn_size">60px</dimen>
|
||||
<dimen name="module_hmi_btn_text_size">44px</dimen>
|
||||
|
||||
|
||||
<dimen name="module_switch_map">280px</dimen>
|
||||
<dimen name="module_switch_map_height">120px</dimen>
|
||||
<dimen name="module_switch_margin_left">20px</dimen>
|
||||
<dimen name="module_switch_text_size">38px</dimen>
|
||||
<dimen name="module_switch_image">50px</dimen>
|
||||
<dimen name="module_switch_image_circle">60px</dimen>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_mogo_autopilot_status_enable">#FFFFFF</color>
|
||||
<color name="module_mogo_autopilot_status_disable">#4DFFFFFF</color>
|
||||
|
||||
<color name="module_switch_map_bg">#323C6F</color>
|
||||
|
||||
<color name="module_ext_color_voice_text">#FFFFFF</color>
|
||||
|
||||
</resources>
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_ext_speed_width">300px</dimen>
|
||||
<dimen name="module_ext_speed_height">300px</dimen>
|
||||
|
||||
<dimen name="module_ext_speed_width_sm_radius">20px</dimen>
|
||||
<dimen name="module_ext_speed_width_big_radius">110px</dimen>
|
||||
|
||||
<dimen name="module_ext_arcView_top">40px</dimen>
|
||||
<dimen name="module_ext_arcView_width">200px</dimen>
|
||||
<dimen name="module_ext_arcView_height">200px</dimen>
|
||||
<dimen name="module_ext_arcView_stroke_with">10px</dimen>
|
||||
<dimen name="module_ext_arcView_center_text_size">80px</dimen>
|
||||
<dimen name="module_ext_arcView_des_text_size">28px</dimen>
|
||||
|
||||
<dimen name="module_mogo_autopilot_status_icon_width">46px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_icon_margin">60px</dimen>
|
||||
|
||||
<dimen name="module_mogo_autopilot_status_bg_width">300px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_bg_height">100px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_margin_left">40px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_margin_top">30px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_padding">20px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_text_size">30px</dimen>
|
||||
<dimen name="module_mogo_autopilot_status_text_margin_start">18px</dimen>
|
||||
|
||||
<dimen name="module_hmi_autopilot_status_bg_sm_radius">20px</dimen>
|
||||
<dimen name="module_hmi_autopilot_status_bg_big_radius">50px</dimen>
|
||||
|
||||
<dimen name="module_hmi_check_size">138px</dimen>
|
||||
<dimen name="module_hmi_check_left">368px</dimen>
|
||||
<dimen name="module_hmi_btn_size">38px</dimen>
|
||||
<dimen name="module_hmi_btn_text_size">33px</dimen>
|
||||
|
||||
|
||||
<dimen name="module_switch_map">190px</dimen>
|
||||
<dimen name="module_switch_map_height">76px</dimen>
|
||||
<dimen name="module_switch_margin_left">16px</dimen>
|
||||
<dimen name="module_switch_text_size">24px</dimen>
|
||||
<dimen name="module_switch_image">35px</dimen>
|
||||
<dimen name="module_switch_image_circle">38px</dimen>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="VideoView_info_text_video_not_supported">"不支持该视频。"</string>
|
||||
<string name="file_not_support">此文件不支持播放</string>
|
||||
|
||||
|
||||
<string name="module_map_model_normal">近距视角</string>
|
||||
<string name="module_map_model_faster">远距视角</string>
|
||||
</resources>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<declare-styleable name="RoundLayout">
|
||||
<attr name="roundLayoutRadius" format="dimension" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="CustomCircleImageView">
|
||||
<attr name="civ_border_width" format="dimension" />
|
||||
<attr name="civ_border_color" format="color" />
|
||||
<attr name="civ_border_overlay" format="boolean" />
|
||||
<attr name="civ_fill_color" format="color" />
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
</resources>
|
||||
Binary file not shown.
Binary file not shown.
@@ -727,6 +727,13 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCurrentIcon(int iconId) {
|
||||
if (checkAMapView()) {
|
||||
mMapView.getMapAutoViewHelper().getMyLocationStyle().myLocationIcon(iconId, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTileId(double lon, double lat) {
|
||||
return getMap().getUIController().getTileId(lon, lat);
|
||||
@@ -875,8 +882,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
@Override
|
||||
public void onMapLoaded() {
|
||||
Logger.i(TAG, "autoop--onMapLoaded: ");
|
||||
// TODO 这里只有小巴车才会替换自车模型
|
||||
//MapAutoApi.INSTANCE.getMyLocationStyle().myLocationIcon(R.raw.selfbus, true); //修改自车模型,未来需区分车的类型
|
||||
mMapView.getMapAutoViewHelper().setRenderFrequency(true, 50);
|
||||
MogoMapListenerHandler.getInstance().onMapLoaded();
|
||||
mMapLoaded = true;
|
||||
|
||||
@@ -301,6 +301,13 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCurrentIcon(int iconId) {
|
||||
if (mClient != null) {
|
||||
mClient.changeCurrentIcon(iconId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTileId(double lon, double lat) {
|
||||
return MapAutoApi.INSTANCE.getTileID(lon, lat, 13); // 13为默认获取瓦片层级级别
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.view.View;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RawRes;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
@@ -245,6 +246,12 @@ public interface IMogoMapUIController {
|
||||
*/
|
||||
void changeMapViewAngle(int type);
|
||||
|
||||
/**
|
||||
* 修改高精地图自车图标
|
||||
* 传入资源ID
|
||||
*/
|
||||
void changeCurrentIcon(@RawRes int iconId);
|
||||
|
||||
/**
|
||||
* 获取瓦片id
|
||||
*
|
||||
|
||||
@@ -345,6 +345,14 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCurrentIcon(int iconId) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.changeCurrentIcon(iconId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTileId(double lon, double lat) {
|
||||
return mDelegate.getTileId(lon, lat);
|
||||
|
||||
@@ -216,4 +216,9 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter >
|
||||
public void changeMaoViewAngle(int type) {
|
||||
mMogoMapView.getMap().getUIController().changeMapViewAngle(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCurrentIcon(int iconId) {
|
||||
mMogoMapView.getMap().getUIController().changeCurrentIcon(iconId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
package com.mogo.module.map;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.service.module.IMogoModuleLifecycle;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.module.ModuleType;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
@Route( path = MogoModulePaths.PATH_MODULE_MAP )
|
||||
public class MapFragmentProvider implements IMogoModuleProvider {
|
||||
|
||||
@Override
|
||||
public Fragment createFragment( Context context, Bundle data ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return MogoModulePaths.PATH_MODULE_MAP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return ModuleType.TYPE_MAP;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View createView( Context context ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoModuleLifecycle getCardLifecycle() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMapListener getMapListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoNaviListener getNaviListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoLocationListener getLocationListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMarkerClickListener getMarkerClickListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAppPackage() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAppName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user