Commit f461466682e731c8cadba5d36c292242220fa1a8
1 parent
f03cf478
1 轨迹工具恢复过滤精度
Showing
2 changed files
with
6 additions
and
10 deletions
config.gradle
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/StartTraceFragmentView.java
| @@ -423,7 +423,10 @@ public class StartTraceFragmentView implements MvpView, SensorEventListener { | @@ -423,7 +423,10 @@ public class StartTraceFragmentView implements MvpView, SensorEventListener { | ||
| 423 | if (location == null || mMapView == null) { | 423 | if (location == null || mMapView == null) { |
| 424 | return; | 424 | return; |
| 425 | } | 425 | } |
| 426 | - | 426 | + if (isFirstLoc) { |
| 427 | + isFirstLoc = false; | ||
| 428 | + Toast.makeText(getContext(), "当前定位误差为:" + location.getRadius() + "米,请您移动至空旷地带!", Toast.LENGTH_SHORT).show(); | ||
| 429 | + } | ||
| 427 | //过滤定位精度 | 430 | //过滤定位精度 |
| 428 | if (location.getRadius() > Constant.LOCA_ACCURACY) { | 431 | if (location.getRadius() > Constant.LOCA_ACCURACY) { |
| 429 | return; | 432 | return; |
| @@ -435,14 +438,7 @@ public class StartTraceFragmentView implements MvpView, SensorEventListener { | @@ -435,14 +438,7 @@ public class StartTraceFragmentView implements MvpView, SensorEventListener { | ||
| 435 | // 此处设置开发者获取到的方向信息,顺时针0-360 | 438 | // 此处设置开发者获取到的方向信息,顺时针0-360 |
| 436 | .direction(location.getDirection()).latitude(location.getLatitude()) | 439 | .direction(location.getDirection()).latitude(location.getLatitude()) |
| 437 | .longitude(location.getLongitude()).build(); | 440 | .longitude(location.getLongitude()).build(); |
| 438 | - if (isFirstLoc) { | ||
| 439 | - isFirstLoc = false; | ||
| 440 | - Toast.makeText(getContext(), "当前定位误差为:" + location.getRadius() + "米,请您移动至空旷地带!", Toast.LENGTH_SHORT).show(); | ||
| 441 | - baiduMap.setMyLocationData(followMyLocation); | ||
| 442 | - MapStatus.Builder builder = new MapStatus.Builder(); | ||
| 443 | - builder.target(currentLatLng).zoom(DEFULT_ZOOM); | ||
| 444 | - baiduMap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(builder.build())); | ||
| 445 | - } | 441 | + |
| 446 | // if (location.hasAddr()) { | 442 | // if (location.hasAddr()) { |
| 447 | // if (!TextUtils.isEmpty(location.getAddress().address)) { | 443 | // if (!TextUtils.isEmpty(location.getAddress().address)) { |
| 448 | // currentAddress = location.getAddress().address; | 444 | // currentAddress = location.getAddress().address; |