|
@@ -3,7 +3,7 @@
|
|
|
<div class="btn">
|
|
|
<el-button @click="drawer = true">打开抽屉</el-button>
|
|
|
</div>
|
|
|
- <MapView />
|
|
|
+ <MapView ref="MapView" />
|
|
|
|
|
|
<el-drawer
|
|
|
:visible.sync="drawer"
|
|
@@ -144,6 +144,7 @@ export default {
|
|
|
methods: {
|
|
|
tableClick(row) {
|
|
|
let url = this.newObj.proxypath + row.hsxtif;
|
|
|
+ this.$refs.MapView.createMap('split')
|
|
|
console.log(row, "-----", url);
|
|
|
const source = new GeoTIFF({
|
|
|
sources: [
|
|
@@ -199,7 +200,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
let fullExtent = this.curPageResultLayer.getSource().getExtent();
|
|
|
- window.map.getView().fit(fullExtent, {
|
|
|
+ window.map['mapDiv'].getView().fit(fullExtent, {
|
|
|
duration: 3, //动画的持续时间,
|
|
|
callback: null,
|
|
|
});
|
|
@@ -221,7 +222,7 @@ export default {
|
|
|
}),
|
|
|
}),
|
|
|
});
|
|
|
- window.map.addLayer(this.vectorLayer);
|
|
|
+ window.map['mapDiv'].addLayer(this.vectorLayer);
|
|
|
}
|
|
|
if (!this.curPageResultLayer) {
|
|
|
let vectorSource = new VectorSource();
|
|
@@ -235,7 +236,7 @@ export default {
|
|
|
}),
|
|
|
}),
|
|
|
});
|
|
|
- window.map.addLayer(this.curPageResultLayer);
|
|
|
+ window.map['mapDiv'].addLayer(this.curPageResultLayer);
|
|
|
}
|
|
|
},
|
|
|
},
|