[3.4.0-map-sdk] wait to finish

This commit is contained in:
zhongchao
2023-08-25 10:16:15 +08:00
parent db342e0bfc
commit 7865da2347
40 changed files with 404 additions and 648 deletions

View File

@@ -11,7 +11,11 @@ import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.zhidaoauto.map.sdk.open.HDTypes;
import com.zhidaoauto.map.sdk.open.MapParams;
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
import com.zhidaoauto.map.sdk.open.view.MapStyleParams;
/**
@@ -39,9 +43,39 @@ public class MogoMapView extends MogoBaseMapView implements ILifeCycle {
private MapAutoView mapAutoView;
@Override
protected void addMapView(Context context) {
protected void addMapView(Context context, AttributeSet attrs) {
if (mapAutoView == null) {
mapAutoView = new MapAutoView(context);
if (getStyleParams() == null) {
mapAutoView = new MapAutoView(context, attrs);
} else {
mapAutoView = new MapAutoView(context, getStyleParams());
}
}
//基础统一配置,如果各个样式地图有修改,此处需要改动
if (mapAutoView.getMapStyleParams() != null) {
mapAutoView.getMapStyleParams()
.setIsWeatherEnable(false)
.setPerspectiveMode(MapParams.MAP_PERSPECTIVE_UP_CAR)
.setHDVisibileArray(new int[]{HDTypes.DIVIDER.getType(), //onSurfaceCreate设置
HDTypes.ROAD_AREA.getType(),
HDTypes.STOP_LINE.getType(),
HDTypes.ARROW.getType(),
HDTypes.STATION_BRIDGE.getType(),
HDTypes.ZEBRA_LINE.getType(),
HDTypes.GREEN_BELT.getType(),
HDTypes.DIVERSION.getType(),
HDTypes.SAFE_ISLAND.getType(),
HDTypes.ALPHANUMERIC.getType(),
HDTypes.GUARDBAR.getType(),
HDTypes.TRAFFIC_DEVICE.getType(),
HDTypes.CABLE.getType(),
HDTypes.SIGNAL_LINE.getType(),
HDTypes.building.getType(),
HDTypes.streetLight.getType(),
HDTypes.area.getType(),
HDTypes.regional.getType(),
HDTypes.geometricLinear.getType(),
HDTypes.geometricSurface.getType()});
}
if (mMapView == null) {
mMapView = new AMapViewWrapper(mapAutoView);
@@ -54,6 +88,20 @@ public class MogoMapView extends MogoBaseMapView implements ILifeCycle {
}
}
/**
* 子类实现
* 代码StyleParams和XML初始化设置同时仅支持一种
*
* @return MapStyleParams
*/
protected MapStyleParams getStyleParams() {
return null;
}
protected IMogoMapUIController getUIController(){
return mMapView.getMap().getUIController();
}
@Override
protected String getInstanceTag() {
return MogoMap.DEFAULT;