Get maximal rect size in scale calculation.

This commit is contained in:
vng 2013-11-05 20:17:45 +03:00 committed by Alex Zolotarev
parent d384240901
commit 5d4c7e6c04

View file

@ -49,7 +49,7 @@ int ScalesProcessor::GetTileScaleBase(ScreenBase const & s) const
int ScalesProcessor::GetTileScaleBase(m2::RectD const & r) const
{
double const sz = min(r.SizeX(), r.SizeY());
double const sz = max(r.SizeX(), r.SizeY());
return max(1, my::rounds(log((MercatorBounds::maxX - MercatorBounds::minX) / sz) / log(2.0)));
}