文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 9368b255 by 李梓桢

layer

parent b5a589a2
......@@ -5,8 +5,8 @@
<el-button-group id="start">
<el-button class="tool-button" type="primary" >保存</el-button>
<el-button class="tool-button" type="primary" >退出</el-button>
<el-button class="tool-button" @click="drawRectangle()" style="margin-bottom: 5px">绘制矩形</el-button>
<el-button class="tool-button" @click="drawPolygon()" style="margin-bottom: 5px">绘制多边形</el-button>
<!-- <el-button class="tool-button" @click="drawRectangle()" style="margin-bottom: 5px">绘制矩形</el-button>
<el-button class="tool-button" @click="drawPolygon()" style="margin-bottom: 5px">绘制多边形</el-button> -->
</el-button-group>
<el-button-group style="margin-right: 10px ; line-height: 40px;vertical-align: middle">
<el-button class="tool-button" type="primary" style="margin-right: 10px">飞入坐标点</el-button>
......@@ -15,11 +15,11 @@
<a>Y:</a>
<input type="text" style="width: 30px">
</el-button-group>
<!-- <el-radio-group v-model="radio1">
<el-radio-group v-model="radio1">
<el-radio-button label="建立地标"></el-radio-button>
<el-radio-button label="矩形标注"></el-radio-button>
<el-radio-button label="多边形标注"></el-radio-button>
</el-radio-group> -->
</el-radio-group>
</div>
<el-container>
......@@ -67,7 +67,7 @@
height_res:0,
Xpoint: 0,
Ypoint: 0,
//radio1: '建立地标',
radio1: '建立地标',
activeIndex1:1,
layerData: null, //layerdata存放标注数据
landMarkData: null,//存放地标数据
......@@ -107,7 +107,19 @@
this.init()
this.restore()
},
watch: {
radio1: function f () {
if (this.radio1 == '建立地标') {
} else if (this.radio1 == '矩形标注') {
} else if (this.radio1 == '多边形标注') {
} else {
}
}
},
methods:{
init () {
this.map = new AMap.Map('container', {
......@@ -138,10 +150,16 @@
console.log('clicked position: ')
console.log(_this.clickedPosition)
if (_this.radio1 == '建立地标')
_this.addLandMark(value)
else if (_this.radio1 == '矩形标注')
_this.drawRectangle()
else if (_this.radio1 == '多边形标注')
_this.drawPolygon()
})
this.mouseTool.on('draw', function(event) {
console.log(event.obj)
if (event.obj._opts.bounds != null) {
if (_this.radio1 == '矩形标注') {
console.log("northEast :" + event.obj._opts.bounds.northEast.lng + ',' + event.obj._opts.bounds.northEast.lat)
console.log("southWest :" + event.obj._opts.bounds.southWest.lng + ',' + event.obj._opts.bounds.southWest.lat)
let northEast = {
......@@ -156,7 +174,7 @@
console.log("这是一个矩形")
_this.addRectangle(northEast, southWest)
}
} else if (event.obj._opts.path != null) {
} else if (_this.radio1 == '多边形标注') {
console.log("这是一个多边形")
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment