Canvas snippets: Difference between revisions

Jump to navigation Jump to search
Line 565: Line 565:
var r = func(name,vis=1,zindex=nil) return caller(0)[0];
var r = func(name,vis=1,zindex=nil) return caller(0)[0];
var type = r('APT');
var type = r('APT');
# a hash that contains variables that are supported by the relevant_keys vector in APT.symbol
var style_apt = {
var style_apt = {
     scale_factor:0.5, # 50 %
     scale_factor:0.5, # 50 %
Line 575: Line 576:


var type = r('VOR');
var type = r('VOR');
# a hash that contains variables that are supported by the relevant_keys vector in VOR.symbol
var style_vor = {
var style_vor = {
     scale_factor:0.6,
     scale_factor:0.6,
Line 583: Line 585:
TestMap.addLayer(factory: canvas.SymbolLayer, type_arg: type.name, visible: type.vis, priority: type.zindex,style:style_vor);
TestMap.addLayer(factory: canvas.SymbolLayer, type_arg: type.name, visible: type.vis, priority: type.zindex,style:style_vor);


### See ...fgdata/Nasal/canvas/map/APT.symbol  ...fgdata/Nasal/canvas/map/VOR.style ... for the style variables that can be configured.
### See $FG_ROOT/Nasal/canvas/map/APT and $FG_ROOT/Nasal/canvas/map/VOR.sy,bolfor the style variables that can be configured.


</syntaxhighlight>
</syntaxhighlight>

Navigation menu