[OpenLayers-Trac] Re: [OpenLayers] #3419: Tile simplifications and
partial rewrite
OpenLayers
trac-20090302 at openlayers.org
Tue Aug 9 17:26:31 EDT 2011
#3419: Tile simplifications and partial rewrite
----------------------+-----------------------------------------------------
Reporter: ahocevar | Owner: ahocevar
Type: feature | Status: new
Priority: minor | Milestone: 2.12 Release
Component: Tile | Version: 2.10
Keywords: | State: Review
----------------------+-----------------------------------------------------
Changes (by ahocevar):
* state: Needs More Work => Review
Comment:
I was able to fix this issue. It occurred when a tile was newly created.
The updateBackBuffer method is called on the tile's beforedraw event. At
this point, isLoading is not yet true, but the tile is not appended to the
DOM yet. So the fix (attached as patch to #2897, sorry for that, but the
code is easier to read there) is to add another check in the
updateBackBuffers initial if statement:
{{{
var noParent = tile.parentNode !== this.layer.div, // this is new
needBuffer = ratio != 1 && this.backBufferMode == 1,
haveImage = tile &&
(this.frameless ? tile.src : tile.childNodes.length),
backBufferUnavailable = !data || !data.tile && this.isLoading;
if (noParent || needBuffer || !haveImage || backBufferUnavailable)
{
//...
}}}
Instead of updating this patch as well, I'd kindly ask to review this with
the latest patch for #2897 applied as well.
--
Ticket URL: <http://trac.openlayers.org/ticket/3419#comment:15>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list