|
|
|
|
|
|
|
|
place: null, // 土地利用图层 |
|
|
place: null, // 土地利用图层 |
|
|
adrainageLayer: null, // 排口图层 |
|
|
adrainageLayer: null, // 排口图层 |
|
|
tileNoman: null, |
|
|
tileNoman: null, |
|
|
|
|
|
riverlayer: null, // 水系图层 |
|
|
|
|
|
arealayer: null, // 行政区划 |
|
|
river: "river2", |
|
|
river: "river2", |
|
|
landColorList: [], |
|
|
landColorList: [], |
|
|
landColor: null, |
|
|
landColor: null, |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
|
|
|
|
|
|
// 南京市水系图 |
|
|
// 南京市水系图 |
|
|
getService("wfs", { |
|
|
getService("wfs", { |
|
|
// filter: equalToFilter("admincode", "320100"), |
|
|
// filter: equalToFilter("admincode", "320100"), |
|
|
|
|
|
|
|
|
opacity: 0.8 |
|
|
opacity: 0.8 |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
let { layer } = res; |
|
|
let { layer } = res; |
|
|
this.map.addLayer(layer); |
|
|
|
|
|
|
|
|
this.riverlayer = layer |
|
|
|
|
|
this.map.addLayer(this.riverlayer); |
|
|
}); |
|
|
}); |
|
|
// 排口数据 |
|
|
// 排口数据 |
|
|
let adrainage = new VectorSource({}); |
|
|
let adrainage = new VectorSource({}); |
|
|
|
|
|
|
|
|
view: this.view, |
|
|
view: this.view, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 江宁区行政区划 |
|
|
|
|
|
getService('ImageArcGIS', { layers: "0" }).then((res) => { |
|
|
|
|
|
let { layer } = res; |
|
|
|
|
|
let arealayer = layer |
|
|
|
|
|
this.map.addLayer(arealayer); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// 切换底图 与无人机影像的叠加 |
|
|
// 切换底图 与无人机影像的叠加 |
|
|
let changeMap = document.getElementById("changeMap"); |
|
|
let changeMap = document.getElementById("changeMap"); |
|
|
changeMap.addEventListener("click", (event) => { |
|
|
changeMap.addEventListener("click", (event) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (properties.geom instanceof MultiPolygon) { |
|
|
if (properties.geom instanceof MultiPolygon) { |
|
|
this.popupPlace = properties; |
|
|
this.popupPlace = properties; |
|
|
console.log(this.popupPlace); |
|
|
|
|
|
let coordinate = e.mapBrowserEvent.coordinate; |
|
|
let coordinate = e.mapBrowserEvent.coordinate; |
|
|
this.overlayPlace.setPosition(coordinate); |
|
|
this.overlayPlace.setPosition(coordinate); |
|
|
this.overlayPlace.setOffset([140, -10]); |
|
|
this.overlayPlace.setOffset([140, -10]); |
|
|
|
|
|
|
|
|
// 菜单按钮 |
|
|
// 菜单按钮 |
|
|
// 选择采样点、土地 |
|
|
// 选择采样点、土地 |
|
|
selectRef($event, $index, index) { |
|
|
selectRef($event, $index, index) { |
|
|
|
|
|
// 关闭水系图 |
|
|
|
|
|
this.map.removeLayer(this.riverlayer) |
|
|
// 显示图层以及处理相应的数据 |
|
|
// 显示图层以及处理相应的数据 |
|
|
// 1-1 排口显示 |
|
|
// 1-1 排口显示 |
|
|
if ($index == 0) { |
|
|
if ($index == 0) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 选择反演参数 |
|
|
// 选择反演参数 |
|
|
selectParams(type, id, index, $index) { |
|
|
selectParams(type, id, index, $index) { |
|
|
|
|
|
// 关闭水系图 |
|
|
|
|
|
this.map.removeLayer(this.riverlayer) |
|
|
// 1.显示四参数的图层并展示对应的图层 |
|
|
// 1.显示四参数的图层并展示对应的图层 |
|
|
this.tileDong.setVisible(true); |
|
|
this.tileDong.setVisible(true); |
|
|
this.sourceDong4.updateParams({ layers: "show:" + id }); |
|
|
this.sourceDong4.updateParams({ layers: "show:" + id }); |
|
|
|
|
|
|
|
|
// 初始化this.colorList 东风河 |
|
|
// 初始化this.colorList 东风河 |
|
|
// 1.根据所选河道变换对应的位置以及缩放信息 |
|
|
// 1.根据所选河道变换对应的位置以及缩放信息 |
|
|
// 设置当前河道值为index |
|
|
// 设置当前河道值为index |
|
|
console.log(index); |
|
|
|
|
|
this.checkedRiver = parseInt(index.slice(0, 1)); |
|
|
this.checkedRiver = parseInt(index.slice(0, 1)); |
|
|
|
|
|
|
|
|
if (this.checkedRiver == 0) { |
|
|
if (this.checkedRiver == 0) { |