[OpenLayers-Dev] tiles outside bbox

Christopher Schmidt crschmidt at metacarta.com
Tue Feb 6 00:27:01 EST 2007


So, in working with bwoodall on testing the
tiles-showing-up-in-wrong-places thing, I put together:

  http://openlayers.org/dev/tests/grid_inittiles.html

This has helped me get my head in order with some testing to see what's
actually wrong.

So, what happens is:

 * Zoom Level 1 is selected. Tiles start to load.
 * Zoom Level 0 is selected. The grid code goes through, and to each
   tile: 
     * sets display=none
     * Checks whether to draw it
     * if not, just exits, leaving the 'drawn' flag on the tile set ot
       false

The problem here is that setting the display=none won't have the correct
affect, because as soon as the (not yet loaded) image finishes loading,
the onImageLoad will unset the display="none", making the incorrectly
positioned image visible again.

If I could trust garbage collection, I'd just make a link from the image
to the tile so it could check whether drawn was true or false. But I
don't trust garbage collection.

So I'm thinking that the image object should have its own 'drawn'
property, updated in Tile.Image:clear and Tile.Image:draw.

Thoughts?

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list