Other widgets

More than one view of the same model can also be included. In the configuration for this page, we add in legend and cursor tracking widgets. The legend renders the same context document as the map, except that the layers are output as a text listing with a checkbox for toggling the visibility of each layer. The cursor tracking widget displays the latitude and longitude of the mouse when the cursor is over the map. Note also that this page is laid out using a table rather than a DIV but the widgets are still associated with the HTML elements using the ID attribute.

The HTML for these widgets is also generated by an XSL stylesheet applied to the context document. The default mapbuilder legend is shown here, however custom stylesheets can be used by adding a <stylesheet> property to widgets in the configuration file. This property would reference a stylesheet installed on your server.

The config document itself is considered a model that may have it's own widgets and tools. Here the config document has Button widgets for controlling the application. Widgets can be configured to act on any particular model through the <targetModel> property.

previous    next