Hi,

it probably would be nice to have ExtJS-like possibility to initialize objects (I would start with layers).

Now, you *have* to create instance of OpenLayers.Layer and than the object can be added to map

map.addLayer(new OpenLayers.Layer.WMS(name,url, params, options));

What do you think about a option, that you would have to submit object-like definition only:

map addLayer({
        CLASS_NAME: "OpenLayers.Layer.WMS",
        name: "my name",
        params: {
                        layers: "0",
                        version: "1.3.0"
                },
        options: {
                        isBaseLayer: false
                }
        });

It should not be too complicated to put such method in OpenLayers.Map object.

What do you think, shall I write some proposal-patch, or do all agree, that it is not needed at all?

Jachym
_______________________________________________
Dev mailing list
d...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-dev

Reply via email to