This commit is contained in:
portree_kid
2020-03-04 10:54:39 +01:00
parent 8b3b8635c4
commit 37b14de1fd
5 changed files with 59 additions and 9 deletions
+6 -2
View File
@@ -8,8 +8,9 @@
</h1>
<div id="panel" width="100%">
<el-row v-for="(result,idx) in results" :key="idx">
<el-col :span="7">{{ result.id }}</el-col>
<el-col :span="15">{{ result.message }}</el-col>
<el-col :span="7"><el-button v-on:click="show(result.id)">Show</el-button></el-col>
</el-row>
</div>
</div>
@@ -27,6 +28,9 @@
}
},
methods: {
show (idx) {
this.$parent.$parent.$parent.$refs.editLayer.show(idx)
}
},
computed: {
results: function () {
@@ -38,7 +42,7 @@
<style>
.el-row {
margin-bottom: 1px;
margin: 1px;
}
.el-col {
border-radius: 1px;
+35
View File
@@ -181,6 +181,41 @@
}
});
},
show (index) {
if(this.featureLookup[index]===undefined) {
console.error("Lookup " + index + " failed ");
return;
}
this.featureLookup[index].forEach((element, i) => {
if (element instanceof L.Polyline) {
element._latlngs.forEach((e1, index1) => {
console.log(e1);
if (e1.attributes.index===index) {
var latlng = {};
latlng.lat = e1.lat;
latlng.lng = e1.lng;
this.$store.dispatch('setCenter', latlng);
if(e1.__vertex._icon.style!=null) {
e1.__vertex._icon.style['background-color'] = 'red';
}
}
});
} else if (element instanceof L.RunwayNode) {
var latlng = {};
latlng.lat = element._latlng.lat;
latlng.lng = element._latlng.lng;
element.highlight();
this.$store.dispatch('setCenter', latlng);
} else if (element instanceof L.ParkingSpot) {
console.log(element);
var latlng = {};
latlng.lat = element._latlng.lat;
latlng.lng = element._latlng.lng;
element.highlight();
this.$store.dispatch('setCenter', latlng);
}
});
},
removeNode (index) {
if(this.featureLookup[index]===undefined) {
console.error("Lookup " + index + " failed ");