Board index FlightGear Development Canvas

Creating new/customized map.nas layers

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Creating new/customized map.nas layers

Postby Hooray » Mon Oct 01, 2012 5:44 pm

Once Stuart has committed the latest version of the merge request, we can start porting the hard-coded "MapWidget" dialog soon, and probably the NavDisplay afterwards - that means, there'll be another handful of "map layers". The process to use the MVC-oriented approach is documented at: http://wiki.flightgear.org/Canvas_Map_API

Alfo and Jomo (developers of ATC-FS) will probably re-use these layers then to port ATC-FS to the Canvas.

Note that we'll probably want to further improve the MVC design, because the "controller" part doesn't exist at the moment...
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Creating new/customized map.nas layers

Postby zakalawe » Tue Oct 02, 2012 9:54 am

I've got code for the 'route' model, fixes model and also an expanded navaids model which handles NDBs, VORs, and potentially VORTACs. However, I'm currently focused on some other C++ issues besides the Map, so if anyone wishes to have this code to adapt to the MVC pattern, please let me know.
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: Creating new/customized map.nas layers

Postby Hooray » Tue Oct 02, 2012 11:26 am

is your code still based on Stuart's original code, or does it already use the current code in git HEAD (master)?
Maybe you could commit this to a separate branch so that I can have a look?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Creating new/customized map.nas layers

Postby zakalawe » Tue Oct 02, 2012 11:59 am

It's based on Stuart's code, no time yet to adapt it following your merge, unfortunately. But it's also very small / simple.
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: Creating new/customized map.nas layers

Postby Hooray » Tue Oct 02, 2012 12:46 pm

Okay, if you want me to take a look, just create a new fgdata branch and post the details here.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Creating new/customized map.nas layers

Postby Hooray » Sun Nov 04, 2012 12:00 am

Update: Stuart has just pushed the latest version to the master branch in fgdata, so that we can now start creating additional canvas map layers and further improve/extend the MVC framework as required.

In particular, we still need:

* fixes
* routing (waypoints from route manager)
* traffic (ai-traffic and multiplayer)
* a vertical map layer to be used for VSDs and other profile views

Also, the "model" and "controller" parts of the MVC framework is basically just a stub at the moment, so these will need further refinements.

In addition, it would be great if findNavaidsWithinRange() could be modified such that it supports an optional position to use as the reference point for the lookup, so that we can also get info for other places. Similarly, adding new Nasal extension functions to access scenery vector data (terrain, ocean, lakes) would be very handy to draw scenery maps.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Canvas

Who is online

Users browsing this forum: No registered users and 2 guests