Board index FlightGear Development Canvas

Canvas Vertical Maps vs. MapStructure VSD layer

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.

Canvas Vertical Maps vs. MapStructure VSD layer

Postby Hooray » Sun Jul 20, 2014 2:23 pm

Subject: Cannot use .setText on SVG text element
omega95 wrote:Image
if we had a vertical WPT and hard-coded terrain layer (this is tricky as it's dependent on the WPTs) this almost exactly be like the ND.


For starters, I think these are the main steps to port your work to become a MapStructure layer
  • extend api.nas to allow "vertical" maps to be added, these would be just canvas groups for now, because we don't have support for hard-coded projections currently
  • i.e. change the .addLayer() method to add a mandatory mode/projection argument (defaulted to "horizontal")
  • support a *.symbol field that also defaults to "horizontal", but which can be overridden by vertical layers
  • add a new MapStructure layer that renders a polygon, the lcontroller file would then simply return a set of lat/lon/alt vertices
  • investigate if/how to reuse lcontroller files (WPT/RTE)

Overall, this shouldn't be very difficult, and it would allow omega95's work to be reused in other places, including other aircraft and GUI dialogs.
At the same time, this would mean that we'd support independent instances and styling, too.
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: 11437
Joined: Tue Mar 25, 2008 8:40 am

Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest