diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-09-12 08:03:08 +0100 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-09-13 12:38:59 +0300 |
commit | beb67fb7b2119fbda8cf2906bdcc67aa7d7fad65 (patch) | |
tree | 49a7f1f42d184aeff192bc3c24e95a0612d715a0 /src/mbgl/style/style.hpp | |
parent | 0cc062a5fd1f9ed63f688dbb802be252c04d917f (diff) | |
download | qtlocation-mapboxgl-beb67fb7b2119fbda8cf2906bdcc67aa7d7fad65.tar.gz |
[core] Separate transition options accessors from class API
Now the style class transition options have its own getter/setter, which
persists for each style until a new style is set.
Diffstat (limited to 'src/mbgl/style/style.hpp')
-rw-r--r-- | src/mbgl/style/style.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mbgl/style/style.hpp b/src/mbgl/style/style.hpp index 61f2563c87..8027313ab9 100644 --- a/src/mbgl/style/style.hpp +++ b/src/mbgl/style/style.hpp @@ -79,10 +79,14 @@ public: double getDefaultBearing() const; double getDefaultPitch() const; - bool addClass(const std::string&, const TransitionOptions& = {}); - bool removeClass(const std::string&, const TransitionOptions& = {}); + bool addClass(const std::string&); + bool removeClass(const std::string&); + void setClasses(const std::vector<std::string>&); + + TransitionOptions getTransitionOptions() const; + void setTransitionOptions(const TransitionOptions&); + bool hasClass(const std::string&) const; - void setClasses(const std::vector<std::string>&, const TransitionOptions& = {}); std::vector<std::string> getClasses() const; RenderData getRenderData(MapDebugOptions) const; @@ -107,7 +111,7 @@ private: std::vector<std::unique_ptr<Source>> sources; std::vector<std::unique_ptr<Layer>> layers; std::vector<std::string> classes; - optional<TransitionOptions> transitionProperties; + TransitionOptions transitionOptions; // Defaults std::string name; |