diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-05-08 18:00:02 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2020-05-26 20:35:04 +0300 |
commit | 03ecfa2644cca12048b5bb953f116c929c67bace (patch) | |
tree | fbf208ad2b2cf90c57ab702a0d28363a4e790558 /include/mbgl/style/conversion_impl.hpp | |
parent | 1237e91a16d6b22df88c3fa25f3bc29b7734f88e (diff) | |
download | qtlocation-mapboxgl-03ecfa2644cca12048b5bb953f116c929c67bace.tar.gz |
[core] Universal set/getProperty API for ImageSource
Diffstat (limited to 'include/mbgl/style/conversion_impl.hpp')
-rw-r--r-- | include/mbgl/style/conversion_impl.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mbgl/style/conversion_impl.hpp b/include/mbgl/style/conversion_impl.hpp index 51a7a7db57..b1855cd09a 100644 --- a/include/mbgl/style/conversion_impl.hpp +++ b/include/mbgl/style/conversion_impl.hpp @@ -352,6 +352,14 @@ struct ValueFactory<LatLngBounds> { } }; +template <> +struct ValueFactory<LatLng> { + static Value make(const LatLng& coordinate) { + std::vector<mapbox::base::Value> value{coordinate.longitude(), coordinate.latitude()}; + return value; + } +}; + template <typename T> Value makeValue(T&& arg) { return ValueFactory<std::decay_t<T>>::make(std::forward<T>(arg)); |