MapPosition: update also zoomLevel in setByBoundingBox, fixes #9
This commit is contained in:
parent
a06973241c
commit
c238916d89
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012 Hannes Janetzek
|
* Copyright 2012 Hannes Janetzek
|
||||||
|
* Copyright 2016 devemux86
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@ -180,6 +181,7 @@ public class MapPosition {
|
|||||||
double zy = viewHeight / (dy * Tile.SIZE);
|
double zy = viewHeight / (dy * Tile.SIZE);
|
||||||
|
|
||||||
scale = Math.min(zx, zy);
|
scale = Math.min(zx, zy);
|
||||||
|
zoomLevel = FastMath.log2((int) scale);
|
||||||
x = minx + dx / 2;
|
x = minx + dx / 2;
|
||||||
y = miny + dy / 2;
|
y = miny + dy / 2;
|
||||||
bearing = 0;
|
bearing = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user