diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java index 5e83b5b196..1926fa72c6 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java @@ -29,6 +29,7 @@ import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager; import com.mogo.eagle.core.function.overview.Infrastructure; import com.mogo.eagle.core.function.overview.ViewModelExtKt; import com.mogo.eagle.core.function.overview.vm.OverViewModel; +import com.mogo.eagle.core.function.smp.AMapCustomView; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.map.IMogoMap; import com.mogo.map.IMogoUiSettings; @@ -62,8 +63,7 @@ public class MapFragment extends MvpFragment private MogoMapView mMogoMapView; private IMogoMap mMogoMap; - private TextureMapView mNaviMapView; - private AMap mAMap; + private AMapCustomView mAMapCustomView; // 每个GeoHash网格对应的新基建Bean private Map> infMap = new HashMap(); // 全局路径规划中的GeoHash网格 @@ -111,8 +111,7 @@ public class MapFragment extends MvpFragment if (mMogoMap != null) { mMogoMap.getUIController().showMyLocation(true); } - mNaviMapView = findViewById(R.id.module_gaode_id_map); - mAMap = mNaviMapView.getMap(); + mAMapCustomView = findViewById(R.id.module_gaode_id_map); // 添加换肤监听 CallerSkinModeListenerManager.INSTANCE.addListener(TAG, this); CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, this); @@ -399,23 +398,6 @@ public class MapFragment extends MvpFragment markerOptionsList.add(markerOption); } } - mAMap.addMarkers(markerOptionsList, false); - mAMap.setOnMarkerClickListener(marker -> { - Infrastructure infrastructure = posInfMap.get(marker.getPosition()); - // 如果是摄像头 - if (0 == infrastructure.getCategory() && infrastructure.getIp() != null) { - CallerMonitorManager.INSTANCE.openCameraStream(infrastructure.getIp(), - flvUrl -> { - - return null; - }, throwable -> { - - return null; - }); - return true; - } - return false; - }); } } diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java index b69405e105..3767918f08 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java @@ -44,6 +44,7 @@ import com.amap.api.navi.model.NaviInfo; import com.amap.api.navi.model.NaviLatLng; import com.amap.api.navi.model.RouteOverlayOptions; import com.autonavi.tbt.TrafficFacilityInfo; +import com.elegant.utils.UiThreadHandler; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.data.map.MogoLocation; @@ -70,7 +71,6 @@ import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; /** - * 小地图的方向View * 监听自动驾驶路径结束,结束高德地图导航 * * @author donghongyu @@ -141,7 +141,7 @@ public class AMapCustomView customOptions(); } - private void setUpMap(){ + private void setUpMap() { // 地图文字标注 mAMap.showMapText(true); // 显示实时路况图层,aMap是地图控制器对象。 @@ -599,8 +599,9 @@ public class AMapCustomView Log.d(TAG, "onCalculateRouteSuccess aMapCalcRouteResult" + aMapCalcRouteResult.toString()); //提测修改为EMULATOR mAMapNavi.startNavi(NaviType.GPS); - mAMapNaviView.displayOverview(); - + UiThreadHandler.postDelayed(() -> { + mAMapNaviView.displayOverview(); + }, 20000); //停止导航测试代码 // UiThreadHandler.postDelayed(() -> { // mAMapNavi.stopNavi(); diff --git a/core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml b/core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml index 710445abdd..3cbe53d174 100644 --- a/core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml +++ b/core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml @@ -7,13 +7,14 @@ + android:layout_height="match_parent" + android:visibility="gone"/> - \ No newline at end of file