diff options
author | vng <viktor.govako@gmail.com> | 2013-09-14 19:03:40 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:01:37 +0300 |
commit | 0eac5695941220e100c910c56ac1ce3d147b0668 (patch) | |
tree | 6f1b466892b1056448158c7577cef6becf5f8b3e /indexer/scales.cpp | |
parent | 2b2be34748405f9c77851aec64c14987394f13ad (diff) |
Return back INITIAL_LEVEL for scales - current styles are optimized for this increment.
Diffstat (limited to 'indexer/scales.cpp')
-rw-r--r-- | indexer/scales.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indexer/scales.cpp b/indexer/scales.cpp index aa760442ca..a1db3730b7 100644 --- a/indexer/scales.cpp +++ b/indexer/scales.cpp @@ -8,10 +8,11 @@ namespace scales { + static const int INITIAL_LEVEL = 1; double GetScaleLevelD(double ratio) { - double const level = min(static_cast<double>(GetUpperScale()), log(ratio) / log(2.0)); + double const level = min(static_cast<double>(GetUpperScale()), log(ratio) / log(2.0) + INITIAL_LEVEL); return (level < 0.0 ? 0.0 : level); } @@ -37,7 +38,9 @@ namespace scales double GetRationForLevel(double level) { - return max(0.0, pow(2.0, level)); + if (level < INITIAL_LEVEL) + level = INITIAL_LEVEL; + return pow(2.0, level - INITIAL_LEVEL); } m2::RectD GetRectForLevel(double level, m2::PointD const & center) |