public void setParams(final RoutingContext rctx, final List<OsmNodeNamed> wplist, final Map<String, String> params) {
        if (params != null) {
            if (params.isEmpty()) {
                return;
            }

            // prepare nogos extra
            if (params.containsKey("nogoLats") && !params.get("nogoLats").isEmpty()) {
                final List<OsmNodeNamed> nogoList = readNogos(params.get("nogoLons"), params.get("nogoLats"), params.get("nogoRadi"));
                if (nogoList != null) {
                    RoutingContext.prepareNogoPoints(nogoList);
                    if (rctx.nogopoints == null) {
                        rctx.nogopoints = nogoList;
                    } else {
                        rctx.nogopoints.addAll(nogoList);
                    }
                }
                params.remove("nogoLats");
                params.remove("nogoLons");
                params.remove("nogoRadi");
            }
            if (params.containsKey("nogos")) {
                final List<OsmNodeNamed> nogoList = readNogoList(params.get("nogos"));
                if (nogoList != null) {
                    RoutingContext.prepareNogoPoints(nogoList);
                    if (rctx.nogopoints == null) {
                        rctx.nogopoints = nogoList;
                    } else {
                        rctx.nogopoints.addAll(nogoList);
                    }
                }
                params.remove("nogos");
            }
            if (params.containsKey("polylines")) {
                final List<OsmNodeNamed> result = new ArrayList<>();
                parseNogoPolygons(params.get("polylines"), result, false);
                if (rctx.nogopoints == null) {
                    rctx.nogopoints = result;
                } else {
                    rctx.nogopoints.addAll(result);
                }
                params.remove("polylines");
            }
            if (params.containsKey("polygons")) {
                final List<OsmNodeNamed> result = new ArrayList<>();
                parseNogoPolygons(params.get("polygons"), result, true);
                if (rctx.nogopoints == null) {
                    rctx.nogopoints = result;
                } else {
                    rctx.nogopoints.addAll(result);
                }
                params.remove("polygons");
            }

            for (Map.Entry<String, String> e : params.entrySet()) {
                final String key = e.getKey();
                final String value = e.getValue();
                if (DEBUG) {
                    System.out.println("params " + key + " " + value);
                }

                if (key.equals("straight")) {
                    try {
                        final String[] sa = value.split(",");
                        for (String s : sa) {
                            final int v = Integer.parseInt(s);
                            if (wplist.size() > v) {
                                wplist.get(v).direct = true;
                            }
                        }
                    } catch (Exception ex) {
                        System.err.println("error " + ex.getStackTrace()[0].getLineNumber() + " " + ex.getStackTrace()[0] + "\n" + ex);
                    }
                } else if (key.equals("pois")) {
                    rctx.poipoints = readPoisList(value);
                } else if (key.equals("heading")) {
                    rctx.startDirection = Integer.valueOf(value);
                    rctx.forceUseStartDirection = true;
                } else if (key.equals("direction")) {
                    rctx.startDirection = Integer.valueOf(value);
                } else if (key.equals("alternativeidx")) {
                    rctx.setAlternativeIdx(Integer.parseInt(value));
                } else if (key.equals("turnInstructionMode")) {
                    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")) {
                    rctx.outputFormat = value.toLowerCase(Locale.ROOT);
                } else if (key.equals("trackFormat")) {
                    rctx.outputFormat = value.toLowerCase(Locale.ROOT);
                } else if (key.startsWith("profile:")) {
                    if (rctx.keyValues == null) {
                        rctx.keyValues = new HashMap<>();
                    }
                    rctx.keyValues.put(key.substring(8), value);
                }
                // ignore other params
            }
        }
    }
fill a parameter map into the routing context

@param rctx    the context
@param wplist  the list of way points needed for 'straight' parameter
@param params  the list of parameters
main/src/main/java/cgeo/geocaching/brouter/core/RoutingParamCollector.java