diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index c2a951b..a1c3a33 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -391,6 +391,17 @@ writeGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, this.icao, xml) }, setVisible(visible) { + if (this.layerGroup) { + if (visible) { + this.layerGroup.addTo(this.$parent.mapObject) + } else { + this.layerGroup.removeFrom(this.$parent.mapObject) + } + } + + if (this.groundnetLayerGroup === undefined) { + return; + } if (visible) { this.groundnetLayerGroup.addTo(this.$parent.mapObject) } else { diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index cc6cdad..246d5f5 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -122,13 +122,13 @@ this.$refs.airportLayer.setVisible(zoom < 12) } }, - centerUpdated (center) { + async centerUpdated (center) { if (center !== this.$store.state.Settings.center) { this.$store.dispatch('setCenter', center) this.$refs.airportLayer.setVisible(this.zoom < 12) } }, - boundsUpdated (bounds) { + async boundsUpdated (bounds) { if (bounds !== this.$store.state.Settings.bounds) { this.$store.dispatch('setBounds', bounds) this.$refs.airportLayer.setVisible(this.zoom < 12)