From: Edwin C. <com...@gm...> - 2009-03-31 19:25:21
|
Hi all, Yesterday I committed changes to the codebase in which I renamed Params objects to Options objects. I partially want to revert that and will commit that tomorrow. Eventually I would like to drop the Options class, as it is not conceptually a parent class for XxxOption clases, see below. Looking at the OpenLayers (OL) API I see that I was a bit to quick, at least for the WMS layer. The constructor for WMS is defined to have the parameters: name, url, params, and options. (see: http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Layer/WMS-js.html ) For a Google layer the constructor is defined to have the parameters: name, options (see: http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Layer/Google-js.html ) Thinking about things a little bit more I would like to suggest the following naming scheme: XxxOptions - for arguments that are defined as options in OL API XxxParams - for arguments that are defined as params in OL API Another thought I had is that ControlOptions, LayerOptions, and MapOptions all extend Options, but in fact these Options classes conceptually do not share a parent class (except that they are all javascript objects). Therefore, I would like to go further and remove Options from GWT-OL completely and let ControlOptions, LayerOptions and MapOptions all extend JSObjectWrapper directly. Options for specific Layer classes (WMS, Image) do share the parent LayerOptions (unlike WMSParams, which can also be a JSObjectWrapper), just as options for specific Format classes share the parent FormatOptions, etc. Greetings, Edwin |