| | |
| | | NavigateNode navigateNode = new NavigateNode(i, j); |
| | | |
| | | String nodeType = map.getString("type"); |
| | | String nodeValue = map.getString("value"); |
| | | if(nodeType == null) { |
| | | navigateNode.setValue(MapNodeType.DISABLE.id); |
| | | }else if(nodeType.equals("devp") || nodeType.equals("merge")){ |
| | |
| | | JSONObject valueObj = JSON.parseObject(map.getString("value")); |
| | | List<String> directionList = valueObj.getJSONArray("direction").toJavaList(String.class); |
| | | navigateNode.setDirectionList(directionList); |
| | | }else { |
| | | } else if (nodeType.equals("rgv")) { |
| | | navigateNode.setValue(MapNodeType.NORMAL_PATH.id); |
| | | JSONObject valueObj = JSON.parseObject(map.getString("value")); |
| | | |
| | | JSONObject newNodeValue = new JSONObject(); |
| | | newNodeValue.put("rgvCalcFlag", 1); |
| | | nodeValue = JSON.toJSONString(newNodeValue); |
| | | |
| | | //RGV暂不控制行走方向,默认上下左右都可走 |
| | | List<String> directionList = new ArrayList<>(); |
| | | directionList.add("top"); |
| | | directionList.add("bottom"); |
| | | directionList.add("left"); |
| | | directionList.add("right"); |
| | | navigateNode.setDirectionList(directionList); |
| | | } else { |
| | | navigateNode.setValue(MapNodeType.DISABLE.id); |
| | | } |
| | | |
| | | navigateNode.setNodeType(nodeType); |
| | | navigateNode.setNodeValue(map.getString("value")); |
| | | navigateNode.setNodeValue(nodeValue); |
| | | navigateNodeRow.add(navigateNode); |
| | | } |
| | | navigateNodeList.add(navigateNodeRow); |