merge code

This commit is contained in:
qiji4215 2023-07-14 16:40:14 +08:00
parent 4fa9df8e3c
commit 3883c934fc
5 changed files with 7 additions and 8 deletions

View File

@ -266,23 +266,22 @@ class MainViewModel @Inject constructor(
location.taskId = id.toString()
//增加间距判断
if (lastNiLocaion != null) {
val disance = GeometryTools.distanceToDouble(
GeoPoint(location.latitude, location.longitude), GeoPoint(
lastNiLocaion!!.latitude, lastNiLocaion!!.longitude
)
)
//相距差距大于0.5米以上进行存储
if (disance > 0.5) {
val disance = GeometryTools.getDistance(
location.latitude, location.longitude,
lastNiLocaion!!.latitude, lastNiLocaion!!.longitude)
//相距差距大于2.5米以上进行存储
if (disance > 2.5) {
traceDataBase.niLocationDao.insert(location)
mapController.markerHandle.addNiLocationMarkerItem(location)
mapController.mMapView.vtmMap.updateMap(true)
}
} else {
traceDataBase.niLocationDao.insert(location)
mapController.markerHandle.addNiLocationMarkerItem(location)
mapController.mMapView.vtmMap.updateMap(true)
}
lastNiLocaion = location
//mapController.mMapView.vtmMap.updateMap(true)
}
}
//用于定位点捕捉道路

View File

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 401 B

View File

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 377 B

View File

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 492 B

View File

Before

Width:  |  Height:  |  Size: 611 B

After

Width:  |  Height:  |  Size: 611 B