|
@@ -147,6 +147,8 @@ export default {
|
|
|
|
|
|
methods: {
|
|
|
tableClick(row) {
|
|
|
+ this.removeWebGLTile("mapCon1");
|
|
|
+ this.removeWebGLTile("mapCon2");
|
|
|
let urlQsx = this.newObj.proxypath + row.qsxtif;
|
|
|
let urlHsx = this.newObj.proxypath + row.hsxtif;
|
|
|
if (this.nowId != row.id) {
|
|
@@ -159,6 +161,16 @@ export default {
|
|
|
this.nowId = "";
|
|
|
}
|
|
|
},
|
|
|
+ removeWebGLTile(name) {
|
|
|
+ console.log(name);
|
|
|
+ const allLayers = window.map[name].getLayers().getArray();
|
|
|
+ allLayers.forEach((layer) => {
|
|
|
+ if (layer instanceof WebGLTile) {
|
|
|
+ window.map[name].removeLayer(layer);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log(window.map[name].getLayers().getArray(), name);
|
|
|
+ },
|
|
|
addLayer(name, url) {
|
|
|
const source = new GeoTIFF({
|
|
|
sources: [
|