Airport Editing

This commit is contained in:
portree_kid 2020-01-08 22:05:39 +01:00
parent 9a59509638
commit 753d77e52f
2 changed files with 14 additions and 3 deletions

View File

@ -29,6 +29,10 @@
<el-col :span="7">Groundnet :</el-col> <el-col :span="7">Groundnet :</el-col>
<el-col :span="15">{{groundnet}}</el-col> <el-col :span="15">{{groundnet}}</el-col>
</el-row> </el-row>
<el-row>
<el-col :span="7">Parking Positions :</el-col>
<el-col :span="15">{{ this.$store.state.Editable.data.airports[this.$store.state.Editable.index].parking }}</el-col>
</el-row>
</div> </div>
</div> </div>
</div> </div>
@ -46,3 +50,9 @@
} }
} }
</script> </script>
<style lang="scss" scoped>
.el-row {
padding: 0em
}
</style>

View File

@ -88,12 +88,13 @@
bounds.getSouthWest().lng < Number(coordinates[0]) bounds.getSouthWest().lng < Number(coordinates[0])
return ret && ret2 return ret && ret2
}, },
// Triggered by adding airports to the map
addEvent (event, item) { addEvent (event, item) {
// console.log(event, item) // console.log(event, item)
if (item.properties.groundnet === 0) { if (item.properties.groundnet === 0) {
event.target.setStyle({color: 'red', fillcolor: 'red'}) event.target.setStyle({color: 'red', fillColor: 'red'})
} else if ((item.properties.flights / item.properties.parking) > 10) { } else if ((item.properties.flights / item.properties.parking) > 40) {
event.target.setStyle({color: 'yellow', fillcolor: 'yellow'}) event.target.setStyle({color: 'yellow', fillColor: 'yellow'})
} }
}, },
onClick (item) { onClick (item) {