|
@@ -168,6 +168,7 @@ export default {
|
|
|
vectorLayer: {},
|
|
|
nowObj: {},
|
|
|
itemObj: {}, //用于存储分屏高亮的实体
|
|
|
+ itemObj2: {},
|
|
|
dialogVisible: false,
|
|
|
TableHeader: TableHeader,
|
|
|
envelopegeomObj: {}, //用于存储进入页面飞入视角的对象
|
|
@@ -293,7 +294,7 @@ export default {
|
|
|
|
|
|
test(item) {
|
|
|
window.map["mapCon1"].removeLayer(this.itemObj);
|
|
|
- window.map["mapCon2"].removeLayer(this.itemObj);
|
|
|
+ window.map["mapCon2"].removeLayer(this.itemObj2);
|
|
|
if (item.geom && item.geom != "") {
|
|
|
if (typeof item.geom === "string") {
|
|
|
let geom = item.geom; // this.tableData[i].geom;
|
|
@@ -315,14 +316,29 @@ export default {
|
|
|
},
|
|
|
zIndex: 9999,
|
|
|
});
|
|
|
+
|
|
|
window.map["mapCon1"].getView().animate({
|
|
|
center: [item["lzb"], item["bzb"]],
|
|
|
zoom: 16.5,
|
|
|
duration: 2000, // 动画持续时间,单位毫秒
|
|
|
});
|
|
|
-
|
|
|
+ this.itemObj2 = new VectorLayer({
|
|
|
+ source: new VectorSource({
|
|
|
+ features: features,
|
|
|
+ }),
|
|
|
+ style: function (feature) {
|
|
|
+ return new Style({
|
|
|
+ stroke: new Stroke({
|
|
|
+ //边界样式
|
|
|
+ color: "rgba(255, 0, 0, 1)",
|
|
|
+ width: 2,
|
|
|
+ }),
|
|
|
+ });
|
|
|
+ },
|
|
|
+ zIndex: 9999,
|
|
|
+ });
|
|
|
window.map["mapCon1"].addLayer(this.itemObj);
|
|
|
- window.map["mapCon2"].addLayer(this.itemObj);
|
|
|
+ window.map["mapCon2"].addLayer(this.itemObj2);
|
|
|
}
|
|
|
},
|
|
|
flyto(item) {
|