将小地图的初始化放到了小地图模块

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-09-22 14:48:49 +08:00
parent ef31c9ee89
commit ad528aaa47
3 changed files with 9 additions and 23 deletions

View File

@@ -21,13 +21,11 @@ import com.amap.api.maps.model.CustomMapStyleOptions;
import com.amap.api.navi.AMapNavi;
import com.amap.api.navi.AMapNaviView;
import com.amap.api.navi.AMapNaviViewOptions;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.smp.animation.DirectionRotateAnimation;
import com.mogo.eagle.core.function.smp.utils.MapAssetStyleUtils;
import com.mogo.eagle.core.function.smp.view.ISmallMapDirectionView;
import com.mogo.eagle.core.widget.RoundLayout;
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
import com.mogo.module.common.MogoApisHandler;
@@ -48,7 +46,6 @@ public class SmallMapDirectionView
//小地图名称
public static final String MODULE_NAME = "SmallMapDirectionView";
private RoundLayout rlSmallMapBorder;
private ImageView mIvMapBorder;
private DirectionRotateAnimation mRotateAnimation;
private int lastAngle = 0;
@@ -80,12 +77,10 @@ public class SmallMapDirectionView
LayoutInflater.from(context).inflate(R.layout.module_small_map_view, this);
mAMapNaviView = AbsMogoApplication.getMapNaviView();
rlSmallMapBorder = findViewById(R.id.rlSmallMapBorder);
rlSmallMapBorder.addView(mAMapNaviView);
mAMapNaviView = findViewById(R.id.aMapNaviView);
mAMapNaviView.onCreate(null);
mIvMapBorder = findViewById(R.id.ivMapBorder);
initAMapView();
// 注册定位监听

View File

@@ -20,14 +20,14 @@
app:roundLayoutRadius="360dp">
<!--TODO Hook方案在Pad上有问题,优先 效果,后面在看如何解决-->
<!-- <com.amap.api.navi.AMapNaviView
android:id="@+id/aMapNaviView"
android:layout_width="@dimen/module_small_map_view_width"
android:layout_height="@dimen/module_small_map_view_width" />-->
<!--<com.amap.api.maps.TextureMapView
<com.amap.api.navi.AMapNaviView
android:id="@+id/aMapNaviView"
android:layout_width="match_parent"
android:layout_height="match_parent" />-->
android:layout_height="match_parent" />
<!-- <com.amap.api.maps.TextureMapView
android:id="@+id/aMapNaviView"
android:layout_width="match_parent"
android:layout_height="match_parent" />-->
</com.mogo.eagle.core.widget.RoundLayout>
<ImageView