[OpenLayers-Dev] Re: Reduce OpenLayers.Layer.Grid's buffer throughout

Andreas Hocevar ahocevar at opengeo.org
Wed Oct 13 16:31:38 EDT 2010


Hi,

I don't know what the problem is. It is so simple to achieve what you want.

I assume you want to change the default buffer from 2 to 1. Just do as others have suggested already:

OpenLayers.Layer.WMS.prototype.buffer = 1;

This can be done anywhere in your code, preferably in a script tag right after the script tag that references OpenLayers.js. It will affect all layers, except those where a different buffer is set upon instantiation. 

Regards,
Andreas.

On Oct 13, 2010, at 21:31 , myOpenLayersUName wrote:

> 
> Thank you for your responses. Unfortunately, the suggestions are the type of
> thing I was trying to avoid.
> 
> There are a number of existing and planned ways that users of our
> web-mapping application can add new WMS layers to the map after it has been
> initialized. I was hoping to set the map's buffer value in one place so it
> would be used by any of our developers creating code that adds a WMS in
> future rather than depending on them to either do as suggested or remember
> to pass the {buffer: 1} parameter everywhere it is necessary.
> 
> Oh well, I guess not. I'll just update all the new WMS instantiations with
> the {buffer:1} option and hope that anyone else adding new functionality
> will use them as references.
> 
> Cheers,
> jtm
> -- 
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Reduce-OpenLayers-Layer-Grid-s-buffer-throughout-tp5609405p5632379.html
> Sent from the OpenLayers Dev mailing list archive at Nabble.com.
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Dev mailing list