| | |
| | | package com.dji.sample.wayline.plane.controller; |
| | | |
| | | import com.dji.sample.common.model.ResponseResult; |
| | | import com.dji.sample.patches.xml.mode.XMLTemplateModel; |
| | | import com.dji.sample.patches.xml.utils.CreateWaylineFileUtils; |
| | | import com.dji.sample.wayline.plane.PlaneCourseUtils; |
| | | import com.dji.sample.wayline.plane.param.CreateWaylineParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return ResponseResult.success(PlaneCourseUtils.createWaylinePoints(param)); |
| | | } |
| | | |
| | | @PostMapping("/saveWayLineFile") |
| | | public ResponseResult saveWayLineFile(@RequestBody CreateWaylineParam param) { |
| | | // 初始化模板对象 |
| | | XMLTemplateModel xmlModel = XMLTemplateModel.initPolygon(param); |
| | | |
| | | //生成航线文件 |
| | | CreateWaylineFileUtils.createWaylineFileByPolygon(xmlModel, "src\\main\\resources\\template\\template-polygon.xml", "src\\main\\resources\\template\\wpmz2\\template.xml"); |
| | | CreateWaylineFileUtils.createWaylineFileByPolygon(xmlModel, "src\\main\\resources\\template\\waylines-polygon.xml", "src\\main\\resources\\template\\wpmz2\\waylines.xml"); |
| | | |
| | | //kmz、上传航线库 |
| | | |
| | | return ResponseResult.success(); |
| | | |
| | | } |
| | | |
| | | } |