Canvas Map API: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 4: Line 4:
The map.nas in $FG_ROOT/Nasal/canvas will serve as the shared backend for all sorts of mapping/charting purposes in FlightGear. So that GUI dialogs and instruments can use the same code. As of 10/2012 the module is still being designed, so nothing written here is set in stone. This page is just intended to document the whole process.
The map.nas in $FG_ROOT/Nasal/canvas will serve as the shared backend for all sorts of mapping/charting purposes in FlightGear. So that GUI dialogs and instruments can use the same code. As of 10/2012 the module is still being designed, so nothing written here is set in stone. This page is just intended to document the whole process.


== Supported Layers ==
As of 10/2012, the following "layers" are supported:


== Creating dialogs with embedded Canvas Maps ==
* runways
* taxiways
* parking
* tower
* navaids
 
 
 
 
== Full Example: Creating dialogs with embedded Canvas Maps ==


Add this to the "Nasal/open" tag of your XML dialog:
Add this to the "Nasal/open" tag of your XML dialog:
Line 18: Line 29:
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
</syntaxhighlight>
</syntaxhighlight>
== Adding support for new Layer Types ==

Navigation menu