moved string control to app worker
This commit is contained in:
parent
8d4012211e
commit
90cc045404
2 changed files with 4 additions and 5 deletions
|
@ -133,7 +133,7 @@ public class RoutingParamCollector {
|
|||
if (params.containsKey("profile")) {
|
||||
rctx.localFunction = params.get("profile");
|
||||
}
|
||||
if (params.containsKey("nogoLats")) {
|
||||
if (params.containsKey("nogoLats") && params.get("nogoLats").length() > 0) {
|
||||
List<OsmNodeNamed> nogoList = readNogos(params.get("nogoLons"), params.get("nogoLats"), params.get("nogoRadi"));
|
||||
if (nogoList != null) {
|
||||
RoutingContext.prepareNogoPoints(nogoList);
|
||||
|
@ -324,9 +324,6 @@ public class RoutingParamCollector {
|
|||
public List<OsmNodeNamed> readNogos(String nogoLons, String nogoLats, String nogoRadi) {
|
||||
if (nogoLons == null || nogoLats == null || nogoRadi == null) return null;
|
||||
List<OsmNodeNamed> nogoList = new ArrayList<>();
|
||||
nogoLons = nogoLons.replace("[", "").replace("]", "");
|
||||
nogoLats = nogoLats.replace("[", "").replace("]", "");
|
||||
nogoRadi = nogoRadi.replace("[", "").replace("]", "");
|
||||
|
||||
String[] lons = nogoLons.split(",");
|
||||
String[] lats = nogoLats.split(",");
|
||||
|
|
|
@ -86,7 +86,9 @@ public class BRouterWorker {
|
|||
for (String key : params.keySet()) {
|
||||
Object value = params.get(key);
|
||||
if (value instanceof double[]) {
|
||||
theParams.put(key, Arrays.toString(params.getDoubleArray(key)));
|
||||
String s = Arrays.toString(params.getDoubleArray(key));
|
||||
s = s.replace("[", "").replace("]", "");
|
||||
theParams.put(key, s);
|
||||
} else {
|
||||
theParams.put(key, value.toString());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue