Explorar el Código

Merge remote-tracking branch 'origin/master'

wulanhaote
nsgkyjk hace 3 años
padre
commit
c8df64bfcf
Se han modificado 2 ficheros con 29 adiciones y 20 borrados
  1. +4
    -1
      src/components/Map/MapGisDrawing.vue
  2. +25
    -19
      src/views/homesteadSurvey/list.vue

+ 4
- 1
src/components/Map/MapGisDrawing.vue Ver fichero

@@ -560,6 +560,9 @@ export default {
maxZoom: 18, //地图放大限制
resolution:Math.random() * 0.00000001,
}),
interactions: ol.interaction.defaults({
pinchRotate: false // 移动端禁止地图旋转
}),
});
//view.setResolution(view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新
//获取坐标是否存在
@@ -692,7 +695,7 @@ export default {
that.newZb = JSON.stringify(coordinate);
if(coordinate !="" && coordinate !=null){
//map.addLayer(vector_drawing);
map.removeInteraction(draw);
that.map.removeInteraction(draw);
}
that.closeMoule = coordinate;
that.formSubmit();


+ 25
- 19
src/views/homesteadSurvey/list.vue Ver fichero

@@ -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 !="")){


Cargando…
Cancelar
Guardar