[dev_arch_opt_3.0]
[Change] [ 1、修改底盘数据Gnss回调为定位回调 2、增加WGS84转GCJ02高德坐标系方法 3、增加底盘数据转换为GCJ02坐标系后的回调 ] Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -2,13 +2,11 @@ package com.mogo.map;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.location.ALocationClient;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.uicontroller.AMapUIController;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -16,66 +14,40 @@ import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
@Route(path = MapApiPath.PATH)
|
||||
public class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
||||
public class CustomMapApiBuilder {
|
||||
|
||||
private static final String TAG = "CustomMapApiBuilder";
|
||||
|
||||
@Override
|
||||
private static CustomMapApiBuilder sApiBuilder;
|
||||
|
||||
private static CustomMapApiBuilder getApiBuilder() {
|
||||
if (sApiBuilder == null) {
|
||||
synchronized (CustomMapApiBuilder.class) {
|
||||
if (sApiBuilder == null) {
|
||||
CallerLogger.INSTANCE.d(TAG, "init");
|
||||
sApiBuilder = new CustomMapApiBuilder();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sApiBuilder;
|
||||
}
|
||||
|
||||
public IMogoLocationClient getLocationClient(Context context) {
|
||||
return new ALocationClient(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMapUIController getMapUIController() {
|
||||
return AMapUIController.getInstance();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IMogoMapView getMapView(Context context) {
|
||||
// MapParams mapParams = MapParams.Companion.init();
|
||||
// mapParams.setDebugMode(false)
|
||||
// //todo 1-使用本地地图数据,0-使用在线地图数据
|
||||
// //.setDataFileSource(1)
|
||||
// .setCoordinateType(MapParams.COORDINATETYPE_GCJ02)
|
||||
// .setPerspectiveMode(MapParams.MAP_PERSPECTIVE_3D)
|
||||
// .setHDVisibileArray(new int[]{HDTypes.DIVIDER.type,
|
||||
// HDTypes.ROAD_AREA.type,
|
||||
// HDTypes.STOP_LINE.type,
|
||||
// HDTypes.ARROW.type,
|
||||
// HDTypes.STATION_BRIDGE.type,
|
||||
// HDTypes.ZEBRA_LINE.type,
|
||||
// HDTypes.GREEN_BELT.type,
|
||||
// HDTypes.DIVERSION.type,
|
||||
// HDTypes.SAFE_ISLAND.type,
|
||||
// HDTypes.ALPHANUMERIC.type,
|
||||
// HDTypes.GUARDBAR.type,
|
||||
// HDTypes.TRAFFIC_DEVICE.type,
|
||||
// HDTypes.CABLE.type,
|
||||
// HDTypes.SIGNAL_LINE.type})
|
||||
// // .setZoom( 20 )
|
||||
// // .setPointToCenter( 0.734375f, 0.5f )
|
||||
// //todo 2D模式下需要注意ADAS部分遮挡
|
||||
// //.setPointToCenter(0.5f, 0.5f)
|
||||
// // 根据 FunctionBuildConfig 配置的皮肤样式设置题图的样式
|
||||
// .setStyleMode(FunctionBuildConfig.skinMode == 0 ? MapParams.MAP_STYLE_NIGHT_VR : MapParams.MAP_STYLE_DAY_VR);
|
||||
//
|
||||
// MapAutoApi.INSTANCE.init(context, mapParams);
|
||||
//
|
||||
MapAutoView mapAutoView = new MapAutoView(context);
|
||||
//mapAutoView.registerRenderListener(l -> Log.i(TAG, "renderTime: " + l));
|
||||
IMogoMapView mapView = new AMapViewWrapper(mapAutoView);
|
||||
return mapView;
|
||||
public static IMogoLocationClient getLocationClientDelegate(Context context) {
|
||||
return getApiBuilder().getLocationClient(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
|
||||
public static IMogoMapUIController getMapUIControllerDelegate() {
|
||||
return getApiBuilder().getMapUIController();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
CallerLogger.INSTANCE.d(TAG, "init");
|
||||
public static void destroy() {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user