This commit is contained in:
wangcongtao
2020-08-13 17:14:38 +08:00
parent 4e679994cd
commit d37664264e
3 changed files with 41 additions and 16 deletions

View File

@@ -522,6 +522,9 @@ public class AMapNaviViewWrapper implements IMogoMapView,
}
if ( checkAMapView() ) {
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
if ( style == null ) {
style = new MyLocationStyle();
}
style.showMyLocation( visible );
if ( visible ) {
// 强制刷新一遍车标
@@ -541,6 +544,9 @@ public class AMapNaviViewWrapper implements IMogoMapView,
}
if ( checkAMapView() ) {
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
if ( style == null ) {
style = new MyLocationStyle();
}
style.showMyLocation( true );
style.myLocationIcon( BitmapDescriptorFactory.fromView( view ) );
mMapView.getMap().setMyLocationStyle( style );