Commit 722c46df authored by co_dengxiongwen's avatar co_dengxiongwen

格式化

parent c7596845
......@@ -252,12 +252,13 @@ export default {
this.changeVectorLayer(this.list)
this.map.on('click', function(evt) {
let feature = evt.map.forEachFeatureAtPixel(evt.pixel, function(
feature
) {
return feature
})
this.map.on('click', function (evt) {
let feature = evt.map.forEachFeatureAtPixel(
evt.pixel,
function (feature) {
return feature
}
)
console.log('***当前点击***', feature)
let coordinate = evt.coordinate //鼠标单击点的坐标
if (feature) {
......@@ -400,7 +401,7 @@ export default {
let bean = null
//画线开始事件
this.draw.on('drawstart', function(evt) {
this.draw.on('drawstart', function (evt) {
//获取坐标
let coordinate = evt.target.sketchCoords_[0]
//添加点
......@@ -409,7 +410,7 @@ export default {
that.list.push(bean)
})
//画线结束事件
this.draw.on('drawend', function(evt) {
this.draw.on('drawend', function (evt) {
//将draw绘制的线设置为透明色
evt.feature.setStyle(that.setLineNone)
//获取坐标
......@@ -592,7 +593,7 @@ export default {
//获取当前拖拽的feature对象,该feature没有id,
let feature = e.mapBrowserEvent.map.forEachFeatureAtPixel(
pixel,
function(feature) {
function (feature) {
return feature
}
)
......@@ -1407,7 +1408,7 @@ export default {
},
clickMap() {
let that = this
this.map.on('click', function(e) {
this.map.on('click', function (e) {
that.jing = parseFloat(e.coordinate[0]).toFixed(2)
that.wei = parseFloat(e.coordinate[1]).toFixed(2)
})
......
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