From 42f0ac662738097a70ae5ac2bf97cfd99040b2f6 Mon Sep 17 00:00:00 2001 From: afischerdev Date: Sat, 30 Sep 2023 11:01:21 +0200 Subject: [PATCH] added app specific vars --- .../main/java/btools/router/RoutingParamCollector.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/brouter-core/src/main/java/btools/router/RoutingParamCollector.java b/brouter-core/src/main/java/btools/router/RoutingParamCollector.java index adc08fe..38f6aaf 100644 --- a/brouter-core/src/main/java/btools/router/RoutingParamCollector.java +++ b/brouter-core/src/main/java/btools/router/RoutingParamCollector.java @@ -196,6 +196,12 @@ public class RoutingParamCollector { rctx.turnInstructionMode = Integer.parseInt(value); } else if (key.equals("timode")) { rctx.turnInstructionMode = Integer.parseInt(value); + } else if (key.equals("turnInstructionFormat")) { + if ("osmand".equalsIgnoreCase(value)) { + rctx.turnInstructionMode = 3; + } else if ("locus".equalsIgnoreCase(value)) { + rctx.turnInstructionMode = 2; + } } else if (key.equals("exportWaypoints")) { rctx.exportWaypoints = (Integer.parseInt(value) == 1); } else if (key.equals("format")) { @@ -305,6 +311,9 @@ public class RoutingParamCollector { public List readNogos(String nogoLons, String nogoLats, String nogoRadi) { if (nogoLons == null || nogoLats == null || nogoRadi == null) return null; List nogoList = new ArrayList<>(); + nogoLons = nogoLons.replace("[", "").replace("]", ""); + nogoLats = nogoLats.replace("[", "").replace("]", ""); + nogoRadi = nogoRadi.replace("[", "").replace("]", ""); String[] lons = nogoLons.split(","); String[] lats = nogoLats.split(",");