hbao 3 лет назад
Родитель
Сommit
6db8054f58
1 измененных файлов: 8 добавлений и 27 удалений
  1. +8
    -27
      src/views/homesteadSurvey/list.vue

+ 8
- 27
src/views/homesteadSurvey/list.vue Просмотреть файл

@@ -4066,31 +4066,12 @@
//样式加载定义
var vector_drawing_delete;
$("#area").click(function () {
if(that.textMjAll != "" && that.clickBbox !=""){
// var styleFsss = new ol.style.Style({
// text: new ol.style.Text({
// text: that.textMjAll+"㎡",
// font: '30px sans-serif',
// textAlign: "center",
// textBaseline: "middle",
// //font: 'verdana',
// fill: new ol.style.Fill({
// color: "#ff00ff"
// }),
// // backgroundFill: new ol.style.Fill({
// // color: "#ff0000"
// // }),
// font: "30px sans-serif",
// stroke: new ol.style.Stroke({
// color: "#ffffff"
// // width: 3
// }),
// offsetX: parseInt(0, 10),
// offsetY: parseInt(0, 10),
// placement: "point", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注
// overflow: false //超出面的部分不显示
// }),
// });
console.log(that.textMjAll);
console.log(that.clickBbox);
if(that.textMjAll ==null){
that.textMjAll =0;
}
if((that.textMjAll != "" && that.clickBbox !="") || (that.textMjAll == 0 && that.clickBbox !="")){
map.removeLayer(vector_drawing_delete);
function createLabelStyle() {
return new ol.style.Style({
@@ -4121,8 +4102,6 @@
map.addLayer(vector_drawing_delete);
newcenterFeature.setStyle(createLabelStyle()); //设置要素样式
sourceMapLook.addFeature(newcenterFeature);
that.clickBbox ="";
that.textMjAll = "";
//map.addLayer(styleFsss);
} else if(that.textMjAllNum == "1"){
that.$toast("该图层面积暂无信息");
@@ -4524,6 +4503,8 @@
var zb = evt.coordinate;
var url;
var url_bbox;
that.clickBbox ="";
that.textMjAll = "";
if(that.drawingClick) {
//点击空白删除之前图层
map.removeLayer(hc_land_on);


Загрузка…
Отмена
Сохранить