forked from organicmaps/organicmaps
Editable PostCode only for buildings and post boxes/post offices.
This commit is contained in:
parent
65fb912326
commit
9dd35d1682
1 changed files with 6 additions and 1 deletions
|
@ -492,6 +492,7 @@ vector<Metadata::EType> Editor::EditableMetadataForType(FeatureType const & feat
|
|||
// TODO(mgsergio): Load editable fields into memory from XML and query them here.
|
||||
feature::TypesHolder const types(feature);
|
||||
set<Metadata::EType> fields;
|
||||
auto const & isBuilding = ftypes::IsBuildingChecker::Instance();
|
||||
for (auto type : types)
|
||||
{
|
||||
auto const * desc = GetTypeDescription(type);
|
||||
|
@ -505,10 +506,14 @@ vector<Metadata::EType> Editor::EditableMetadataForType(FeatureType const & feat
|
|||
fields.insert(EType::FMD_EMAIL);
|
||||
fields.insert(EType::FMD_OPEN_HOURS);
|
||||
fields.insert(EType::FMD_PHONE_NUMBER);
|
||||
fields.insert(EType::FMD_POSTCODE);
|
||||
fields.insert(EType::FMD_WEBSITE);
|
||||
}
|
||||
}
|
||||
else if (isBuilding.HasTypeValue(type))
|
||||
{
|
||||
// Post boxes and post offices have editable postcode field defined separately.
|
||||
fields.insert(EType::FMD_POSTCODE);
|
||||
}
|
||||
}
|
||||
return {begin(fields), end(fields)};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue