[Fix]修复小地图加载失败问题

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2021-11-15 20:02:20 +08:00
parent 8d29be3ba6
commit 26d92ba5d2
15 changed files with 273 additions and 383 deletions

View File

@@ -26,6 +26,7 @@ import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.call.map.CallerLocationUpdaterManager;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapStyleListenerManager;
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
import com.mogo.map.IMogoMap;
import com.mogo.map.IMogoMapView;
@@ -963,18 +964,18 @@ public class AMapViewWrapper implements IMogoMapView,
}
@Override
public void onChangeMapStyle(int i) {
public void onChangeMapStyle(int styleId) {
EnumMapUI last = mCurrentUI;
Logger.d(TAG, "currentMapStyle = %s", i);
Logger.d(TAG, "currentMapStyle = %s", styleId);
if (i == MapAutoApi.MAP_STYLE_DAY
|| i == MapAutoApi.MAP_STYLE_DAY_NAV) {
if (styleId == MapAutoApi.MAP_STYLE_DAY
|| styleId == MapAutoApi.MAP_STYLE_DAY_NAV) {
mCurrentUI = EnumMapUI.Type_Light;
} else if (i == MapAutoApi.MAP_STYLE_NIGHT
|| i == MapAutoApi.MAP_STYLE_NIGHT_NAV) {
} else if (styleId == MapAutoApi.MAP_STYLE_NIGHT
|| styleId == MapAutoApi.MAP_STYLE_NIGHT_NAV) {
mCurrentUI = EnumMapUI.Type_Night;
} else if (i == MapAutoApi.MAP_STYLE_VR) {
} else if (styleId == MapAutoApi.MAP_STYLE_VR) {
mCurrentUI = EnumMapUI.Type_VR;
// 进入vr模式的时候自动切换到车头朝上
change2CarUp();
@@ -998,6 +999,7 @@ public class AMapViewWrapper implements IMogoMapView,
try {
Logger.d(TAG, "currentUI = %s", mCurrentUI);
MogoMapListenerHandler.getInstance().onMapModeChanged(mCurrentUI);
CallerMapStyleListenerManager.INSTANCE.invokeMapStyleChange(styleId);
} catch (Exception e) {
e.printStackTrace();
}