diff --git a/baatolibrary/src/main/java/com/baato/baatolibrary/navigation/InstructionResponse.java b/baatolibrary/src/main/java/com/baato/baatolibrary/navigation/InstructionResponse.java index 2dc4ee6..9f268bd 100644 --- a/baatolibrary/src/main/java/com/baato/baatolibrary/navigation/InstructionResponse.java +++ b/baatolibrary/src/main/java/com/baato/baatolibrary/navigation/InstructionResponse.java @@ -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; } diff --git a/baatolibrary/src/main/java/com/baato/baatolibrary/navigation/NavigateResponseConverter.java b/baatolibrary/src/main/java/com/baato/baatolibrary/navigation/NavigateResponseConverter.java index b9c68da..2210502 100644 --- a/baatolibrary/src/main/java/com/baato/baatolibrary/navigation/NavigateResponseConverter.java +++ b/baatolibrary/src/main/java/com/baato/baatolibrary/navigation/NavigateResponseConverter.java @@ -584,6 +584,14 @@ private static void putVoiceInstructions(ArrayList 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());