智慧农业大数据平台
shuishen
2022-07-16 9983b8634a8689f2daee0433f01cfbce9cf5a79a
src/components/map/index.vue
@@ -212,7 +212,7 @@
        },
        addPlotPolygon (positions, item) {
            // const that = this
            const that = this
            const center = this.getCenter(positions)
@@ -233,12 +233,18 @@
            // })
            const polygon = new global.DC.Polygon(positions)
            polygon.attrParams = item
            polygon.setStyle({
                material: global.DC.Namespace.Cesium.Color.fromBytes(
                    129, 255, 84,
                    200
                )
            })
            polygon.on(global.DC.MouseEventType.CLICK, (e) => {
                that.$parent.plotDetailsPopupShow(e.overlay.attrParams)
            })
            plotRegionLayer.addOverlay(polygon)
            addPlotLayers.push({ center, name: item.landName })
        },