Canvas snippets: Difference between revisions

Jump to navigation Jump to search
m
→‎Adding a MapStructure map to a Canvas: placeholder for questions raised by www2
m (→‎Adding a MapStructure map to a Canvas: placeholder for questions raised by www2)
Line 429: Line 429:
foreach(var type; [r('APT'), r('VOR') ] )
foreach(var type; [r('APT'), r('VOR') ] )
  TestMap.addLayer(factory: canvas.SymbolLayer, type_arg: type.name, visible: type.vis, priority: type.zindex,);
  TestMap.addLayer(factory: canvas.SymbolLayer, type_arg: type.name, visible: type.vis, priority: type.zindex,);
</syntaxhighlight>
|}
== Customizing MapStructure Styling  ==
{{WIP}}
{| class="wikitable"
|-
! Screenshot !! Code
|-
| [[File:Snippets-canvas-mapstructure-dialog.png|thumb|[[MapStructure]] layers shown in a Canvas GUI dialog]]
| {{Note|This assumes that you already have a top-level root group set up, and named it '''root''', just change this variable if you want it to be rendered elsewhere. Equally, this snippet assumes that your canvas is named '''myCanvas'''.}}
<syntaxhighlight lang="nasal" enclose="div">
</syntaxhighlight>
</syntaxhighlight>


Navigation menu