From 07b9d3efeed5380b0b6938e1f21e79f5e2b0e6aa Mon Sep 17 00:00:00 2001 From: portree_kid Date: Sun, 2 Aug 2020 14:43:03 +0200 Subject: [PATCH] https://github.com/Portree-Kid/flightgear-airports/issues/86 --- src/renderer/leaflet/Taxiway.js | 25 +++++++++++++++++++++++++ src/renderer/loaders/pavement_loader.js | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/renderer/leaflet/Taxiway.js diff --git a/src/renderer/leaflet/Taxiway.js b/src/renderer/leaflet/Taxiway.js new file mode 100644 index 0000000..56e61ea --- /dev/null +++ b/src/renderer/leaflet/Taxiway.js @@ -0,0 +1,25 @@ +/* +Copyright 2020 Keith Paterson + +This file is part of FG Airports. + +FG Airports is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +FG Airports is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with FG Airports. If not, see http://www.gnu.org/licenses/. +*/ + +/* eslint-disable */ + +L.TaxiwayPolygon = L.Polygon.extend({ +}); + +var taxiwayPoly = function (runwayPoints) { + var taxiwayPoly = new L.TaxiwayPolygon(runwayPoints); + taxiwayPoly.setStyle({ color: 'grey', fillColor: 'grey', opacity: 0.3, fillOpacity: 0.3, interactive: false }); + + return taxiwayPoly; +} + +module.exports = taxiwayPoly; \ No newline at end of file diff --git a/src/renderer/loaders/pavement_loader.js b/src/renderer/loaders/pavement_loader.js index 6ab8d48..43c873e 100644 --- a/src/renderer/loaders/pavement_loader.js +++ b/src/renderer/loaders/pavement_loader.js @@ -19,6 +19,7 @@ const fs = require('fs'); const store = require('../store'); const buildRunwayPoly = require('../leaflet/Runway.js'); +const buildTaxiwayPoly = require('../leaflet/Taxiway.js'); /** * @@ -342,7 +343,7 @@ var scanMethods = { runwayPoints.push(point2.destinationPoint(runwayWidth / 2, (bearing - 90))); runwayPoints.push(point1.destinationPoint(runwayWidth / 2, (bearing - 90))); - var runwayPoly = buildRunwayPoly(runwayPoints); + var runwayPoly = buildTaxiwayPoly(runwayPoints); runwayPoly.addTo(layerGroup); } },