| | |
| | | JSONObject content = new JSONObject(); |
| | | content.put("orderId", orderId); |
| | | content.put("routeType", "ORDER_NAVIGATION_START_DATA".equals(keyStr) ? 1 : 2); |
| | | content.put("direction", null != vehiclePosition ? vehiclePosition.getCourse() : 0); |
| | | content.put("direction", null != vehiclePosition ? vehiclePosition.getCourse() : 90); |
| | | JSONObject route = new JSONObject(); |
| | | route.put("distance", routeVo.getDistance()); |
| | | route.put("duration", routeVo.getDuration()); |
| | |
| | | return point; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | route.put("polyline", collect); |
| | | route.put("polyline", collect.toArray()); |
| | | content.put("route", route.toJSONString()); |
| | | jsonObject.put("content", content.toJSONString()); |
| | | SendMessageDTO messageDTO = new SendMessageDTO(); |