Merge pull request #8900 from osmandapp/fix_8726

Fix_8726
This commit is contained in:
vshcherb 2020-05-06 13:40:03 +02:00 committed by GitHub
commit e8a8dcfec9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,6 +105,8 @@ public class ExternalApiHelper {
public static final String PARAM_CATEGORY = "category"; public static final String PARAM_CATEGORY = "category";
public static final String PARAM_LAT = "lat"; public static final String PARAM_LAT = "lat";
public static final String PARAM_LON = "lon"; public static final String PARAM_LON = "lon";
public static final String PARAM_MAP_LAT = "map_lat";
public static final String PARAM_MAP_LON = "map_lon";
public static final String PARAM_COLOR = "color"; public static final String PARAM_COLOR = "color";
public static final String PARAM_VISIBLE = "visible"; public static final String PARAM_VISIBLE = "visible";
@ -445,6 +447,12 @@ public class ExternalApiHelper {
result.putExtra(PARAM_LON, location.getLongitude()); result.putExtra(PARAM_LON, location.getLongitude());
} }
LatLon mapLocation = mapActivity.getMapLocation();
if (location != null) {
result.putExtra(PARAM_MAP_LAT, mapLocation.getLatitude());
result.putExtra(PARAM_MAP_LON, mapLocation.getLongitude());
}
final RoutingHelper routingHelper = app.getRoutingHelper(); final RoutingHelper routingHelper = app.getRoutingHelper();
if (routingHelper.isRouteCalculated()) { if (routingHelper.isRouteCalculated()) {
int time = routingHelper.getLeftTime(); int time = routingHelper.getLeftTime();