the mergeNewParams function does not reinitialize the tiles for layers

other than WMS. It should do this for any Grid layer. Ticket #496 includes
a patch for this: it adds a mergeNewParams call at the Layer.Grid level,
(subclassing Layer.HTTPRequest) which reinits the tile grid. This commit
also includes tests for this functionality. Since testing directly
on the Grid layer doesn't work (it's meant to be subclassed), we need to 
instead pick a second layer to test -- in this case, ka-Map. Thanks to
Bill Woodall for the patch.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2237 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-02-17 15:00:05 +00:00
parent 795d6b4d20
commit 499c8db92a
4 changed files with 46 additions and 5 deletions

View File

@@ -351,6 +351,20 @@ OpenLayers.Layer.Grid.prototype =
// Should be implemented by subclasses
},
/**
* Once params have been changed, we will need to re-init our tiles
*
* @param {Object} newParams Hashtable of new params to use
*/
mergeNewParams:function(newArguments) {
OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,
[newArguments]);
if (this.map != null) {
this._initTiles();
}
},
/** go through and remove all tiles from the grid, calling
* destroy() on each of them to kill circular references