[OpenLayers-Trac] [OpenLayers] #496: mergeNewParams function in WMS.js and Grid.js are not correct
OpenLayers
trac at openlayers.org
Tue Feb 6 15:36:54 EST 2007
#496: mergeNewParams function in WMS.js and Grid.js are not correct
----------------------------+-----------------------------------------------
Reporter: openlayers | Owner:
Type: feature | Status: new
Priority: major | Milestone:
Component: Layer.WMS | Version:
Keywords: mergeNewParams |
----------------------------+-----------------------------------------------
Calling mergeNewParams on a WMS layer resets the tile image srcs fine.
However, doing the same on a Kamap layer does not. This is because there
is a mergeNewParams in WMS.js that calls this._initTiles(). However,
Kamap.js does not have its own mergeNewParams function and uses the one in
HTTPRequest.js. This version of the function does not call
this._initTiles() because there is no grid here.
After discussing this with crschmidt in the #openlayers IRC channel, he
determined that this should be fixed like so:
crschmidt: That's a bug[[BR]]
crschmidt: So, in HTTP Request, there *is* no _initTiles[[BR]]
crschmidt: because there is no grid[[BR]]
crschmidt: Instead, there should be a different mergeNewParams() in
Grid.js[[BR]]
crschmidt: which should just be[[BR]]
crschmidt: [[[[[BR]]
crschmidt:[[BR]]
OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,newArguments);[[BR]]
crschmidt: if (this.map != null) {[[BR]]
crschmidt: this._initTiles(); }[[BR]]
crschmidt: ]]][[BR]]
crschmidt: and then the Layer.WMS mergeNewParams should not have the last
line in it
This will allow the Kamap layer to re-init its tiles after calling this
function. Currently a Kamap layer can not use the mergeNewParams function
to reset/redraw its tiles.[[BR]]
--
Ticket URL: <http://trac.openlayers.org/ticket/496>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list