[core] Limit symbol re-placement on changed tile distance to pitch > 25.

This commit is contained in:
Chris Loer
2017-05-25 14:12:20 -07:00
committed by Ansis Brammanis
parent 7c7564d72e
commit 72f6b73590

View File

@@ -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 {