diff options
Diffstat (limited to 'src/mbgl/style')
-rw-r--r-- | src/mbgl/style/parser.hpp | 3 | ||||
-rw-r--r-- | src/mbgl/style/style_impl.cpp | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/style/parser.hpp b/src/mbgl/style/parser.hpp index 401b5ff513..ec7be038fb 100644 --- a/src/mbgl/style/parser.hpp +++ b/src/mbgl/style/parser.hpp @@ -4,6 +4,7 @@ #include <mbgl/style/source.hpp> #include <mbgl/style/light.hpp> +#include <mbgl/util/constants.hpp> #include <mbgl/util/rapidjson.hpp> #include <mbgl/util/font_stack.hpp> #include <mbgl/util/geo.hpp> @@ -32,7 +33,7 @@ public: std::vector<std::unique_ptr<Source>> sources; std::vector<std::unique_ptr<Layer>> layers; - TransitionOptions transition; + TransitionOptions transition { { util::DEFAULT_TRANSITION_DURATION } }; Light light; std::string name; diff --git a/src/mbgl/style/style_impl.cpp b/src/mbgl/style/style_impl.cpp index 0c7f924917..5c9edc789f 100644 --- a/src/mbgl/style/style_impl.cpp +++ b/src/mbgl/style/style_impl.cpp @@ -92,8 +92,7 @@ void Style::Impl::parse(const std::string& json_) { layers.clear(); images.clear(); - transitionOptions = {}; - transitionOptions.duration = util::DEFAULT_TRANSITION_DURATION; + transitionOptions = parser.transition; for (auto& source : parser.sources) { addSource(std::move(source)); |