forked from organicmaps/organicmaps
Return back INITIAL_LEVEL for scales - current styles are optimized for this increment.
This commit is contained in:
parent
2b2be34748
commit
0eac569594
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue