OpenLayers OpenLayers

Ticket #1552 (closed bug: fixed)

Opened 7 months ago

Last modified 6 months ago

Misalignment of TMS overlays due to incorrect use of MaxExtent

Reported by: kleptog Assigned to: euzuro
Priority: minor Milestone: 2.7 Release
Component: Layer.Grid Version: 2.6
Keywords: Cc:
State: Complete

Description

In Layer.Grid.initGriddedTiles there is a line:

var extent = this.map.getMaxExtent();

I run a map where not all the layers have the same extent, and in particular the overlays won't have the same extent as the base map. So the above line causes the grid to be misaligned in those cases. Replacing this line with:

var extent = this.maxExtent;

makes everything work perfectly as expected. Now, I call this a bug but maybe there's a problem with this fix? There is also another use of this.map.getMaxExtent() which may also be wrong.

Attachments

gridfix.patch (0.9 kB) - added by kleptog on 05/19/08 02:49:11.

Change History

05/19/08 02:49:11 changed by kleptog

  • attachment gridfix.patch added.

05/31/08 12:56:41 changed by crschmidt

  • status changed from new to closed.
  • state changed from Review to Complete.
  • resolution set to fixed.

(In [7298]) Use the maxExtent of the layer in Grid layers instead of the maxExtent of the map (since the two can differ). Patch from kleptog. (Closes #1552)