diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-10-26 15:45:32 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-10-26 16:44:55 +0100 |
commit | 75dec6ffac6f3e79e5a173cd8a3f98d374ed1c09 (patch) | |
tree | dd3e2752cfe2c1ea741ac1b97d38e5e4bc4aa008 /src/mbgl/text/placement_config.hpp | |
parent | c0c554e36fd43bfe57ef13fe60f9cd50b5c018fd (diff) | |
download | qtlocation-mapboxgl-75dec6ffac6f3e79e5a173cd8a3f98d374ed1c09.tar.gz |
[core] always reparse with the freshest possible placement config
Fixes an issue where updates to stale tiles would remove labels altogether until the map was rotated.
Diffstat (limited to 'src/mbgl/text/placement_config.hpp')
-rw-r--r-- | src/mbgl/text/placement_config.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mbgl/text/placement_config.hpp b/src/mbgl/text/placement_config.hpp new file mode 100644 index 0000000000..6680f52449 --- /dev/null +++ b/src/mbgl/text/placement_config.hpp @@ -0,0 +1,28 @@ +#ifndef MBGL_TEXT_PLACEMENT_CONFIG +#define MBGL_TEXT_PLACEMENT_CONFIG + +namespace mbgl { + +class PlacementConfig { +public: + inline PlacementConfig(float angle_ = 0, float pitch_ = 0, bool debug_ = false) + : angle(angle_), pitch(pitch_), debug(debug_) { + } + + inline bool operator==(const PlacementConfig& rhs) const { + return angle == rhs.angle && pitch == rhs.pitch && debug == rhs.debug; + } + + inline bool operator!=(const PlacementConfig& rhs) const { + return !operator==(rhs); + } + +public: + float angle; + float pitch; + bool debug; +}; + +} // namespace mbgl + +#endif |