| | |
| | | <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> |
| | |
| | | |
| | | export default { |
| | | name: 'OpenLayersMap', |
| | | props:['routeRange'], |
| | | props:['routeRange','isTaskinfoDetail'], |
| | | data() { |
| | | return { |
| | | map: null, |
| | |
| | | }), |
| | | }) |
| | | _this.map.addLayer(_this.lineVector) |
| | | |
| | | _this.addLineDraw(_this.routeRange) |
| | | }, |
| | | // 绘画之后的样式 |