Add addr::postcode to feature metadata

This commit is contained in:
Sergey Yershov 2015-04-24 14:56:23 +03:00 committed by Alex Zolotarev
parent 82a629b663
commit dd1f0656e6
2 changed files with 12 additions and 1 deletions

View file

@ -45,6 +45,12 @@ public:
if (!value.empty())
m_params.GetMetadata().Add(feature::FeatureMetadata::FMD_STARS, value);
}
else if (k == "addr:postcode")
{
string const & value = ValidateAndFormat_postcode(v);
if (!value.empty())
m_params.GetMetadata().Add(feature::FeatureMetadata::FMD_POSTCODE, value);
}
else if (k == "url")
{
string const & value = ValidateAndFormat_url(v);
@ -173,5 +179,9 @@ protected:
{
return v;
}
string ValidateAndFormat_postcode(string const & v) const
{
return v;
}
};

View file

@ -31,7 +31,8 @@ namespace feature
FMD_TURN_LANES = 11,
FMD_TURN_LANES_FORWARD = 12,
FMD_TURN_LANES_BACKWARD = 13,
FMD_EMAIL = 14
FMD_EMAIL = 14,
FMD_POSTCODE = 15
};
bool Add(EMetadataType type, string const & s)