Check
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 ");
|
||||
|
||||
Reference in New Issue
Block a user