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

myOpenLayersUName joanne.mcgraw at SYMPATICO.CA
Wed Oct 13 17:36:27 EDT 2010


Ah, I'm glad you responded Andreas because I misunderstood the previous
posts.

Both posts that suggested that approach included statements such as "This
should be done AFTER you instantiate all your layers" or "(assuming that WMS
instances are created)". I understood those statements to mean that this
line of code would only work on those layers that were instantiated before I
inserted that line. And, since a user can use our application to instantiate
and add another WMS layer to the map at any time, I didn't see how that was
going to help me any. What was suggested sounded like the same problem I
described originally...where I thought I was changing the prototype's buffer
(which is what they were essentially telling me to do) but it wasn't getting
used in the Grid's initialize method when the code was actually trying to
initialize a WMS layer.

I'm guessing then those statements actually meant that I should add that
line after the prototype for the class in question is loaded...not that I
have to wait until all the layers that will use that prototype have actually
been instantiated (which I can't do).

Anyway, for anyone else who comes across this thread, the suggestions are
correct. If you add the suggested line after the applicable prototypes have
been created, the prototype's "default" buffer is changed globally and used
when a WMS is instantiated.

Thanks again!
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Reduce-OpenLayers-Layer-Grid-s-buffer-throughout-tp5609405p5632793.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list