- first stab at refactoring the map.nas module, and trying to let the API evolve according to our requirements
- split up the module into separate files (some of them will disappear soon)
- split up the "drawing" loops into separate functions so that they can be individually called
- move actual "drawing" to map_layers.nas
- introduce some OOP helpers to prepare a pure Layer-based design
- prepare helpers: LayeredMap, GenericMap, AirportMap (TODO: use a real "Layer" class)
- move airport features (taxiways, runways, parking, tower) to separate layers (i.e. canvas groups)
- avoid using a single update callback and use different layer-specific callbacks to update individual layers more efficiently
- add some boilerplate hashes to prepare the MVC design
- allow lazy updating of layers, where canvas groups are only populated on demand, to save some time during instantiation, i.e. loading an airport without "parking" selected, will only populate the layer once the checkbox is checked
- extend the original code such that it supports showing multiple airports at once
- add some proof of concept "navaid" layer using SVG files for navaid symbols (added only NDB symbol from wikimedia commons)
regressions:
- runway highlighting needs to be re-implemented
- parking highlighting will be done differently
- enforcing a specific drawing order for layers is currently not explicitly supported, so that taxiways may be rendered on top of runways
Also:
- integrated with the latest changes in git/master (HEAD) -i.e. metar support
- further generalized map.nas
- partially moved instantiation from Nasal space to XML space (WIP)
- create "toggle layer" checkboxes procedurally in Nasal space
- prepared the code to be better reusable in other dialogs (e.g. route manager, map dialog etc)
- completely removed the "highlighting" (runway/parking) feature for now, because we talked about re-implementing it anyhow
- Display taxiways
- Display different surface types
- control over components (taxiways, parking positions, towers) displayed
- include distance and course to airport.
A fire log can now be loaded at startup time with, e.g.,
--prop:environment/wildfire/events-file=$HOME/.fgfs/Wildfire/small_fire.xml
(Note: Wildfire is only authorized to load logs from ~/.fgfs/Wildfire .)
Additionally, a time at which the fire starts to evolve (past the event log)
can be specified with, e.g.,
--prop:environment/wildfire/time-hack-gmt='2012:08:23:15:15'
Instances of FlightGear that are started with the same event log and time-hack
should arrive at similar wildfire states (prior to new events).
- API:
* Rename setSize to setFontSize
* Add method getElementById to Group
* Rename name of element to id to show more prominent
that it should be unique.
* Add methods for hide/show elements.
* Fix: set correct id for cloned elements (parsesvg)
* Fix: retrieving group with getElementById failed.
* Parse SVG inkscape:transform-center-[xy]
* Allow rotation around given point (use values from inkscape
by default for SVG files)
* Use breadth-first search instead of depth-first search for
Element::getElementById (large speedup :))
* Add more convenience functions for path drawing.
* Add version check (useful if API files manually copied)
- SVG:
* Support <use> element
* Parse font-size
* Parse stroke-linecap
- Fraction of each tank capacity displayed, along with pounds and gallons
- Total fuel is now displayed
- CofG displayed if available even if /limits/ not defined (bug fix)
- Tanks of capacity 0 ignored (bug fix)
- Some layout improvements.
Addresses issue #778
Throttle/aileron/elevator keyboard bindings did not work on aircraft
without autopilots (= without A/P properties). Rearrange logic to make
basic axis/throttle control the default (i.e. when prop values are "nil").
This is a new button in the pilot list, left of the callsign. It's
binded to multiplayer.compose_message("<CALLSIGN>, ");
Signed-off-by: Anders Gidenstam <anders@gidenstam.org>