diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java index f19e9ec7d0..b1323b85e1 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java @@ -39,7 +39,6 @@ import com.mogo.och.bus.passenger.constant.BusPassengerConst; import com.mogo.och.bus.passenger.network.BusPassengerModelLoopManager; import com.mogo.och.bus.passenger.network.BusPassengerServiceCallback; import com.mogo.och.bus.passenger.network.BusPassengerServiceManager; -import com.mogo.och.bus.passenger.utils.BusThreadPoolManager; import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil; import com.mogo.service.intent.IMogoIntentListener; import com.mogo.service.statusmanager.IMogoStatusChangedListener; diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiNaviFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiNaviFragment.java index 4038351737..8899f882a0 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiNaviFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiNaviFragment.java @@ -81,8 +81,8 @@ public class TaxiNaviFragment extends BaseTaxiUIFragment implements AMapNaviView aMap.setCustomMapStyle( new CustomMapStyleOptions() .setEnable(true) - .setStyleData(MapAssetStyleUtils.getAssetsStyle(getContext(), "small_map_style.data")) - .setStyleExtraData(MapAssetStyleUtils.getAssetsExtraStyle(getContext(), "small_map_style_extra.data")) + .setStyleData(MapAssetStyleUtils.getAssetsStyle(getContext())) + .setStyleExtraData(MapAssetStyleUtils.getAssetsExtraStyle(getContext())) ); //设置希望展示的地图缩放级别 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 7046a7c476..c60023e735 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 @@ -12,6 +12,7 @@ import android.view.View; import android.widget.RelativeLayout; import android.widget.TextView; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.amap.api.maps.AMap; @@ -77,6 +78,7 @@ import java.util.Map; import ch.hsr.geohash.GeoHash; import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; +import system_master.SystemStatusInfo; /** * 小地图的方向View @@ -201,7 +203,7 @@ public class AMapCustomView // options.setTilt((int) tilt); //自车车标 options.setCarBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.module_small_map_view_my_location_logo)); - options.setFourCornersBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.amap_custom_corner)); +// options.setFourCornersBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.amap_custom_corner)); options.setStartPointBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.module_small_map_view_dir_start)); options.setWayPointBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.icon_module_small_map_four_corners)); options.setEndPointBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.module_small_map_view_dir_end)); @@ -210,17 +212,22 @@ public class AMapCustomView //路线纹理自定义 RouteOverlayOptions routeOverlayOptions = new RouteOverlayOptions(); routeOverlayOptions.setTurnArrowIs3D(false); - routeOverlayOptions.setUnknownTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.custtexture_no));//未知路段 - routeOverlayOptions.setSmoothTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.amap_custom_smooth_route)); - routeOverlayOptions.setJamTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.custtexture_bad));//拥堵路段 - routeOverlayOptions.setVeryJamTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.custtexture_grayred));//超级拥堵路段 - routeOverlayOptions.setPassRoute(BitmapFactory.decodeResource(getResources(), R.drawable.amap_custom_pass_route));//走过的路段 +// routeOverlayOptions.setUnknownTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.custtexture_no));//未知路段 +// routeOverlayOptions.setSmoothTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.amap_custom_smooth_route)); +// routeOverlayOptions.setJamTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.custtexture_bad));//拥堵路段 +// routeOverlayOptions.setVeryJamTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.custtexture_grayred));//超级拥堵路段 +// routeOverlayOptions.setPassRoute(BitmapFactory.decodeResource(getResources(), R.drawable.amap_custom_pass_route));//走过的路段 options.setRouteOverlayOptions(routeOverlayOptions); mAMapNaviView.setViewOptions(options); } private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener() { + @Override + public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) { + + } + @Override public void onAutopilotIpcConnectStatusChanged(int status, @org.jetbrains.annotations.Nullable String reason) { @@ -330,72 +337,6 @@ public class AMapCustomView CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(TAG); } - private void initAMapView(Context context) { - mCameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel); - AMapNaviViewOptions options = mAMapNaviView.getViewOptions(); - //关闭自动绘制路线,自行绘制路线 -// options.setAutoDrawRoute(false); - //不显示导航界面 - options.setLayoutVisible(false); - //黑夜模式 - options.setNaviNight(true); - //导航全程光柱 - options.setTrafficBarEnabled(false); - //指南针 -// options.setCompassEnabled(false); - options.setTilt((int) tilt); - //自车车标 - options.setCarBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.module_small_map_view_my_location_logo)); - options.setFourCornersBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.amap_custom_corner)); - options.setStartPointBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.module_small_map_view_dir_start)); - options.setWayPointBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.icon_module_small_map_four_corners)); - options.setEndPointBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.module_small_map_view_dir_end)); - //与走过的路线 - options.setAfterRouteAutoGray(true); - //路线纹理自定义 - RouteOverlayOptions routeOverlayOptions = new RouteOverlayOptions(); - routeOverlayOptions.setTurnArrowIs3D(false); - routeOverlayOptions.setUnknownTraffic(BitmapFactory.decodeResource(getResources(),R.drawable.custtexture_no));//未知路段 - routeOverlayOptions.setSmoothTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.amap_custom_smooth_route)); - routeOverlayOptions.setJamTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.custtexture_bad));//拥堵路段 - routeOverlayOptions.setVeryJamTraffic(BitmapFactory.decodeResource(getResources(), R.drawable.custtexture_grayred));//超级拥堵路段 - routeOverlayOptions.setPassRoute(BitmapFactory.decodeResource(getResources(), R.drawable.custtexture_slow));//走过的路段 - options.setRouteOverlayOptions(routeOverlayOptions); - mAMapNaviView.setViewOptions(options); - - mAMap = mAMapNaviView.getMap(); - // 地图文字标注 - mAMap.showMapText(true); - // 显示实时路况图层,aMap是地图控制器对象。 - mAMap.setTrafficEnabled(true); - //设置希望展示的地图缩放级别 - mAMap.moveCamera(mCameraUpdate); - //设置地图的样式 - UiSettings uiSettings = mAMap.getUiSettings(); - //地图缩放级别的交换按钮 - uiSettings.setZoomControlsEnabled(false); - //所有手势 - uiSettings.setAllGesturesEnabled(true); - //隐藏指南针 - uiSettings.setCompassEnabled(false); - //设置倾斜手势是否可用。 - uiSettings.setTiltGesturesEnabled(true); - //隐藏默认的定位按钮 - uiSettings.setMyLocationButtonEnabled(false); - //设置Logo下边界距离屏幕底部的边距,设置为负值即可 - uiSettings.setLogoBottomMargin(-150); - int strategy = 0; - try { - //再次强调,最后一个参数为true时代表多路径,否则代表单路径 - strategy = mAMapNavi.strategyConvert(true, false, false, false, false); - } catch (Exception e) { - e.printStackTrace(); - } - //指定路径绘制导航路线 - mAMapNavi.calculateDriveRoute(sList, eList, mWayPointList, strategy); - } - - @Override public boolean onInterceptTouchEvent(MotionEvent ev) { return false; @@ -750,8 +691,8 @@ public class AMapCustomView // 加载自定义样式 CustomMapStyleOptions customMapStyleOptions = new CustomMapStyleOptions() .setEnable(true) - .setStyleData(MapAssetStyleUtils.getAssetsStyle(getContext(), "over_view_style.data")) - .setStyleExtraData(MapAssetStyleUtils.getAssetsExtraStyle(getContext(), "over_view_style_extra.data")); + .setStyleData(MapAssetStyleUtils.getAssetsStyle(getContext())) + .setStyleExtraData(MapAssetStyleUtils.getAssetsExtraStyle(getContext())); // 设置自定义样式 mAMap.setCustomMapStyle(customMapStyleOptions); } diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/CarOverlay.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/CarOverlay.java index abcfcad111..ef5d6f8834 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/CarOverlay.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/CarOverlay.java @@ -65,9 +65,9 @@ public class CarOverlay { public CarOverlay(Context context, TextureMapView mapView) { this.mapView = mapView; - fourCornersDescriptor = BitmapDescriptorFactory.fromBitmap(BitmapFactory - .decodeResource(context.getResources(), - R.drawable.module_small_map_navi_direction)); +// fourCornersDescriptor = BitmapDescriptorFactory.fromBitmap(BitmapFactory +// .decodeResource(context.getResources(), +// R.drawable.module_small_map_navi_direction)); carDescriptor = BitmapDescriptorFactory.fromBitmap(BitmapFactory .decodeResource(context.getResources(), @@ -154,7 +154,7 @@ public class CarOverlay { carMarker.setVisible(true); newAngle = bearing; IPoint resultGeoPnt = IPoint.obtain(); - resultGeoPnt = NaviUtil.lonlat2Geo(mLatLng.latitude, mLatLng.longitude, 20); +// resultGeoPnt = NaviUtil.lonlat2Geo(mLatLng.latitude, mLatLng.longitude, 20); updateCarPosition(resultGeoPnt); resultGeoPnt.recycle();