OpenLayers OpenLayers

Ticket #496 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

mergeNewParams function in WMS.js and Grid.js are not correct

Reported by: openlayers Assigned to:
Priority: major Milestone: 2.4 Release
Component: Layer.WMS Version:
Keywords: Cc:
State:

Description

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
crschmidt: So, in HTTP Request, there *is* no _initTiles
crschmidt: because there is no grid
crschmidt: Instead, there should be a different mergeNewParams() in Grid.js
crschmidt: which should just be
crschmidt: [[[
crschmidt:
OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,newArguments);
crschmidt: if (this.map != null) {
crschmidt: this._initTiles(); }
crschmidt: ]]]
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.

Attachments

KaMap_mergeNewParams.patch (1.4 kB) - added by bwoodall on 02/17/07 01:48:48.
Moves initTile to Grid.mergeNewParams for WMS & KaMap

Change History

02/06/07 17:13:30 changed by openlayers

  • type changed from feature to bug.

02/17/07 01:48:48 changed by bwoodall

  • attachment KaMap_mergeNewParams.patch added.

Moves initTile to Grid.mergeNewParams for WMS & KaMap

02/17/07 01:50:04 changed by bwoodall

  • keywords changed from mergeNewParams to review.

02/17/07 10:01:41 changed by crschmidt

  • keywords deleted.
  • milestone set to 2.4 Release.

Yep, this looks good. Applied to trunk, this will be included in 2.4.

Applied in r2237: note that this commit includes tests that are not included in this patch.

02/17/07 10:01:53 changed by crschmidt

  • status changed from new to closed.
  • resolution set to fixed.