From 68d140072b76b6fd8ca124ced47735925fb224b3 Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Thu, 25 May 2017 14:12:20 -0700 Subject: [core] Limit symbol re-placement on changed tile distance to pitch > 25. --- src/mbgl/text/placement_config.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 + 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 { -- cgit v1.2.1