guoshilong
2022-09-21 414327a34ab7f4c9d9a74be8a09cb07d6aab1455
src/components/OpenLayersMap/index.vue
@@ -1,8 +1,8 @@
<template>
  <div>
    <div id='map' style='width: 100%; height: 400px'>
      <div id='map' :style="{height:isTaskinfoDetail?'85vh':'40vh',width:'100%'}">
      <div style="position: absolute;right:40%;top:-1%;z-index: 999999">
        <p style="margin-top: 10px">
        <p style="margin-top: 10px" v-if="!isTaskinfoDetail">
          <el-button type="primary" size="small" @click="point()">绘制路线</el-button>
          <el-button type="danger" size="small" @click="clearDraw()">重置</el-button>
        </p>
@@ -30,7 +30,7 @@
export default {
  name: 'OpenLayersMap',
  props:['routeRange'],
  props:['routeRange','isTaskinfoDetail'],
  data() {
    return {
      map: null,
@@ -84,7 +84,6 @@
        }),
      })
      _this.map.addLayer(_this.lineVector)
      _this.addLineDraw(_this.routeRange)
    },
    // 绘画之后的样式