[Fix]解决ArrayList的操作异常
This commit is contained in:
@@ -22,6 +22,7 @@ import com.mogo.eagle.core.function.overview.InfStructureManager;
|
||||
import com.mogo.eagle.core.function.overview.ViewModelExtKt;
|
||||
import com.mogo.eagle.core.function.overview.vm.OverViewModel;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.IMogoMap;
|
||||
import com.mogo.map.IMogoUiSettings;
|
||||
import com.mogo.map.MogoMapView;
|
||||
@@ -213,7 +214,9 @@ public class MapFragment extends MvpFragment<MapView, MapPresenter>
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(@Nullable MessagePad.GlobalPathResp globalPathResp) {
|
||||
InfStructureManager.INSTANCE.savePlanningData(globalPathResp.getWayPointsList());
|
||||
UiThreadHandler.post(() -> {
|
||||
InfStructureManager.INSTANCE.savePlanningData(globalPathResp.getWayPointsList());
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -322,13 +322,14 @@ public class AMapCustomView
|
||||
* @param locationList
|
||||
*/
|
||||
private void drawInfrastructureMarkers(List<MessagePad.Location> locationList) {
|
||||
if (locationList == null) return;
|
||||
if (!pathMap.isEmpty()) {
|
||||
pathMap.clear();
|
||||
}
|
||||
String geoHash;
|
||||
ArrayList<Infrastructure> infList;
|
||||
for (MessagePad.Location location : locationList) {
|
||||
LatLng latLng = MarkerDrawerManager.INSTANCE.coordinateConverterWgsToGcj(mContext, location);
|
||||
for (int i = 0; i < locationList.size(); i++) {
|
||||
LatLng latLng = MarkerDrawerManager.INSTANCE.coordinateConverterWgsToGcj(mContext, locationList.get(i));
|
||||
geoHash = GeoHash.withCharacterPrecision(latLng.latitude, latLng.longitude, 7).toBase32();
|
||||
// 网格内的轨迹点只取一次s
|
||||
if (!pathMap.containsKey(geoHash)) {
|
||||
|
||||
Reference in New Issue
Block a user