The Catalog demo in Mapbuilder allows you to search a catalog, add layers onto a map and arrange the layers in the resultant Context document.
This tutorial explains how the model and widgets for the catalog demo work, and how to add a new data source to search. Eg: querying and processing a WMS GetCapabilities request.
- A form is created for user to enter Catalog query information: widget/CatalogSearchForm.xsl or CatalogSearchForm.paint()
- A user populates a form with query information.
- The widget builds a query for the Catalog: widget/CatalogSearchForm.doSelect()
- The Catalog is queried and XML results put into a Response model.
- The widget converts the ResponseXML to OWS Context format as a ResponseContext: widget/CatalogSearchForm.handleResponse() calls tool/xsl/ebrim2Context.xsl
- The user can then copy layers from the Response Context into the MainMap Context.
Files to create or update
Create yourself a new widget, which you can base upon widget/CatalogSearchForm. Eg WmsGetCapabilities.
Stylesheet to convert to OWS Context
You need to convert the response to an OWS Context. See tool/xsl/ebrim2Context.xsl
Update the examples/catalog/ files: