Enable use of direction to app (#464)

* make app equal to server #314
This commit is contained in:
afischerdev 2022-10-19 21:12:38 +02:00 committed by GitHub
parent 51dc7fb1fb
commit 13a41bd9f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 39 deletions

View file

@ -29,6 +29,8 @@ interface IBRouterService {
// "pois" = lon,lat,name|... (optional)
// "extraParams" = Bundle key=value list for a profile setup (like "profile:")
// "timode" = turnInstructionMode [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style] default 0
// "heading" = angle (optional to give a route a start direction)
// "direction" = (deprecated) angle
// return null if all ok and no path given, the track if ok and path given, an error message if it was wrong
// the resultas string when 'pathToFileResult' is null, this should be default when Android Q or later

View file

@ -64,10 +64,13 @@ public class BRouterWorker {
rc.turnInstructionMode = params.getInt("timode");
}
if (params.containsKey("direction")) {
rc.startDirection = params.getInt("direction");
}
if (params.containsKey("heading")) {
rc.startDirection = params.getInt("heading");
rc.forceUseStartDirection = true;
}
if (params.containsKey("alternativeidx")) {
rc.alternativeIdx = params.getInt("alternativeidx");
}