liuyg
2021-12-14 d8b1c86a025f4ab44cb46dd15c9c5e0d82f28fba
src/components/map/main.vue
@@ -68,7 +68,7 @@
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";
@@ -364,9 +364,9 @@
          }),
          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) {
            // 结束绘画 处理数据
@@ -402,6 +402,7 @@
        }
      }
      str += ")";
      // console.log(str, 111);
      return str;
    },
    addLinesDraw(val) {
@@ -464,7 +465,7 @@
      if (that.draw != null) {
        that.beginDraw = false;
        that.butTitle = "重新绘画";
        that.draw.controlDrawing(true);
        that.draw.abortDrawing_();
        that.tipTitle = "已结束绘画,点击重新绘画清除上次内容并开始绘画";
        $("#map").unbind("mousemove");
        // setTimeout(() => {