forked from organicmaps/organicmaps
[styles] Support min_height and building:min_level in metadata
This commit is contained in:
parent
7169223390
commit
6c5f5982b7
2 changed files with 19 additions and 1 deletions
|
@ -140,6 +140,23 @@ public:
|
|||
md.Set(Metadata::FMD_HEIGHT, value);
|
||||
}
|
||||
}
|
||||
else if (k == "min_height")
|
||||
{
|
||||
string const & value = ValidateAndFormat_height(v);
|
||||
if (!value.empty())
|
||||
md.Set(Metadata::FMD_MIN_HEIGHT, value);
|
||||
}
|
||||
else if (k == "building:min_level")
|
||||
{
|
||||
// Ignoring if FMD_HEIGHT already set
|
||||
if (md.Get(Metadata::FMD_HEIGHT).empty())
|
||||
{
|
||||
// Converting this attribute into height
|
||||
string const & value = ValidateAndFormat_building_levels(v);
|
||||
if (!value.empty())
|
||||
md.Set(Metadata::FMD_MIN_HEIGHT, value);
|
||||
}
|
||||
}
|
||||
else if (k == "denomination")
|
||||
{
|
||||
string const & value = ValidateAndFormat_denomination(v);
|
||||
|
|
|
@ -38,7 +38,8 @@ namespace feature
|
|||
FMD_MAXSPEED = 17,
|
||||
FMD_FLATS = 18,
|
||||
FMD_HEIGHT = 19,
|
||||
FMD_DENOMINATION = 20,
|
||||
FMD_MIN_HEIGHT = 20,
|
||||
FMD_DENOMINATION = 21,
|
||||
FMD_COUNT
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue