diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java index 7ee58cb4ac..84e5755729 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java @@ -9,6 +9,8 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.alibaba.android.arouter.facade.annotation.Route; +import com.amap.api.maps.AMap; +import com.amap.api.maps.TextureMapView; import com.mogo.commons.mvp.MvpFragment; import com.mogo.eagle.core.data.constants.MoGoFragmentPaths; import com.mogo.eagle.core.data.map.CenterLine; @@ -39,6 +41,8 @@ public class MapFragment extends MvpFragment private MogoMapView mMogoMapView; private IMogoMap mMogoMap; + private TextureMapView mNaviMapView; + private AMap mAMap; private final boolean mIsControllerByOthersStatus = false; @@ -81,6 +85,8 @@ public class MapFragment extends MvpFragment if (mMogoMap != null) { mMogoMap.getUIController().showMyLocation(true); } + mNaviMapView = findViewById(R.id.module_gaode_id_map); + mAMap = mNaviMapView.getMap(); // 添加换肤监听 CallerSkinModeListenerManager.INSTANCE.addListener(TAG, this); } diff --git a/core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml b/core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml index 30ae83c338..710445abdd 100644 --- a/core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml +++ b/core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml @@ -9,4 +9,11 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> + + \ No newline at end of file