Introduce house number/ street for osm editing
This commit is contained in:
parent
174b30ad3a
commit
0bfc9d448e
2 changed files with 17 additions and 3 deletions
|
@ -75,8 +75,6 @@
|
||||||
</EditText>
|
</EditText>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -108,7 +106,7 @@
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="5dp" >
|
android:layout_marginRight="5dp" >
|
||||||
</EditText>
|
</EditText>
|
||||||
</TableRow> -->
|
</TableRow>
|
||||||
|
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -66,6 +66,8 @@ public class EditingPOIActivity implements DialogProvider {
|
||||||
private EditText commentText;
|
private EditText commentText;
|
||||||
private EditText websiteText;
|
private EditText websiteText;
|
||||||
private EditText phoneText;
|
private EditText phoneText;
|
||||||
|
private EditText streetNameText;
|
||||||
|
private EditText hnoText;
|
||||||
private CheckBox closeChange;
|
private CheckBox closeChange;
|
||||||
|
|
||||||
// private final static Log log = LogUtil.getLog(EditingPOIActivity.class);
|
// private final static Log log = LogUtil.getLog(EditingPOIActivity.class);
|
||||||
|
@ -182,6 +184,10 @@ public class EditingPOIActivity implements DialogProvider {
|
||||||
nameText.setText(a.getName());
|
nameText.setText(a.getName());
|
||||||
EditText openingHours = ((EditText)dlg.findViewById(R.id.OpeningHours));
|
EditText openingHours = ((EditText)dlg.findViewById(R.id.OpeningHours));
|
||||||
openingHours.setText(a.getOpeningHours());
|
openingHours.setText(a.getOpeningHours());
|
||||||
|
EditText streetName = ((EditText)dlg.findViewById(R.id.StreetName));
|
||||||
|
streetName.setText(n.getTag(OSMTagKey.ADDR_STREET));
|
||||||
|
EditText houseNumber = ((EditText)dlg.findViewById(R.id.HouseNumber));
|
||||||
|
houseNumber.setText(n.getTag(OSMTagKey.ADDR_HOUSE_NUMBER));
|
||||||
EditText phoneText = ((EditText)dlg.findViewById(R.id.Phone));
|
EditText phoneText = ((EditText)dlg.findViewById(R.id.Phone));
|
||||||
phoneText.setText(a.getPhone());
|
phoneText.setText(a.getPhone());
|
||||||
EditText websiteText = ((EditText)dlg.findViewById(R.id.Website));
|
EditText websiteText = ((EditText)dlg.findViewById(R.id.Website));
|
||||||
|
@ -298,6 +304,8 @@ public class EditingPOIActivity implements DialogProvider {
|
||||||
typeText.setThreshold(1);
|
typeText.setThreshold(1);
|
||||||
commentText = ((EditText)dlg.findViewById(R.id.Comment));
|
commentText = ((EditText)dlg.findViewById(R.id.Comment));
|
||||||
phoneText = ((EditText)dlg.findViewById(R.id.Phone));
|
phoneText = ((EditText)dlg.findViewById(R.id.Phone));
|
||||||
|
hnoText = ((EditText)dlg.findViewById(R.id.HouseNumber));
|
||||||
|
streetNameText = ((EditText)dlg.findViewById(R.id.StreetName));
|
||||||
websiteText = ((EditText)dlg.findViewById(R.id.Website));
|
websiteText = ((EditText)dlg.findViewById(R.id.Website));
|
||||||
closeChange = ((CheckBox) dlg.findViewById(R.id.CloseChangeset));
|
closeChange = ((CheckBox) dlg.findViewById(R.id.CloseChangeset));
|
||||||
|
|
||||||
|
@ -457,6 +465,14 @@ public class EditingPOIActivity implements DialogProvider {
|
||||||
if (phone.length() > 0 ){
|
if (phone.length() > 0 ){
|
||||||
n.putTag(OSMTagKey.PHONE.getValue(),phone);
|
n.putTag(OSMTagKey.PHONE.getValue(),phone);
|
||||||
}
|
}
|
||||||
|
String str = streetNameText.getText().toString();
|
||||||
|
if (str .length() > 0 ){
|
||||||
|
n.putTag(OSMTagKey.ADDR_STREET.getValue(),str);
|
||||||
|
}
|
||||||
|
String hno = hnoText.getText().toString();
|
||||||
|
if (hno .length() > 0 ){
|
||||||
|
n.putTag(OSMTagKey.ADDR_HOUSE_NUMBER.getValue(),hno);
|
||||||
|
}
|
||||||
commitNode(action, n, openstreetmapUtil.getEntityInfo(), commentText.getText().toString(), closeChange.isSelected(),
|
commitNode(action, n, openstreetmapUtil.getEntityInfo(), commentText.getText().toString(), closeChange.isSelected(),
|
||||||
new Runnable() {
|
new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue