|
@@ -37,7 +37,6 @@ class AlarmLayer {
|
|
|
eventBus.on("alarmList:changeMapLayer", function ({url, type,name}) {
|
|
|
that.plantLayer && that.kmap.map.removeLayer(that.plantLayer.layer)
|
|
|
that.nameStr = name
|
|
|
- console.log('sdadas',url);
|
|
|
that.initWarningLayer(url, type,name)
|
|
|
})
|
|
|
// 种植面积,预估产量,底图切换
|
|
@@ -67,16 +66,18 @@ class AlarmLayer {
|
|
|
if(name==='日间温度'){
|
|
|
text = '从化地块日温'
|
|
|
path = this.warningLayers[text]
|
|
|
+ return
|
|
|
}else if(name==='夜间温度'){
|
|
|
text = '从化地块夜温'
|
|
|
path = this.warningLayers[text]
|
|
|
+ return
|
|
|
}else if(name==='土壤水分'){
|
|
|
text = '从化地块水分'
|
|
|
path = this.warningLayers[text]
|
|
|
+ return
|
|
|
}else{
|
|
|
path = layerUrl
|
|
|
}
|
|
|
- console.log('path',path);
|
|
|
this.warningLayer = this.kmap.addXYZLayer(
|
|
|
path,
|
|
|
{ minZoom: 5, maxZoom: 22 },
|
|
@@ -103,7 +104,6 @@ class AlarmLayer {
|
|
|
togglePlantLayer(name) {
|
|
|
const url = this.warningLayers[name]
|
|
|
// const url = "https://birdseye-img.sysuimars.com/map/szts/{z}/{x}/{y}.png"
|
|
|
- // console.log('uu', url);
|
|
|
this.plantLayer && this.kmap.map.removeLayer(this.plantLayer.layer)
|
|
|
// 104.3017367175,30.329292136
|
|
|
this.plantLayer = this.kmap.addXYZLayer(
|
|
@@ -139,7 +139,6 @@ class AlarmLayer {
|
|
|
|
|
|
// 切换地图区域
|
|
|
changeDistrict(id) {
|
|
|
- console.log('id',id);
|
|
|
VE_API.warning.fetchAreaDistrict({ id }).then(({ data }) => {
|
|
|
if (data.geom) {
|
|
|
let f = new Feature({
|