Skip to content

Commit

Permalink
added landmark voice info
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhawak committed Oct 12, 2020
1 parent 4215b61 commit 1ffd4f7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,18 @@ public class ExtraInfoJSON {
@Expose
private Double lastHeading;

@SerializedName("landmark")
@Expose
private String landmark;

public String getLandmark() {
return landmark;
}

public void setLandmark(String landmark) {
this.landmark = landmark;
}

public Double getHeading() {
return heading;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,14 @@ private static void putVoiceInstructions(ArrayList<InstructionResponse> instruct
else
description = "You have arrived at your destination";
}
if(ghResponse.getInstructionList().get(index + 1).getExtraInfoJSON().getLandmark() != null) {
String extraInfo = ghResponse.getInstructionList().get(index + 1).getExtraInfoJSON().getLandmark();
if (locale.getLanguage().equals("ne"))
extraInfo = "तपाईं " + extraInfo + " भएर जानुहुनेछ";
else
extraInfo = "you will pass by " + extraInfo;
description = description + ", " + extraInfo;
}
String value = getTranslatedDistance((int) distanceAlongGeometry);
// Log.wtf("turn desc then", description);
// description = description.replace("unknown instruction sign '6'", "Continue on " + instructions.get(index).getName());
Expand Down

0 comments on commit 1ffd4f7

Please sign in to comment.