use of net.osmand.plus.osmedit.OsmEditOptionsBottomSheetDialogFragment.OsmEditOptionsFragmentListener in project Osmand by osmandapp.
the class OsmEditsFragment method createOsmEditOptionsFragmentListener.
private OsmEditOptionsFragmentListener createOsmEditOptionsFragmentListener() {
return new OsmEditOptionsFragmentListener() {
@Override
public void onUploadClick(OsmPoint osmPoint) {
uploadItems(new OsmPoint[] { getPointAfterModify(osmPoint) });
}
@Override
public void onShowOnMapClick(OsmPoint osmPoint) {
OsmandSettings settings = getMyApplication().getSettings();
settings.setMapLocationToShow(osmPoint.getLatitude(), osmPoint.getLongitude(), settings.getLastKnownMapZoom());
MapActivity.launchMapActivityMoveToTop(getActivity());
}
@Override
public void onModifyOsmChangeClick(OsmPoint osmPoint) {
OpenstreetmapPoint i = (OpenstreetmapPoint) getPointAfterModify(osmPoint);
final Node entity = i.getEntity();
refreshId = entity.getId();
EditPoiDialogFragment.createInstance(entity, false).show(getActivity().getSupportFragmentManager(), "edit_poi");
}
@Override
public void onModifyOsmNoteClick(OsmPoint osmPoint) {
showBugDialog((OsmNotesPoint) osmPoint);
}
@Override
public void onDeleteClick(OsmPoint osmPoint) {
ArrayList<OsmPoint> points = new ArrayList<>();
points.add(osmPoint);
deleteItems(new ArrayList<>(points));
}
};
}
Aggregations