I'm starting to look at the impact of modifying rendering in singleTile layers to not clear the existing tile until the new tile arrives. As I try to grok the code related to this, I'm running into a couple of things I think are unnecessary. My understanding of the code is still perhaps too limited to understand if the following are extraneous or not, but I thought I would throw it out there and see if others can explain why they are necessary:
At the end of initSingleTile in Grid.js, there is a call to: this.removeExcessTiles(1,1); This seems unnecessary to me as several lines before, this.grid is set to an empty array and exactly one new tile is added to it. It does not seem to me that this.grid can contain any more than one tile at the point removeExcessTiles is called and therefore this is pure overhead (not much, I grant). In Tile.js moveTo, this.clear() is called prior to calling this.draw (), which also calls this.clear(). It seems calling this.clear in moveTo is unnecessary. This is not quite true because there is a code path involving the redraw variable where this.draw() is not called and so the clear would need to be done in the alternate path. Of course, if you are moving a layer and not redrawing it, should you clear it? Discussion invited :) Cheers Paul +-----------------------------------------------------------------+ |Paul Spencer [EMAIL PROTECTED] | +-----------------------------------------------------------------+ |Chief Technology Officer | |DM Solutions Group Inc http://www.dmsolutions.ca/ | +-----------------------------------------------------------------+ _______________________________________________ Dev mailing list [email protected] http://openlayers.org/mailman/listinfo/dev
