diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/utils/MogoMapUtils.java b/libraries/mogo-map/src/main/java/com/mogo/map/utils/MogoMapUtils.java index 781117ec0d..3bbfe4c4d0 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/utils/MogoMapUtils.java +++ b/libraries/mogo-map/src/main/java/com/mogo/map/utils/MogoMapUtils.java @@ -1,6 +1,8 @@ package com.mogo.map.utils; import com.mogo.eagle.core.data.map.MogoLatLng; +import com.mogo.eagle.core.utilcode.util.StringUtils; +import com.mogo.map.R; import com.mogo.map.exception.MogoMapException; import com.zhidaoauto.map.data.point.LonLatPoint; import com.zhidaoauto.map.sdk.open.logics.camera.LatLngBounds; @@ -18,7 +20,8 @@ public class MogoMapUtils { public static LatLngBounds getLatLngBounds(MogoLatLng carPosition, List< MogoLatLng > lonLats, boolean lockCarPosition ) throws Exception { if ( lonLats == null || lonLats.isEmpty() ) { - throw new MogoMapException( "经纬度不能为null或空集合" ); +// throw new MogoMapException( "经纬度不能为null或空集合" ); + throw new MogoMapException(StringUtils.getString(R.string.module_map_lon_lat_not_null)); } LatLngBounds.Builder builder = new LatLngBounds.Builder(); for ( MogoLatLng lonLat : lonLats ) { @@ -33,7 +36,8 @@ public class MogoMapUtils { } if ( carPosition == null ) { - throw new MogoMapException( "自车位置经纬度信息不能为空" ); +// throw new MogoMapException( "自车位置经纬度信息不能为空" ); + throw new MogoMapException(StringUtils.getString(R.string.module_map_car_position_not_null)); } if ( latLngBounds.getNortheast() == null && latLngBounds.getSouthwest() == null ) { diff --git a/libraries/mogo-map/src/main/res/values/strings.xml b/libraries/mogo-map/src/main/res/values/strings.xml index 27e89c2880..4a914b420a 100644 --- a/libraries/mogo-map/src/main/res/values/strings.xml +++ b/libraries/mogo-map/src/main/res/values/strings.xml @@ -1,3 +1,5 @@ mogo-map + 经纬度不能为null或空集合 + 自车位置经纬度信息不能为空