Other models

A Web Map Context document is just one type of model supported. The configuration for this page demonstrates the mapbuilder implementation for Context Collections. This is an XML document which contains a list of context document URLs and a title.

The widget for a context Collection is a text listing of the map titles to be selected and is also generated by an XSL stylesheet. Other widgets could defined to support a dynamic menu system for example.

In this case, the tools of the model are simply HTML links which execute a JavaScript method. Note how the context model is set as the target of the action using the <tagetModelId> property in the CollectionList widget. The links call the JavaScript config[targetModelId].loadModel(modelUrl) method.

The MVC design pattern allows other document types to be supported very easily. Please see the mapbuilder-lib Software Design Description for details on how to extend the code base. This is an open source project so contributions from other developers are encouraged.

previous