summaryrefslogtreecommitdiff
path: root/src/mbgl/layout
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2018-03-22 16:44:12 -0700
committerGitHub <noreply@github.com>2018-03-22 16:44:12 -0700
commit9499a2bda7eed68f8a11cdecce0130b1be2054a4 (patch)
treebf26cc0af726388039a1d6de12cc3a091a2ec175 /src/mbgl/layout
parent1d29f82c1b636166053874323ee04ade5b243275 (diff)
downloadqtlocation-mapboxgl-9499a2bda7eed68f8a11cdecce0130b1be2054a4.tar.gz
[core] Don't resolve tokens after evaluating a text-field or icon-image expression (#11509)
Diffstat (limited to 'src/mbgl/layout')
-rw-r--r--src/mbgl/layout/symbol_layout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp
index 3bf85407c6..82a9255824 100644
--- a/src/mbgl/layout/symbol_layout.cpp
+++ b/src/mbgl/layout/symbol_layout.cpp
@@ -126,7 +126,7 @@ SymbolLayout::SymbolLayout(const BucketParameters& parameters,
if (hasText) {
std::string u8string = layout.evaluate<TextField>(zoom, ft);
- if (layout.get<TextField>().isConstant()) {
+ if (layout.get<TextField>().isConstant() && !leader.layout.get<TextField>().isExpression()) {
u8string = util::replaceTokens(u8string, getValue);
}
@@ -159,7 +159,7 @@ SymbolLayout::SymbolLayout(const BucketParameters& parameters,
if (hasIcon) {
std::string icon = layout.evaluate<IconImage>(zoom, ft);
- if (layout.get<IconImage>().isConstant()) {
+ if (layout.get<IconImage>().isConstant() && !leader.layout.get<IconImage>().isExpression()) {
icon = util::replaceTokens(icon, getValue);
}
ft.icon = icon;