地图依赖重构
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package com.mogo.module.navi.bean;
|
||||
|
||||
import com.amap.api.maps.model.CameraPosition;
|
||||
import com.amap.api.services.geocoder.RegeocodeAddress;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.search.inputtips.MogoTip;
|
||||
import com.mogo.module.navi.constants.DataConstants;
|
||||
@@ -93,36 +91,6 @@ public class EntityConvertUtils {
|
||||
MogoTip.getTypeCode() );
|
||||
}
|
||||
|
||||
|
||||
//public static SearchPoi aMapLocation2Poi( AMapLocation location ) {
|
||||
// if ( location == null || location.getErrorCode() != AMapLocation.LOCATION_SUCCESS ) {
|
||||
// return null;
|
||||
// }
|
||||
// return new SearchPoi( System.currentTimeMillis() + "",
|
||||
// location.getPoiName(),
|
||||
// location.getAddress(),
|
||||
// location.getLatitude(),
|
||||
// location.getLongitude(),
|
||||
// location.getDistrict(),
|
||||
// location.getAdCode(),
|
||||
// location.getCoordType() );
|
||||
//}
|
||||
|
||||
public static SearchPoi geocodeAddress2Poi( RegeocodeAddress address, CameraPosition position ) {
|
||||
if ( address == null || position == null ) {
|
||||
return null;
|
||||
}
|
||||
return new SearchPoi( System.currentTimeMillis() + "",
|
||||
address.getFormatAddress(),
|
||||
address.getFormatAddress(),
|
||||
position.target.latitude,
|
||||
position.target.longitude,
|
||||
address.getDistrict(),
|
||||
address.getAdCode(),
|
||||
"" );
|
||||
}
|
||||
|
||||
|
||||
public static SearchPoi geoToPoi( double latitude, double longitude, int type ) {
|
||||
SearchPoi searchPoi = new SearchPoi( System.currentTimeMillis() + "",
|
||||
null,
|
||||
|
||||
@@ -5,7 +5,6 @@ import android.location.Location;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
|
||||
Reference in New Issue
Block a user