There's a difference in OpenLayers between params and options, which
is pretty confusing if you ask me. I'm not really sure which is which
and often end up trying to set an option first in the params object
and then in the options object when initializing a Layer, just to see
where it has an effect.

The code I have for the layer is pretty simple:

    OpenLayers.Layers.MyLayer = OpenLayers.Class(OpenLayers.Layer.TMS, {
        initialize: function(name, url, params, options) {
            OpenLayers.Layer.TMS.prototype.initialize.apply(this,
[name, url, params, options]);
        },

        getURL: function(bounds) {
            return
'http://example.com/some/url/based/on/bounds/parameter/that/works/for/your/server';
        },

        CLASS_NAME: 'OpenLayers.Layers.MyLayer'
    };

Hope this helps,

Joost

On 18 March 2011 17:46, Marco Scheuble <[email protected]> wrote:
> Hi Joost,
>
> thanks for your answer. So I will try the same.
> But I have some problems:
> http://osgeo-org.1803224.n2.nabble.com/Implementing-new-Class-tp6181195p6181195.html
> , so maybe you could post your code?
>
> cheers, Marco
>
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/Layer-HTTPRequest-tp6172617p6185261.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to