Skip to content
Browse files

lang on response instructions

  • Loading branch information...
1 parent 024b2b6 commit cc4e73c27e729490c47941d11a5af12e1b1fcd9f @Delawen Delawen committed
Showing with 5 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +4 −3 src/main/java/org/gofleet/openLS/util/OSRMConnector.java
View
1 .gitignore
@@ -3,3 +3,4 @@ target/
.settings
.metadata
.project
+/.externalToolBuilders
View
7 src/main/java/org/gofleet/openLS/util/OSRMConnector.java
@@ -33,6 +33,7 @@
import java.util.List;
import java.util.Locale;
+import javax.ws.rs.core.MediaType;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.datatype.DatatypeFactory;
@@ -169,7 +170,7 @@ public AbstractResponseParametersType routePlan(
url += "&via=" + point.getY() + "," + point.getX();
}
- url += "&z=15&output=json&geomformat=cmp&instructions=true";
+ url += "&output=json&instructions=true";
LOG.debug(url);
@@ -177,8 +178,6 @@ public AbstractResponseParametersType routePlan(
lst.setSrsName(targetCRS.getName().getCode());
- routeInstructionsList.setLang("en");
-
JsonFactory f = new JsonFactory();
JsonParser jp = f.createJsonParser(new URL(url));
jp.nextToken();
@@ -255,6 +254,8 @@ else if (fieldname.equals("route_summary")) {
if (param.getRouteInstructionsRequest() != null)
res.setRouteInstructionsList(routeInstructionsList);
+ res.getRouteInstructionsList().setFormat(MediaType.TEXT_PLAIN);
+ res.getRouteInstructionsList().setLang(locale.getLanguage());
res.setRouteSummary(routeSummary);
} catch (Throwable t) {
LOG.error("Error generating route response: " + t, t);

0 comments on commit cc4e73c

Please sign in to comment.
Something went wrong with that request. Please try again.