use of net.osmand.plus.plugins.osmedit.asynctasks.SaveOsmNoteAsyncTask in project Osmand by osmandapp.
the class OsmEditsLayer method applyNewObjectPosition.
@Override
public void applyNewObjectPosition(@NonNull Object o, @NonNull LatLon position, @Nullable ApplyMovedObjectCallback callback) {
if (o instanceof OsmPoint) {
if (o instanceof OpenstreetmapPoint) {
OpenstreetmapPoint objectInMotion = (OpenstreetmapPoint) o;
Entity entity = objectInMotion.getEntity();
entity.setLatitude(position.getLatitude());
entity.setLongitude(position.getLongitude());
new SaveOsmChangeAsyncTask(mOsmChangeUtil, objectInMotion, callback).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else if (o instanceof OsmNotesPoint) {
OsmNotesPoint objectInMotion = (OsmNotesPoint) o;
objectInMotion.setLatitude(position.getLatitude());
objectInMotion.setLongitude(position.getLongitude());
new SaveOsmNoteAsyncTask(objectInMotion.getText(), ctx, callback, plugin, mOsmBugsUtil).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, objectInMotion);
}
}
}
Aggregations