diff --git a/libraries/map-custom/build.gradle b/libraries/map-custom/build.gradle index e09d37dd0f..8bf9bfe3fc 100644 --- a/libraries/map-custom/build.gradle +++ b/libraries/map-custom/build.gradle @@ -55,7 +55,7 @@ dependencies { implementation project(':foudations:mogo-commons') } - implementation 'com.zhidaoauto.machine:map:1.0.0-online-8' + implementation 'com.zhidaoauto.machine:map:1.0.0-online-9' } apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index cf91e3a699..98f4faf9ec 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -1,6 +1,7 @@ package com.mogo.map.impl.custom; import android.content.Context; +import android.graphics.BitmapFactory; import android.graphics.Point; import android.graphics.Rect; import android.location.Location; @@ -38,6 +39,7 @@ import com.zhidaoauto.map.sdk.open.camera.CameraUpdateFactory; import com.zhidaoauto.map.sdk.open.camera.LatLngBounds; import com.zhidaoauto.map.sdk.open.location.LocationListener; import com.zhidaoauto.map.sdk.open.location.MyLocationStyle; +import com.zhidaoauto.map.sdk.open.marker.BitmapDescriptorFactory; import com.zhidaoauto.map.sdk.open.marker.Marker; import com.zhidaoauto.map.sdk.open.marker.OnMarkClickListener; import com.zhidaoauto.map.sdk.open.query.LonLatPoint; @@ -94,7 +96,7 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca // 设置路线相关的配置属性,如:路线的路况颜色,路线上是否显示摄像头气泡等。 // options.setRouteOverlayOptions( MapStyleUtils.getRouteOverlayOptions() ); // 设置自车的图片对象 -// options.setCarBitmap( BitmapFactory.decodeResource( getContext().getResources(), DEFAULT_OPTION.getNaviCursorRes() ) ); + options.setMyLocationStyle( options.getMyLocationStyle().myLocationIcon(DEFAULT_OPTION.getCarCursorRes())); // 设置指南针图标否在导航界面显示,默认显示。true,显示;false,隐藏。 options.hiddenDirection(); // 黑夜模式 @@ -377,6 +379,7 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca @Override public void showMyLocation(View view) { + Logger.d(TAG, "showMyLocation %s", "view"); if (NaviClient.getInstance(getContext()).isNaviing()) { return; } @@ -385,7 +388,7 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca } if (checkAMapView()) { MyLocationStyle style = mMapView.getMapAutoViewHelper().getMyLocationStyle(); -// style.myLocationIcon( BitmapDescriptorFactory.fromView( view ) ); + style.myLocationIcon( BitmapDescriptorFactory.INSTANCE.convertViewToBitmap( view ) ); mMapView.getMapAutoViewHelper().setMyLocationStyle(style); } } diff --git a/libraries/map-custom/src/main/res/drawable-ldpi/map_api_ic_current_location2.png b/libraries/map-custom/src/main/res/drawable-ldpi/map_api_ic_current_location2.png new file mode 100644 index 0000000000..5f91be07f3 Binary files /dev/null and b/libraries/map-custom/src/main/res/drawable-ldpi/map_api_ic_current_location2.png differ diff --git a/libraries/map-custom/src/main/res/drawable-mdpi/map_api_ic_current_location2.png b/libraries/map-custom/src/main/res/drawable-mdpi/map_api_ic_current_location2.png new file mode 100644 index 0000000000..5f91be07f3 Binary files /dev/null and b/libraries/map-custom/src/main/res/drawable-mdpi/map_api_ic_current_location2.png differ diff --git a/libraries/map-custom/src/main/res/drawable-xhdpi/map_api_ic_current_location2.png b/libraries/map-custom/src/main/res/drawable-xhdpi/map_api_ic_current_location2.png new file mode 100644 index 0000000000..5f91be07f3 Binary files /dev/null and b/libraries/map-custom/src/main/res/drawable-xhdpi/map_api_ic_current_location2.png differ