Explorar el Código

bug修复

wulanhaote
hbao hace 3 años
padre
commit
024e4126dd
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. +2
    -1
      src/components/Map/MapGisDrawing.vue

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

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


Cargando…
Cancelar
Guardar