httpdns change

This commit is contained in:
zhongchao
2022-08-17 14:29:10 +08:00
parent e7637c9540
commit 617b342910
3 changed files with 35 additions and 21 deletions

View File

@@ -643,6 +643,7 @@ public class AMapViewWrapper implements IMogoMapView,
/**
* 设置转向灯和刹车灯
*
* @param type :车尾灯类型 time: 闪烁时间 最小500ms 小于500ms 默认为500ms
* @param time
*/
@@ -748,9 +749,11 @@ public class AMapViewWrapper implements IMogoMapView,
sysLocation.setSpeed(location.getSpeed());
// 将有效经纬度暂存本地提供给下一次的Http-DNS使用防止首次请求位置获取不到
if (location.getLat() > 0) {
SharedPrefsMgr.getInstance(mMapView.getContext())
.putString(SharedPrefsConstants.LOCATION_CITY_CODE, location.getCityCode());
if (location.getLat() > 0 && location.getLon() > 0) {
if (location.getCityCode() != null && !location.getCityCode().isEmpty()) {
SharedPrefsMgr.getInstance(mMapView.getContext())
.putString(SharedPrefsConstants.LOCATION_CITY_CODE, location.getCityCode());
}
SharedPrefsMgr.getInstance(mMapView.getContext())
.putString(SharedPrefsConstants.LOCATION_LATITUDE, String.valueOf(location.getLat()));
SharedPrefsMgr.getInstance(mMapView.getContext())
@@ -1000,7 +1003,7 @@ public class AMapViewWrapper implements IMogoMapView,
bean.setAcceleration(gnssInfo.getAcceleration());
bean.setAlt(gnssInfo.getAltitude());
bean.setSystemTime(Double.valueOf(gnssInfo.getSystemTime()).longValue());
bean.setSatelliteTime(Double.valueOf(gnssInfo.getSatelliteTime()*1000).longValue());
bean.setSatelliteTime(Double.valueOf(gnssInfo.getSatelliteTime() * 1000).longValue());
bean.setLon(gnssInfo.getLongitude());
bean.setLat(gnssInfo.getLatitude());
bean.setGnss_speed(((float) gnssInfo.getGnssSpeed()));
@@ -1053,7 +1056,7 @@ public class AMapViewWrapper implements IMogoMapView,
}
@Override
public Double getRoadAngle(Double lon,Double lat,float angle) {
public Double getRoadAngle(Double lon, Double lat, float angle) {
return MapDataApi.INSTANCE.getRoadRectInfo(lon, lat, angle).getAngle();
}