[OpenLayers-Trac] [OpenLayers] #1417: resizing the map quickly messes up tile load events (singleTile)
OpenLayers
trac at openlayers.org
Wed Mar 12 07:43:47 EDT 2008
#1417: resizing the map quickly messes up tile load events (singleTile)
-------------------------+--------------------------------------------------
Reporter: bartvde | Owner: euzuro
Type: bug | Status: reopened
Priority: minor | Milestone: 2.6 Release
Component: Layer.Grid | Version: 2.5
Resolution: | Keywords:
State: Review |
-------------------------+--------------------------------------------------
Changes (by crschmidt):
* state: Needs More Work => Review
Comment:
Okay. Destroy is too late, so we add an 'unload' method to the tile.
Anyone wanting to get events when a tile is about to be destroyed if it is
still loading has the requirement of calling tile.unload() on the tile:
This will cause the tile to report an 'unload' event if it is still
loading at the time the method is called. The layer should register for an
unload event, and use that to decrement the count. (This also fixes
another bug in the previous patch, which was that you could get a
numTilesLoading of -1.) Also, unregister our events. (Which is what made
me think it was working before, cause I wasn't cleaning up after myself.)
Also, do it for the WFS layer too, since it suffers the same problem.
I've confirmed that when I resize the map with a single untiled layer, I'm
getting load start/end events that match up one to one. Bart, please try
this one when you get a chance.
--
Ticket URL: <http://trac.openlayers.org/ticket/1417#comment:16>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list