diff options
Diffstat (limited to 'platform/darwin/src/MGLStyleLayer.mm.ejs')
-rw-r--r-- | platform/darwin/src/MGLStyleLayer.mm.ejs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLStyleLayer.mm.ejs b/platform/darwin/src/MGLStyleLayer.mm.ejs index ac7676a1cc..42940083b5 100644 --- a/platform/darwin/src/MGLStyleLayer.mm.ejs +++ b/platform/darwin/src/MGLStyleLayer.mm.ejs @@ -136,7 +136,12 @@ namespace mbgl { if (propertyValue.isUndefined()) { propertyValue = self.rawLayer->getDefault<%- camelize(originalPropertyName(property)) %>(); } +<% if (property.type === 'string') { -%> + NSExpression *expression = MGLStyleValueTransformer<<%- valueTransformerArguments(property).join(', ') %>>().toExpression(propertyValue); + return expression.mgl_expressionByReplacingTokensWithKeyPaths; +<% } else { -%> return MGLStyleValueTransformer<<%- valueTransformerArguments(property).join(', ') %>>().toExpression(propertyValue); +<% } -%> } <% if (property.original) { -%> @@ -174,7 +179,12 @@ namespace mbgl { if (propertyValue.isUndefined()) { propertyValue = self.rawLayer->getDefault<%- camelize(originalPropertyName(property)) %>(); } +<% if (property.type === 'string') { -%> + NSExpression *expression = MGLStyleValueTransformer<<%- valueTransformerArguments(property).join(', ') %>>().toExpression(propertyValue); + return expression.mgl_expressionByReplacingTokensWithKeyPaths; +<% } else { -%> return MGLStyleValueTransformer<<%- valueTransformerArguments(property).join(', ') %>>().toExpression(propertyValue); +<% } -%> } <% if (property["transition"]) { -%> |