Open needed location by clicking on bitmap
This commit is contained in:
parent
3807f8f367
commit
ecd2dc4763
1 changed files with 2 additions and 1 deletions
|
@ -277,7 +277,8 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
||||||
headerView.setOnClickListener(new View.OnClickListener() {
|
headerView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
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();
|
final OsmandSettings settings = app.getSettings();
|
||||||
settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(),
|
settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(),
|
||||||
settings.getLastKnownMapZoom());
|
settings.getLastKnownMapZoom());
|
||||||
|
|
Loading…
Reference in a new issue