summaryrefslogtreecommitdiff
path: root/include/mbgl
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl')
-rw-r--r--include/mbgl/style/conversion_impl.hpp7
-rw-r--r--include/mbgl/style/light.hpp2
-rw-r--r--include/mbgl/style/light.hpp.ejs2
3 files changed, 11 insertions, 0 deletions
diff --git a/include/mbgl/style/conversion_impl.hpp b/include/mbgl/style/conversion_impl.hpp
index 7abe7bf923..3e4236949e 100644
--- a/include/mbgl/style/conversion_impl.hpp
+++ b/include/mbgl/style/conversion_impl.hpp
@@ -342,6 +342,13 @@ struct ValueFactory<T, typename std::enable_if<is_linear_container<T>::value>::t
}
};
+template <>
+struct ValueFactory<Position> {
+ static Value make(const Position& position) {
+ return ValueFactory<std::array<float, 3>>::make(position.getSpherical());
+ }
+};
+
template <typename T>
Value makeValue(T&& arg) {
return ValueFactory<std::decay_t<T>>::make(std::forward<T>(arg));
diff --git a/include/mbgl/style/light.hpp b/include/mbgl/style/light.hpp
index 9a82eb14b5..7434fb2882 100644
--- a/include/mbgl/style/light.hpp
+++ b/include/mbgl/style/light.hpp
@@ -6,6 +6,7 @@
#include <mbgl/style/conversion.hpp>
#include <mbgl/style/property_value.hpp>
+#include <mbgl/style/style_property.hpp>
#include <mbgl/style/transition_options.hpp>
#include <mbgl/style/types.hpp>
#include <mbgl/util/immutable.hpp>
@@ -22,6 +23,7 @@ public:
// Dynamic properties
optional<conversion::Error> setProperty(const std::string& name, const conversion::Convertible& value);
+ StyleProperty getProperty(const std::string&) const;
static LightAnchorType getDefaultAnchor();
PropertyValue<LightAnchorType> getAnchor() const;
diff --git a/include/mbgl/style/light.hpp.ejs b/include/mbgl/style/light.hpp.ejs
index a5b907b4dc..e4661dc59b 100644
--- a/include/mbgl/style/light.hpp.ejs
+++ b/include/mbgl/style/light.hpp.ejs
@@ -9,6 +9,7 @@
#include <mbgl/style/conversion.hpp>
#include <mbgl/style/property_value.hpp>
+#include <mbgl/style/style_property.hpp>
#include <mbgl/style/transition_options.hpp>
#include <mbgl/style/types.hpp>
#include <mbgl/util/immutable.hpp>
@@ -25,6 +26,7 @@ public:
// Dynamic properties
optional<conversion::Error> setProperty(const std::string& name, const conversion::Convertible& value);
+ StyleProperty getProperty(const std::string&) const;
<% for (const property of properties) { -%>
static <%- evaluatedType(property) %> getDefault<%- camelize(property.name) %>();