diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-10-28 16:39:50 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-02-02 09:44:42 -0800 |
commit | 141e995806576364d185626176c1b993fc519291 (patch) | |
tree | ecdc41fc7699f2a1a9e9456157348451ebe99597 /src/mbgl/style/layers/layer_properties.hpp.ejs | |
parent | 6a6bddb4537004cc1bfc506e76772de74d33f3f7 (diff) | |
download | qtlocation-mapboxgl-141e995806576364d185626176c1b993fc519291.tar.gz |
[core] Add support for data-driven styling
Diffstat (limited to 'src/mbgl/style/layers/layer_properties.hpp.ejs')
-rw-r--r-- | src/mbgl/style/layers/layer_properties.hpp.ejs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mbgl/style/layers/layer_properties.hpp.ejs b/src/mbgl/style/layers/layer_properties.hpp.ejs index d18ad44efd..2a736ca388 100644 --- a/src/mbgl/style/layers/layer_properties.hpp.ejs +++ b/src/mbgl/style/layers/layer_properties.hpp.ejs @@ -10,22 +10,21 @@ #include <mbgl/style/types.hpp> #include <mbgl/style/layout_property.hpp> #include <mbgl/style/paint_property.hpp> +#include <mbgl/programs/attributes.hpp> namespace mbgl { namespace style { <% for (const property of layoutProperties) { -%> -struct <%- camelize(property.name) %> : LayoutProperty<<%- propertyType(property) %>> { +struct <%- camelize(property.name) %> : <%- layoutPropertyType(property, type) %> { static constexpr const char * key = "<%- property.name %>"; - static <%- propertyType(property) %> defaultValue() { return <%- defaultValue(property) %>; } + static <%- evaluatedType(property) %> defaultValue() { return <%- defaultValue(property) %>; } }; <% } -%> <% for (const property of paintProperties) { -%> -struct <%- camelize(property.name) %> : <% -if (/-pattern$/.test(property.name) || property.name === 'line-dasharray') { -%>CrossFaded<% } -%>PaintProperty<<%- propertyType(property) %>> { - static <%- propertyType(property) %> defaultValue() { return <%- defaultValue(property) %>; } +struct <%- camelize(property.name) %> : <%- paintPropertyType(property, type) %> { + static <%- evaluatedType(property) %> defaultValue() { return <%- defaultValue(property) %>; } }; <% } -%> |