[OpenLayers-Dev] Minor fix for Grid layer

Martijn van Oosterhout kleptog at gmail.com
Sun May 18 16:39:12 EDT 2008


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. Thoughts?

Have a nice day,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/



More information about the Dev mailing list