Ver código fonte

Merge branch 'master' of http://www.sysuimars.cn:3000/feiniao/feiniao-pc-vue

刘秀芳 2 semanas atrás
pai
commit
07467167db

+ 3 - 0
src/views/addFarm/farmMap.js

@@ -110,6 +110,9 @@ class FarmMap {
                 }),
             });
             that.treeClusterLayer.layer.setSource(that.clusterSource)
+            setTimeout(()=>{
+                that.kmap.fit(that.clusterSource.source.getExtent(), {padding:[100,100,100,100]})
+            },100)
         })
     }
     //多点的过滤方法

+ 0 - 1
src/views/home/map/blueRegionLayer.js

@@ -26,7 +26,6 @@ class BlueRegionLayer {
             for (let item of arr) {
                 let feature = newAreaFeature(item);
                 let strokeColor = "#FFFFFF";
-                console.log('item',item.color);
                 feature.setStyle(this.vectorStyle.getPolygonStyle(item.nonghu == 1 ? "rgba(255, 255, 255, 0.5)" : "rgba(255, 252, 61, 0.5)", strokeColor, 1));
                 // feature.setStyle(this.vectorStyle.getPolygonStyle(item.color+opacity, strokeColor, 1));
                 this.blueRegionLayer.addFeature(feature);