[2.13.0-arch-opt] change the gradle files and map gradle config
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
package com.mogo.map;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.location.ALocationClient;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
@@ -13,12 +11,8 @@ import com.mogo.map.search.PoiSearchClient;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearch;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.search.traffic.IMogoTrafficSearch;
|
||||
import com.mogo.map.uicontroller.AMapUIController;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.zhidaoauto.map.sdk.open.HDTypes;
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi;
|
||||
import com.zhidaoauto.map.sdk.open.MapParams;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||
|
||||
/**
|
||||
@@ -90,11 +84,6 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
||||
return mapView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoTrafficSearch getTrafficSearch() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearch;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.search.traffic.IMogoTrafficSearch;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
|
||||
|
||||
@@ -58,8 +57,4 @@ class MogoMapDelegateFactory {
|
||||
return getApiBuilder().getMapView(context);
|
||||
}
|
||||
|
||||
public static IMogoTrafficSearch getTrafficSearch() {
|
||||
return getApiBuilder().getTrafficSearch();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.mogo.map;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.search.traffic.IMogoTrafficSearch;
|
||||
import com.mogo.map.search.traffic.IMogoTrafficSearchListener;
|
||||
|
||||
public class MogoTrafficSearch implements IMogoTrafficSearch {
|
||||
|
||||
private IMogoTrafficSearch mDelegate;
|
||||
|
||||
public MogoTrafficSearch() {
|
||||
mDelegate = MogoMapDelegateFactory.getTrafficSearch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void searchTrafficByRoad(String adCode, String roadName) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.searchTrafficByRoad(adCode, roadName);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void searchTrafficByCircleArea(MogoLatLng mogoLatLng, int radius) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.searchTrafficByCircleArea(mogoLatLng, radius);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerTrafficSearchListener(IMogoTrafficSearchListener listener) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.registerTrafficSearchListener(listener);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.constants.SharedPrefsConstants;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
|
||||
public class GDLocationClient implements AMapLocationListener,IMogoGDLocationClient {
|
||||
public class GDLocationClient implements AMapLocationListener, IMogoGDLocationClient {
|
||||
|
||||
private volatile static GDLocationClient gdLocationClient;
|
||||
private static final byte[] obj = new byte[0];
|
||||
@@ -27,8 +27,9 @@ public class GDLocationClient implements AMapLocationListener,IMogoGDLocationCli
|
||||
}
|
||||
|
||||
//声明LocationClient对象
|
||||
private AMapLocationClient mLocationClient;
|
||||
private AMapLocationClient mLocationClient;
|
||||
private String mCityCode;
|
||||
private AMapLocation mapLocation;
|
||||
|
||||
private GDLocationClient(Context context) {
|
||||
AMapLocationClient.updatePrivacyShow(context, true, true);
|
||||
@@ -69,6 +70,7 @@ public class GDLocationClient implements AMapLocationListener,IMogoGDLocationCli
|
||||
@Override
|
||||
public void onLocationChanged(AMapLocation aMapLocation) {
|
||||
if (aMapLocation != null) {
|
||||
mapLocation = aMapLocation;
|
||||
String cityCode = aMapLocation.getCityCode();
|
||||
if (cityCode != null && !cityCode.isEmpty()) {
|
||||
mCityCode = aMapLocation.getCityCode();
|
||||
@@ -82,4 +84,14 @@ public class GDLocationClient implements AMapLocationListener,IMogoGDLocationCli
|
||||
public String getLastCityCode() {
|
||||
return mCityCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLastLat() {
|
||||
return mapLocation != null ? mapLocation.getLatitude() : 0.0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLastLon() {
|
||||
return mapLocation != null ? mapLocation.getLongitude() : 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user