diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-05-25 14:12:20 -0700 |
---|---|---|
committer | Ansis Brammanis <brammanis@gmail.com> | 2017-07-11 09:10:24 -0700 |
commit | 72f6b73590722d5451623cd21c4b1abde74e8f69 (patch) | |
tree | 67c3318d5fbbea25df0913073ea988a68c90ce34 /src/mbgl | |
parent | 7c7564d72ed060bfd9ff1d5ebc6086a52f837c4b (diff) | |
download | qtlocation-mapboxgl-72f6b73590722d5451623cd21c4b1abde74e8f69.tar.gz |
[core] Limit symbol re-placement on changed tile distance to pitch > 25.
Diffstat (limited to 'src/mbgl')
-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 { |