diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/MogoLatLng.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/MogoLatLng.java index 8c47532497..951c21a907 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/MogoLatLng.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/MogoLatLng.java @@ -14,13 +14,10 @@ import java.util.Objects; public class MogoLatLng implements Parcelable { public final double lat; - @Deprecated - public final double lng; public final double lon; public MogoLatLng( double lat, double lon ) { this.lat = lat; - this.lng = lon; this.lon = lon; } @@ -28,16 +25,6 @@ public class MogoLatLng implements Parcelable { return lat; } - /** - * Deprecated, use {@link #getLon()} instead. - * - * @return - */ - @Deprecated - public double getLng() { - return lng; - } - public double getLon() { return lon; } @@ -53,7 +40,7 @@ public class MogoLatLng implements Parcelable { @Override public int hashCode() { - return Objects.hash( lat, lng, lon ); + return Objects.hash( lat, lon ); } @Override @@ -72,13 +59,11 @@ public class MogoLatLng implements Parcelable { @Override public void writeToParcel( Parcel dest, int flags ) { dest.writeDouble( this.lat ); - dest.writeDouble( this.lng ); dest.writeDouble( this.lon ); } protected MogoLatLng( Parcel in ) { this.lat = in.readDouble(); - this.lng = in.readDouble(); this.lon = in.readDouble(); } diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index 376bd68a9a..1949915969 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -436,7 +436,7 @@ public class AMapViewWrapper implements IMogoMapView, @Override public void moveToCenter(MogoLatLng latLng, boolean animate) { Logger.d(TAG, "move to center %s", latLng); - if (latLng == null || latLng.lat == 0.0d || latLng.lng == 0.0d) { + if (latLng == null || latLng.lat == 0.0d || latLng.lon == 0.0d) { Logger.e(TAG, "latlng = null or is illegal"); return; } diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/MogoMapUtils.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/MogoMapUtils.java index a6e709160c..a818446f4f 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/MogoMapUtils.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/MogoMapUtils.java @@ -53,24 +53,24 @@ public class MogoMapUtils { if ( latLngBounds.getNortheast() == null ) { dLat = Math.abs( carPosition.lat - latLngBounds.getSouthwest().getLatitude() ); - dLon = Math.abs( carPosition.lng - latLngBounds.getSouthwest().getLongitude() ); + dLon = Math.abs( carPosition.lon - latLngBounds.getSouthwest().getLongitude() ); } else if ( latLngBounds.getSouthwest() == null ) { dLat = Math.abs( carPosition.lat - latLngBounds.getNortheast().getLatitude() ); - dLon = Math.abs( carPosition.lng - latLngBounds.getNortheast().getLongitude() ); + dLon = Math.abs( carPosition.lon - latLngBounds.getNortheast().getLongitude() ); } else { final double dLat1 = Math.abs( carPosition.lat - latLngBounds.getSouthwest().getLatitude() ); - final double dLon1 = Math.abs( carPosition.lng - latLngBounds.getSouthwest().getLongitude() ); + final double dLon1 = Math.abs( carPosition.lon - latLngBounds.getSouthwest().getLongitude() ); final double dLat2 = Math.abs( carPosition.lat - latLngBounds.getNortheast().getLatitude() ); - final double dLon2 = Math.abs( carPosition.lng - latLngBounds.getNortheast().getLongitude() ); + final double dLon2 = Math.abs( carPosition.lon - latLngBounds.getNortheast().getLongitude() ); dLat = dLat1 > dLat2 ? dLat1 : dLat2; dLon = dLon1 > dLon2 ? dLon1 : dLon2; } west = carPosition.lat - dLat; - south = carPosition.lng + dLon; + south = carPosition.lon + dLon; east = carPosition.lat + dLat; - north = carPosition.lng - dLon; + north = carPosition.lon - dLon; if ( south == 0.0 || west == 0.0 || east == 0.0 || north == 0.0 ) { return null; diff --git a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/bean/EntityConvertUtils.java b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/bean/EntityConvertUtils.java index 67e79545d7..13a0e1bd28 100644 --- a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/bean/EntityConvertUtils.java +++ b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/bean/EntityConvertUtils.java @@ -79,7 +79,7 @@ public class EntityConvertUtils { double lng = 0.0; if ( MogoTip.getPoint() != null ) { lat = MogoTip.getPoint().getLat(); - lng = MogoTip.getPoint().getLng(); + lng = MogoTip.getPoint().getLon(); } return new SearchPoi( MogoTip.getPoiID(), MogoTip.getName(), diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java index 3e220c7e9f..e8a1953100 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java @@ -509,7 +509,7 @@ public class MogoServices implements IMogoMapListener, */ private float getMapCameraFactWidth() { try { - return Utils.calculateLineDistance( mCameraNorthEastPosition, new MogoLatLng( mCameraNorthEastPosition.lat, mCameraSouthWestPosition.lng ) ); + return Utils.calculateLineDistance( mCameraNorthEastPosition, new MogoLatLng( mCameraNorthEastPosition.lat, mCameraSouthWestPosition.lon ) ); } catch ( Exception e ) { return ServiceConst.DEFAULT_AUTO_REFRESH_DATA_RADIUS; } @@ -520,7 +520,7 @@ public class MogoServices implements IMogoMapListener, */ private float getMapCameraFactHeight() { try { - return Utils.calculateLineDistance( mCameraSouthWestPosition, new MogoLatLng( mCameraNorthEastPosition.lat, mCameraSouthWestPosition.lng ) ); + return Utils.calculateLineDistance( mCameraSouthWestPosition, new MogoLatLng( mCameraNorthEastPosition.lat, mCameraSouthWestPosition.lon ) ); } catch ( Exception e ) { return ServiceConst.DEFAULT_AUTO_REFRESH_DATA_RADIUS; } diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java index 161ab53eb6..0ad608281c 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java @@ -47,7 +47,7 @@ public class RefreshModel { final Map< String, Object > query = new ParamsProvider.Builder( mContext ).build(); final RefreshBody refreshBody = new RefreshBody(); refreshBody.limit = limit; - refreshBody.location = new RefreshBody.LatLon( latLng.lat, latLng.lng ); + refreshBody.location = new RefreshBody.LatLon( latLng.lat, latLng.lon ); refreshBody.radius = radius; refreshBody.viewPush = true; refreshBody.dataType.add( ServiceConst.CARD_TYPE_ROAD_CONDITION ); @@ -93,7 +93,7 @@ public class RefreshModel { final Map< String, Object > query = new ParamsProvider.Builder( mContext ).build(); final RefreshBody refreshBody = new RefreshBody(); refreshBody.limit = limit; - refreshBody.location = new RefreshBody.LatLon( latLng.lat, latLng.lng ); + refreshBody.location = new RefreshBody.LatLon( latLng.lat, latLng.lon ); refreshBody.radius = radius; refreshBody.dataType.add( ServiceConst.CARD_TYPE_ROAD_CONDITION ); refreshBody.dataType.add( ServiceConst.CARD_TYPE_USER_DATA ); @@ -157,7 +157,7 @@ public class RefreshModel { refreshBody.limit = limit; } refreshBody.radius = radius; - refreshBody.location = new RefreshBody.LatLon( latLng.lat, latLng.lng ); + refreshBody.location = new RefreshBody.LatLon( latLng.lat, latLng.lon ); refreshBody.onlyFocus = onlyFocus; refreshBody.onlySameCity = onlySameCity; refreshBody.onlyRealUser = onlyRealUser; diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java b/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java index 178d489cf8..c5f888c3df 100644 --- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java +++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java @@ -180,7 +180,7 @@ public class TanluManager implements IMogoMarkerClickListener, lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude(); } else { Logger.d(TAG, "其他 ---1----"); - longit = latLon.lng; + longit = latLon.lon; lat = latLon.lat; } Logger.d(TAG, "geoSearch keywords =" + mKeywords + ">>longitude= " + longit + "--latitude= " + lat); @@ -546,7 +546,7 @@ public class TanluManager implements IMogoMarkerClickListener, lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude(); } else { Logger.d(TAG, "其他 -onPoiSearched---1----"); - longit = latLon.lng; + longit = latLon.lon; lat = latLon.lat; } // getVoiceControlRoadData(mKeywords, lat, longit);