diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java
index 24f557de14..0a05343782 100644
--- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java
+++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java
@@ -522,7 +522,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
if ( checkAMapView() ) {
- MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
+ MyLocationStyle style = getMyLocationStyle();
if ( style == null ) {
style = new MyLocationStyle();
}
@@ -544,7 +544,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
if ( checkAMapView() ) {
- MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
+ MyLocationStyle style = getMyLocationStyle();
if ( style == null ) {
style = new MyLocationStyle();
}
@@ -557,7 +557,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
public void initMyLocation() {
if ( checkAMapView() ) {
mMapView.getMap().setMyLocationEnabled( true );
- MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
+ MyLocationStyle style = getMyLocationStyle();
style.myLocationType( MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER );
style.interval( 1000 );
style.anchor( 0.5F, 0.5F );
@@ -864,7 +864,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
if ( mMapView.getMap() == null ) {
return;
}
- MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
+ MyLocationStyle style = getMyLocationStyle();
if ( mCarCursorOption.getCarCursorBmp() != null && !mCarCursorOption.getCarCursorBmp().isRecycled() ) {
style.myLocationIcon( BitmapDescriptorFactory.fromBitmap( mCarCursorOption.getCarCursorBmp() ) );
} else {
@@ -877,6 +877,20 @@ public class AMapNaviViewWrapper implements IMogoMapView,
mMapView.getMap().setMyLocationStyle( style );
}
+ private MyLocationStyle getMyLocationStyle() {
+ MyLocationStyle style = null;
+ try {
+ style = mMapView.getMap().getMyLocationStyle();
+ } catch ( Exception e ) {
+ style = new MyLocationStyle();
+ } finally {
+ if ( style == null ) {
+ style = new MyLocationStyle();
+ }
+ return style;
+ }
+ }
+
@Override
public MapCameraPosition getMapCameraPosition() {
if ( checkAMapView() ) {
diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapViewWrapper.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapViewWrapper.java
index 7b6e72ea7a..2c70ee3345 100644
--- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapViewWrapper.java
+++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapViewWrapper.java
@@ -465,10 +465,16 @@ public class AMapViewWrapper implements IMogoMapView,
}
private MyLocationStyle getMyLocationStyle() {
+ MyLocationStyle style = null;
try {
- return mMapView.getMap().getMyLocationStyle();
+ style = mMapView.getMap().getMyLocationStyle();
} catch ( Exception e ) {
- return new MyLocationStyle();
+ style = new MyLocationStyle();
+ } finally {
+ if ( style == null ) {
+ style = new MyLocationStyle();
+ }
+ return style;
}
}
@@ -790,7 +796,7 @@ public class AMapViewWrapper implements IMogoMapView,
if ( mMapView.getMap() == null ) {
return;
}
- MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
+ MyLocationStyle style = getMyLocationStyle();
if ( mCarCursorOption.getCarCursorBmp() != null && !mCarCursorOption.getCarCursorBmp().isRecycled() ) {
style.myLocationIcon( BitmapDescriptorFactory.fromBitmap( mCarCursorOption.getCarCursorBmp() ) );
} else {
diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java
index d4f71eb6a0..679e008277 100644
--- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java
+++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java
@@ -82,8 +82,8 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
mMogoMarkerOptions = null;
}
if ( mMarker != null ) {
- mMarker.remove();
mMarker.setObject( null );
+ mMarker.remove();
mMarker = null;
}
if ( mMovingPointOverlay != null ) {
diff --git a/main-extensions/mogo-module-main-independent/src/main/java/com/zhidao/mogo/module/main/independent/MainIndependentActivity.java b/main-extensions/mogo-module-main-independent/src/main/java/com/zhidao/mogo/module/main/independent/MainIndependentActivity.java
index 6cb5363e2d..f3ae390679 100644
--- a/main-extensions/mogo-module-main-independent/src/main/java/com/zhidao/mogo/module/main/independent/MainIndependentActivity.java
+++ b/main-extensions/mogo-module-main-independent/src/main/java/com/zhidao/mogo/module/main/independent/MainIndependentActivity.java
@@ -46,9 +46,6 @@ public class MainIndependentActivity extends MainActivity {
@Override
protected void onResume() {
super.onResume();
- if ( mCoverUpLayout.getVisibility() != View.VISIBLE ) {
- mServiceApis.getAdasControllerApi().setUseAlgorithm( true );
- }
if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
fixInMultiWindowMode();
}
@@ -65,7 +62,6 @@ public class MainIndependentActivity extends MainActivity {
@Override
protected void onPause() {
super.onPause();
- mServiceApis.getAdasControllerApi().setUseAlgorithm( true );
}
@Override
diff --git a/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_share_item.xml b/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_share_item.xml
index edcc11341e..e85015dc28 100644
--- a/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_share_item.xml
+++ b/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_share_item.xml
@@ -31,9 +31,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
- android:gravity="left"
- android:paddingRight="@dimen/dp_24"
- android:paddingLeft="@dimen/dp_24"
+ android:paddingRight="@dimen/dp_28"
android:text="100"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_34" />
@@ -54,9 +52,8 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_toLeftOf="@id/road_case_useless"
- android:gravity="center"
- android:paddingRight="@dimen/dp_24"
- android:paddingLeft="@dimen/dp_24"
+ android:gravity="left"
+ android:paddingRight="@dimen/dp_28"
android:text="100"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_34" />
diff --git a/modules/mogo-module-v2x/src/main/res/values-mdpi/dimens.xml b/modules/mogo-module-v2x/src/main/res/values-mdpi/dimens.xml
index c9ce0a563d..2d45b0b58f 100644
--- a/modules/mogo-module-v2x/src/main/res/values-mdpi/dimens.xml
+++ b/modules/mogo-module-v2x/src/main/res/values-mdpi/dimens.xml
@@ -56,7 +56,7 @@
20px
16px
17px
- 15.4px
+ 14px
82px
16px
117px