summaryrefslogtreecommitdiff
path: root/platform/glfw
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-21 13:35:34 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-06-22 08:04:39 -0700
commit1520a56813f82bbe875774fdc2b3df26392278d6 (patch)
treed8f6ccc10e118bd2be6a954951c037f9c2fc1384 /platform/glfw
parentbe7e9bbb8d54c775127f53d793c117c4bf5e2764 (diff)
downloadqtlocation-mapboxgl-1520a56813f82bbe875774fdc2b3df26392278d6.tar.gz
[all] Promote Style to public API
Diffstat (limited to 'platform/glfw')
-rw-r--r--platform/glfw/glfw_view.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp
index 06a852b3f3..1beaf2b52b 100644
--- a/platform/glfw/glfw_view.cpp
+++ b/platform/glfw/glfw_view.cpp
@@ -2,6 +2,7 @@
#include "ny_route.hpp"
#include <mbgl/annotation/annotation.hpp>
+#include <mbgl/style/style.hpp>
#include <mbgl/style/image.hpp>
#include <mbgl/style/transition_options.hpp>
#include <mbgl/style/layers/fill_extrusion_layer.hpp>
@@ -585,11 +586,11 @@ void GLFWView::toggle3DExtrusions(bool visible) {
show3DExtrusions = visible;
// Satellite-only style does not contain building extrusions data.
- if (!map->getSource("composite")) {
+ if (!map->getStyle().getSource("composite")) {
return;
}
- if (auto layer = map->getLayer("3d-buildings")) {
+ if (auto layer = map->getStyle().getLayer("3d-buildings")) {
layer->setVisibility(mbgl::style::VisibilityType(!show3DExtrusions));
return;
}
@@ -617,7 +618,7 @@ void GLFWView::toggle3DExtrusions(bool visible) {
auto baseSourceFn = mbgl::style::SourceFunction<float> { "min_height", mbgl::style::IdentityStops<float>() };
extrusionLayer->setFillExtrusionBase({ baseSourceFn });
- map->addLayer(std::move(extrusionLayer));
+ map->getStyle().addLayer(std::move(extrusionLayer));
}
namespace mbgl {