diff --git a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/map/ObuRecognizedResultDrawer.kt b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/map/ObuRecognizedResultDrawer.kt index 7a8b3b2f5d..1277fc76cf 100644 --- a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/map/ObuRecognizedResultDrawer.kt +++ b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/map/ObuRecognizedResultDrawer.kt @@ -13,6 +13,8 @@ import com.mogo.module.common.constants.DataTypes import com.mogo.utils.WorkThreadHandler import com.mogo.utils.logger.Logger import com.zhidao.support.obu.model.CvxRvInfoIndInfo +import com.zhidao.support.obu.model.advance.MovingObjectInfo +import com.zhidao.support.obu.model.advance.Position import java.util.concurrent.ConcurrentHashMap /** @@ -47,6 +49,25 @@ class ObuRecognizedResultDrawer() { super.handleMessage(msg) drawerCvxRvInfo() + /*// TODO 测试数据 + mCvxRvInfoIndInfoMap.forEach { + + var latitude = ((it.value.basic_info.position.latitude * 10000000.0).toLong()) + var longitude = (it.value.basic_info.position.longitude * 10000000.0).toLong() + + latitude += 10 + //longitude += 100 + + it.value.basic_info.position.setValue( + 0, + latitude, + longitude, + 30 + ) + addCvxRvInfoIndInfo(it.value) + }*/ + + // 延时50毫秒重复发送自己,定时轮询进行车辆绘制,可以及时将已经不存在车辆删除 sendEmptyMessageDelayed(0, 100L) } @@ -55,6 +76,15 @@ class ObuRecognizedResultDrawer() { init { mContext = AbsMogoApplication.getApp() mDrawerHandler.sendEmptyMessageDelayed(1, 0L) + + /* // TODO 测试数据 + val cvxRvInfoIndInfo = CvxRvInfoIndInfo(0, 1, 2) + cvxRvInfoIndInfo.vehicle_id = "123321" + val position = Position(0, 399739429, 1164115207, 20) + val movingObjectInfo = MovingObjectInfo(0, position, 1800, 60) + cvxRvInfoIndInfo.basic_info = movingObjectInfo + addCvxRvInfoIndInfo(cvxRvInfoIndInfo)*/ + } /** @@ -75,7 +105,6 @@ class ObuRecognizedResultDrawer() { * 绘制 */ private fun drawerCvxRvInfo() { - //Logger.d(TAG, "drawerCvxRvInfo") // 数据为空的时候清除所有数据 if (mCvxRvInfoIndInfoMap.isEmpty()) { mMarkersCaches.forEach { @@ -85,6 +114,8 @@ class ObuRecognizedResultDrawer() { } else { // 循环绘制识别的数据 mCvxRvInfoIndInfoMap.forEach { + Logger.d(TAG, "drawerCvxRvInfo:${it.value}") + // 如果数据已经存在 Marker,取出做动画 if (mMarkersCaches[it.key] != null) { mMarkersCaches[it.key]?.let { it1 ->