diff options
author | Lucas Wojciechowski <lucas@mapbox.com> | 2018-04-12 12:02:07 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2018-05-09 16:06:10 -0700 |
commit | 9f8d45677315ef0a99721f369dbf62c3c0b33b05 (patch) | |
tree | 7afbfd4cf352661d86bca37ec80c90776ea14dc2 | |
parent | cd08443cb12a6b33ca9d9fbe6612d604ffab1053 (diff) | |
download | qtlocation-mapboxgl-9f8d45677315ef0a99721f369dbf62c3c0b33b05.tar.gz |
Fix GLFW compilation
-rw-r--r-- | platform/glfw/glfw_view.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp index 3988419265..04839438c4 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -7,6 +7,8 @@ #include <mbgl/style/image.hpp> #include <mbgl/style/transition_options.hpp> #include <mbgl/style/layers/fill_extrusion_layer.hpp> +#include <mbgl/style/expression/compound_expression.hpp> +#include <mbgl/style/expression/literal.hpp> #include <mbgl/util/logging.hpp> #include <mbgl/util/platform.hpp> #include <mbgl/util/string.hpp> @@ -634,7 +636,12 @@ void GLFWView::toggle3DExtrusions(bool visible) { auto extrusionLayer = std::make_unique<mbgl::style::FillExtrusionLayer>("3d-buildings", "composite"); extrusionLayer->setSourceLayer("building"); extrusionLayer->setMinZoom(15.0f); - extrusionLayer->setFilter(mbgl::style::EqualsFilter { "extrude", { std::string("true") } }); + + std::vector<std::unique_ptr<mbgl::style::expression::Expression>> args; + args.push_back(std::make_unique<mbgl::style::expression::Literal>(mbgl::style::expression::Value(std::string("extrude")))); + args.push_back(std::make_unique<mbgl::style::expression::Literal>(mbgl::style::expression::Value(std::string("true")))); + mbgl::style::expression::ParsingContext context; + extrusionLayer->setFilter(mbgl::style::Filter { std::move(*mbgl::style::expression::createCompoundExpression("filter-==", std::move(args), context)) }); auto colorFn = mbgl::style::SourceFunction<mbgl::Color> { "height", mbgl::style::ExponentialStops<mbgl::Color> { |