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: [],
|
||||
created () {
|
||||
|
||||
console.log(LMap)
|
||||
console.log(LMarker)
|
||||
console.log(L)
|
||||
console.log(LEdit)
|
||||
console.log(L2)
|
||||
[LMap, LMarker, L, LEdit, L2]
|
||||
console.log('Created Editlayer')
|
||||
// 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.groundnetLayerGroup = readGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, icao, force)
|
||||
if (this.groundnetLayerGroup === undefined) {
|
||||
console.error('ICAO not loaded ' + icao)
|
||||
console.warn('Groundnet for ICAO not loaded ' + icao)
|
||||
return
|
||||
}
|
||||
if (this.groundnetLayerGroup.getLayers().length === 0) {
|
||||
console.warn('Groundnet for ICAO not loaded ' + icao)
|
||||
}
|
||||
this.groundnetLayerGroup.eachLayer(l => {
|
||||
if (l instanceof L.TaxiwaySegment) {
|
||||
l.addListeners()
|
||||
|
@ -31,6 +31,10 @@
|
||||
load (icao) {
|
||||
// Callback for add
|
||||
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.visible = true
|
||||
this.icao = icao
|
||||
|
@ -60,6 +60,11 @@ function walkPushbackRoute (index, walkedNodes, pushBackNodes) {
|
||||
|
||||
exports.writeGroundnetXML = function (fDir, icao, featureList) {
|
||||
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 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) {
|
||||
var result = [];
|
||||
if(!fs.existsSync(dir)) {
|
||||
return result;
|
||||
}
|
||||
fs.readdirSync(dir).forEach(file => {
|
||||
let fullPath = path.join(dir, file);
|
||||
if (fs.lstatSync(fullPath).isDirectory()) {
|
||||
|
Loading…
Reference in New Issue
Block a user