use of net.osmand.plus.GPXUtilities.GPXFile in project Osmand by osmandapp.
the class GPXLayer method applyNewObjectPosition.
@Override
public void applyNewObjectPosition(@NonNull Object o, @NonNull LatLon position, @Nullable ContextMenuLayer.ApplyMovedObjectCallback callback) {
if (o instanceof WptPt) {
WptPt objectInMotion = (WptPt) o;
GPXFile gpxFile = pointFileMap.get(objectInMotion).getGpxFile();
gpxFile.updateWptPt(objectInMotion, position.getLatitude(), position.getLongitude(), System.currentTimeMillis(), objectInMotion.desc, objectInMotion.name, objectInMotion.category, objectInMotion.getColor());
new SaveGpxFileAsyncTask(view.getApplication(), callback, objectInMotion).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, gpxFile);
syncGpx(gpxFile);
} else if (callback != null) {
callback.onApplyMovedObject(false, o);
}
}
Aggregations