[OpenLayers-Users] Re: Layer.HTTPRequest
Joost Molenaar
j.j.molenaar at gmail.com
Mon Mar 21 04:51:14 EDT 2011
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 <mail at marco-scheuble.de> 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
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
More information about the Users
mailing list