forked from organicmaps/organicmaps
Fix bug with viewport scale for GPS update.
This commit is contained in:
parent
b40178913d
commit
5ae04598eb
1 changed files with 9 additions and 5 deletions
|
@ -87,12 +87,16 @@ void Framework::OnGpsUpdate(location::GpsInfo const & info)
|
|||
// correct rect scale if country isn't downloaded
|
||||
int const upperScale = scales::GetUpperWorldScale();
|
||||
if (rectScale > upperScale && IsEmptyModel(center))
|
||||
{
|
||||
setScale = upperScale;
|
||||
|
||||
// correct rect scale for best user experience
|
||||
int const bestScale = scales::GetUpperScale() - 1;
|
||||
if (rectScale > bestScale)
|
||||
setScale = bestScale;
|
||||
}
|
||||
else
|
||||
{
|
||||
// correct rect scale for best user experience
|
||||
int const bestScale = scales::GetUpperScale() - 1;
|
||||
if (rectScale > bestScale)
|
||||
setScale = bestScale;
|
||||
}
|
||||
|
||||
if (setScale != -1)
|
||||
rect = scales::GetRectForLevel(setScale, center, 1.0);
|
||||
|
|
Loading…
Add table
Reference in a new issue