[轨迹计算]
This commit is contained in:
yangyakun
2023-03-18 13:24:34 +08:00
parent c65a28d35f
commit ad8478a720

View File

@@ -633,9 +633,17 @@ object CharterPassengerModel {
)
//要前往的站在轨迹中对应的点
var nextRouteIndex: Int = mRoutePoints.size - 1
orderInfo?.let {
orderInfo?.let {order->
val coordinateConverterWgsToGcj =
CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(
mContext,
order.wgs84Lon!!,
order.wgs84Lat!!
)
nextRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndexNew(
currentRouteIndex, mRoutePoints, it.gcj02Lon!!, it.gcj02Lat!!
currentRouteIndex, mRoutePoints,
coordinateConverterWgsToGcj.longitude,
coordinateConverterWgsToGcj.latitude
)
}
var lastSumLength = 0f