Canvas Map API: Difference between revisions

Jump to navigation Jump to search
Line 142: Line 142:


The layer is registered at the end of the file using the "register_layer" call and passing a symbolic/lookup name, and the name of the hash that implements the layer.
The layer is registered at the end of the file using the "register_layer" call and passing a symbolic/lookup name, and the name of the hash that implements the layer.
Finally, to actually load the new layer, you'll want to edit your XML dialog file and add it to your XML file. For example, this is how the navaids layer is enabled:
<syntaxhighlight lang="xml">
<layer>
                <name>navaids</name>
                <init-property>selected-airport/id</init-property>
                <property>display-navaids</property>
                <description>Show Navaids</description>
                <default>enabled</default>
</layer>
</syntaxhighlight>

Navigation menu