代码优化
This commit is contained in:
@@ -93,16 +93,16 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
}
|
||||
|
||||
final long start = System.currentTimeMillis();
|
||||
double[] matchedPoint = matchRoad( recognizedListResult.lon,
|
||||
recognizedListResult.lat,
|
||||
recognizedListResult.heading,
|
||||
recognizedListResult.dataAccuracy == 1
|
||||
);
|
||||
Log.i("match-road-timer", "cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
if ( matchedPoint != null ) {
|
||||
recognizedListResult.lon = matchedPoint[0];
|
||||
recognizedListResult.lat = matchedPoint[1];
|
||||
}
|
||||
// double[] matchedPoint = matchRoad( recognizedListResult.lon,
|
||||
// recognizedListResult.lat,
|
||||
// recognizedListResult.heading,
|
||||
// recognizedListResult.dataAccuracy == 1
|
||||
// );
|
||||
// Log.i("match-road-timer", "cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
// if ( matchedPoint != null ) {
|
||||
// recognizedListResult.lon = matchedPoint[0];
|
||||
// recognizedListResult.lat = matchedPoint[1];
|
||||
// }
|
||||
|
||||
IMogoMarker marker = mAdasRecognizedMarkersCaches.remove( uniqueKey );
|
||||
|
||||
|
||||
@@ -190,11 +190,10 @@ class BaseDrawer {
|
||||
* @return
|
||||
*/
|
||||
protected double[] matchRoad( double lon, double lat, double angle, boolean isRtk ) {
|
||||
double wgs[] = CoordinateUtils.transformGcj02toWgs84( lat, lon );
|
||||
return MogoApisHandler.getInstance()
|
||||
.getApis()
|
||||
.getMapServiceApi()
|
||||
.getMapUIController()
|
||||
.matchRoad( wgs[0], wgs[1], angle, true, isRtk );
|
||||
.matchRoad( lon, lat, angle, true, isRtk );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,15 +160,15 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
continue;
|
||||
}
|
||||
|
||||
double[] matchedPoint = matchRoad( cloudRoadData.getLon(),
|
||||
cloudRoadData.getLat(),
|
||||
cloudRoadData.getHeading(),
|
||||
true
|
||||
);
|
||||
if ( matchedPoint != null ) {
|
||||
cloudRoadData.setLon( matchedPoint[0] );
|
||||
cloudRoadData.setLat( matchedPoint[1] );
|
||||
}
|
||||
// double[] matchedPoint = matchRoad( cloudRoadData.getLon(),
|
||||
// cloudRoadData.getLat(),
|
||||
// cloudRoadData.getHeading(),
|
||||
// true
|
||||
// );
|
||||
// if ( matchedPoint != null ) {
|
||||
// cloudRoadData.setLon( matchedPoint[0] );
|
||||
// cloudRoadData.setLat( matchedPoint[1] );
|
||||
// }
|
||||
|
||||
IMogoMarker marker = mCloudSnapshotMarkersCaches.remove( uniqueKey );
|
||||
CloudRoadData lastPosition = mLastPositions.put( uniqueKey, cloudRoadData );
|
||||
|
||||
Reference in New Issue
Block a user