summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2017-05-25 14:12:20 -0700
committerAnsis Brammanis <brammanis@gmail.com>2017-07-07 10:46:21 -0400
commit2e77ce234e4b5210f46ea14440f1447155d350e7 (patch)
tree0baa521572bdbf734e7c10663b4e224b0bedacf1
parent0df17d297ef2eeb3a2d853bee65af3eb83a7a9a5 (diff)
downloadqtlocation-mapboxgl-2e77ce234e4b5210f46ea14440f1447155d350e7.tar.gz
[core] Limit symbol re-placement on changed tile distance to pitch > 25.
-rw-r--r--src/mbgl/text/placement_config.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mbgl/text/placement_config.hpp b/src/mbgl/text/placement_config.hpp
index c5c013055a..1e1279341d 100644
--- a/src/mbgl/text/placement_config.hpp
+++ b/src/mbgl/text/placement_config.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include <mbgl/util/constants.hpp>
+
namespace mbgl {
class PlacementConfig {
@@ -9,7 +11,11 @@ public:
}
bool operator==(const PlacementConfig& rhs) const {
- return angle == rhs.angle && pitch == rhs.pitch && cameraToCenterDistance == rhs.cameraToCenterDistance && cameraToTileDistance == rhs.cameraToTileDistance && debug == rhs.debug;
+ return angle == rhs.angle &&
+ pitch == rhs.pitch &&
+ cameraToCenterDistance == rhs.cameraToCenterDistance &&
+ (pitch * util::RAD2DEG < 25 || cameraToTileDistance == rhs.cameraToTileDistance) &&
+ debug == rhs.debug;
}
bool operator!=(const PlacementConfig& rhs) const {