This commit is contained in:
parent
d0361b0e76
commit
e8b0c3c923
@ -41,11 +41,7 @@ You should have received a copy of the GNU General Public License along with FG
|
|||||||
props: [],
|
props: [],
|
||||||
created () {
|
created () {
|
||||||
|
|
||||||
console.log(LMap)
|
[LMap, LMarker, L, LEdit, L2]
|
||||||
console.log(LMarker)
|
|
||||||
console.log(L)
|
|
||||||
console.log(LEdit)
|
|
||||||
console.log(L2)
|
|
||||||
console.log('Created Editlayer')
|
console.log('Created Editlayer')
|
||||||
// console.log(LSymbol)
|
// console.log(LSymbol)
|
||||||
},
|
},
|
||||||
@ -125,9 +121,12 @@ You should have received a copy of the GNU General Public License along with FG
|
|||||||
this.icao = icao
|
this.icao = icao
|
||||||
this.groundnetLayerGroup = readGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, icao, force)
|
this.groundnetLayerGroup = readGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, icao, force)
|
||||||
if (this.groundnetLayerGroup === undefined) {
|
if (this.groundnetLayerGroup === undefined) {
|
||||||
console.error('ICAO not loaded ' + icao)
|
console.warn('Groundnet for ICAO not loaded ' + icao)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.groundnetLayerGroup.getLayers().length === 0) {
|
||||||
|
console.warn('Groundnet for ICAO not loaded ' + icao)
|
||||||
|
}
|
||||||
this.groundnetLayerGroup.eachLayer(l => {
|
this.groundnetLayerGroup.eachLayer(l => {
|
||||||
if (l instanceof L.TaxiwaySegment) {
|
if (l instanceof L.TaxiwaySegment) {
|
||||||
l.addListeners()
|
l.addListeners()
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
load (icao) {
|
load (icao) {
|
||||||
// Callback for add
|
// Callback for add
|
||||||
this.layerGroup = readThresholdXML(this.$store.state.Settings.settings.airportsDirectory, icao, this.read)
|
this.layerGroup = readThresholdXML(this.$store.state.Settings.settings.airportsDirectory, icao, this.read)
|
||||||
|
if (!this.layerGroup) {
|
||||||
|
console.warn('Threshold for ICAO not loaded ' + icao)
|
||||||
|
return
|
||||||
|
}
|
||||||
this.layerGroup.addTo(this.$parent.mapObject)
|
this.layerGroup.addTo(this.$parent.mapObject)
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.icao = icao
|
this.icao = icao
|
||||||
|
@ -60,6 +60,11 @@ function walkPushbackRoute (index, walkedNodes, pushBackNodes) {
|
|||||||
|
|
||||||
exports.writeGroundnetXML = function (fDir, icao, featureList) {
|
exports.writeGroundnetXML = function (fDir, icao, featureList) {
|
||||||
try {
|
try {
|
||||||
|
try { fs.mkdirSync(path.join(fDir), { recursive: true })} catch (err) { }
|
||||||
|
try { fs.mkdirSync(path.join(fDir, icao[0]),{ recursive: true })} catch (err) { }
|
||||||
|
try { fs.mkdirSync(path.join(fDir, icao[0], icao[1]), { recursive: true })} catch (err) { }
|
||||||
|
try { fs.mkdirSync(path.join(fDir, icao[0], icao[1], icao[2]), { recursive: true })} catch (err) { }
|
||||||
|
|
||||||
var f = path.join(fDir, icao[0], icao[1], icao[2], icao + '.groundnet.new.xml');
|
var f = path.join(fDir, icao[0], icao[1], icao[2], icao + '.groundnet.new.xml');
|
||||||
var fBak = path.join(fDir, icao[0], icao[1], icao[2], icao + '.groundnet.bak.xml');
|
var fBak = path.join(fDir, icao[0], icao[1], icao[2], icao + '.groundnet.bak.xml');
|
||||||
|
|
||||||
|
@ -186,6 +186,9 @@ function scanTrafficIntoDB(p, features) {
|
|||||||
|
|
||||||
function traverseDir(dir) {
|
function traverseDir(dir) {
|
||||||
var result = [];
|
var result = [];
|
||||||
|
if(!fs.existsSync(dir)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
fs.readdirSync(dir).forEach(file => {
|
fs.readdirSync(dir).forEach(file => {
|
||||||
let fullPath = path.join(dir, file);
|
let fullPath = path.join(dir, file);
|
||||||
if (fs.lstatSync(fullPath).isDirectory()) {
|
if (fs.lstatSync(fullPath).isDirectory()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user