summaryrefslogtreecommitdiff
path: root/src/mbgl/map/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/map/map.cpp')
-rw-r--r--src/mbgl/map/map.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index dd33d0b170..b5a1af172a 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -9,6 +9,7 @@
#include <mbgl/style/style.hpp>
#include <mbgl/style/source.hpp>
#include <mbgl/style/layer.hpp>
+#include <mbgl/style/light.hpp>
#include <mbgl/style/observer.hpp>
#include <mbgl/style/transition_options.hpp>
#include <mbgl/style/update_parameters.hpp>
@@ -978,6 +979,22 @@ const style::Image* Map::getImage(const std::string& id) {
return nullptr;
}
+void Map::setLight(std::unique_ptr<style::Light> light) {
+ if (!impl->style) {
+ return;
+ }
+
+ impl->style->light = std::move(light);
+}
+
+style::Light* Map::getLight() {
+ if (!impl->style) {
+ return nullptr;
+ }
+
+ return impl->style->light.get();
+}
+
#pragma mark - Defaults
std::string Map::getStyleName() const {