Fix fit route on map after calc on tablet landscape
This commit is contained in:
parent
a17274c372
commit
87a2740e6f
2 changed files with 7 additions and 5 deletions
|
@ -1818,7 +1818,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
|||
WeakReference<MapRouteInfoMenuFragment> fragmentRef = mapRouteInfoMenu.findMenuFragment();
|
||||
if (fragmentRef != null) {
|
||||
MapRouteInfoMenuFragment f = fragmentRef.get();
|
||||
if (landscapeLayout) {
|
||||
if (!f.isPortrait()) {
|
||||
tileBoxWidthPx = tb.getPixWidth() - f.getWidth();
|
||||
} else {
|
||||
tileBoxHeightPx = tb.getPixHeight() - f.getHeight();
|
||||
|
|
|
@ -1684,10 +1684,12 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
|||
WeakReference<MapRouteInfoMenuFragment> fragmentRef = routeInfoMenu.findMenuFragment();
|
||||
if (fragmentRef != null) {
|
||||
MapRouteInfoMenuFragment f = fragmentRef.get();
|
||||
if (mapActivity.isLandscapeLayout()) {
|
||||
tileBoxWidthPx = tb.getPixWidth() - f.getWidth();
|
||||
} else {
|
||||
tileBoxHeightPx = tb.getPixHeight() - f.getHeight();
|
||||
if (f != null) {
|
||||
if (!f.isPortrait()) {
|
||||
tileBoxWidthPx = tb.getPixWidth() - f.getWidth();
|
||||
} else {
|
||||
tileBoxHeightPx = tb.getPixHeight() - f.getHeight();
|
||||
}
|
||||
}
|
||||
}
|
||||
mapActivity.getMapView().fitLocationToMap(latitude, longitude, mapActivity.getMapView().getZoom(),
|
||||
|
|
Loading…
Reference in a new issue