| | |
| | | import VectorSource from "ol/source/Vector"; |
| | | |
| | | import { OSM, TileWMS, Vector } from "ol/source"; |
| | | import Draw from "ol/interaction/Draw"; |
| | | import Draw from "./Draw"; |
| | | |
| | | import Feature from "ol/Feature.js"; |
| | | import Point from "ol/geom/Point.js"; |
| | |
| | | }), |
| | | coordinate: function (res) { |
| | | //画线中的点 |
| | | that.coordinates.push(res.coordinate_); |
| | | that.coordinates.push(res); |
| | | that.tipTitle = "可继续,或选择最终位置双击结束"; |
| | | // console.log(res.coordinate_, 123456); |
| | | // console.log(res, 123456); |
| | | }, |
| | | coordinateOver: function (res) { |
| | | // 结束绘画 处理数据 |
| | |
| | | } |
| | | } |
| | | str += ")"; |
| | | // console.log(str, 111); |
| | | return str; |
| | | }, |
| | | addLinesDraw(val) { |
| | |
| | | if (that.draw != null) { |
| | | that.beginDraw = false; |
| | | that.butTitle = "重新绘画"; |
| | | that.draw.controlDrawing(true); |
| | | that.draw.abortDrawing_(); |
| | | that.tipTitle = "已结束绘画,点击重新绘画清除上次内容并开始绘画"; |
| | | $("#map").unbind("mousemove"); |
| | | // setTimeout(() => { |