[OpenLayers-Trac] Re: [OpenLayers] #3061: Investigate, and if possible implement more efficient tile positioning

OpenLayers trac-20090302 at openlayers.org
Sun Jul 3 17:19:12 EDT 2011

#3061: Investigate, and if possible implement more efficient tile positioning
  Reporter:  ahocevar  |       Owner:              
      Type:  task      |      Status:  reopened    
  Priority:  minor     |   Milestone:  2.12 Release
 Component:  Layer     |     Version:  2.10        
Resolution:            |    Keywords:  mobile      
     State:  Review    |  
Changes (by ahocevar):

  * state:  Needs More Work => Review


 [attachment:openlayers-3061.2.patch] adds many improvements and
 simplifications related to tile positioning and tile handling in general:
  * The size of the map's layerContainerDiv is now 100x100 pixels. By
 changing the size, the scale of all layers will be changed. Each layer's
 div has a size of 100%. By changing this value, the scale of an indivitual
 layer can be changed. This allows for both animated zooming and layers
 displayed at resolutions that are not available on the server.
  * The only downside of the new percentage based positioning is that IE6
 needs a reflow after a tile is rendered to actually show it. This may
 cause some flicker while dragging.
  * Tiles don't need a clone method any more, because backBuffer tiles are
 not separate Tile instances any more. Instead, we have a new
 Tile.ImageMixin mixin, which provides backBuffer functionality and other
 things that are needed for image based tiles (i.e. currently Tile.Image
 and Tile.Google).
  * Tile.Image.imgDiv is renamed to Tile.Image.image, because it is
 actually the image element - even if the IE6 alpha hack is applied.
  * Layer subclasses don't need a setOpacity method any more, because the
 opacity can be set on the layer's div, instead of setting it on each tile
 or marker.
  * Error handling of loading images is no longer handled in Util.js, and
 no viewRequestID is required any more.
  * Both Tile.Image and Tile.Image.IFrame are more compact now, using less
  * Tile.Google has now proper loadstart/loadend handling, and supports the
 resize transition effect. The workaround for the hybrid layer is also not
 needed any more.
  * The lag when dragging layers on mobile devices was caused by a reflow
 after a tile image was loaded. This reflow is not needed any more, so the
 tileLoadingDelay on the Grid layer has now a default of 0ms instead of

 All tests pass in Safari5, Firefox4, IE6 and IE8. All examples work in
 these browsers as well. Thanks for any review. If there is interest and it
 makes reviewing easier, I can set up a sandbox with this patch.

Ticket URL: <http://trac.openlayers.org/ticket/3061#comment:9>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer

More information about the Trac mailing list