From ecd2dc47637b204c0b242631d5357387e421198a Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Thu, 29 Jun 2017 11:30:24 +0300 Subject: [PATCH] Open needed location by clicking on bitmap --- OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java index ad0d58db9c..84f5a3eb30 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java @@ -277,7 +277,8 @@ public class TrackSegmentFragment extends OsmAndListFragment { headerView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - LatLon location = new LatLon(generalDisplayItem.locationStart.lat, generalDisplayItem.locationStart.lon); + LatLon location = new LatLon((generalDisplayItem.analysis.bottom + generalDisplayItem.analysis.top) / 2, + (generalDisplayItem.analysis.left + generalDisplayItem.analysis.right) / 2); final OsmandSettings settings = app.getSettings(); settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(), settings.getLastKnownMapZoom());