[core] Traverse expression tree when checking for property overrides

Before this change, symbol layer was only checking whether top level
'text-field' layout property expression is FormatExpression and if it
has paint property overrides. This change takes into account that
'text-field' might have nested expressions, thus, requires traversal
over child expressions.

Fixes: #14254
This commit is contained in:
Alexander Shalamov
2019-03-28 00:44:32 +02:00
parent 21155772ef
commit 4e335d0b05
3 changed files with 65 additions and 14 deletions

View File

@@ -166,6 +166,11 @@ mbgl::Value ValueConverter<mbgl::Value>::fromExpressionValue(const Value& value)
}
options.emplace("text-font", std::vector<mbgl::Value>{ std::string("literal"), fontStack });
}
if (section.textColor) {
options.emplace("text-color", fromExpressionValue(*section.textColor));
}
serialized.push_back(options);
}
return serialized;