This commit is contained in:
portree_kid 2020-02-12 20:49:22 +01:00
parent 85dedefef9
commit 3772717291
3 changed files with 18 additions and 0 deletions

View File

@ -365,6 +365,13 @@
})
writeGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, this.icao, xml)
},
setVisible(visible) {
if (visible) {
this.groundnetLayerGroup.addTo(this.$parent.mapObject)
} else {
this.groundnetLayerGroup.removeFrom(this.$parent.mapObject)
}
}
},
computed: {
edit: function () {

View File

@ -65,6 +65,7 @@
this.$refs.pavementLayer.load(airportsToLoad[0])
this.editingAirport = airportsToLoad[0]
}
this.$refs.editLayer.setVisible(this.zoom >= 12)
this.$refs.airportLayer.setVisible(this.zoom < 12)
// console.log(this.groundnet)
@ -131,6 +132,7 @@
if (bounds !== this.$store.state.Settings.bounds) {
this.$store.dispatch('setBounds', bounds)
this.$refs.airportLayer.setVisible(this.zoom < 12)
this.$refs.pavementLayer.setVisible(this.zoom < 12)
}
}
},

View File

@ -63,6 +63,15 @@
if (this.$parent._isMounted) {
this.deferredMountedTo(this.$parent.mapObject)
}
},
setVisible (visible) {
if (this.layerGroup !== undefined) {
if (visible) {
this.layerGroup.addTo(this.$parent.mapObject)
} else {
this.layerGroup.removeFrom(this.$parent.mapObject)
}
}
}
},
computed: {