|
@@ -1334,6 +1334,9 @@
|
|
|
layerSwitchingList_Data: function(banCheckList) { //图层切换数组 urlList 图层地址(数组) 带数据图层
|
|
|
let that = this
|
|
|
that.initInfoView()
|
|
|
+ if (that.lbtThemeLayer != null) {
|
|
|
+ that.map.removeLayer(that.lbtThemeLayer);
|
|
|
+ }
|
|
|
// 定义 Unique 单值专题图层
|
|
|
that.lbtThemeLayer = window.L.supermap.uniqueThemeLayer("lbtThemeLayer", {
|
|
|
// 开启 hover 高亮效果
|
|
@@ -1404,34 +1407,7 @@
|
|
|
.hasOwnProperty('features')) {
|
|
|
that.lbtThemeLayer.addFeatures(serviceResult.result.features);
|
|
|
}
|
|
|
-
|
|
|
- // var result = serviceResult.result;
|
|
|
- // if (result && result.features) {
|
|
|
- // var features = result.features;
|
|
|
- // this.lbtThemeLayer.addFeatures(serviceResult.result.features);
|
|
|
- // }
|
|
|
}, SuperMap.DataFormat.ISERVER);
|
|
|
-
|
|
|
-
|
|
|
- // window.L.supermap.featureService(
|
|
|
- // 'http://121.36.228.94:8090/iserver/services/data-baishan/rest/data')
|
|
|
- // .getFeaturesBySQL(sqlParam, function(serviceResult) {
|
|
|
- // if (serviceResult.hasOwnProperty('result') && serviceResult.result
|
|
|
- // .hasOwnProperty('features')) {
|
|
|
- // var html = ''
|
|
|
- // var resultLayer = window.L.geoJSON(
|
|
|
- // serviceResult.result.features, {
|
|
|
- // onEachFeature: function(feature, layer) {
|
|
|
- // layer.on('dblclick', function(e) {
|
|
|
- // that.showBanData = true
|
|
|
- // that.banDataList = feature.properties
|
|
|
- // })
|
|
|
- // }
|
|
|
- // }
|
|
|
- // ).addTo(that.map)
|
|
|
- // that.resultLayer_Data.push(resultLayer)
|
|
|
- // }
|
|
|
- // })
|
|
|
}
|
|
|
}
|
|
|
}
|