From 933c2baabc6e6f8ee41e642a47f2742915230366 Mon Sep 17 00:00:00 2001 From: Koen Rabaey Date: Tue, 22 Apr 2014 22:46:36 +0200 Subject: [PATCH] - move map to first waypoint of imported track --- OsmAnd/src/net/osmand/plus/activities/MapActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 82db0cf491..332ab73a53 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -23,6 +23,7 @@ import net.osmand.plus.ApplicationMode; import net.osmand.plus.BusyIndicator; import net.osmand.plus.GPXUtilities; import net.osmand.plus.GPXUtilities.GPXFile; +import net.osmand.plus.GPXUtilities.WptPt; import net.osmand.plus.OsmAndConstants; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; @@ -713,6 +714,12 @@ public class MapActivity extends AccessibleActivity { else { getMyApplication().setGpxFileToDisplay(result, true); + final WptPt moveTo = result.findPointToShow(); + if (moveTo != null) + { + mapView.getAnimatedDraggingThread().startMoving(moveTo.lat, moveTo.lon, mapView.getZoom(), true); + } + mapView.refreshMap(); } }