diff options
Diffstat (limited to 'src/mbgl/style/layers/layer.cpp.ejs')
-rw-r--r-- | src/mbgl/style/layers/layer.cpp.ejs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mbgl/style/layers/layer.cpp.ejs b/src/mbgl/style/layers/layer.cpp.ejs index 657a7f5a8a..0d11b16a6d 100644 --- a/src/mbgl/style/layers/layer.cpp.ejs +++ b/src/mbgl/style/layers/layer.cpp.ejs @@ -12,7 +12,7 @@ // for constructing default heatmap-color ramp expression from style JSON #include <mbgl/style/conversion.hpp> #include <mbgl/style/conversion/json.hpp> -#include <mbgl/style/conversion/heatmap_color_property_value.hpp> +#include <mbgl/style/conversion/color_ramp_property_value.hpp> <% } -%> namespace mbgl { @@ -139,16 +139,18 @@ void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(<%- propertyV // Paint properties <% for (const property of paintProperties) { %> +<% if (property.name !== 'line-gradient') { -%> <%- propertyValueType(property) %> <%- camelize(type) %>Layer::getDefault<%- camelize(property.name) %>() { -<% if (property.name === 'heatmap-color') { -%> +<% if (property.name === 'heatmap-color') { -%> conversion::Error error; std::string rawValue = R"JSON(<%- JSON.stringify(property.default) %>)JSON"; return *conversion::convertJSON<<%- propertyValueType(property)%>>(rawValue, error); -<% } else { -%> +<% } else { -%> return { <%- defaultValue(property) %> }; -<% } -%> +<% } -%> } +<% } -%> <%- propertyValueType(property) %> <%- camelize(type) %>Layer::get<%- camelize(property.name) %>() const { return impl().paint.template get<<%- camelize(property.name) %>>().value; } |