diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-05-25 14:12:20 -0700 |
---|---|---|
committer | Ansis Brammanis <brammanis@gmail.com> | 2017-07-10 13:09:33 -0400 |
commit | 68d140072b76b6fd8ca124ced47735925fb224b3 (patch) | |
tree | 2e28cba608dcb420e71acca29f96c29c7302ad65 | |
parent | ef3d74da1b1c1a2f111278069bbdd32749c586f0 (diff) | |
download | qtlocation-mapboxgl-68d140072b76b6fd8ca124ced47735925fb224b3.tar.gz |
[core] Limit symbol re-placement on changed tile distance to pitch > 25.
-rw-r--r-- | src/mbgl/text/placement_config.hpp | 8 |
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 { |