Browse Source

bug修复

wulanhaote
hbao 3 years ago
parent
commit
024e4126dd
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/components/Map/MapGisDrawing.vue

+ 2
- 1
src/components/Map/MapGisDrawing.vue View File

@@ -566,6 +566,7 @@ export default {
//var Zb;
//村边界查询开始 ------------------------------start
var cql_filter = "dept_id='" + that.$cookies.get("item").deptId + "'";
console.log(cql_filter);
var cunTc= new ol.layer.Image({
source: new ol.source.ImageWMS({
url: that.mapGeoServerUrl +"/geoserver/zjd_dc/wms",
@@ -606,7 +607,7 @@ export default {
})
.then((data) => {
console.log(data);
let resolution = that.map.getView().getResolutionForExtent(data.bbox,map.getSize());
let resolution = that.map.getView().getResolutionForExtent(data.bbox,that.map.getSize());
resolution:resolution + Math.random() * 0.00000001,
that.map.getView().fit(data.bbox);
that.map.getView().setResolution(resolution);


Loading…
Cancel
Save