|
|
@@ -3010,6 +3010,9 @@ |
|
|
|
var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY; |
|
|
|
//定位查询位置 |
|
|
|
var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 |
|
|
|
that.clickBbox = center; |
|
|
|
console.log(that.mapZjdData); |
|
|
|
that.textMjAll = that.mapZjdData.zdmj; |
|
|
|
map.getView().animate({ |
|
|
|
// 只设置需要的属性即可 |
|
|
|
center: center, // 中心点 |
|
|
@@ -3018,7 +3021,7 @@ |
|
|
|
duration: 1000, // 缩放持续时间,默认不需要设置 |
|
|
|
resolution: Math.random() * 0.00000001, |
|
|
|
}); |
|
|
|
this.backMap =1; |
|
|
|
//this.backMap =1; |
|
|
|
} else if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "[") { |
|
|
|
//that.newHt ="1"; |
|
|
|
var zbNew = JSON.stringify({ |
|
|
@@ -3054,6 +3057,9 @@ |
|
|
|
var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY; |
|
|
|
//定位查询位置 |
|
|
|
var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 |
|
|
|
that.clickBbox = center; |
|
|
|
console.log(that.mapZjdData); |
|
|
|
that.textMjAll = that.mapZjdData.zdmj; |
|
|
|
map.getView().animate({ |
|
|
|
// 只设置需要的属性即可 |
|
|
|
center: center, // 中心点 |
|
|
@@ -3062,7 +3068,7 @@ |
|
|
|
duration: 1000, // 缩放持续时间,默认不需要设置 |
|
|
|
resolution: Math.random() * 0.00000001, |
|
|
|
}); |
|
|
|
this.backMap =1; |
|
|
|
//this.backMap =1; |
|
|
|
} else { |
|
|
|
let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize()); |
|
|
|
resolution:resolution + Math.random() * 0.00000001, |
|
|
@@ -3124,22 +3130,22 @@ |
|
|
|
map.addLayer(fsssTc); |
|
|
|
//附属设施图层查询开始 ------------------start |
|
|
|
//使用geoserver服务查询开始 -------------------end |
|
|
|
if(this.backMap ==1){ |
|
|
|
var cql = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + this.mapZjdTeAll.mapZjdAData.zjddm + "'"; |
|
|
|
var wmsSourceBack = new ol.source.ImageWMS({ |
|
|
|
crossOrigin: 'anonymous', |
|
|
|
params: { |
|
|
|
LAYERS: 'zjd_dc:t_house_survey_all', |
|
|
|
'VERSION': '1.1.0', |
|
|
|
'FORMAT': "image/png", |
|
|
|
'CQL_FILTER': cql |
|
|
|
}, |
|
|
|
serverType: 'geoserver', |
|
|
|
url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms", |
|
|
|
}); |
|
|
|
zjdTc.setSource(wmsSourceBack); |
|
|
|
ol.view.setResolution(ol.view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新 |
|
|
|
} |
|
|
|
// if(this.backMap ==1){ |
|
|
|
// var cql = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + this.mapZjdTeAll.mapZjdAData.zjddm + "'"; |
|
|
|
// var wmsSourceBack = new ol.source.ImageWMS({ |
|
|
|
// crossOrigin: 'anonymous', |
|
|
|
// params: { |
|
|
|
// LAYERS: 'zjd_dc:t_house_survey_all', |
|
|
|
// 'VERSION': '1.1.0', |
|
|
|
// 'FORMAT': "image/png", |
|
|
|
// 'CQL_FILTER': cql |
|
|
|
// }, |
|
|
|
// serverType: 'geoserver', |
|
|
|
// url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms", |
|
|
|
// }); |
|
|
|
// zjdTc.setSource(wmsSourceBack); |
|
|
|
// ol.view.setResolution(ol.view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新 |
|
|
|
// } |
|
|
|
//数据库直接加载数据渲染方式---------------------------------------------------start |
|
|
|
//判断当前账套是否有数据 |
|
|
|
// var mapTalkAbout = true; |
|
|
@@ -4068,7 +4074,7 @@ |
|
|
|
$("#area").click(function () { |
|
|
|
console.log(that.textMjAll); |
|
|
|
console.log(that.clickBbox); |
|
|
|
if(that.textMjAll ==null){ |
|
|
|
if(that.textMjAll ==null || that.textMjAll ==""){ |
|
|
|
that.textMjAll =0; |
|
|
|
} |
|
|
|
if((that.textMjAll != "" && that.clickBbox !="") || (that.textMjAll == 0 && that.clickBbox !="")){ |
|
|
|