自车与停止线间画线(画线类缺少色值适配)

This commit is contained in:
liujing
2021-04-02 18:17:02 +08:00
parent 4834980346
commit 4824b17a6f

View File

@@ -1,6 +1,7 @@
package com.mogo.module.v2x.scenario.scene.warning;
import android.content.Context;
import android.util.Log;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.map.MogoLatLng;
@@ -28,6 +29,7 @@ import java.util.List;
* @since: 2021/3/30
*/
public class V2XWarningMarker implements IV2XMarker {
private static final String TAG = "V2XWarningMarker";
private V2XWarningEntity mMarkerEntity;
private MarkerShowEntity markerShowEntity = new MarkerShowEntity();
private Context mContext = V2XServiceManager.getContext();
@@ -65,13 +67,7 @@ public class V2XWarningMarker implements IV2XMarker {
clearPOI();
WorkThreadHandler.getInstance().postDelayed(() -> {
//自车位置
MogoLatLng car = mMarkerEntity.getCarLocation();
if (car == null) {
double lon = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon();
double lat = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat();
car = new MogoLatLng(lat, lon);
car = new MogoLatLng(39.977709,116.417703);
}
MogoLatLng car = V2XServiceManager.getNavi().getCarLocation();
if (car != null) {
//根据到停止线的距离和方向角获取经纬度
MogoLatLng
@@ -79,6 +75,8 @@ public class V2XWarningMarker implements IV2XMarker {
if (mMarkerEntity.getCollisionLat() > 0 && mMarkerEntity.getCollisionLon() > 0) {
drawLine(car, stopLineLo);
}
} else {
Log.d(TAG, "自车位置没有拿到");
}
}, 0);
}
@@ -105,7 +103,7 @@ public class V2XWarningMarker implements IV2XMarker {
fillPoints.add(y);
}
} catch (Exception e) {
e.printStackTrace();
}
}